<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<br>
On 12/23/11 12:58 PM, Arif Tuhin wrote:
<blockquote cite="mid:COL104-W47C39BAFC5E8E8A731419CAEAB0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
Hi,<br>
I'm using the new kamailio 3.2 which has some changes in
rtpproxy module. And i'm finding it hard to implement a certain
configuration.<br>
<br>
Because of our network infrastructure i have to repackage rtp
streams in one direction. Now in kamailio 3.1.5 i used to do
this in this way:<br>
<strong>In main route</strong><br>
route[RTPPROXY]{<br>
if(is_method("BYE"){<br>
unforce_rtp_proxy();<br>
else if(is_method("INVITE")){<br>
force_rtp_proxy();<br>
}<br>
<strong>in onreply_route</strong><br>
force_rtp_proxy("z160");<br>
<br>
Now in kamailio 3.2 the <strong>force_rtp_proxy()</strong> is
replaced by <strong>rtpproxy_manage(). </strong>Here the
script reads like:<br>
<strong>main route</strong><br>
route[NATMANAGE] {<br>
#!ifdef WITH_NAT<br>
if (is_request()) {<br>
if(has_totag()) {<br>
if(check_route_param("nat=yes")) {<br>
setbflag(FLB_NATB);<br>
}<br>
}<br>
}<br>
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))<br>
return;<br>
rtpproxy_manage("z150");<br>
if (is_request()) {<br>
if (!has_totag()) {<br>
add_rr_param(";nat=yes");<br>
}<br>
}<br>
if (is_reply()) {<br>
if(isbflagset(FLB_NATB)) {<br>
fix_nated_contact();<br>
}<br>
}<br>
#!endif<br>
return;<br>
<br>
<strong>onreply_route</strong><br>
this block is called route[NATMANAGE]. <br>
<br>
Now if i put rtpproxy_manage("z150"), it tries to repackage in
both direction which i do not want. So i need to write a
separate block for onreply_route instead of calling
route[NATMANAGE]. <br>
So please help me to write a block for onreply_route.<br>
Thanks in advance.
</div>
</blockquote>
just copy&paste route[NATMANGE] to a new name like
route[NATMANGEREPLY], update it to fit your needs and call it from
the reply route.<br>
<br>
Also, as you can see, there is an is_reply() function that you can
use in route[NATMANGE] to make an IF condition around
rtpproxy_mange() function to call it with different parameters.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>