Re: can't use msg_apply_changes() on failure route?

Daniel-Constantin Mierla via sr-users <[email protected]> Thu, 23 Apr 2026 09:38:38 +0200
Newsgroups gmane.comp.voip.ser
Message-ID <[email protected]>
Hello,

yes, that is known and documented, once the transaction is created,
there are too many references/timer routines/callbacks that can be impacted.

However, if you are using 6.1.x, there is an option via branch route,
which should be the recommended way, not in the failure route:

  -
https://www.kamailio.org/docs/modules/devel/modules/tm.html#tm.f.t_msg_apply_changes

Cheers,
Daniel

On 23.04.26 01:35, David Villasmil via sr-users wrote:
> Hello all,
>
> I need to make changes on the SDP. The first change is fine on the
> request route, but i only need to make changes to it in the failure
> route to set it properly for the failover endpoint. 
> I restore the sdp, but my problem is i can't modify it since i can't
> manipulate it: 
>
>             # Restore original dual-transport SDP before stripping for
> new dest -- $avp(orig_sdp) was saved on the initial request route.
>             set_body("$avp(orig_sdp)", "application/sdp");  
>
>             # Strip unsupported transport for new destination
>             if ( $du =~ "tls" ) {
>                 xlogl("L_INFO", "[RTF_CARRIER] TLS dest - stripping
> RTP/AVP\n");
>                 sdp_remove_transport("RTP/AVP");
>             } else {
>                 xlogl("L_INFO", "[RTF_CARRIER] Non-TLS dest -
> stripping RTP/SAVP\n");
>                 sdp_remove_transport("RTP/SAVP");
>             }
>
> Any ideas how to accomplish this?
>
> Thanks!
>
>
>
> Regards,
>
> David Villasmil
> email: [email protected]
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the sender!

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!