<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Mark,<br>
      <br>
      You mentioned calling rtpengine before? if so, note that you
      cannot have more than one change over the same part of the body.
      And rtpengine is replacing the whole body, so you cannot change a
      prev change.<br>
      What you have to do is to tell  </tt><tt>rtpengine_offer() to
      provide the new body into a variable (rather then changing the
      msg), so you can change the value of the variable and push it into
      the msg afterwards.<br>
      <br>
      PS: why do you do record_route_set() + record_route() in the same
      time ???<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2020Amsterdam/">https://www.opensips.org/events/Summit-2020Amsterdam/</a>

</pre>
    <div class="moz-cite-prefix">On 3/19/20 1:21 PM, Mark Farmer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOvQDesQz01-VWYBtbHik=PjKrkxOT+TpQ5JL7OvvfpT-O49EA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">Hi everyone<br clear="all">
                <div><br>
                </div>
                <div>I am trying to remove a line from the SDP resulting
                  from rtpengine_offer() but it's not working for me.
                  Can anyone tell me what I am doing wrong please?</div>
                <div><br>
                </div>
                <div>
                  <div>
                    <div>if (is_from_gw("2")) {</div>
                    <div>                remove_hf("Contact","g");</div>
                    <div>                insert_hf("Contact:
                      <a class="moz-txt-link-rfc2396E" href="sip:$fU@$var(fqdn):5061;did=$DLG_did"><sip:$fU@$var(fqdn):5061;did=$DLG_did></a>\r\n");</div>
                    <div>                xlog("CUSTOM_LOG: Call to
                      Microsoft - Adjusting SIP Headers & SDP");</div>
                    <div>               
                      set_advertised_address("$var(fqdn)");</div>
                    <div>               
                      record_route_preset("my.fqdn:5061;transport=tls",
                      "XXX.XXX.XXX.XXX:5060");</div>
                    <div>                add_rr_param(";r2=on");</div>
                    <div>                record_route();</div>
                    <div>                if
                      (replace_body("a=setup:actpass","")) {</div>
                    <div>                        xlog("CUSTOM_LOG:
                      Removed a=setup:actpass line from SDP");</div>
                    <div>                }</div>
                    <div>}</div>
                  </div>
                </div>
                <div><br>
                </div>
                <div>I have also tried:</div>
                <div><br>
                </div>
                <div><font face="arial, sans-serif"><span
                      style="color:rgb(0,0,0)">if
                      (replace_body("a=setup:actpass\r",""))</span><br>
                  </font></div>
                <div><font face="arial, sans-serif" color="#000000"><span
                      style="caret-color: rgb(0, 0, 0);">and</span></font></div>
                <div><span style="color:rgb(0,0,0)"><font face="arial,
                      sans-serif">if
                      (replace_body("a=setup:actpass\r\n",""))</font></span><font
                    size="3" face="-webkit-standard" color="#000000"><span
                      style="caret-color: rgb(0, 0, 0);"><br>
                    </span></font></div>
                <div><span
                    style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium"><br>
                  </span></div>
                <div>Many thanks</div>
                <div>Mark.</div>
                <div><br>
                </div>
              </div>
            </div>
          </div>
        </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>
    <br>
  </body>
</html>