Dear All,
I'm using the below config plan for routing my calls...The issue that forcing rtp proxy is not working well and the rtp proxy is never forced....Can you please provide me a guidance here?
if($rU=~"^00.*" ) {
if(!cr_route("default", "domain.com", "$rU", "$rU", "call_id")){ sl_send_reply("403", "Not allowed"); } else {
setbflag(6); route(1); } exit; ## this was missing here -bogdan!!! } else { route(LOCATION);
route(RELAY); } }
############# THIS IS THE GENERIC RELAY ROUTE THAT MUST BE USED ALL THE TIME FOR RELAY route[1] {
# apply any NAT changes? if(isflagset(5)||isbflagset(6)) { route(4); }
exit; }
route[4] {
if (is_method("BYE|CANCEL")) { unforce_rtp_proxy(); } else if (is_method("INVITE")){
if (nat_uac_test("8")) { * force_rtp_proxy();* } else { force_rtp_proxy(); } xlog("L_ERR","66666666666666666666666666666666666666666"); t_on_failure("1"); t_on_reply("1");
};
The call is going through Route[1] then through Route[4], but rtp proxy is never forced...Any tips please?
Regards
Are you sure that force_rtp_proxy is not called?
Instead of
if (nat_uac_test("8")) { * force_rtp_proxy();* } else { force_rtp_proxy(); }
try:
xlog("L_ERR","route(4): method = $rm"); if (is_method("BYE|CANCEL")) { xlog("L_ERR","route(4): cancel or bye -> unforce_rtp_proxy ..."); unforce_rtp_proxy(); xlog("L_ERR","route(4): cancel or bye -> unforce_rtp_proxy ... done"); } else if (is_method("INVITE")){ xlog("L_ERR","route(4): INVITE -> force_rtp_proxy ..."); force_rtp_proxy(); xlog("L_ERR","route(4): INVITE -> force_rtp_proxy ..."); }
also you can try to increase debug level and make sure that rtp proxy is running.
You can alos change rtpproxy to listen on a UDP socket and reconfigure kamailio to connect to rtpproxy via UDP transport - then you can watch communication between kamailio and rtpproxy using a packet sniffer on the loopback interface.
regards klaus