Asterisk – How to Host a PRI Circuit with a Sangoma Card

These are just a few quick notes of mine on how to host a PRI circuit from a Sangoma card in an Asterisk server to another Asterisk server or wherever for that matter.

This config here is for a Sangoma A102 with two ports and Asterisk will provide the clocking source. Channels 1-23 will be the B channels and channel 24 will be the D channel for signaling. Echo cancelling will be enabled as well.
/etc/dahdi/system.conf

#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2015-08-28
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak
loadzone=us
defaultzone=us

#Sangoma A102 port 1 [slot:4 bus:6 span:1] 
span=1,0,0,esf,b8zs
bchan=1-23
echocanceller=mg2,1-23
hardhdlc=24

#Sangoma A102 port 2 [slot:4 bus:6 span:2] 
span=2,2,0,esf,b8zs
bchan=25-47
echocanceller=mg2,25-47
hardhdlc=48

Continue reading “Asterisk – How to Host a PRI Circuit with a Sangoma Card”

Adtran TA924 PRI Conversion – Routing Inbound DIDs to FXS Ports or via a SIP Trunk to Asterisk and Allowing Bi-Directional Communications Between the Two

I have to say, I’ve worked with the Adtran TA924 Gen1 and Gen2 in the past and thought it was a great product then, but here recently I’ve just rediscovered the amazing flexibility of this unit and I am extremely impressed.

I’ve used the TA924 with a SIP trunk from both a Metaswitch and Asterisk before to convert to analog FXS ports and have had great success. It has always been rock solid but even back when the device was still in it’s infancy stages, it had a few limitations. I remember specifically when the unit could only do a PRI into a PBX and that is certainly no longer the case any more. There doesn’t seem to be anything this unit can’t do at this point. <3

At work, we had around 20 plus regular POTS lines through AT&T and were getting massively raped over the past several years (every year our prices have went up and at the time of porting our numbers out, we were looking at $74 dollars per POTS line and not including usage charges. Effing ridiculous. That is why I hate AT&T and refuse to support them, not to mention all their NSA spying garbage.) and I got a great deal on a PRI through our fiber internet provider so I needed a way to sort of peel out some of the channels into fax lines with DIDs and then bring the rest of the lines into my Asterisk server. In comes my old TA924 Gen2, that was collecting dust on a shelf, to the rescue. Continue reading “Adtran TA924 PRI Conversion – Routing Inbound DIDs to FXS Ports or via a SIP Trunk to Asterisk and Allowing Bi-Directional Communications Between the Two”

Asterisk Dialplan Module – stdexten

Very similar to the stock version of standard extension in extensions.conf on Asterisk 11 with some minor customizations to the variables passed to it. Technically, this is not what I’m calling a “module” (which is actually a subroutine), this is just an example of the stdexten context which some may find useful.

In my scenario, under no circumstances would there be any reason to have to change the voicemail context, so the arguments that get passed are: The devices to ring, the timeout period (how long to ring the extension), and the destination voicemail box. If neither of the second and third arguments are passed, then it assumes a timeout period of 25 milliseconds and the extension passed in argument one as the voicemail box.
Continue reading “Asterisk Dialplan Module – stdexten”