[Asterisk-Users] tdm400p / outbound zap prob

dan at kdhx.org dan at kdhx.org
Wed Aug 10 23:20:04 MST 2005


I'm having trouble getting outbound calls going with aah 1.3 and a tdm400p
w/ 4 FXO.  Incoming calls work fine, outbound I get this:

-- Executing SetVar("SIP/231-af2b", "OUTNUM=6643955") in new stack
    -- Executing Cut("SIP/231-af2b", "custom=OUT_1|:|1") in new stack
    -- Executing GotoIf("SIP/231-af2b", "0?19") in new stack
    -- Executing Dial("SIP/231-af2b", "ZAP/g0/6643955") in new stack
    -- Called g0/6643955
    -- Hungup 'Zap/1-1'
  == No one is available to answer at this time
    -- Executing Goto("SIP/231-af2b", "s-NOANSWER|1") in new stack
    -- Goto (macro-dialout-trunk,s-NOANSWER,1)
    -- Executing NoOp("SIP/231-af2b", "Dial failed due to NOANSWER") in
new stack
    -- Executing Macro("SIP/231-af2b", "outisbusy") in new stack
    -- Executing Playback("SIP/231-af2b",
"allison7/all-circuits-busy-now") in new stack
    -- Playing 'allison7/all-circuits-busy-now' (language 'en')
    -- Executing Playback("SIP/231-af2b", "allison7/pls-try-call-later")
in new stack
    -- Playing 'allison7/pls-try-call-later' (language 'en')

I'm not sure why (not reboot), but sometimes I get something like this:

-- Executing SetVar("SIP/231-7e98", "OUTNUM=6643955") in new stack
    -- Executing Cut("SIP/231-7e98", "custom=OUT_1|:|1") in new stack
    -- Executing GotoIf("SIP/231-7e98", "0?19") in new stack
    -- Executing Dial("SIP/231-7e98", "ZAP/g0/6643955") in new stack
    -- Called g0/6643955
    -- Zap/1-1 answered SIP/231-7e98
    -- Hungup 'Zap/1-1'
  == Spawn extension (macro-dialout-trunk, s, 17) exited non-zero on
'SIP/231-7e98' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 18005069511, 1) exited non-zero on
'SIP/231-7e98'
    -- Executing Macro("SIP/231-7e98", "hangupcall") in new stack
    -- Executing ResetCDR("SIP/231-7e98", "w") in new stack
    -- Executing NoCDR("SIP/231-7e98", "") in new stack
    -- Executing Wait("SIP/231-7e98", "5") in new stack
  == Spawn extension (macro-hangupcall, s, 3) exited non-zero on
'SIP/231-7e98' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/231-7e98'


In this situation I can hear the call going through for a second or two,
sometimes even hear the other end answer before * hangs up the channel. 
I've tried adding a w before ${ARG2} on line exten => s,11 (in
extensions.conf below)  but this has no effect.  Here's some zapata.conf:

[channels]

language=en
context=from-pstn
signalling=fxs_ks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=no
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=10.0
txgain=3.0
group=0
callgroup=1
pickupgroup=1
immediate=no
faxdetect=incoming
channel => 1-4


And part of extensions.conf:

[macro-dialout-trunk]
exten => s,1,GotoIf($[foo${ARG3} = foo]?3:2))	; arg3 is pattern password
exten => s,2,Authenticate(${ARG3})
exten => s,3,Macro(record-enable,${CALLERIDNUM},OUT)
exten => s,4,GotoIf($[foo${ECID${CALLERIDNUM}} = foo]?7)  ;check for CID
override for exten
exten => s,5,SetCallerID(${ECID${CALLERIDNUM}})
exten => s,6,Goto(9)
exten => s,7,GotoIf($[foo${OUTCID_${ARG1}} = foo]?9)  ;check for CID
override for trunk
exten => s,8,SetCallerID(${OUTCID_${ARG1}})
exten => s,9,SetGroup(OUT_${ARG1})
exten => s,10,CheckGroup(${OUTMAXCHANS_${ARG1}})
; if we've used up the max channels, continue at 109 (n+101)
exten => s,11,SetVar(DIAL_NUMBER=${ARG2})
exten => s,12,SetVar(DIAL_TRUNK=${ARG1})
exten => s,13,AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper
dial string for this trunk
exten => s,14,SetVar(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER})  ; OUTNUM
is the final dial number
exten => s,15,Cut(custom=OUT_${ARG1},:,1)  ; Custom trunks are prefixed
with "AMP:"
exten => s,16,GotoIf($[${custom} = AMP]?19)
exten => s,17,Dial(${OUT_${ARG1}}/${OUTNUM})  ; Regular Trunk Dial
exten => s,18,Goto(s-${DIALSTATUS},1)

; This is a custom trunk.  Substitute $OUTNUM$ with the actual number and
rebuild the dialstring
; example trunks: "AMP:CAPI/XXXXXXXX:b$OUTNUM$,30,r",
"AMP:OH323/$OUTNUM$@XX.XX.XX.XX:XXXX"
exten => s,19,Cut(pre_num=OUT_${ARG1},$,1)
exten => s,20,Cut(the_num=OUT_${ARG1},$,2)  ; this is where we expect to
find string OUTNUM
exten => s,21,Cut(post_num=OUT_${ARG1},$,3)
exten => s,22,GotoIf($[${the_num} = OUTNUM]?23:24) ; if we didn't find
"OUTNUM", then skip to Dial
exten => s,23,SetVar(the_num=${OUTNUM}) ; replace "OUTNUM" with the actual
number to dial
exten => s,24,Dial(${pre_num:4}${the_num}${post_num})
exten => s,25,Goto(s-${DIALSTATUS},1)

exten => s,111,Noop(max channels used up)
exten => s-BUSY,1,NoOp(Trunk is reporting BUSY)
exten => s-BUSY,2,Busy()
exten => s-BUSY,3,Wait(60)
exten => s-BUSY,4,NoOp()

exten => _s-.,1,NoOp(Dial failed due to ${DIALSTATUS})


Any ideas?

Thanks,

Dan




More information about the asterisk-users mailing list