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

2007-07-30 Thread Jared Smith
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.


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


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

2007-07-30 Thread Chris Blunt
Hi All, 

 

In our small office calls to the PSTN are currently sent via Asterisk and a
Linksys SPA3102 (1 x FXO and 1 x FXS):

 

SIP Phone --> Asterisk --> Linksys SPA3102 --> PSTN

 

If the PSTN is in use on SPA3102 I need a way to get the call to then route
out over IAX termination.

 

SIP Phone --> Asterisk--> Linksys SPA3102 --> PSTN (In Use) -->
Use IAX

 

Can any one help me with some dial plan logic for this; I'm confused as to
the best way around this?

 

Thanks in advance

 

Chris

 

 

--

 

Chris Blunt

Entropy IT Ltd

 

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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