We do it slightly different, rather than multiple macros, we do it within a single macro.

;
;------------------------
;
[macro-outbound-calling]
exten => s,1,NoOp("Debug:  Outbound Call from ${CALLERID}")
;
exten => s,n(tryiax01),NoOP("Debug [${CONTEXT}]: Trying 1st IAX2 Service")
exten => s,n,Dial(IAX2/${CarrierA}/${ARG1},60,tT)
exten => s,n,GotoIf($["${DIALSTATUS}" : "(CHANUNAVAIL|CONGESTION)"]? tryiax02:Hangup)
;
exten => s,n(tryiax02),NoOP("Debug [${CONTEXT}]: Trying 2nd IAX2 Service")
exten => s,n,Dial(IAX2/${CarrierB}/${ARG1},60,tT)
exten => s,n,GotoIf($["${DIALSTATUS}" : "(CHANUNAVAIL|CONGESTION)"]? trypstn:Hangup)
;
exten => s,n(trypstn),NoOP("Debug [${CONTEXT}]: Now trying the PSTN Backup Lines")
exten => s,n,etc, etc....
;
exten => s,n,Hangup()

Then the extension string becomes;

exten => _9011Z.,103,Macro(outbound-calling,${EXTEN})


On 11/04/2006, at 6:55 PM, Mimmus wrote:


I have now:
exten => _9011Z.,103,Dial(SIP/011${EXTEN:[EMAIL PROTECTED])
;exten => _9011Z.,103,Dial(SIP/011${EXTEN:[EMAIL PROTECTED])
;exten => _9011Z.,103,Dial(SIP/011${EXTEN:[EMAIL PROTECTED])
exten => _9011Z.,104,NoOp(${DIALSTATUS})

I configured two trunks for my outgoing calls:

 [outrt-001-out]
 exten => _0.,1,Macro(dialout-trunk,2,${EXTEN:1},)
 exten => _0.,2,Macro(dialout-trunk,5,${EXTEN:1},)
 exten => _0.,3,Macro(outisbusy) ; No available circuits

If first fails, second is automatically used but I get a CDR with
disposition = 'FAILED'. How can I avoid this?

--
Domenico Viggiani

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to