Howto Update Dahdi to the latest version

Discussion in 'PIAF 3 Add-Ons' started by blanchae, Feb 10, 2011.

  1. blanchae

    blanchae Guru

    Joined:
    Mar 12, 2008
    Messages:
    1,910
    Likes Received:
    9
    This example is updating dahdi 2.2.1 to dahdi 2.4.0 (which is the latest version at this time). This is based on updating dahdi drivers from a working configured system that dahdi works properly already. This is NOT a howto on updating from zaptel to dahdi. If you are looking at how to update from zaptel to dahdi - look elsewhere!

    Warning: If your system doesn't run using the existing dahdi drivers then you have a configuration issue. Updating the drivers to the latest version will not solve your configuration problem.

    If you are updating the dahdi drivers, this implies that you have a knowledge of how to configure a PBX in a Flash server properly for dahdi and can competently troubleshoot dahdi configuration issues.

    Backup your dahdi configs to the /usr/local/backup directory (just in case!)

    1. Backup all files in /etc/dahdi/

    cd
    mkdir /usr/local/backup
    cp /etc/dahdi/* /usr/local/backup



    2. Backup the following asterisk config files in /etc/asterisk:

    cp /etc/asterisk/chan_dahdi* /usr/local/backup
    cp /etc/asterisk/dahdi* /usr/local/backkup



    3. Stop asterisk and dahdi:

    amportal stop
    service dahdi stop


    4. Download and install dahdi 2.4.0 complete:

    cd /usr/src
    wget http://downloads.asterisk.org/pub/t...eases/dahdi-linux-complete-2.4.0+2.4.0.tar.gz

    (last part should read pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.4.0+2.4.0.tar.gz - forum won't print it correctly)
    tar -zxvf dahdi-linux-complete-2.4.0+2.4.0.tar.gz
    cd dahdi-linux-complete-2.4.0+2.4.0
    make
    make install
    make config


    5. Rename old dahdi version directory to dahdi-old:

    cd /usr/src
    mv dahdi dahdi-old


    6. Create a soft link so /usr/src/dahdi points to version 2.4.0

    ln -s /usr/src/dahdi-linux-complete-2.4.0+2.4.0 /usr/src/dahdi

    7. Start dahdi services:

    service dahdi start

    8. Test that dahdi is running with the new version

    cd <= moves you to root's home directory for testing
    modinfo dahdi will show you the dahdi version loaded
    dahdi_tool should show your dahdi interfaces and Xorcom devices like astribanks.

    9. Start asterisk

    amportal start

    10. Run the status command. It should now show that you are running dahdi 2.4.0+2.4.0

    11. From the asterisk CLI> help dahdi, you should have the dahdi commands show up. If not, you have a configuration issue.

    12. From the asterisk CLI> dahdi show channels, this should show your previous dahdi channel configuration.

    Done :biggrin5: