[asterisk-users] Dial plan question: PSTN via Linksys SPA3102 then IAX if busy?

Jared Smith jsmith at digium.com
Mon Jul 30 19:52:51 CDT 2007


On Mon, 2007-07-30 at 16:09 +0100, Chris Blunt wrote:
> If the PSTN is in use on SPA3102 I need a way to get the call to then
> route out over IAX termination.

Usually, the best way to accomplish this is to send a call to your
Linksys ATA by using the Dial application from the dialplan, and then
looking at the result that gets set in the DIALSTATUS variable.  For
example, you could try something like this:

exten => 123,1,Dial(SIP/linksys/5551212,30)
exten => 123,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?try-iax)
exten => 123,n,Busy(3)
exten => 123,n,Hangup()
exten => 123,n(try-iax),Dial(IAX2/my_iax_peer/5551212,30)

Obviously my example isn't that robust... it's simply meant to
illustrate the idea.  (It depends on the SPA3102 returning a status code
that maps to CONGESTION if it's already in use... I don't have an
SPA3102, so I can't tell you how it actually performs.)



-- 
Jared Smith
Community Relations Manager
Digium, Inc.




More information about the asterisk-users mailing list