<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Denis,<br>
<br>
3xx is a final response and it cannot be simply drop (as will let
the transaction state machine in an ambiguous state). Not to mention
that you will de-syncronize the callee side (which rejected the
call) and the caller side (still waiting for a final answer).<br>
<br>
What you can do is to replace the 3xx with another final negative
reply. Use a failure_route to do that:<br>
<br>
failure_route[block_redirect]<br>
{<br>
if (t_check_status("3[0-9][0-9]))<br>
t_reply("404","Not Found");<br>
}<br>
<br>
Regards,<br>
<br>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 18.08.2016 11:58, Denis wrote:<br>
</div>
<blockquote cite="mid:686221444.20160818115830@ptl.ru" type="cite">
<title>reject 3xx code</title>
<span style=" font-family:'Times New Roman'; font-size: 12pt;">Hello<br>
<br>
I am using Opensips 2.1.2.<br>
I want to block sending 3xx codes to caller.<br>
<br>
In reply route i wrote such code <br>
if (status=~"30[1,2]") {<br>
drop();<br>
}<br>
<br>
but i see that 302, for example, still process successfully.<br>
<br>
Thank you for any help.<br>
<br>
<span style=" font-family:'arial'; font-size: 10pt;"><i>-- <br>
</i></span></span><a moz-do-not-send="true" style="
font-family:'arial'; font-size: 10pt;"
href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>