<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 8/28/13 8:22 PM, Marc Soda wrote:<br>
    </div>
    <blockquote
cite="mid:CAFBTUUa9bwAKBZVrRzLrufGm+LACGDKWEQ110x=PXOM_8yxxmA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_extra">Thanks, I appreciate it.</div>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra">In this setup the there are 2
            endpoints (700 and 701) peered up to an Asterisk server
            (172.16.60.6) via a Kamailio proxy (172.16.60.20).  700
            (172.16.60.28) is calling 701 (172.16.3.65).  When 701
            answers the OK is sent to the proxy and then to Asterisk.
             Asterisk is then ACKing the OK.  The ACK is being sent to
            the proxy and then the proxy should be sending it back to
            the endpoint.  It is not.  The ACK is being sent to the
            proxy and then the proxy is sending to itself again, via the
            loopback interface.  I believe loose_route() should be
            re-writing the destination to be the endpoint, but it not.</div>
        </div>
      </div>
    </blockquote>
    what device is at 701? The 200ok receved from it has the contact
    address with the IP of kamailio:<br>
    <br>
    U 172.16.3.65:5060 -> 172.16.60.20:5060<br>
    SIP/2.0 200 OK.<br>
    Via: SIP/2.0/UDP
    172.16.60.20;received=172.16.60.20;branch=z9hG4bK9381.d7d662b.0.<br>
    Via: SIP/2.0/UDP 172.16.60.6:5060;rport=5060;branch=z9hG4bK0919ead7.<br>
    Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:172.16.60.20;lr;ftag=as5e1a80d8;nat=yes"><sip:172.16.60.20;lr;ftag=as5e1a80d8;nat=yes></a>.<br>
    Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:64a513d30fc6a51e54e8255b7169345c@172.16.60.6:5060">64a513d30fc6a51e54e8255b7169345c@172.16.60.6:5060</a>.<br>
    From: "Alpha" <a class="moz-txt-link-rfc2396E" href="sip:700@172.16.60.6"><sip:700@172.16.60.6></a>;tag=as5e1a80d8.<br>
    To:
<a class="moz-txt-link-rfc2396E" href="sip:sip701_tbs@172.16.60.20"><sip:sip701_tbs@172.16.60.20></a>;tag=64c37e7e-19b8-46ae-ad0d-f2a4abe667bc.<br>
    CSeq: 102 INVITE.<br>
    Allow: PRACK, SUBSCRIBE, NOTIFY, REFER, INVITE, ACK, BYE, CANCEL,
    UPDATE, INFO, REGISTER, OPTIONS, MESSAGE.<br>
    <b>Contact: <a class="moz-txt-link-rfc2396E" href="sip:sip701_tbs@172.16.60.20:5060"><sip:sip701_tbs@172.16.60.20:5060></a></b>.<br>
    .....<br>
    <br>
    It should be its IP address, otherwise Kamailio doesn't know where
    to sent requests within dialog.<br>
    <br>
    It seems there is a NAT between your kamailio and 701, as kamailio
    adds alias parameter to Contact in 200ok. That can be used to route
    the ack, like:<br>
    <br>
    handle_ruri_alias();<br>
    $ru = $du;<br>
    $du = $null;<br>
    <br>
    Do the above for the ACK before calling loose_route(). Then it will
    get out of kamailio, but might not solve the overall routing, if the
    701 is not at next hop or it doesn't like the r-uri, because it is
    not what it has set.<br>
    <br>
    The best is to ask for the proper fix on 701 device.<br>
    <br>
    Cheers,<br>
    Daniel<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://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
  </body>
</html>