[asterisk-users] Quad Card PRI, Disable Unused Ports or Manage Channels. How?

Pete ps1 at gmx.us
Fri Feb 5 07:38:36 CST 2010


Hi there,

I have an AsteriskNow setup (1.5.0 64 bit with all the latest updates 
downloaded) which I am trying to connect up to our Telco using an E1 
connection and a quad port card.  Sorry in advance for being a bit of a 
newbie.

Everything is working great except that I can not make outgoing calls 
through the card.  I get a recorded message saying "all circuits are 
busy now".  Incoming is fine on the PRI line and I have a SIP trunk that 
works incoming and outgoing no problem.

If I disconnect the cable, the trunk shows as status red, if I connect 
the cable, the status is OK.

I have looked and looked and I think it is trying to make the outgoing 
calls through one of the ports that is not in use?  I've put a log at 
the bottom of this email.

I can think of two ways to fix the problem and either will do for me, 
though other suggested solutions will be taken very seriously :)


Plan A) Force asterisk to use only the channels that are connected up 
(my preferred option).

Now I thought I had a handle on this, but it didn't work.  If I assign a 
group of 1 to the first span (and 2,3,4 to the others), create a trunk 
in FreePBX assigned to ZAP/g1 (and g2,g3,g4 disabled to the others) and 
modify the default "9_outside" outbound route that calls through that 
trunk, I thought it would work.  But I got the same voice message.  I am 
obviously missing something.  Apologies if this is a newbie thing, I am 
totally swamped with different documentation and advice, I think 
Asterisk is a bit of a victim of it's own success and there just so much 
info out there that you can (and I have) spend days looking for answers 
to problems.  I suspect I've just missed the elusive post that has the 
answer...

Issuing the command
module reload chan_dahdi.so

It shows: -
     -- Reconfigured channel 1, ISDN PRI signalling
down to channel 127 (from memory)

dahdi show channels

shows
    Chan Extension  Context         Language   MOH Interpret
  pseudo            default                    default
       1            from-pstn       en         default
       2            from-pstn       en         default

To channel 127.  I connect the cable to the telco but I still get the 
message "all circuits are busy now" when I try and call out.


chan_dahdi.conf
------------------------------------------------
[channels]
language=en
callwaiting=no
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
immediate=no
signaling=pri_cpe
switchtype=euroisdn
echocancel=yes
hidecallerid=yes
restrictcid=yes
rxgain=0.0
txgain=0.0
immediate=no

; include dahdi extensions defined in FreePBX
; chan_dahdi_additional.conf is empty
#include chan_dahdi_additional.conf
#include dahdi-channels.conf
------------------------------------------------

dahdi-channels.conf (all enabled)
------------------------------------------------
; Autogenerated by /usr/sbin/dahdi_genconf on Tue Feb  2 12:26:07 2010 
-- do not hand edit
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is 
intended
; to be #include-d by /etc/asterisk/chan_dahdi.conf that will include 
the global settings
;

; Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" (MASTER)
; group=0,11
group=1
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
rxgain=2
txgain=3
channel => 1-15,17-31
context = default
group = 63

; Span 2: TE4/0/2 "T4XXP (PCI) Card 0 Span 2"
; group=0,12
group=2
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 32-46,48-62
context = default
group = 63

; Span 3: TE4/0/3 "T4XXP (PCI) Card 0 Span 3"
; group=0,13
group=3
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 63-77,79-93
context = default
group = 63

; Span 4: TE4/0/4 "T4XXP (PCI) Card 0 Span 4"
; group=4
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 94-108,110-124
context = default
group = 63
------------------------------------------------


/etc/dahdi/system.conf
------------------------------------------------
# Autogenerated by /usr/sbin/dahdi_genconf on Tue Feb  2 12:26:07 2010 
-- do not hand edit
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" (MASTER)
span=1,1,0,ccs,hdb3,crc4
# termtype: te
bchan=1-15,17-31
dchan=16
echocanceller=mg2,1-15,17-31

# Span 2: TE4/0/2 "T4XXP (PCI) Card 0 Span 2"
span=2,0,0,ccs,hdb3,crc4
# termtype: te
bchan=32-46,48-62
dchan=47
echocanceller=mg2,32-46,48-62

# Span 3: TE4/0/3 "T4XXP (PCI) Card 0 Span 3"
span=3,0,0,ccs,hdb3,crc4
# termtype: te
bchan=63-77,79-93
dchan=78
echocanceller=mg2,63-77,79-93

# Span 4: TE4/0/4 "T4XXP (PCI) Card 0 Span 4"
span=4,0,0,ccs,hdb3,crc4
# termtype: te
bchan=94-108,110-124
dchan=109
echocanceller=mg2,94-108,110-124

# Global data

loadzone        = uk
defaultzone     = uk
------------------------------------------------

Plan B) Disable the unused ports.

If I edit Dahdi-channels.conf (see below) and comment out the last three 
spans, reboot, issue a: -

module reload chan_dahdi.so

It shows: -
     -- Reconfigured channel 1, ISDN PRI signalling
down to channel 31

dahdi show channels

shows
    Chan Extension  Context         Language   MOH Interpret
  pseudo            default                    default
       1            from-pstn       en         default
       2            from-pstn       en         default

Also to channel 31.  I connect the cable to the telco but I still get 
the message "all circuits are busy now" when I try and call out.


dahdi-channels.conf (with span 2,3,4 disabled - I think)
------------------------------------------------
; Autogenerated by /usr/sbin/dahdi_genconf on Tue Feb  2 12:26:07 2010 
-- do not hand edit
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is 
intended
; to be #include-d by /etc/asterisk/chan_dahdi.conf that will include 
the global settings
;

; Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" (MASTER)
; group=0,11
group=1
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
rxgain=2
txgain=3
channel => 1-15,17-31
context = default
group = 63

; Span 2: TE4/0/2 "T4XXP (PCI) Card 0 Span 2"
; group=0,12
;group=2
;context=from-pstn
;switchtype = euroisdn
;signalling = pri_cpe
;channel => 32-46,48-62
;context = default
;group = 63

; Span 3: TE4/0/3 "T4XXP (PCI) Card 0 Span 3"
; group=0,13
;group=3
;context=from-pstn
;switchtype = euroisdn
;signalling = pri_cpe
;channel => 63-77,79-93
;context = default
;group = 63

; Span 4: TE4/0/4 "T4XXP (PCI) Card 0 Span 4"
; group=4
;context=from-pstn
;switchtype = euroisdn
;signalling = pri_cpe
;channel => 94-108,110-124
;context = default
;group = 63
------------------------------------------------

I know this is most likely just me not understanding something basic, so 
thanks in advance for pointing out my mistake :)

Regards,
Pete

Log while trying to call: -
   == Primary D-Channel on span 1 up
     -- B-channel 0/1 successfully restarted on span 1
     -- B-channel 0/2 successfully restarted on span 1
     -- B-channel 0/3 successfully restarted on span 1
     -- B-channel 0/4 successfully restarted on span 1
     -- B-channel 0/5 successfully restarted on span 1
     -- B-channel 0/6 successfully restarted on span 1
     -- B-channel 0/7 successfully restarted on span 1
     -- B-channel 0/8 successfully restarted on span 1
     -- B-channel 0/9 successfully restarted on span 1
     -- B-channel 0/10 successfully restarted on span 1
     -- B-channel 0/11 successfully restarted on span 1
     -- B-channel 0/12 successfully restarted on span 1
     -- B-channel 0/13 successfully restarted on span 1
     -- B-channel 0/14 successfully restarted on span 1
     -- B-channel 0/15 successfully restarted on span 1
     -- B-channel 0/17 successfully restarted on span 1
     -- B-channel 0/18 successfully restarted on span 1
     -- B-channel 0/19 successfully restarted on span 1
     -- B-channel 0/20 successfully restarted on span 1
     -- B-channel 0/21 successfully restarted on span 1
     -- B-channel 0/22 successfully restarted on span 1
     -- B-channel 0/23 successfully restarted on span 1
     -- B-channel 0/24 successfully restarted on span 1
     -- B-channel 0/25 successfully restarted on span 1
     -- B-channel 0/26 successfully restarted on span 1
     -- B-channel 0/27 successfully restarted on span 1
     -- B-channel 0/28 successfully restarted on span 1
     -- B-channel 0/29 successfully restarted on span 1
     -- B-channel 0/30 successfully restarted on span 1
     -- B-channel 0/31 successfully restarted on span 1
     -- Executing [9150 at from-internal:1] Macro("SIP/105-0f643cf0", 
"user-callerid|SKIPTTL|") in new stack
     -- Executing [s at macro-user-callerid:1] Set("SIP/105-0f643cf0", 
"AMPUSER=105") in new stack
     -- Executing [s at macro-user-callerid:2] GotoIf("SIP/105-0f643cf0", 
"0?report") in new stack
     -- Executing [s at macro-user-callerid:3] ExecIf("SIP/105-0f643cf0", 
"1|Set|REALCALLERIDNUM=105") in new stack
     -- Executing [s at macro-user-callerid:4] Set("SIP/105-0f643cf0", 
"AMPUSER=105") in new stack
     -- Executing [s at macro-user-callerid:5] Set("SIP/105-0f643cf0", 
"AMPUSERCIDNAME=Pete Siviter") in new stack
     -- Executing [s at macro-user-callerid:6] GotoIf("SIP/105-0f643cf0", 
"0?report") in new stack
     -- Executing [s at macro-user-callerid:7] Set("SIP/105-0f643cf0", 
"AMPUSERCID=105") in new stack
     -- Executing [s at macro-user-callerid:8] Set("SIP/105-0f643cf0", 
"CALLERID(all)="Pete Siviter" <105>") in new stack
     -- Executing [s at macro-user-callerid:9] GotoIf("SIP/105-0f643cf0", 
"1?continue") in new stack
     -- Goto (macro-user-callerid,s,18)
     -- Executing [s at macro-user-callerid:18] NoOp("SIP/105-0f643cf0", 
"Using CallerID "Pete Siviter" <105>") in new stack
     -- Executing [9150 at from-internal:2] Set("SIP/105-0f643cf0", 
"_NODEST=") in new stack
     -- Executing [9150 at from-internal:3] Macro("SIP/105-0f643cf0", 
"record-enable|105|OUT|") in new stack
     -- Executing [s at macro-record-enable:1] GotoIf("SIP/105-0f643cf0", 
"1?check") in new stack
     -- Goto (macro-record-enable,s,4)
     -- Executing [s at macro-record-enable:4] AGI("SIP/105-0f643cf0", 
"recordingcheck|20100205-132202|1265376122.2") in new stack
     -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
   recordingcheck|20100205-132202|1265376122.2: Outbound recording enabled.
   recordingcheck|20100205-132202|1265376122.2: 
CALLFILENAME=OUT105-20100205-132202-1265376122.2
     -- AGI Script recordingcheck completed, returning 0
     -- Executing [s at macro-record-enable:999] 
MixMonitor("SIP/105-0f643cf0", 
"OUT105-20100205-132202-1265376122.2.wav||") in new stack
   == Begin MixMonitor Recording SIP/105-0f643cf0
     -- Executing [9150 at from-internal:4] Macro("SIP/105-0f643cf0", 
"dialout-trunk|1|150||") in new stack
     -- Executing [s at macro-dialout-trunk:1] Set("SIP/105-0f643cf0", 
"DIAL_TRUNK=1") in new stack
     -- Executing [s at macro-dialout-trunk:2] GosubIf("SIP/105-0f643cf0", 
"0?sub-pincheck|s|1") in new stack
     -- Executing [s at macro-dialout-trunk:3] GotoIf("SIP/105-0f643cf0", 
"0?disabletrunk|1") in new stack
     -- Executing [s at macro-dialout-trunk:4] Set("SIP/105-0f643cf0", 
"DIAL_NUMBER=150") in new stack
     -- Executing [s at macro-dialout-trunk:5] Set("SIP/105-0f643cf0", 
"DIAL_TRUNK_OPTIONS=tr") in new stack
     -- Executing [s at macro-dialout-trunk:6] Set("SIP/105-0f643cf0", 
"OUTBOUND_GROUP=OUT_1") in new stack
     -- Executing [s at macro-dialout-trunk:7] GotoIf("SIP/105-0f643cf0", 
"1?nomax") in new stack
     -- Goto (macro-dialout-trunk,s,9)
     -- Executing [s at macro-dialout-trunk:9] GotoIf("SIP/105-0f643cf0", 
"0?skipoutcid") in new stack
     -- Executing [s at macro-dialout-trunk:10] Set("SIP/105-0f643cf0", 
"DIAL_TRUNK_OPTIONS=") in new stack
     -- Executing [s at macro-dialout-trunk:11] Macro("SIP/105-0f643cf0", 
"outbound-callerid|1") in new stack
     -- Executing [s at macro-outbound-callerid:1] 
ExecIf("SIP/105-0f643cf0", "0|SetCallerPres|") in new stack
     -- Executing [s at macro-outbound-callerid:2] 
ExecIf("SIP/105-0f643cf0", "0|Set|REALCALLERIDNUM=105") in new stack
     -- Executing [s at macro-outbound-callerid:3] 
GotoIf("SIP/105-0f643cf0", "1?normcid") in new stack
     -- Goto (macro-outbound-callerid,s,6)
     -- Executing [s at macro-outbound-callerid:6] Set("SIP/105-0f643cf0", 
"USEROUTCID=") in new stack
     -- Executing [s at macro-outbound-callerid:7] Set("SIP/105-0f643cf0", 
"EMERGENCYCID=") in new stack
     -- Executing [s at macro-outbound-callerid:8] Set("SIP/105-0f643cf0", 
"TRUNKOUTCID=") in new stack
     -- Executing [s at macro-outbound-callerid:9] 
GotoIf("SIP/105-0f643cf0", "1?trunkcid") in new stack
     -- Goto (macro-outbound-callerid,s,12)
     -- Executing [s at macro-outbound-callerid:12] 
ExecIf("SIP/105-0f643cf0", "0|Set|CALLERID(all)=") in new stack
     -- Executing [s at macro-outbound-callerid:13] 
ExecIf("SIP/105-0f643cf0", "0|Set|CALLERID(all)=") in new stack
     -- Executing [s at macro-outbound-callerid:14] 
ExecIf("SIP/105-0f643cf0", "0|SetCallerPres|prohib_passed_screen") in 
new stack
     -- Executing [s at macro-dialout-trunk:12] ExecIf("SIP/105-0f643cf0", 
"0|AGI|fixlocalprefix") in new stack
     -- Executing [s at macro-dialout-trunk:13] Set("SIP/105-0f643cf0", 
"OUTNUM=150") in new stack
     -- Executing [s at macro-dialout-trunk:14] Set("SIP/105-0f643cf0", 
"custom=DAHDI/g1") in new stack
     -- Executing [s at macro-dialout-trunk:15] ExecIf("SIP/105-0f643cf0", 
"0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)") in new stack
     -- Executing [s at macro-dialout-trunk:16] Macro("SIP/105-0f643cf0", 
"dialout-trunk-predial-hook|") in new stack
     -- Executing [s at macro-dialout-trunk-predial-hook:1] 
MacroExit("SIP/105-0f643cf0", "") in new stack
     -- Executing [s at macro-dialout-trunk:17] GotoIf("SIP/105-0f643cf0", 
"0?bypass|1") in new stack
     -- Executing [s at macro-dialout-trunk:18] GotoIf("SIP/105-0f643cf0", 
"0?customtrunk") in new stack
     -- Executing [s at macro-dialout-trunk:19] Dial("SIP/105-0f643cf0", 
"DAHDI/g1/150|300|") in new stack
     -- Requested transfer capability: 0x00 - SPEECH
     -- Called g1/150
     -- Channel 0/1, span 1 got hangup, cause 44
     -- Forcing restart of channel 0/1 on span 1 since channel reported 
in use
     -- Hungup 'DAHDI/1-1'
   == Everyone is busy/congested at this time (1:0/0/1)
     -- Executing [s at macro-dialout-trunk:20] Goto("SIP/105-0f643cf0", 
"s-CHANUNAVAIL|1") in new stack
     -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
     -- Executing [s-CHANUNAVAIL at macro-dialout-trunk:1] 
GotoIf("SIP/105-0f643cf0", "1?noreport") in new stack
     -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
     -- Executing [s-CHANUNAVAIL at macro-dialout-trunk:3] 
NoOp("SIP/105-0f643cf0", "TRUNK Dial failed due to CHANUNAVAIL 
(hangupcause: 44) - failing through to other trunks") in new stack
     -- Executing [9150 at from-internal:5] Macro("SIP/105-0f643cf0", 
"outisbusy|") in new stack
     -- Executing [s at macro-outisbusy:1] Playback("SIP/105-0f643cf0", 
"all-circuits-busy-now|noanswer") in new stack
     -- <SIP/105-0f643cf0> Playing 'all-circuits-busy-now' (language 'en')
     -- B-channel 0/1 successfully restarted on span 1




More information about the asterisk-users mailing list