<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>The commit 81df84b is related to tls, so there should be no
      relation with nat functions.</p>
    <p>Are you using t_suspend()/t_continue() or other async processing
      functions?</p>
    <p>Anyhow, whatever changes you want to be specific for each
      outgoing request must be done in a branch_route. request_route
      changes are visible to all changes and if you do something again
      in branch_route or failure_route, then you will see duplicated
      operations.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 28/11/2016 09:02, Anthony Messina
      wrote:<br>
    </div>
    <blockquote
      cite="mid:20161128020202.Horde.GHZ30DwO3sFUkLMFjfOKbGP@messinet.com"
      type="cite">Prior to the upgrade to Kamailio 4.4.4, I was using
      4.4.3 with updates through 81df84b from the 4.4 branch and the
      following fix_nated_sdp call worked through the initial INVITE and
      when a voicemail branch was appended from the failure_route.
      <br>
      <br>
      route[NATMANAGE] {
      <br>
      ...
      <br>
      <br>
      # RTPEngine is not needed but if STUN addresses are being used on
      our
      <br>
      # internal network, rewrite the addresses to the internal source
      address
      <br>
      if(!isbflagset(FLB_RTPENGINE) &&
      has_body("application/sdp")) {
      <br>
              if(dst_ip==10.1.1.2 &&
      compare_pure_ips($sel(contact.uri.host), "<EXTERNAL_IP>")) {
      <br>
                      fix_nated_sdp("10");
      <br>
              }
      <br>
      }
      <br>
      <br>
      ...
      <br>
      }
      <br>
      <br>
      Since the upgrade to 4.4.4, when the original INVITE fails over to
      voicemail (branch appended), fix_nated_sdp creates the SDP below,
      doubling the replaced IP addresses.  Asterisk replies with 488, as
      the media address is completely invalid.  I need something like
      the above (which worked for the request and the reply) but can't
      figure out what the problem is.
      <br>
      <br>
      v=0
      <br>
      o=Zoiper 0 0 IN IP4 10.1.1.18210.1.1.182
      <br>
      s=Zoiper
      <br>
      c=IN IP4 10.1.1.18210.1.1.182
      <br>
      t=0 0
      <br>
      m=audio 63732 RTP/SAVP 9 3 0 97 101
      <br>
      a=rtpmap:9 G722/8000
      <br>
      a=rtpmap:3 GSM/8000
      <br>
      a=rtpmap:0 PCMU/8000
      <br>
      a=rtpmap:97 iLBC/8000
      <br>
      a=fmtp:97 mode=30
      <br>
      a=rtpmap:101 telephone-event/8000
      <br>
      a=fmtp:101 0-16
      <br>
      a=sendrecv
      <br>
      a=crypto:5 AES_256_CM_HMAC_SHA1_80
      inline:n2C0BcdXOr32BPTEE8pfHII9mamAK566xMNvQIDIGKI2LPOLdNDOcpFdtqu5DQ==
      <br>
      a=crypto:6 AES_256_CM_HMAC_SHA1_32
      inline:n2C0BcdXOr32BPTEE8pfHII9mamAK566xMNvQIDIGKI2LPOLdNDOcpFdtqu5DQ==
      <br>
      a=crypto:3 AES_192_CM_HMAC_SHA1_80
      inline:n2C0BcdXOr32BPTEE8pfHII9mamAK566xMNvQIDIGKI2LPOLdNA=
      <br>
      a=crypto:4 AES_192_CM_HMAC_SHA1_32
      inline:n2C0BcdXOr32BPTEE8pfHII9mamAK566xMNvQIDIGKI2LPOLdNA=
      <br>
      a=crypto:1 AES_CM_128_HMAC_SHA1_80
      inline:n2C0BcdXOr32BPTEE8pfHII9mamAK566xMNvQIDI
      <br>
      a=crypto:2 AES_CM_128_HMAC_SHA1_32
      inline:n2C0BcdXOr32BPTEE8pfHII9mamAK566xMNvQIDI
      <br>
      a=oldmediaip:<EXTERNAL_IP>
      <br>
      a=oldmediaip:<EXTERNAL_IP>
      <br>
      a=oldmediaip:<EXTERNAL_IP>
      <br>
      a=oldmediaip:<EXTERNAL_IP>
      <br>
      <br>
      <br>
      <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://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 Training, Berlin, Nov 28-30, 2016 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>