On Tue, Mar 1, 2011 at 8:09 AM, Deepika Nijhawan <deepika.nijha...@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 -- _____________________________________________________________________ -- 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