Hello,
On 12/23/11 12:58 PM, Arif Tuhin wrote:
Hi,
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.
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:
*In main route*
route[RTPPROXY]{
if(is_method("BYE"){
unforce_rtp_proxy();
else if(is_method("INVITE")){
force_rtp_proxy();
}
*in onreply_route*
force_rtp_proxy("z160");
Now in kamailio 3.2 the *force_rtp_proxy()* is replaced by
*rtpproxy_manage(). *Here the script reads like:
*main route*
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;
rtpproxy_manage("z150");
if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
}
#!endif
return;
*onreply_route*
this block is called route[NATMANAGE].
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].
So please help me to write a block for onreply_route.
Thanks in advance.
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.
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.
Cheers,
Daniel
--
Daniel-Constantin Mierla --
http://www.asipto.com
http://linkedin.com/in/miconda --
http://twitter.com/miconda