[OpenSIPS-Users] replace_body()

Mark Farmer farmorg at gmail.com
Thu Mar 19 11:21:03 EST 2020


Hi everyone

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?

if (is_from_gw("2")) {
                remove_hf("Contact","g");
                insert_hf("Contact: <sip:$fU@
$var(fqdn):5061;did=$DLG_did>\r\n");
                xlog("CUSTOM_LOG: Call to Microsoft - Adjusting SIP Headers
& SDP");
                set_advertised_address("$var(fqdn)");
                record_route_preset("my.fqdn:5061;transport=tls",
"XXX.XXX.XXX.XXX:5060");
                add_rr_param(";r2=on");
                record_route();
                if (replace_body("a=setup:actpass","")) {
                        xlog("CUSTOM_LOG: Removed a=setup:actpass line from
SDP");
                }
}

I have also tried:

if (replace_body("a=setup:actpass\r",""))
and
if (replace_body("a=setup:actpass\r\n",""))

Many thanks
Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200319/bbe00e36/attachment.html>


More information about the Users mailing list