[asterisk-users] SIP Dialplan Failover Solution

2010-04-06 Thread Alexandru Oniciuc
Hello list,

I need a hand to find the best dialplan failover solution when 
using two SIP Trunks.

My reasons to do failover are:

a)  one of the two providers could be unreachable

b)  both providers may be UP but one of them could return a SIP error 
message (maybe caused by DOWN E1s)

Googling I found a few possible solutions:


1.   Using DIALSTATUS variable.


2.   Dialing in sequence:
   exten = _X.,1,Dial(SIP/${TRUNK1}/${EXTEN})
   exten = _X.,2,Dial(SIP/${TRUNK2}/${EXTEN})


3.  ChanIsAvail



Using the first method it's possible to get the CONGESTION and 
CHANUNAVAIL status which pretty much solves my problem but it takes more than 2 
lines of dialplan(I like one liners).
The second solution requires less space in the dialplan but it should work only 
when the called party is busy (or maybe even when the first trunk is down).

Is there a clean way to send the call to the second SIP provider if the first 
one is unreachable or spits out sip error messages?

Thanks in advance,

Alex
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] SIP Dialplan Failover Solution

2010-04-06 Thread Aurimas Skirgaila
Hi,

I do use the first solution based on DIALSTATUS variable. (
http://www.voip-info.org/wiki/view/Superdial+macro)

since it's included to a separated context named [superdial-macro], I don't
have to repeat it over and over, so the fact that it's not a oneliner
doesn't bother me at all :)

On Tue, Apr 6, 2010 at 3:37 PM, Alexandru Oniciuc 
alexandru.onic...@trivenet.it wrote:

  Hello list,



 I need a hand to find the best dialplan failover solution
 when using two SIP Trunks.



 My reasons to do failover are:

 a)  one of the two providers could be unreachable

 b)  both providers may be UP but one of them could return a SIP error
 message (maybe caused by DOWN E1s)



 Googling I found a few possible solutions:



 1.   Using DIALSTATUS variable.



 2.   Dialing in sequence:

exten = _X.,1,Dial(SIP/${TRUNK1}/${EXTEN})

exten = _X.,2,Dial(SIP/${TRUNK2}/${EXTEN})



 3.  ChanIsAvail







 Using the first method it’s possible to get the CONGESTION
 and CHANUNAVAIL status which pretty much solves my problem but it takes more
 than 2 lines of dialplan(I like one liners).

 The second solution requires less space in the dialplan but it should work
 only when the called party is busy (or maybe even when the first trunk is
 down).



 Is there a clean way to send the call to the second SIP provider if the
 first one is unreachable or spits out sip error messages?



 Thanks in advance,



 Alex

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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




-- 
Mvh,
Aurimas Skirgaila
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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