<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Indeed, getting rtpengine involved is the easiest fix. <br>
    </p>
    <p>BUT : I am working on B2BUA implementation in opensips.  So as
      there is no route[relay] and reply_route, where do I need to call
      rtpengine_offer and rtpengine_answer ? <br>
    </p>
    <p>wkr, <br>
    </p>
    <div class="moz-cite-prefix">On 11/06/2021 15:10, Slava Bendersky
      via Users wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1692119754.11980.1623417046629.JavaMail.zimbra@skillsearch.ca">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div style="font-family: lucida console,sans-serif; font-size:
        12pt; color: #000000">
        <div>Hello Johan,</div>
        <div>You can use something like this </div>
        <div><br data-mce-bogus="1">
        </div>
        <div><br data-mce-bogus="1">
        </div>
        <blockquote>
          <div>
            <div>route[ONHOLD] {</div>
            <div>        if(!is_audio_on_hold())</div>
            <div>                return;</div>
            <div><br data-mce-bogus="1">
            </div>
            <div>       <span style="color: #000000; font-family:
                'lucida console', sans-serif; font-size: 16px;
                font-style: normal; font-variant-ligatures: normal;
                font-variant-caps: normal; font-weight: 400;
                letter-spacing: normal; orphans: 2; text-align: start;
                text-indent: 0px; text-transform: none; white-space:
                normal; widows: 2; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; background-color:
                #ffffff; text-decoration-thickness: initial;
                text-decoration-style: initial; text-decoration-color:
                initial; display: inline !important; float: none;"
                data-mce-style="color: #000000; font-family: 'lucida
                console', sans-serif; font-size: 16px; font-style:
                normal; font-variant-ligatures: normal;
                font-variant-caps: normal; font-weight: 400;
                letter-spacing: normal; orphans: 2; text-align: start;
                text-indent: 0px; text-transform: none; white-space:
                normal; widows: 2; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; background-color:
                #ffffff; text-decoration-thickness: initial;
                text-decoration-style: initial; text-decoration-color:
                initial; display: inline !important; float: none;">$var(cline-ip)<span> 
                  = NULL;</span></span>
              <div style="clear: both;" data-mce-style="clear: both;"><br>
              </div>
            </div>
            <div>        if(has_body("application/sdp")) {</div>
            <div>                if(search_body("a=sendonly") ||
              search_body("a=inactive")) {</div>
            <div>                        $var(cline-ip) =
              $(rb{sdp.line,c}{s.select,2, });</div>
            <div>                        xlog("[$rm] On hold call SDP IP
              [$var(cline-ip)]\n");</div>
            <div>                       
              if($(var(cline-ip){s.select,1,.}{s.int})==0 &&
              $socket_in(proto)=="WSS") {</div>
            <div>                                xlog("[$rm] On hold
              call going from WAN SouceIP <$si> to LAN with
              transport $socket_in(proto)\n");</div>
            <div>                                $var(rtpengine_f_topbx)
              = "replace-session-connection replace-origin
              UDP/TLS/RTP/SAVPF";</div>
            <div>                                $var(codec_flag_topbx)
              = "codec-strip-PCMU codec-strip-G722  codec-strip-PCMA";</div>
            <div>                                $var(codec_trans) =
              "transcode-OPUS codec-mask-G722";</div>
            <div>                                $avp(on_hold) = "true";</div>
            <div>                               
              rtpengine_offer("$var(rtpengine_f_topbx)
              $var(codec_flag_topbx) $var(codec_trans) ICE=remove
              in-iface=external out-iface=internal");</div>
            <div>                               
              t_on_reply("handle_wss_reply");</div>
            <div>                        } else {</div>
            <div>                                xlog("[$rm] On hold
              call going from WAN SouceIP <$si> to LAN with
              transport $socket_in(proto)\n");</div>
            <div>                               
              rtpengine_offer("RTP/AVP replace-session-connection
              replace-origin ICE=remove in-iface=external
              out-iface=internal");</div>
            <div>                                t_on_reply("3");</div>
            <div>                        }</div>
            <div>                }</div>
            <div>        }</div>
            <div>        route(RELAY);</div>
            <div>        exit;</div>
            <div>}</div>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>volga629</div>
        </blockquote>
        <div><br>
        </div>
        <div><br data-mce-bogus="1">
        </div>
        <div><br data-mce-bogus="1">
        </div>
        <hr id="zwchr" data-marker="__DIVIDER__">
        <div data-marker="__HEADERS__"><b>From: </b>"johan"
          <a class="moz-txt-link-rfc2396E" href="mailto:johan@democon.be"><johan@democon.be></a><br>
          <b>To: </b>"OpenSIPS users mailling list"
          <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
          <b>Sent: </b>Friday, June 11, 2021 6:05:39 AM<br>
          <b>Subject: </b>[OpenSIPS-Users] Dumb ass question<br>
        </div>
        <div><br>
        </div>
        <div data-marker="__QUOTED_TEXT__">Hello,<br>
          <br>
          <br>
          is there somebody that can help me with rewriting the sdp when
          you<br>
          receive 0.0.0.0 ?<br>
          <br>
          I kind of like tried a bunch of variations on this<br>
          fix_nated_sdp(0x12,"1.2.3.4");, but obviously I do something
          wrong. <br>
          <br>
          wkr, Johan.<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>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<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>
</pre>
    </blockquote>
  </body>
</html>