<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Everyone,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I would like to implement fail-over for my outbound gateway, but I would like to be able to pick certain cause codes which qualify to stop trying next gateway (specifically when I have bad number and I am getting sip:404 NO_ROUTE_DESTINATION, UNALLOCATED_NUMBER). I was using 1.0.6, but I moved to the newest git about month ago.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>After searching through lists and spending several hours playing with continue_to_fail, failure_causes and fail_on_single_reject I was able to make it work by specifying cause codes for which I want to fail-over and omitting ones that qualify to stop trying next gateway in variable continue_to_fail:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So this setup is working for me and in the case I have bad number and x.x.x.x returns sip:404 (NO_ROUTE_DESTINATION or UNALLOCATED_NUMBER) it is not trying y.y.y.y gateway.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><include><o:p></o:p></p><p class=MsoNormal> <extension name="myextension"><o:p></o:p></p><p class=MsoNormal> <condition field="destination_number" expression="^(01144\d+)$"><o:p></o:p></p><p class=MsoNormal> <action application="set"<o:p></o:p></p><p class=MsoNormal>data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,SERVICE_NOT_IMPLEMENTED,CALL_RE<o:p></o:p></p><p class=MsoNormal>JECTED,NO_USER_RESPONSE,EXCHANGE_ROUTING_ERROR,INCOMPATIBLE_DESTINATION,NETWORK_OUT_OF_ORDER,RECOVERY_ON_TIMER_EXPIRE"/><o:p></o:p></p><p class=MsoNormal> <action application="bridge" data="sofia/myprofile/$1@x.x.x.x"/><o:p></o:p></p><p class=MsoNormal> <action application="bridge" data="sofia/myprofile/$1@y.y.y.y"/><o:p></o:p></p><p class=MsoNormal> <action application="bridge" data="sofia/myprofile/$1@z.z.z.z"/><o:p></o:p></p><p class=MsoNormal> </condition><o:p></o:p></p><p class=MsoNormal> </extension><o:p></o:p></p><p class=MsoNormal></include><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>However if I want to use "|" between my gateways – and the example below is not working. And no matter what x.x.x.x returns - it will try y.y.y.y and eventually z.z.z.z.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><action application="set"<o:p></o:p></p><p class=MsoNormal>data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,SERVICE_NOT_IMPLEMENTED,CALL_RE<o:p></o:p></p><p class=MsoNormal>JECTED,NO_USER_RESPONSE,EXCHANGE_ROUTING_ERROR,INCOMPATIBLE_DESTINATION,NETWORK_OUT_OF_ORDER,RECOVERY_ON_TIMER_EXPIRE"/><o:p></o:p></p><p class=MsoNormal><action application="bridge"<o:p></o:p></p><p class=MsoNormal>data="sofia/myprofile/$1@x.x.x.x|sofia/myprofile/$1@y.y.y.y|sofia/myprofile/$1@z.z.z.z"/><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Unfortunately, we have to use pipe for fail-over since we are using mod_lcr to choose between outbound gateways.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any suggestions? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Ivan <o:p></o:p></p></div></body></html>