<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    HI,<br>
    <br>
    Problem is that I am relaying call throught FS and I guess I am
    arming on_replay_route on wrong spot. I am arming it when call is
    send to UAC.<br>
    <br>
    Here is my replay_route:<br>
    <br>
    onreply_route[1] {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("on replay");<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (client_nat_test("3")) {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_INFO", "NAT Reply\n");<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_contact();<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
    }<br>
    <br>
    <br>
    here is a sip trace:<br>
    <br>
    U UAC_PUBLIC_IP:1079 -&gt; opensips_ip:5060<br>
    SIP/2.0 200 OK.<br>
    Via: SIP/2.0/UDP opensips_ip:5060;branch=z9hG4bK13dc.ad5b3917.0.<br>
    Via: SIP/2.0/UDP
    FS_IP:5080;received=FS_IP;rport=5080;branch=z9hG4bKj26KZH1XvKm9p.<br>
    Record-Route:
<a class="moz-txt-link-rfc2396E" href="sip:opensips_ip;lr;ftag=c8N0ZtF52D3vF;vsf=AAAAAAMLBwYFAAACA3cFcQAfAx0fARoLGg8eNjA-;did=b88.c27c8733">&lt;sip:opensips_ip;lr;ftag=c8N0ZtF52D3vF;vsf=AAAAAAMLBwYFAAACA3cFcQAfAx0fARoLGg8eNjA-;did=b88.c27c8733&gt;</a>.<br>
    From: "031545477" <a class="moz-txt-link-rfc2396E" href="sip:44431545477@FS_IP">&lt;sip:44431545477@FS_IP&gt;</a>;tag=c8N0ZtF52D3vF.<br>
    To: <a class="moz-txt-link-rfc2396E" href="sip:44418108754@opensips_ip">&lt;sip:44418108754@opensips_ip&gt;</a>;tag=581792008.<br>
    Call-ID: 65b7d8a0-fc4c-1231-bb95-005056b2fe3d.<br>
    CSeq: 54766485 INVITE.<br>
    Contact: <a class="moz-txt-link-rfc2396E" href="sip:44418108754@10.105.15.67:5060">&lt;sip:44418108754@10.105.15.67:5060&gt;</a>.<br>
    Supported: replaces, path, timer.<br>
    User-Agent: Grandstream GXP1405 1.0.5.32.<br>
    Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
    REFER, UPDATE, MESSAGE.<br>
    Content-Type: application/sdp.<br>
    Content-Length:&nbsp;&nbsp; 242.<br>
    .<br>
    v=0.<br>
    o=44418108754 8000 8000 IN IP4 10.105.15.67.<br>
    s=SIP Call.<br>
    c=IN IP4 10.105.15.67.<br>
    t=0 0.<br>
    m=audio 5004 RTP/AVP 8 0 101.<br>
    a=sendrecv.<br>
    a=rtpmap:8 PCMA/8000.<br>
    a=ptime:20.<br>
    a=rtpmap:0 PCMU/8000.<br>
    a=rtpmap:101 telephone-event/8000.<br>
    a=fmtp:101 0-15.<br>
    <br>
    <br>
    U opensips_ip:5060 -&gt; FS_IP:5080<br>
    SIP/2.0 200 OK.<br>
    Via: SIP/2.0/UDP
    FS_IP:5080;received=FS_IP;rport=5080;branch=z9hG4bKj26KZH1XvKm9p.<br>
    Record-Route:
<a class="moz-txt-link-rfc2396E" href="sip:opensips_ip;lr;ftag=c8N0ZtF52D3vF;vsf=AAAAAAMLBwYFAAACA3cFcQAfAx0fARoLGg8eNjA-;did=b88.c27c8733">&lt;sip:opensips_ip;lr;ftag=c8N0ZtF52D3vF;vsf=AAAAAAMLBwYFAAACA3cFcQAfAx0fARoLGg8eNjA-;did=b88.c27c8733&gt;</a>.<br>
    From: "031545477" <a class="moz-txt-link-rfc2396E" href="sip:031545477@FS_IP">&lt;sip:031545477@FS_IP&gt;</a>;tag=c8N0ZtF52D3vF.<br>
    To: <a class="moz-txt-link-rfc2396E" href="sip:44418108754@opensips_ip">&lt;sip:44418108754@opensips_ip&gt;</a>;tag=581792008.<br>
    Call-ID: 65b7d8a0-fc4c-1231-bb95-005056b2fe3d.<br>
    CSeq: 54766485 INVITE.<br>
    Contact: <a class="moz-txt-link-rfc2396E" href="sip:44418108754@10.105.15.67:5060">&lt;sip:44418108754@10.105.15.67:5060&gt;</a>.<br>
    Supported: replaces, path, timer.<br>
    User-Agent: Grandstream GXP1405 1.0.5.32.<br>
    Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
    REFER, UPDATE, MESSAGE.<br>
    Content-Type: application/sdp.<br>
    Content-Length:&nbsp;&nbsp; 242.<br>
    .<br>
    v=0.<br>
    o=44418108754 8000 8000 IN IP4 10.105.15.67.<br>
    s=SIP Call.<br>
    c=IN IP4 10.105.15.67.<br>
    t=0 0.<br>
    m=audio 5004 RTP/AVP 8 0 101.<br>
    a=sendrecv.<br>
    a=rtpmap:8 PCMA/8000.<br>
    a=ptime:20.<br>
    a=rtpmap:0 PCMU/8000.<br>
    a=rtpmap:101 telephone-event/8000.<br>
    a=fmtp:101 0-15.<br>
    <br>
    <br>
    U FS_IP:5080 -&gt; opensips_ip:5060<br>
    ACK <a class="moz-txt-link-freetext" href="sip:44418108754@10.105.15.67:5060">sip:44418108754@10.105.15.67:5060</a> SIP/2.0.<br>
    Via: SIP/2.0/UDP FS_IP:5080;rport;branch=z9hG4bKKB0c1cj1Svavj.<br>
    Route:
<a class="moz-txt-link-rfc2396E" href="sip:opensips_ip;lr;ftag=c8N0ZtF52D3vF;vsf=AAAAAAMLBwYFAAACA3cFcQAfAx0fARoLGg8eNjA-;did=b88.c27c8733">&lt;sip:opensips_ip;lr;ftag=c8N0ZtF52D3vF;vsf=AAAAAAMLBwYFAAACA3cFcQAfAx0fARoLGg8eNjA-;did=b88.c27c8733&gt;</a>.<br>
    Max-Forwards: 70.<br>
    From: "031545477" <a class="moz-txt-link-rfc2396E" href="sip:031545477@FS_IP">&lt;sip:031545477@FS_IP&gt;</a>;tag=c8N0ZtF52D3vF.<br>
    To: <a class="moz-txt-link-rfc2396E" href="sip:44418108754@opensips_ip">&lt;sip:44418108754@opensips_ip&gt;</a>;tag=581792008.<br>
    Call-ID: 65b7d8a0-fc4c-1231-bb95-005056b2fe3d.<br>
    CSeq: 54766485 ACK.<br>
    Contact: <a class="moz-txt-link-rfc2396E" href="sip:mod_sofia@FS_IP:5080">&lt;sip:mod_sofia@FS_IP:5080&gt;</a>.<br>
    Content-Length: 0.<br>
    .<br>
    <br>
    <br>
    U opensips_ip:5060 -&gt; 10.105.15.67:5060<br>
    ACK <a class="moz-txt-link-freetext" href="sip:44418108754@">sip:44418108754@</a><b>10.105.15.67</b>:5060 SIP/2.0.<br>
    Via: SIP/2.0/UDP opensips_ip:5060;branch=z9hG4bK13dc.ad5b3917.2.<br>
    Via: SIP/2.0/UDP
    FS_IP:5080;received=FS_IP;rport=5080;branch=z9hG4bKKB0c1cj1Svavj.<br>
    Max-Forwards: 69.<br>
    From: "031545477" <a class="moz-txt-link-rfc2396E" href="sip:44431545477@FS_IP">&lt;sip:44431545477@FS_IP&gt;</a>;tag=c8N0ZtF52D3vF.<br>
    To: <a class="moz-txt-link-rfc2396E" href="sip:44418108754@opensips_ip">&lt;sip:44418108754@opensips_ip&gt;</a>;tag=581792008.<br>
    Call-ID: 65b7d8a0-fc4c-1231-bb95-005056b2fe3d.<br>
    CSeq: 54766485 ACK.<br>
    Contact: <a class="moz-txt-link-rfc2396E" href="sip:mod_sofia@FS_IP:5080">&lt;sip:mod_sofia@FS_IP:5080&gt;</a>.<br>
    Content-Length: 0.<br>
    <br>
    <div class="moz-cite-prefix">Dne 1/17/2014 2:13 PM, pi&#353;e Miha:<br>
    </div>
    <blockquote cite="mid:52D92C89.3030800@softnet.si" type="cite">Hi,
      <br>
      <br>
      in my config I have:
      <br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (nat_uac_test("18")) {
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("fixing nat");
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method=="REGISTER") {
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_register();
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport();
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };
      <br>
      <br>
      <br>
      In location table I can see that ip:port is saved from source
      ip:port and not from contact which is good (contact has
      private_ip). Invites are also send to right ip:port. Problem is
      that ACK is send to private ip instead to public_ip:port.
      <br>
      <br>
      What I am missing?
      <br>
      <br>
      br
      <br>
      miha
      <br>
      <br>
      <br>
      _______________________________________________
      <br>
      Users mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>