TUTORIAL Install AEX800 (Wildcard) using Dahdi on PIAF Purple

Joined
Nov 14, 2008
Messages
1,398
Reaction score
320

Installing an AEX800 (Wildcard) using Dahdi on PIAF Purple (example is with 4 FXO and 4 FXS ports)


With card installed in your PC go ahead and install PIAF Purple


After you’ve completed the install and logged on type the following at the Linux command prompt:


dahdi_genconf –v
dahdi_cfg –v

cp /var/www/html/admin/modules/dahdiconfig/etc/chan_dahdi.conf /etc/asterisk/chan_dahdi.conf.hold


Go into Freepbx and immediately uninstall the Dahdi module that was pre-installed. Do not click on the DAHDI selection in the left hand column. After uninstalling, exit and re-enter Freepbx, DAHDI should be gone from the menu.


Rename file:


mv /etc/asterisk/chan_dahdi.conf.hold /etc/asterisk/chan_dahdi.conf


Edit the following files:


/etc/asterisk/dahdi-channels.conf

delete unneeded blocks that reference fxo_ks extensions like 4001, 4002, 4003 & 4004 as you will establish your own extensions using Freepbx. Leave the lines that reference the fxs_ks ports since these are for your PSTN lines. The fxs_ks lines were created when you ran dahdi_genconf.

Use Freepbx to create your extensions and trunks. The channel numbers in this example will be 1 through 8. Depending on how you installed the FXO – FXS module on the board will determine whether port 1 has dialtone or its port 5 instead. Same for trunks. You can use the dahdi_scan command to see which are which.


At the CLI prompt type:


dahdi restart


or do an amportal stop and then amportal start. FXS and FXO ports should now be working.


Comments:


Dahdi shouldn’t be much more complicated than installing a network card but a lack of short, conceptual documentation and examples is to blame. Even the documentation that comes with the AEX800 card is very limited.


In order for a card like this to function it needs a driver which needs to be compiled into the system. The driver then looks for certain hardware and software configuration info to set up its available services.


The files in /etc/dahdi and /etc/asterisk provide the needed settings. Freepbx adds an element of complexity because instead of everything being in the chan_dahdi.conf file the elements need to be spread among several files because Freepbx rewrites some of the files whenever there is a change. With that in mind chan_dahdi.conf, chan_dahdi.additional.conf and dahdi-channels.conf are needed. They are then tied together with “include” statements which turn them into one virtual file when the main file is read.


I don’t find the DAHDI module to be functional in PIAF Purple and it’s quirky in Silver. It doesn’t seem to be maintained by anyone as the Digium person who wrote it no longer works there. Its presence also creates a different configuration scenario that is not documented involving the database. It would need a much higher level of functionality to be useful.
Part of understanding Dahdi configuration is letting go of the idea that Freepbx is doing a lot of work for you behind the scenes. When it comes to Dahdi its not. Its up to you to get the Dahdi configuration right so Freepbx can utilize it.


What we are doing in the example is generating an appropriate configuration based on the card, copying the abbreviated PIAF chan_dahdi.conf file to a different location and name. We delete the unneeded DAHDI module, rename the file we copied, make some edits, configure ext. and trk. resources and then restart things.

Notes:
1. In the commands above you could just as well use the chan_dahdi.conf.orig file by deleting the existing symlink and renaming it but it’s a longer more confusing version of the same PIAF abbreviated file we have chosen to copy. If you chose that route be sure to rename it AFTER you delete the module or it will be deleted.

2. Editing, copying and renaming can be done through Webmin if you prefer.

3. When it comes to Dahdi if everything looks right and it doesn’t work always try a reboot of the system.

4. For your own benefit do this slowly and follow what is being done, deleted, created and edited.

5. Assuming things are ok in the etc/dahdi directory of files then getting the chan_dahdi and dahdi-channels file(s) correct in /etc/asterisk should be all you need for Purple and future versions and most distros.


Good Luck,
Brian Kelly
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
Bravo excellent! I have stuck this thread.

I have discussed your email with Ward and we are working on it.


Tom
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top