aft
2014-10-21 12:29:14 UTC
Hi,
I'm trying to re packet rtp streams based on Destination IP. I've
implemented it like below :
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;
if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
xlog("Destination [$du]...");
if ($du == "108.59.14.153")
rtpproxy_manage("coz20");
else
rtpproxy_manage("coz100");
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
rtpproxy_manage("coz100");
}
#!endif
return;
}
But its not working, and the log comes up like :
Oct 21 08:12:33 srv4617 /usr/local/sbin/kamailio[28346]: ERROR: <script>:
Destination...... <null>
I'm trying to re packet rtp streams based on Destination IP. I've
implemented it like below :
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;
if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
xlog("Destination [$du]...");
if ($du == "108.59.14.153")
rtpproxy_manage("coz20");
else
rtpproxy_manage("coz100");
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
rtpproxy_manage("coz100");
}
#!endif
return;
}
But its not working, and the log comes up like :
Oct 21 08:12:33 srv4617 /usr/local/sbin/kamailio[28346]: ERROR: <script>:
Destination...... <null>