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
On 07/17/2016 05:49 PM, TEG AMJG wrote:
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/
A guess, but each call takes 4 file descriptors, so you might be running into the normal os limit of 1024 open files per process. Recent rtpproxy versions have the -L option to increase the limit. It should be 4 times the number of concurrent calls you expect to handle.
Again, just a guess.
Yes, that's probably it. There should be also some error in the log that rtpproxy emits, so you might want to check that. I see people run into this from time to time, perhaps we need to check and put out a big warning in red if the OS limit appers to be too low?
-Max
On Sun, Jul 17, 2016 at 3:18 PM, Nathan Angelacos nangel@nothome.org wrote:
On 07/17/2016 05:49 PM, TEG AMJG wrote:
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/
A guess, but each call takes 4 file descriptors, so you might be running into the normal os limit of 1024 open files per process. Recent rtpproxy versions have the -L option to increase the limit. It should be 4 times the number of concurrent calls you expect to handle.
Again, just a guess.
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
Hi again
Yes, i feel very dumb because i actually faced this problem in my testing with SIPp and with Asterisk before and it was all about open file description. I probably didnt think about it because I couldnt find anything in the logs about it which it is quite weird, the only thing that logs is the one mentioned before, I feel sorry for wasting your time but at the same time i have to thanks to you guys for helped me out.
Best Regards.
Alejandro
2016-07-17 23:43 GMT-04:00 Maxim Sobolev sobomax@sippysoft.com:
Yes, that's probably it. There should be also some error in the log that rtpproxy emits, so you might want to check that. I see people run into this from time to time, perhaps we need to check and put out a big warning in red if the OS limit appers to be too low?
-Max
On Sun, Jul 17, 2016 at 3:18 PM, Nathan Angelacos nangel@nothome.org wrote:
On 07/17/2016 05:49 PM, TEG AMJG wrote:
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/
A guess, but each call takes 4 file descriptors, so you might be running into the normal os limit of 1024 open files per process. Recent rtpproxy versions have the -L option to increase the limit. It should be 4 times the number of concurrent calls you expect to handle.
Again, just a guess.
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
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