Hello,
if it is onreply_route{} (or reply_route{}), then it is executed for SIP
replies, not requests.
Are you sure it is executed against the INVITE request? You can add an
xlog at the top of the block and see in the logs if it is reply or
request (there are functions or variables for it).
Cheers,
Daniel
On 26.09.17 09:17, Jurijs Ivolga wrote:
Hi,
I have difficult times to edit SDP in 200 ok replies, I need to change
RTP/SAVPF to UDP/TLS/RTP/SAVPF in all 200 Ok.
Here is code snippet:
onreply_route {
if ( $rm == "INVITE" && status=="200") {
if (search_body("a=fingerprint")) {
if (search_body(" RTP/SAVPF ")) {
xlog("L_INFO","200 OK DTLS
call.\n");
replace_body_all(" RTP/SAVPF
"," UDP/TLS/RTP/SAVPF ");
}
}
}
}
What I'm doing wrong?
I think my code is executed against SDP of Invite, but not 200 OK.
Jurijs
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training -
www.asipto.com
Kamailio World Conference -
www.kamailioworld.com