Re: [SR-Users] RTPProxy Issues

2016-07-17 Thread Maxim Sobolev
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 
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


Re: [SR-Users] RTPProxy Issues

2016-07-17 Thread Nathan Angelacos

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


[SR-Users] RTPProxy Issues

2016-07-17 Thread TEG AMJG
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
 -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


Re: [SR-Users] WEBRTC Confusion (2)

2016-07-17 Thread Colin Morelli
Zaka,

I could be wrong here but I don't think you ever actually have a "listen"
line for MY_WS_ADDR.

I believe you have a typo, as you have listen=MY_IP_ADDR twice, once within
the guard for WITH_WEBSOCKETS. Replace the one inside the if with
MY_WS_ADDR and I think your problem should be resolved.

Best,
Colin

On Sat, Jul 16, 2016 at 3:36 AM Zaka  wrote:

> Dear List:
>
> I am still stuck. Still unable to get Kamailio to listen on WEBRTC port*
> (in this case 8000)*
>
> Please advise if it has something to do with disabling TLS/MSRP?
>
>
> Please see the log & related config file in line here:
>
> *Log:*
>
>  0(5724) INFO:  [ppcfg.c:82]: pp_subst_add(): ### added subst
> expression: !MY_WS_PORT!8000!g
>
>
> *and the result of config file check:*
>
> root@callcntr:/usr/local/etc/kamailio# kamailio -eE -ddd -cf
> /usr/local/etc/kamailio/websocket.cfg
>  0(5902) INFO:  [main.c:1911]: main(): private (per process) memory:
> 8388608 bytes
>  0(5902) DEBUG:  [mem/f_malloc.c:323]: fm_malloc_init():
> fm_malloc_init: F_OPTIMIZE=16384, /ROUNDTO=2048
>  0(5902) DEBUG:  [mem/f_malloc.c:325]: fm_malloc_init():
> fm_malloc_init: F_HASH_SIZE=2099, fm_block size=33912
>  0(5902) DEBUG:  [mem/f_malloc.c:327]: fm_malloc_init():
> fm_malloc_init(0x7f9ca6e1f010, 8388608), start=0x7f9ca6e1f010
>  0(5902) DEBUG:  [route.c:129]: route_add(): mapping routing block
> (0xac2700)[0] to 0
>  0(5902) DEBUG:  [route.c:129]: route_add(): mapping routing block
> (0xac2680)[0] to 0
>  0(5902) DEBUG:  [route.c:129]: route_add(): mapping routing block
> (0xac26c0)[0] to 0
>  0(5902) DEBUG:  [route.c:129]: route_add(): mapping routing block
> (0xac2720)[0] to 0
>  0(5902) DEBUG:  [route.c:129]: route_add(): mapping routing block
> (0xac26a0)[0] to 0
>  0(5902) DEBUG:  [route.c:129]: route_add(): mapping routing block
> (0xac26e0)[0] to 0
>  0(5902) DEBUG:  [pvapi.c:1976]: pv_init_buffer(): PV print buffer
> initialized to [10][8192]
>  0(5902) DEBUG:  [main.c:2097]: main(): read 286773155 from
> /dev/urandom
>  0(5902) DEBUG:  [main.c:2103]: main(): seeding PRNG with 1755363211
>  0(5902) DEBUG:  [main.c:2107]: main(): test random numbers
> 726213135 321707966 991183401
>  0(5902) DEBUG:  [re.c:313]: subst_parser(): ok, se is 0x7f9ca6e3fc48
>  0(5902) INFO:  [ppcfg.c:82]: pp_subst_add(): ### added subst
> expression: !DBURL!mysql://kamailio:kamailiorw@localhost/kamailio!g
>  0(5902) DEBUG:  [cfg.lex:1690]: pp_define(): defining id: DBURL
>  0(5902) DEBUG:  [cfg.lex:1776]: pp_define_set(): ### setting define
> ID [DBURL] value [mysql://kamailio:kamailiorw@localhost/kamailio]
>  0(5902) DEBUG:  [ppcfg.c:160]: pp_substdef_add(): ### added
> substdef: [DBURL]=[mysql://kamailio:kamailiorw@localhost/kamailio] (0)
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:313]: subst_parser(): ok, se is 0x7f9ca6e3ffe8
>  0(5902) INFO:  [ppcfg.c:82]: pp_subst_add(): ### added subst
> expression: !MY_IP_ADDR!192.168.1.16!g
>  0(5902) DEBUG:  [cfg.lex:1690]: pp_define(): defining id: MY_IP_ADDR
>  0(5902) DEBUG:  [cfg.lex:1776]: pp_define_set(): ### setting define
> ID [MY_IP_ADDR] value [192.168.1.16]
>  0(5902) DEBUG:  [ppcfg.c:160]: pp_substdef_add(): ### added
> substdef: [MY_IP_ADDR]=[192.168.1.16] (0)
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:313]: subst_parser(): ok, se is 0x7f9ca6e40320
>  0(5902) INFO:  [ppcfg.c:82]: pp_subst_add(): ### added subst
> expression: !MY_DOMAIN!callcntr.com.al!g
>  0(5902) DEBUG:  [cfg.lex:1690]: pp_define(): defining id: MY_DOMAIN
>  0(5902) DEBUG:  [cfg.lex:1776]: pp_define_set(): ### setting define
> ID [MY_DOMAIN] value [callcntr.com.al]
>  0(5902) DEBUG:  [ppcfg.c:160]: pp_substdef_add(): ### added
> substdef: [MY_DOMAIN]=[callcntr.com.al] (0)
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:313]: subst_parser(): ok, se is 0x7f9ca6e40658
>  0(5902) INFO:  [ppcfg.c:82]: pp_subst_add(): ### added subst
> expression: !MY_WS_PORT!8000!g
>  0(5902) DEBUG:  [cfg.lex:1690]: pp_define(): defining id: MY_WS_PORT
>  0(5902) DEBUG:  [cfg.lex:1776]: pp_define_set(): ### setting define
> ID [MY_WS_PORT] value [8000]
>  0(5902) DEBUG:  [ppcfg.c:160]: pp_substdef_add(): ### added
> substdef: [MY_WS_PORT]=[8000] (0)
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str(): no match
>  0(5902) DEBUG:  [re.c:436]: subst_run(): running. r=1
>  0(5902) DEBUG:  [re.c:505]: subst_str():