[SR-Users] How to change SDP in 200 Ok reply

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 26 09:47:06 CEST 2017


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 at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170926/d56d9a48/attachment.html>


More information about the sr-users mailing list