Asterisk dial fallback macro

If 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.

Alex 2012-01-25 12:45:49

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

 
Name (required)
E-mail (required - never shown publicly)
Webpage URL
Comment:
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> in your comment.

Trackback responses to this post

About me

Nonoo
I'm Nonoo. This is my blog about music, sounds, filmmaking, amateur radio, computers, programming, electronics and other things I'm obsessed with. ... »

Twitter

Listening now

My favorite artists