Dear list I am quite new to Kamailio and i have been able to solve some NAT Traversal issues with symmetric SIP+RTP putting kamailio+rtpproxy behind NAT, i am also load balancing some asterisk boxes for transcoding and some other services like voicemail. Also i am using SIPp for load testing
Now the question is that, while everything is working great with NAT (even when i am using SIPp for testing with low load) when i am about to test it with more than 150 calls or something i am starting to get the following error: *kamailio[34549]: ERROR: rtpproxy [rtpproxy.c:2735]: force_rtp_proxy(): incorrect port 0 in reply from rtp proxy* I have been trying to look at some SIP packets when the error starts and i am not seeing anything out of the normal (while being quite difficult to debug when having so many concurrent calls at SIP level) My configuration doesnt have anything new, the only thing is that, because Kamailio is behind NAT i used some ideas from some other users and debates from this same mailing list: *# RTPProxy control* *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(!route(FROMASTERISK)){* * force_send_socket(10.0.1.207);* * rtpproxy_manage("rw","10.0.1.206");* * }else{* * force_send_socket(10.0.1.206);* * rtpproxy_manage("rw","10.0.5.203");* * }* * if (is_request()) {* * if (!has_totag()) {* * add_rr_param(";nat=yes");* * }* * }* * if (is_reply()) {* * if(isbflagset(FLB_NATB)) {* * fix_nated_contact();* * }* *#!endif* * return;* *}* This solution is based of someone's idea from this mailing list: http://lists.sip-router.org/pipermail/sr-users/2013-January/076254.html As you can see in my configuration, my "public network" is really private network so i tweak the NATDETECT route to not include RFC1918 networks as part of the detection *# Caller NAT detection route* *route[NATDETECT] {* *#!ifdef WITH_NAT* *if (nat_uac_test("1")) {* * if (nat_uac_test("18")) {* * force_rport();* * if (is_method("REGISTER")) {* * fix_nated_register();* * } else {* * fix_nated_contact();* * }* * setflag(FLT_NATS);* * return;* * }* * }* *#!endif* * return;* *}* Also i would like to know how may i use RTPProxy logs?, i tried to configure it like this: /etc/rsyslog.conf *# Kamailio logging* *local0.* -/var/log/kamailio.log* *#RTPProxy logging* *local3.* /var/log/rtpproxy.log* /etc/sysconfig/rtpproxy *OPTIONS="-l 10.0.1.206 -A 10.0.5.203 -s udp:127.0.0.1:7722 <http://127.0.0.1:7722> -r /var/lib/rtpproxy/sessions -d DBUG:LOG_LOCAL3 -m 35000 -M 55000 -F"* I cannot see anyhing in the logs Thank you very much Alejandro
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users