[Asterisk-Users] Marco Extensions

Chris listmail at odisok.net
Fri Apr 8 15:05:38 MST 2005


Can someone help on the marco?   when I use this marc to dial out it connects the call  just fine, but never executes the voice-rec marco.


Chris

[macro-dialout-trunk-rec]
exten => s,1,GotoIf($[foo${ECID${CALLERIDNUM}} = foo]?4)        ;check
for CID override for exten
exten => s,2,SetCallerID(${ECID${CALLERIDNUM}})
exten => s,3,Goto(6)
exten => s,4,GotoIf($[foo${OUTCID_${ARG1}} = foo]?6)            ;check
for CID override for trunk
exten => s,5,SetCallerID(${OUTCID_${ARG1}})
exten => s,6,SetGroup(OUT_${ARG1})
exten => s,7,CheckGroup(${OUTMAXCHANS_${ARG1}})
; if we've used up the max channels, continue at 108 (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(CALLFILENAME=${EXTEN:1}-${TIMESTAMP})
exten => s,12,NoOp(${ARG1})
exten => s,13,Monitor(wav,${CALLFILENAME},m)
exten => s,14,Dial(${OUT_${ARG1}}/${OUTPREFIX_${ARG1}}${DIAL_NUMBER},60,M(voicerec^${DIAL_NUMBER}))
; if dial fails (ie, all channels are busy), continue at 112 (n+101)

; we should only get here if the call was successful (?)
;exten => s,9,Congestion

; exit points for macro
exten => s,108,NoOp(max channels used up)
exten => s,112,NoOp(dial failed)

[marco-voicerec]
exten => s,1,noop(${ARG1})
exten => s,2,Background(custom/recordwarn)



Regards,


Chris


More information about the asterisk-users mailing list