<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>if it is onreply_route{} (or reply_route{}), then it is executed
for SIP replies, not requests.</p>
<p>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).</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 26.09.17 09:17, Jurijs Ivolga wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOrA2UaztdKxbFamLotJvPMCX5HSyEohZ+yPS5q1F8N375RZVw@mail.gmail.com">
<div dir="ltr">
<div>Hi,<br>
<br>
</div>
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.<br>
<br>
Here is code snippet:<br>
<br>
onreply_route {<br>
if ( $rm == "INVITE" && status=="200") {<br>
if (search_body("a=fingerprint")) {<br>
if (search_body(" RTP/SAVPF "))
{<br>
xlog("L_INFO","200 OK
DTLS call.\n");<br>
replace_body_all("
RTP/SAVPF "," UDP/TLS/RTP/SAVPF ");<br>
}<br>
}<br>
}<br>
}<br>
<br>
<div>
<div>What I'm doing wrong?</div>
<div><br>
</div>
<div>I think my code is executed against SDP of Invite, but
not 200 OK.<br>
</div>
<div><br clear="all">
<div>
<div class="gmail_signature">
<div dir="ltr">Jurijs<br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>