Hi Mark,

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. What you have to do is to tell 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.

PS: why do you do record_route_set() + record_route() in the same time ???

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/19/20 1:21 PM, Mark Farmer wrote:
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.


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to