<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 6/2/11 9:41 PM, Gary Chen wrote:
    <blockquote
cite="mid:162648092.254595.1307043674889.JavaMail.root@md09.insight.synacor.com"
      type="cite">
      <style type="text/css">p { margin: 0; }</style>
      <div style="font-family: Times New Roman; font-size: 12pt; color:
        rgb(0, 0, 0);">
        <p class="MsoPlainText"><o:p>&nbsp;Thanks for the quick reply.</o:p></p>
        <p class="MsoPlainText"><o:p>How can I fix this?</o:p></p>
      </div>
    </blockquote>
    When you set t_on_failure for an INVITE, the respective failure
    route will be executed for any reply &gt;=0. What you have to do is
    to not re-route to a new destination from failure route, simply exit
    for those reply codes, like:<br>
    <br>
    if(t_check_status("401|407")) exit;<br>
    <br>
    You don't handle as well the canceled transactions, when re-routing
    makes no sense -- you should do it (see default config file for
    example.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:162648092.254595.1307043674889.JavaMail.root@md09.insight.synacor.com"
      type="cite">
      <div style="font-family: Times New Roman; font-size: 12pt; color:
        #000000">
        <p class="MsoPlainText">We are using Kamailio as single point of
          entry for all our phones. Our phones all registered with
          Freeswitch. Kamailio only route the SIP traffic. Is there any
          way I can make Kamailio not treat 407 as failure?</p>
        <p class="MsoPlainText">I also have the same problem with
          REGISTER messages when Freeswitch reply with '401
          Unauthorized'. I end up using Forward() instead of t_relay()
          to make the phone1 register with Freeswitch.</p>
        <p class="MsoPlainText"><br>
        </p>
        <p class="MsoPlainText">Any suggestion?</p>
        <p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
        <p class="MsoPlainText">-----Original Message-----<br>
          From: <a class="moz-txt-link-abbreviated" href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a>
          [<a class="moz-txt-link-freetext" href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>] On Behalf Of
          Alex Balashov<br>
          Sent: Thursday, June 02, 2011 3:30 PM<br>
          To: <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
          Subject: Re: [SR-Users] Problem using dispatcher.</p>
        <p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
        <p class="MsoPlainText">On 06/02/2011 03:26 PM, Gary Chen wrote:<o:p></o:p></p>
        <p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
        <p class="MsoPlainText">&gt; the dispatcher always get into
          FAILURE route
          although the log shows<o:p></o:p></p>
        <p class="MsoPlainText">&gt; that kamailio did send INVITE to
          10.10.1.222 and
          received '407 -<o:p></o:p></p>
        <p class="MsoPlainText">&gt; Proxy Authentication Required' from
          Freexwitch1 and
          then dispatcher<o:p></o:p></p>
        <p class="MsoPlainText">&gt; send INVITE to 10.10.1.223 and also
          received '407 -
          Proxy<o:p></o:p></p>
        <p class="MsoPlainText">&gt; Authentication Required' from
          Freexwitch2 and
          eventually failed.<o:p></o:p></p>
        <p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
        <p class="MsoPlainText">That's because any reply &gt;= 300 is
          considered a
          failure.<o:p></o:p></p>
        <p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
        <p class="MsoPlainText">-- <o:p></o:p></p>
        <p class="MsoPlainText">Alex Balashov - Principal<o:p></o:p></p>
        <p class="MsoPlainText">Evariste Systems LLC<o:p></o:p></p>
        <p class="MsoPlainText">260 Peachtree Street NW<o:p></o:p></p>
        <p class="MsoPlainText">Suite 2200<o:p></o:p></p>
        <p class="MsoPlainText">Atlanta, GA 30303<o:p></o:p></p>
        <p class="MsoPlainText">Tel: +1-678-954-0670<o:p></o:p></p>
        <p class="MsoPlainText">Fax: +1-404-961-1892<o:p></o:p></p>
        <p class="MsoPlainText">Web: <a class="moz-txt-link-freetext" href="http://www.evaristesys.com/">http://www.evaristesys.com/</a><o:p></o:p></p>
        <p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
        <p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
        <p class="MsoPlainText">SIP Express Router (SER) and Kamailio
          (OpenSER) -
          sr-users mailing list<o:p></o:p></p>
        <p class="MsoPlainText"><a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></p>
        <p class="MsoPlainText"><a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>