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

Jurijs Ivolga jurijs.ivolga at gmail.com
Tue Sep 26 10:49:48 CEST 2017


Hi,

Sorry it was my mistake, I was searching for wrong string. :)

With kind regards,

Jurijs

On Tue, Sep 26, 2017 at 10:47 AM, Daniel-Constantin Mierla <
miconda at gmail.com> wrote:

> 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 Listsr-users at lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.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/2edc10bb/attachment.html>


More information about the sr-users mailing list