Page tree
Skip to end of metadata
Go to start of metadata

The following will help you configure a system that contains both a Sangoma card and a Digium card for Asterisk

1. Run the script to configure your Sangoma card (from your Linux command line)
-> wancfg_dahdi 


This command will create /etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf for the Sangoma card

 2. Find out the run-level your system boots in and then open up that file

        -> vi /etc/inittab/        <------ your run level will be indicated after the line "id:"  (i.e. id:3:initdefault)
        -> cd /etc/rc<run-level>.d/   (i.e. cd /etc/rc3.d/)

In here, we need to search for wanrouter and Dahdi, and to make sure that wanrouter starts up before Dahdi. 

 -> ls |grep dahdi     <---- The start order will be indicated by a number following S (i.e. S26dahdi)
 -> ls |grep wanrouter   <---- (i.e. S25wanrouter)

As indicated by the above example, wanrouter does start prior to dahdi, since its number is lower.  If your results indicate the opposite, you can re-configure the start order by re-naming the file and change the numbers around

If your search results do no populate anything for dahdi, that means you do not have a start script for it.  To create the start script, go into the source directory for dahdi and type: make config. Now the start scripts have been created and proceed again with the beginning of this step. 

3. stop Asterisk; stop wanrouter; stop dahdi

-> asterisk -rx "core stop now"
-> wanrouter stop 
 -> /etc/init.d/dahdi stop

4. Now start wanrouter, followed by dahdi

*Note: you will come to a point after "wanrouter start" that throws an error message indicating span configuration problem.  Disregard this message as this is the first span of the digium card, and therefore the Sangoma card does not know how to configure, which leads you to the next step (/etc/dahdi.system.conf)

->  wanrouter start
 -> /etc/init.d/dahdi start

At this stage, we have the Sangoma card loaded first into the dahdi spans by starting wanrouter, and then loaded the Digium card after by starting dahdi .  You can run cat /proc/dahdi/ in between to see that this exact process occurs. Since both cards are loaded as Dahdi spans, they are indistinguishable to dahdi and the above layers of the system

5. Run dahdi_genconf

This command will re-write /etc/dahdi/system.conf and will include both the Sangoma card and the Digium card, since they are all considered just dahdi spans now.  It is important to note that dahd_genconf uses the syntax "dchan=24" to define a D-channel, but the correct syntax for Sangoma hardware is "hardhdlc=24".  Make sure that you make this change before continuing.

6. Re-write chan_dahdi.conf .  All that is needed to be done in this file is to append the Digium card configuration at the end.  Since the Sangoma card was loaded first, the configuration created in here by wancfg_dahdi (in step 1) are correct, and placing the Digium configs after makes sense.

7. Start Asterisk and all the dahdi spans/channels for both cards should load and work

  • No labels