[asterisk-users] Failover Routing

Bob Beers bob.beers at gmail.com
Tue Mar 1 07:23:33 CST 2011


On Tue, Mar 1, 2011 at 8:09 AM, Deepika Nijhawan
<deepika.nijhawan at oxygen8.com> wrote:
> Ya, below is my routing:
> Exten => 1234,1,Dial(SIP/abc)
> Exten => 1234,n,Dial(SIP/xyz)
>
> If 1234 is unallocated on SIP/abc it returns 1 in ${HANGUPCAUSE} variable.
> For this I don't want it  to try SIP/xyz.
> But overall, if we get SIP 4xx reason then call should hangup like it sends
> back 404 not found for this case and if we get SIP 5xx response then should
> try SIP/xyz.
> Is there any way to check sip responses and do failover routing based on
> that?
>

Have you looked at SIP_HEADER() dialplan function?
<https://wiki.asterisk.org/wiki/display/AST/Function_SIP_HEADER>

Maybe you can parse Reason header in 4xx or 5xx response?

HTH,
-Bob



More information about the asterisk-users mailing list