DAHDI Trunk channel usage strategies

I have two PRI connections on an A102DE (sangoma). I am constantly getting congestion. I believe this is because the system is trying to use the first available line for incoming and outbound calling. I would like to change the channel strategy so that outbound calls start at the bottom of the channel list (in my case 46). However, I do not know where to change this. Also the PRI card is a Sangoma, so I am using the wanpipe rather than DAHDI (per the install instructions from Sangoma and freepbx support).

Go in to trunks

edit g0

Change it to G0

This will reverse the hunt.

I doubt that that is your problem, in your case you have 46 channels, which indicates to me that you have ISDN PRI rate over T1, (NANP land) in which case the channels used are negociated in the D channel (24), if you are getting congestion check that you do not have a Partial T1 from your provider, if not 23 then adjust in /etc/asterisk/chan_dahdi.conf


channel => 1-n

If you turn on pri debugging you can grep out the channels used for your calls from bash with something like

cat /var/log/asterisk/full|grep -A 20 -E “Channel ID (”|less

That will cut out much extraneous info.

find a failed call and see what channel was used or not used.

(calls that successfully complete can be grepped with

cat /var/log/asterisk/full|grep “Accepting call”|grep span

so examining the channel used can also be deductive)

I have 2 full PRIs. I wrote a small program to monitor the pris (pri show channels) output. I never go over 22 used channels. The second pri show absolutely no traffic.

put the second span in group => 1 channels => 25-47 and use G1 or g1 for outbound calls, the ISDN’s spans need to be arranged in “hunt” by the provider to overflow from span 1 to span 2. Once that is confirmed working then you can use group => 0 channels => 1-23,25-47 for convenience then using g0/G0 can help monitor traffic usage.

I honestly do not know how to split the channels. I used the setup-sangoma to install the card. In the process, it does not give you the option to split the groups.

You mentioned using g0/G0 … is that what I would put in the DAHDi Identifier?

The Sangoma setup writes a new


(and saves the old one), you need to edit that file to suit your needs. A sample
; Span 1: WPT1/1 “wanpipe1 card 1” ESFB8ZS/ RED
switchtype = national
signalling = pri_cpe
channel => 1-23

; Span 4: WPT1/2 “wanpipe2 card 1” ESFB8ZS/ RED
switchtype = national
signalling = pri_cpe
channel => 25-47

Just edit the group to 0 for the second span. and you can use.

Yes, the DAHDI Identifier on a new (or old) trunk, g0, G0, r0 and R0 are all predefined.