[Asterisk-Users] re: voipjet -- Workaround if needed

Cavanna, Richard RCavanna at sychip.com
Thu Feb 9 15:00:29 MST 2006


Same thing here.  I had this problem awhile ago and made this
workaround.

Going to another trunk does not work because they are answering and not
sending a error code.  If you are using AAH code then this waits 10
seconds on your Voip then times out and goes to PSTN.  You can modify
for your needs

The pertinent line is 14 in macro-dialout-trunk

I am going to clean it up and repost under my original question


[9_outside]
exten => _9Z.,1,Macro(dialout-trunk,"trunknumerhere",${EXTEN:1},,10)
exten => _9Z.,2,Macro(dialout-trunk, "trunknumerhere",${,${EXTEN:1},)
exten => _9Z.,3,Macro(outisbusy)	; No available circuits


[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(user-callerid)
exten => s,4,Macro(record-enable,${CALLERIDNUM},OUT)
exten => s,5,Macro(outbound-callerid,${ARG1})
exten => s,6,SetGroup(OUT_${ARG1})
exten => s,7,CheckGroup(${OUTMAXCHANS_${ARG1}})
; if we've used up the max channels, continue at (n+101)
exten => s,8,SetVar(DIAL_NUMBER=${ARG2})
exten => s,9,SetVar(DIAL_TRUNK=${ARG1})
exten => s,10,AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper
dial string for this trunk
exten => s,11,SetVar(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER})  ;
OUTNUM is the final dial number
exten => s,12,Cut(custom=OUT_${ARG1},:,1)  ; Custom trunks are prefixed
with "AMP:"
exten => s,13,GotoIf($[${custom} = AMP]?16)
;exten => s,14,Dial(${OUT_${ARG1}}/${OUTNUM})  ; Regular Trunk Dial
exten => s,14,Dial(${OUT_${ARG1}}/${OUTNUM},${ARG4})  ; Regular Trunk
Dial w/ timeout
exten => s,15,NoOp(HANGUPCAUSE is ${HANGUPCAUSE} and DIALSTATUS is
${DIALSTATUS})
exten => s,16,Goto(s-${DIALSTATUS},1)




More information about the asterisk-users mailing list