Asterisk dial fallback macro
March 4th, 2011 | Last modified: November 8th, 2011If you have 2 or more outbound lines, and want to prioritize them, use this macro:
1 2 3 4 5 6 7 | exten => 1234,1,Macro(dialWithFallback,555666) [macro-dialWithFallback] exten => s,1,Dial(SIP/line1/${ARG1}) exten => s,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?tryLine2) exten => s,n,Hangup() exten => s,n(tryLine2),Dial(SIP/line2/${ARG1}) |
In this case, 555666 will be called first on line1, and if it fails (channel unavailable), it will be called using line2.
RSS feed for comments
Trackback URL
Trackback URL
1 Comment »
Trackback responses to this post
About me
I'm Nonoo. This is my blog about music, sounds, filmmaking, amateur radio, computers, programming, electronics and other things I'm obsessed with.
... »
Thanks for sharing, this is exactly what I was looking for.
I extended this macro a little bit, to specify which fallback channel to be used (I have several to choose from).
Someone else described a different solution, but yours is much more simple: uhrig.eu.org/pbx/sipfallback