Re: [SR-Users] Kamailio 5.0 can't get version of the RTP proxy

2017-04-10 Thread Yebe diomande Keffa
After started with  -F as mentioned above, i got :

rtpproxy -F -l 5.135.177.203 -s udp:localhost:7722

Log message

Apr 10 11:47:03 ns3033789 /usr/local/sbin/kamailio[3120]: INFO: rtpproxy 
[rtpproxy.c:1386]: rtpp_test(): rtp proxy  found, support 
for it enabled

 

When i check :

root@ns3033789:~# ps -auxw | grep -i rtpproxy

root  2951  1.2  0.0 130696   692 ?Ssl  11:46   0:04 rtpproxy -F -l 
5.135.177.203 -s udp:localhost 7722

root  3411  0.0  0.0  13204   972 pts/0S+   11:52   0:00 grep -i 
rtpproxy

 

thank you to everyone

 

 

De : sr-users <sr-users-boun...@lists.sip-router.org> au nom de 
Daniel-Constantin Mierla <mico...@gmail.com>
Répondre à : <mico...@gmail.com>, "Kamailio (SER) - Users Mailing List" 
<sr-users@lists.sip-router.org>
Date : lundi 10 avril 2017 à 09:42
À : "Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Objet : Re: [SR-Users] Kamailio 5.0 can't get version of the RTP proxy

 

iirc, with that log message the rtpproxy is not starting if you don't provide 
the -u or -F parameter.

The netstat shows only kamailio as application, no rtpproxy. See if rtpproxy is 
in the process running table, like:

ps -auxw | grep -i rtpproxy

Cheers,
Daniel

 

On 10.04.17 11:21, Yebe diomande Keffa wrote:

YES, i think rtpproxy is running 

 

root@ns3033789:/usr/local/src/kamailio-5.0/rtpproxy# netstat -np  | grep 7722

udp0  0 127.0.0.1:43042 127.0.0.1:7722  ESTABLISHED 
13084/kamailio  

udp0  0 127.0.0.1:38992 127.0.0.1:7722  ESTABLISHED 
13062/kamailio  

udp0  0 127.0.0.1:47217 127.0.0.1:7722  ESTABLISHED 
13093/kamailio  

udp0  0 127.0.0.1:43185 127.0.0.1:7722  ESTABLISHED 
13086/kamailio  

udp0  0 127.0.0.1:49354 127.0.0.1:7722  ESTABLISHED 
13113/kamailio  

udp0  0 127.0.0.1:51461 127.0.0.1:7722  ESTABLISHED 
13097/kamailio  

udp0  0 127.0.0.1:43428 127.0.0.1:7722  ESTABLISHED 
13065/kamailio  





i started RTPproxy like this:



root@ns3033789:/usr/local/src/kamailio-5.0/rtpproxy# rtpproxy -l 5.135.177.203 
-s udp:localhost:7722

rtpproxy: running this program as superuser in a remote control mode is 
strongly not recommended, as it poses serious security threat to your system. 
Use -u option to run as an unprivileged user or -F is you want to run as a 
superuser anyway.







Keffa Y. Diomande
Skype : keffadi
Tel : +225 02 77 22 22
Office : Abidjan Ciad
http://www.alcall.net
 

 

Le 10 avr. 2017 à 09:11, Alex Balashov <abalas...@evaristesys.com> a écrit :

 

ascertained

 




___
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


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
___ 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] Kamailio 5.0 can't get version of the RTP proxy

2017-04-10 Thread Daniel-Constantin Mierla
iirc, with that log message the rtpproxy is not starting if you don't
provide the -u or -F parameter.

The netstat shows only kamailio as application, no rtpproxy. See if
rtpproxy is in the process running table, like:

ps -auxw | grep -i rtpproxy

Cheers,
Daniel


On 10.04.17 11:21, Yebe diomande Keffa wrote:
> YES, i think rtpproxy is running
>
> root@ns3033789:/usr/local/src/kamailio-5.0/rtpproxy# netstat -np  |
> grep 7722
> udp0  0 127.0.0.1:43042 127.0.0.1:7722 
> ESTABLISHED 13084/kamailio  
> udp0  0 127.0.0.1:38992 127.0.0.1:7722 
> ESTABLISHED 13062/kamailio  
> udp0  0 127.0.0.1:47217 127.0.0.1:7722 
> ESTABLISHED 13093/kamailio  
> udp0  0 127.0.0.1:43185 127.0.0.1:7722 
> ESTABLISHED 13086/kamailio  
> udp0  0 127.0.0.1:49354 127.0.0.1:7722 
> ESTABLISHED 13113/kamailio  
> udp0  0 127.0.0.1:51461 127.0.0.1:7722 
> ESTABLISHED 13097/kamailio  
> udp0  0 127.0.0.1:43428 127.0.0.1:7722 
> ESTABLISHED 13065/kamailio  
>
>
> i started RTPproxy like this:
>
> root@ns3033789:/usr/local/src/kamailio-5.0/rtpproxy# rtpproxy -l
> 5.135.177.203 -s udp:localhost:7722
> rtpproxy: running this program as superuser in a remote control mode
> is strongly not recommended, as it poses serious security threat to
> your system. Use -u option to run as an unprivileged user or -F is you
> want to run as a superuser anyway.
>
>
>
> Keffa Y. Diomande
> Skype : keffadi
> Tel : +225 02 77 22 22
> Office : Abidjan Ciad
> http://www.alcall.net
>  
>
>
>> Le 10 avr. 2017 à 09:11, Alex Balashov > > a écrit :
>>
>> ascertained
>
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio 5.0 can't get version of the RTP proxy

2017-04-10 Thread Yebe diomande Keffa
YES, i think rtpproxy is running

root@ns3033789:/usr/local/src/kamailio-5.0/rtpproxy# netstat -np  | grep 7722
udp0  0 127.0.0.1:43042 127.0.0.1:7722  ESTABLISHED 
13084/kamailio  
udp0  0 127.0.0.1:38992 127.0.0.1:7722  ESTABLISHED 
13062/kamailio  
udp0  0 127.0.0.1:47217 127.0.0.1:7722  ESTABLISHED 
13093/kamailio  
udp0  0 127.0.0.1:43185 127.0.0.1:7722  ESTABLISHED 
13086/kamailio  
udp0  0 127.0.0.1:49354 127.0.0.1:7722  ESTABLISHED 
13113/kamailio  
udp0  0 127.0.0.1:51461 127.0.0.1:7722  ESTABLISHED 
13097/kamailio  
udp0  0 127.0.0.1:43428 127.0.0.1:7722  ESTABLISHED 
13065/kamailio  


i started RTPproxy like this:

root@ns3033789:/usr/local/src/kamailio-5.0/rtpproxy# rtpproxy -l 5.135.177.203 
-s udp:localhost:7722
rtpproxy: running this program as superuser in a remote control mode is 
strongly not recommended, as it poses serious security threat to your system. 
Use -u option to run as an unprivileged user or -F is you want to run as a 
superuser anyway.



Keffa Y. Diomande
Skype : keffadi
Tel : +225 02 77 22 22
Office : Abidjan Ciad
http://www.alcall.net
 


> Le 10 avr. 2017 à 09:11, Alex Balashov  a écrit :
> 
> ascertained

___
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] Kamailio 5.0 can't get version of the RTP proxy

2017-04-10 Thread Alex Balashov
Have you ascertained that rtpproxy is actually running after you start
it?

On Mon, Apr 10, 2017 at 09:00:44AM +, Yebe diomande Keffa wrote:

> Hello
> 
> Getting this issu on Kamaiio 5.0 ( install from GIT):
> Apr 10 10:47:42 ns3033789 /usr/local/sbin/kamailio[11496]: WARNING: rtpproxy 
> [rtpproxy.c:1366]: rtpp_test(): can't get version of the RTP proxy
> Apr 10 10:47:42 ns3033789 /usr/local/sbin/kamailio[11488]: WARNING: rtpproxy 
> [rtpproxy.c:1403]: rtpp_test(): support for RTP proxy  
> has been disabled temporarily
> 
> I done install of RTPproxy with:
> $ git clone -b master https://github.com/sippy/rtpproxy.git
> $ git -C rtpproxy submodule update --init --recursive
> $ cd rtpproxy
> $ ./configure
> $ make
> $ make install
> $ rtpproxy -l 5.135.177.203 -s udp:localhost:7722
> 
> Before i install  mysql-server & kamdbctl create (rtpproxy table), it was 
> working fine
> Someone to advise please!
> 
> Keffa Y. Diomande
> Skype : keffadi
> Tel : +225 02 77 22 22
> Office : Abidjan Ciad
> http://www.alcall.net
>  
> 
> 

> ___
> 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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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] Kamailio 5.0 can't get version of the RTP proxy

2017-04-10 Thread Yebe diomande Keffa
Hello

Getting this issu on Kamaiio 5.0 ( install from GIT):
Apr 10 10:47:42 ns3033789 /usr/local/sbin/kamailio[11496]: WARNING: rtpproxy 
[rtpproxy.c:1366]: rtpp_test(): can't get version of the RTP proxy
Apr 10 10:47:42 ns3033789 /usr/local/sbin/kamailio[11488]: WARNING: rtpproxy 
[rtpproxy.c:1403]: rtpp_test(): support for RTP proxy  has 
been disabled temporarily

I done install of RTPproxy with:
$ git clone -b master https://github.com/sippy/rtpproxy.git
$ git -C rtpproxy submodule update --init --recursive
$ cd rtpproxy
$ ./configure
$ make
$ make install
$ rtpproxy -l 5.135.177.203 -s udp:localhost:7722

Before i install  mysql-server & kamdbctl create (rtpproxy table), it was 
working fine
Someone to advise please!

Keffa Y. Diomande
Skype : keffadi
Tel : +225 02 77 22 22
Office : Abidjan Ciad
http://www.alcall.net
 


___
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] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk

2017-04-06 Thread Daniel-Constantin Mierla
Hello,

I am not sure I got the proper picture of what do you want to achieve.
Do you want to authenticate the registration twice, once by kamailio and
second by asterisk?

Cheers,
Daniel


On 03.04.17 01:05, Marko Tirs wrote:
> Hello all,
>
> I am trying to use Kamailio 5.0 with Asterisk (separate IP addresses,
> both port 5060),
> but Asterisk doesn't register the SIP clients which comes through
> Kamailio.
> If I register the same user directly to the Asterisk then it works!
> 1st REGISTER
> is also without Authorization (Digest name) but in the 2nd REGISTER it
> exists
> and registration goes OK.
>
> How to use Kamailio with Asterisk in the way the SIP client is
> registered on both of them?
> Thank you
> Marko
>
>
> SIP-CLIENT DIRECTLY TO ASTERISK:
> ---
> 12017-04-01 15:20:48.331806192.168.0.12192.168.0.2  
>  SIP544Request: REGISTER sip:192.168.0.2  (1 binding) |
> 22017-04-01 15:20:48.332998192.168.0.2192.168.0.12  
>  SIP626Status: 401 Unauthorized |
> 32017-04-01 15:20:48.333814192.168.0.12192.168.0.2  
>  SIP700Request: REGISTER sip:192.168.0.2  (1 binding) |
> 42017-04-01 15:20:48.335975192.168.0.2192.168.0.12  
>  SIP647Status: 200 OK  (1 binding) |
>
> Frame 3: 700 bytes on wire (5600 bits), 700 bytes captured (5600 bits)
> on interface 0
> Ethernet II, Src: AsrockIn_0a:0b:46 (70:85:c2:0a:0b:46), Dst:
> Raspberr_a1:fd:f7 (b8:27:eb:a1:fd:f7)
> Internet Protocol Version 4, Src: 192.168.0.12, Dst: 192.168.0.2
> User Datagram Protocol, Src Port: 64369, Dst Port: 5060
> Session Initiation Protocol (REGISTER)
> Request-Line: REGISTER sip:192.168.0.2 SIP/2.0
> Message Header
> Via: SIP/2.0/UDP
> 192.168.0.12:64369;rport;branch=z9hG4bKPj9f8759c0537b4834bb411358d0b0a2ff
> Max-Forwards: 70
> From: "33"
> ;tag=4c586be1fcf842359e7d429abcb0b213
> To: "33" 
> Contact:
> ;+sip.instance=""
> Call-ID: d3c240808c934b77a9bbcb8bd4c1bd8c
> CSeq: 2 REGISTER
> Expires: 600
> Supported: gruu
> User-Agent: Blink 3.0.0 (Windows)
> Authorization: Digest username="33", realm="asterisk",
> nonce="76ca37d8", uri="sip:192.168.0.2",
> response="19fc1a634abc72c41dcb516470c34fc2", algorithm=MD5
> Authentication Scheme: Digest
> Username: "33"
> Realm: "asterisk"
> Nonce Value: "76ca37d8"
> Authentication URI: "sip:192.168.0.2"
> Digest Authentication Response:
> "19fc1a634abc72c41dcb516470c34fc2"
> Algorithm: MD5
> Content-Length:  0
>
>
> SIP-CLIENT TO KAMAILIO WITH FORWARD TO ASTERISK:
> --
> 112017-04-01 15:21:06.806347192.168.0.13192.168.0.2  
>  SIP459Request: REGISTER sip:192.168.0.2:5060  (1 binding) |
> 122017-04-01 15:21:06.807514192.168.0.2192.168.0.13  
>  SIP608Status: 401 Unauthorized |
> 132017-04-01 15:21:06.814819192.168.0.13192.168.0.2  
>  SIP456Request: REGISTER sip:192.168.0.2:5060  (remove 1
> binding) |
> 142017-04-01 15:21:06.815712192.168.0.2192.168.0.13  
>  SIP608Status: 401 Unauthorized |
> 152017-04-01 15:21:06.821125192.168.0.13192.168.0.2  
>  SIP459Request: REGISTER sip:192.168.0.2:5060  (1 binding) |
> 162017-04-01 15:21:06.821910192.168.0.2192.168.0.13  
>  SIP608Status: 401 Unauthorized |
>
> Frame 15: 459 bytes on wire (3672 bits), 459 bytes captured (3672
> bits) on interface 0
> Ethernet II, Src: Micro-St_de:b2:3a (00:24:21:de:b2:3a), Dst:
> Raspberr_a1:fd:f7 (b8:27:eb:a1:fd:f7)
> Internet Protocol Version 4, Src: 192.168.0.13, Dst: 192.168.0.2
> User Datagram Protocol, Src Port: 5060, Dst Port: 5060
> Session Initiation Protocol (REGISTER)
> Request-Line: REGISTER sip:192.168.0.2:5060 SIP/2.0
> Message Header
> Via: SIP/2.0/UDP
> 192.168.0.13;branch=z9hG4bKd101.0ad599b6.0
> To: 
> SIP to address: sip:32@192.168.0.2
> From:
> ;tag=533cb9e91f4b999cf76861cbb9ed54ed-85c4
> SIP from address: sip:32@192.168.0.2
> SIP from tag: 533cb9e91f4b999cf76861cbb9ed54ed-85c4
> CSeq: 10 REGISTER
> Call-ID: 41df282f10fdc7b6-2773@127.0.0.1
> Max-Forwards: 70
> Content-Length: 0
> User-Agent: kamailio (5.0.0 (x86_64/linux))
> Contact: 
> Contact URI: sip:32@192.168.0.13:5060
> Expires: 3600
>
>
>
> kamailio.cfg:
> 
>
> #!define WITH_DEBUG
> #!define WITH_MYSQL
> #!define WITH_AUTH
> #!define WITH_USRLOCDB
> #!define WITH_ASTERISK
> ...
>
> #!ifdef WITH_ASTERISK
> 

Re: [SR-Users] Kamailio 5.0.0 KEMI Lua event routes

2017-04-05 Thread Daniel-Constantin Mierla
Hello,

execution of event routes for kemi was added. You have to use master
branch for now.

Anyhow, I expect that maybe some functions from this modules were not
yet exported to kemi -- if you give the list of the functions you use in
your config from this modules, I will add them.

Cheers,
Daniel


On 04.04.17 20:59, José Seabra wrote:
> Hello Daniel,
> Thanks a lot for you help.
> I will start testing it for Dispatcher and Dialog.
>
> Thank you for your great job.
> Regards
>
> 2017-04-04 16:29 GMT+01:00 Daniel-Constantin Mierla  >:
>
> Hello,
>
> On 01.04.17 15:43, José Seabra wrote:
> > Hi all,
> >
> > I'm starting using kamailio 5 and was trying to convert   my actual
> > routing scripts to new KEMI interface using Lua.
> > In my old script i'm using  event routes for the evapi, dialog and
> > dispatcher modules, so i was wondering how can i use it on KEMI. It
> > exports some special Lua function to the KEMI framework? Can anyone
> >  give an example please.
> each module needs a bit of code to be able to execute an equivalent of
> event_route blocks in an embedded interpreter via KEMI. I did it
> earlier
> today for dispatcher and dialog module, next will be evapi as you plan
> to use it -- I will let you know when it's ready so you can start
> testing. For now you can look at dialog/dispatcher docs, see the
> event_callback parameter.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda  --
> www.linkedin.com/in/miconda 
> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
> 
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
> 
>
>
> ___
> 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
> 
>
>
>
>
> -- 
> Cumprimentos
> José Seabra

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio Issue

2017-04-05 Thread Daniel-Constantin Mierla
Hello,


On 03.04.17 22:15, 노형균 wrote:
> Hello all, I’m newbie to Kamailio and I’m having problem with installation.
> I tried to install Kamailio through
>
> '/usr/local/sbin/kamdbctl create’ but it showed error that database engine 
> not specified.
>
> When I checked the kamctlrc file, the DBENGINE was already MYSQL. 
> (DBENGINE=MYSQL)
>
> What am I missing here??

By default that line is commented, remove the '#' character at the
beginning of the line.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio database fail

2017-04-05 Thread Daniel-Constantin Mierla
Hello,


On 03.04.17 22:53, 노형균 wrote:
> Hello all, I’m having problem again.
> After solving DBENGINE=MYSQL, I’ve been asked to type password but still get 
> this message.
> I’ve tried to install mysql-server but it showed the same.

when you install mysql-server you have to set the password, not to
provide an existing one.

Cheers,
Daniel

> What am I missing here?
>
> root@ubuntu:/home/parallels# kamdbctl create
> MySQL password for root: 
> INFO: test server charset
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
> '/var/run/mysqld/mysqld.sock' (2)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
> '/var/run/mysqld/mysqld.sock' (2)
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> /usr/local/lib64/kamailio//kamctl/kamdbctl.mysql: line 117: [: =: unary 
> operator expected
> INFO: creating database kamailio ...
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
> '/var/run/mysqld/mysqld.sock' (2)
> ERROR: Creating database kamailio failed!
>
> Regards,
> Hyoung Kyoon Roh
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio 5.0.0 KEMI Lua event routes

2017-04-04 Thread José Seabra
Hello Daniel,
Thanks a lot for you help.
I will start testing it for Dispatcher and Dialog.

Thank you for your great job.
Regards

2017-04-04 16:29 GMT+01:00 Daniel-Constantin Mierla :

> Hello,
>
> On 01.04.17 15:43, José Seabra wrote:
> > Hi all,
> >
> > I'm starting using kamailio 5 and was trying to convert   my actual
> > routing scripts to new KEMI interface using Lua.
> > In my old script i'm using  event routes for the evapi, dialog and
> > dispatcher modules, so i was wondering how can i use it on KEMI. It
> > exports some special Lua function to the KEMI framework? Can anyone
> >  give an example please.
> each module needs a bit of code to be able to execute an equivalent of
> event_route blocks in an embedded interpreter via KEMI. I did it earlier
> today for dispatcher and dialog module, next will be evapi as you plan
> to use it -- I will let you know when it's ready so you can start
> testing. For now you can look at dialog/dispatcher docs, see the
> event_callback parameter.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> 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
>



-- 
Cumprimentos
José Seabra
___
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] Kamailio 5.0.0 KEMI Lua event routes

2017-04-04 Thread Daniel-Constantin Mierla
Hello,

On 01.04.17 15:43, José Seabra wrote:
> Hi all,
>
> I'm starting using kamailio 5 and was trying to convert   my actual
> routing scripts to new KEMI interface using Lua.
> In my old script i'm using  event routes for the evapi, dialog and
> dispatcher modules, so i was wondering how can i use it on KEMI. It
> exports some special Lua function to the KEMI framework? Can anyone
>  give an example please.
each module needs a bit of code to be able to execute an equivalent of
event_route blocks in an embedded interpreter via KEMI. I did it earlier
today for dispatcher and dialog module, next will be evapi as you plan
to use it -- I will let you know when it's ready so you can start
testing. For now you can look at dialog/dispatcher docs, see the
event_callback parameter.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio database fail

2017-04-03 Thread 노형균
Hello all, I’m having problem again.
After solving DBENGINE=MYSQL, I’ve been asked to type password but still get 
this message.
I’ve tried to install mysql-server but it showed the same.
What am I missing here?

root@ubuntu:/home/parallels# kamdbctl create
MySQL password for root: 
INFO: test server charset
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
/usr/local/lib64/kamailio//kamctl/kamdbctl.mysql: line 117: [: =: unary 
operator expected
INFO: creating database kamailio ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)
ERROR: Creating database kamailio failed!

Regards,
Hyoung Kyoon Roh
___
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] Kamailio Issue

2017-04-03 Thread David Villasmil
Make sure kamdbctl is really using kamctlrc, I've had situations where is
was trying to use it from a different path...
On Mon, Apr 3, 2017 at 10:16 PM 노형균  wrote:

> Hello all, I’m newbie to Kamailio and I’m having problem with installation.
> I tried to install Kamailio through
>
> '/usr/local/sbin/kamdbctl create’ but it showed error that database engine
> not specified.
>
> When I checked the kamctlrc file, the DBENGINE was already MYSQL.
> (DBENGINE=MYSQL)
>
> What am I missing here??
>
> Cheers,
> Hyoung Kyoon Roh
> ___
> 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


[SR-Users] Kamailio Issue

2017-04-03 Thread 노형균
Hello all, I’m newbie to Kamailio and I’m having problem with installation.
I tried to install Kamailio through

'/usr/local/sbin/kamdbctl create’ but it showed error that database engine not 
specified.

When I checked the kamctlrc file, the DBENGINE was already MYSQL. 
(DBENGINE=MYSQL)

What am I missing here??

Cheers,
Hyoung Kyoon Roh
___
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] Kamailio 6.0 architecture

2017-04-03 Thread Daniel-Constantin Mierla
I though that the last decision was to make the core a kernel module and
use systemd-dbus for inter-module API -- have you fetched latest specs
from CVS repo?

Daniel

On 01.04.17 12:25, Olle E. Johansson wrote:
> Dear Kamailians!
>
> We got news for you! The Kamailio 6.0 architecture is finalised! It's 
> something we've been working on for a long time in the project team and 
> you've already seen part of it in the recent Kamailio 5 release - the KEMI 
> interface for LUA.
>
> We've realised that we have too many modules, especially all those IMS* 
> modules. And the core is getting slimmer and slimmer. This is what we're 
> going to do:
>
> * All RPC, EVENTAPI,AUTH, JSON, TM, HTTP_CLIENT and TLS modules will be 
> integrated back into the core. 
> * The EVENT API will be the core API for external modules
> * The rest of the functionality in the modules will have to be rewritten in 
> LUA and maintained as separate GITHUB projects outside of the core
>
> After successfully integrating LUA into the heart of Kamailio and exposing 
> the Kamailio API we have decided to make life more simple for the core 
> maintainers. Maintaining well over 100 modules took too much time, and who 
> cares about some of the stuff? Billing, least cost routing and all the other 
> crazy stuff in modules are going away anyhow as all services will be free. 
> Calls really wants to be free. And presence is no longer needed, we'll just 
> tap into the mobile phones from the core to know where everyone is.
>
> The removal of the modules will take place during the month of April 2017 and 
> a new core will raise like a Fenix from the ashes, a much larger, monolithic 
> and complex core with new functionality that will take Kamailio to new areas, 
> like a message bus for games, an API server for mobile yoga apps and a 
> control plane for embedded IoT devices. "Kamailio everywhere" is the new 
> slogan for the Kamailio project.
>
> - "We will all remember April 1st 2017 as a new start of the project" says 
> Olle-Carsten Mierla, the new elected project leader. "From now on, Kamailio 
> aims to be a standard part of every operating system distribution, defining 
> the new core of the Internet.”
>
> We hope all of you join us in this effort and refrain from reporting any bugs 
> or other disturbing issues while we rebuild the new Kamailio.
>
> /O
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk

2017-04-02 Thread Marko Tirs
Hello all,
I am trying to use Kamailio 5.0 with Asterisk (separate IP addresses, both port 
5060), but Asterisk doesn't register the SIP clients which comes through 
Kamailio.If I register the same user directly to the Asterisk then it works! 
1st REGISTER is also without Authorization (Digest name) but in the 2nd 
REGISTER it exists and registration goes OK.

How to use Kamailio with Asterisk in the way the SIP client is registered on 
both of them?Thank youMarko

SIP-CLIENT DIRECTLY TO 
ASTERISK:---
1    2017-04-01 15:20:48.331806    192.168.0.12    192.168.0.2    SIP    544    
Request: REGISTER sip:192.168.0.2  (1 binding) | 
2    2017-04-01 15:20:48.332998    192.168.0.2    192.168.0.12    SIP    626    
Status: 401 Unauthorized | 
3    2017-04-01 15:20:48.333814    192.168.0.12    192.168.0.2    SIP    700    
Request: REGISTER sip:192.168.0.2  (1 binding) | 
4    2017-04-01 15:20:48.335975    192.168.0.2    192.168.0.12    SIP    647    
Status: 200 OK  (1 binding) | 

Frame 3: 700 bytes on wire (5600 bits), 700 bytes captured (5600 bits) on 
interface 0
Ethernet II, Src: AsrockIn_0a:0b:46 (70:85:c2:0a:0b:46), Dst: Raspberr_a1:fd:f7 
(b8:27:eb:a1:fd:f7)
Internet Protocol Version 4, Src: 192.168.0.12, Dst: 192.168.0.2
User Datagram Protocol, Src Port: 64369, Dst Port: 5060
Session Initiation Protocol (REGISTER)
    Request-Line: REGISTER sip:192.168.0.2 SIP/2.0
    Message Header
    Via: SIP/2.0/UDP 
192.168.0.12:64369;rport;branch=z9hG4bKPj9f8759c0537b4834bb411358d0b0a2ff
    Max-Forwards: 70
    From: "33" ;tag=4c586be1fcf842359e7d429abcb0b213
    To: "33" 
    Contact: 
;+sip.instance=""
    Call-ID: d3c240808c934b77a9bbcb8bd4c1bd8c
    CSeq: 2 REGISTER
    Expires: 600
    Supported: gruu
    User-Agent: Blink 3.0.0 (Windows)
    Authorization: Digest username="33", realm="asterisk", 
nonce="76ca37d8", uri="sip:192.168.0.2", 
response="19fc1a634abc72c41dcb516470c34fc2", algorithm=MD5
    Authentication Scheme: Digest
    Username: "33"
    Realm: "asterisk"
    Nonce Value: "76ca37d8"
    Authentication URI: "sip:192.168.0.2"
    Digest Authentication Response: "19fc1a634abc72c41dcb516470c34fc2"
    Algorithm: MD5
    Content-Length:  0


SIP-CLIENT TO KAMAILIO WITH FORWARD TO 
ASTERISK:--
11    2017-04-01 15:21:06.806347    192.168.0.13    192.168.0.2    SIP    459   
 Request: REGISTER sip:192.168.0.2:5060  (1 binding) | 
12    2017-04-01 15:21:06.807514    192.168.0.2    192.168.0.13    SIP    608   
 Status: 401 Unauthorized | 
13    2017-04-01 15:21:06.814819    192.168.0.13    192.168.0.2    SIP    456   
 Request: REGISTER sip:192.168.0.2:5060  (remove 1 binding) | 
14    2017-04-01 15:21:06.815712    192.168.0.2    192.168.0.13    SIP    608   
 Status: 401 Unauthorized | 
15    2017-04-01 15:21:06.821125    192.168.0.13    192.168.0.2    SIP    459   
 Request: REGISTER sip:192.168.0.2:5060  (1 binding) | 
16    2017-04-01 15:21:06.821910    192.168.0.2    192.168.0.13    SIP    608   
 Status: 401 Unauthorized | 

Frame 15: 459 bytes on wire (3672 bits), 459 bytes captured (3672 bits) on 
interface 0
Ethernet II, Src: Micro-St_de:b2:3a (00:24:21:de:b2:3a), Dst: Raspberr_a1:fd:f7 
(b8:27:eb:a1:fd:f7)
Internet Protocol Version 4, Src: 192.168.0.13, Dst: 192.168.0.2
User Datagram Protocol, Src Port: 5060, Dst Port: 5060
Session Initiation Protocol (REGISTER)
    Request-Line: REGISTER sip:192.168.0.2:5060 SIP/2.0
    Message Header
    Via: SIP/2.0/UDP 
192.168.0.13;branch=z9hG4bKd101.0ad599b6.0
    To: 
    SIP to address: sip:32@192.168.0.2
    From: ;tag=533cb9e91f4b999cf76861cbb9ed54ed-85c4
    SIP from address: sip:32@192.168.0.2
    SIP from tag: 533cb9e91f4b999cf76861cbb9ed54ed-85c4
    CSeq: 10 REGISTER
    Call-ID: 41df282f10fdc7b6-2773@127.0.0.1
    Max-Forwards: 70
    Content-Length: 0
    User-Agent: kamailio (5.0.0 (x86_64/linux))
    Contact: 
    Contact URI: sip:32@192.168.0.13:5060
    Expires: 3600



kamailio.cfg:

#!define WITH_DEBUG
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_ASTERISK
...

#!ifdef WITH_ASTERISK
asterisk.bindip = "192.168.0.2" desc "Asterisk IP Address"
asterisk.bindport = "5060" desc "Asterisk Port"
kamailio.bindip = "192.168.0.13" desc "Kamailio IP Address"
kamailio.bindport = "5060" desc "Kamailio Port"
#!endif
...

# Forward REGISTER to Asterisk
route[REGFWD] {
    if(!is_method("REGISTER"))
    {
        return;
    }
    $var(rip) = $sel(cfg_get.asterisk.bindip);
    $uac_req(method)="REGISTER";
    

[SR-Users] Kamailio 5.0.0 KEMI Lua event routes

2017-04-01 Thread José Seabra
Hi all,

I'm starting using kamailio 5 and was trying to convert   my actual routing
scripts to new KEMI interface using Lua.
In my old script i'm using  event routes for the evapi, dialog and
dispatcher modules, so i was wondering how can i use it on KEMI. It exports
some special Lua function to the KEMI framework? Can anyone  give an
example please.

Many thanks

José Seabra
___
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] Kamailio 6.0 architecture

2017-04-01 Thread Annus Fictus

I love this 1st April Solution... :)

Good News.


El 01/04/2017 a las 05:25, Olle E. Johansson escribió:

Dear Kamailians!

We got news for you! The Kamailio 6.0 architecture is finalised! It's something 
we've been working on for a long time in the project team and you've already 
seen part of it in the recent Kamailio 5 release - the KEMI interface for LUA.

We've realised that we have too many modules, especially all those IMS* 
modules. And the core is getting slimmer and slimmer. This is what we're going 
to do:

* All RPC, EVENTAPI,AUTH, JSON, TM, HTTP_CLIENT and TLS modules will be 
integrated back into the core.
* The EVENT API will be the core API for external modules
* The rest of the functionality in the modules will have to be rewritten in LUA 
and maintained as separate GITHUB projects outside of the core

After successfully integrating LUA into the heart of Kamailio and exposing the 
Kamailio API we have decided to make life more simple for the core maintainers. 
Maintaining well over 100 modules took too much time, and who cares about some 
of the stuff? Billing, least cost routing and all the other crazy stuff in 
modules are going away anyhow as all services will be free. Calls really wants 
to be free. And presence is no longer needed, we'll just tap into the mobile 
phones from the core to know where everyone is.

The removal of the modules will take place during the month of April 2017 and a new core 
will raise like a Fenix from the ashes, a much larger, monolithic and complex core with 
new functionality that will take Kamailio to new areas, like a message bus for games, an 
API server for mobile yoga apps and a control plane for embedded IoT devices. 
"Kamailio everywhere" is the new slogan for the Kamailio project.

- "We will all remember April 1st 2017 as a new start of the project" says 
Olle-Carsten Mierla, the new elected project leader. "From now on, Kamailio aims to be a 
standard part of every operating system distribution, defining the new core of the Internet.”

We hope all of you join us in this effort and refrain from reporting any bugs 
or other disturbing issues while we rebuild the new Kamailio.

/O
___
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


[SR-Users] Kamailio 6.0 architecture

2017-04-01 Thread Olle E. Johansson
Dear Kamailians!

We got news for you! The Kamailio 6.0 architecture is finalised! It's something 
we've been working on for a long time in the project team and you've already 
seen part of it in the recent Kamailio 5 release - the KEMI interface for LUA.

We've realised that we have too many modules, especially all those IMS* 
modules. And the core is getting slimmer and slimmer. This is what we're going 
to do:

* All RPC, EVENTAPI,AUTH, JSON, TM, HTTP_CLIENT and TLS modules will be 
integrated back into the core. 
* The EVENT API will be the core API for external modules
* The rest of the functionality in the modules will have to be rewritten in LUA 
and maintained as separate GITHUB projects outside of the core

After successfully integrating LUA into the heart of Kamailio and exposing the 
Kamailio API we have decided to make life more simple for the core maintainers. 
Maintaining well over 100 modules took too much time, and who cares about some 
of the stuff? Billing, least cost routing and all the other crazy stuff in 
modules are going away anyhow as all services will be free. Calls really wants 
to be free. And presence is no longer needed, we'll just tap into the mobile 
phones from the core to know where everyone is.

The removal of the modules will take place during the month of April 2017 and a 
new core will raise like a Fenix from the ashes, a much larger, monolithic and 
complex core with new functionality that will take Kamailio to new areas, like 
a message bus for games, an API server for mobile yoga apps and a control plane 
for embedded IoT devices. "Kamailio everywhere" is the new slogan for the 
Kamailio project.

- "We will all remember April 1st 2017 as a new start of the project" says 
Olle-Carsten Mierla, the new elected project leader. "From now on, Kamailio 
aims to be a standard part of every operating system distribution, defining the 
new core of the Internet.”

We hope all of you join us in this effort and refrain from reporting any bugs 
or other disturbing issues while we rebuild the new Kamailio.

/O
___
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] Kamailio Registration load Issue

2017-03-28 Thread SamyGo
Hi,
Interesting to know that AWS has PPS limitation.

Found this article to be useful :
http://techblog.cloudperf.net/2016/05/2-million-packets-per-second-on-public.html

Regards,
Sammy


On Tue, Mar 28, 2017 at 3:37 AM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> besides Alex' suggestion to look at AWS PPS limits, few things to take in
> consideration in such case:
>
>   - if CPU usage is low, then if you use DNS for routing, be sure that DNS
> server is very responsive
>   - if you do auth with database, be sure that database is very responsive
>   - if you print extensive log messages, be sure syslog is configured
> asynchronous
>   - check the received queue on sip port with netstat, if it is high
> value, then kamailio is stuck in some operations (like those above) and
> doesn't read as fast as the end point transmits
>   - if sipp runs on a low capacity system, I noticed that it cannot handle
> the responses at high throughput even when they are sent to it and it
> actually thinks it hasn't received them and do retransmissions
>
> Cheers,
> Daniel
>
> On 27/03/2017 21:09, Jade SZ wrote:
>
> Hi Guys,
>
> I am running a simple REGISTER load test on:
>
> 1) Kamailio sever with 2 cores - mem 5G
> 2) Kamailio server with 4 cores - mem 16G
>
> Both are EC2 instances.
>
> At -r = 500 i.e. 500 reg/sec sipP test works fine with very few re-trans.
> But when i increase it to 800 reg/sec it starts retransmissions in bulk.
>
> I don't see server's CPU, load-avg or memory shooting. Running everything
> by default, even using kamctl to start the instance. So I have not tuned
> any params yet.
>
> My main concern is how can I make server choke and get its actual
> capacity, and avoid these retransmissions as apparently kamailio is not
> even utilizing 2 cores and CPU usage is under 10 always.
>
> Results of both server is same i.e. 500 reg/sec max so I am sure there is
> some problem that needs a fix, but need some hints here.
>
> Also used multiple SIPp's to rule out if it is SIPp issue, but after 500 I
> see same problem.
>
>
> Regards,
> JSZ
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> 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] kamailio 4.4.1 crash on bad sip response

2017-03-28 Thread David Escartín Almudévar
hello Daniel

yes yes i understood.

thanks a lot
david


 El mar, 28-03-2017 a las 13:44 +0200, Daniel-Constantin Mierla
escribió:

> Hello,
> 
> it is already backported to branch 4.4 -- I said that you can use
> latest 4.4 branch from git -- backporting was only if you want to
> still use 4.4.1 snapshot + this patch.
> 
> Therefore next release in 4.4 series will have it as well.
> 
> 
> Cheers,
> Daniel
> 
> 
> 
> 
> On 28/03/2017 13:42, David Escartín Almudévar wrote:
> 
> > 
> > hello Daniel
> > 
> > thanks a lot.
> > we actually will start testing 5.0 to migrate to it, but in the
> > meantime it's great if we can patch it on the 4.4
> > 
> > best regards
> > david
> > 
> > 
> > El mar, 28-03-2017 a las 13:37 +0200, Daniel-Constantin Mierla
> > escribió:
> > 
> > > Hello,
> > > 
> > > I pushed a safety checks to avoid crash in this situation. I will
> > > have to investigate deeper why it got to this state, but for now
> > > the fix should avoid this crash in a similar situation. You have
> > > to use the latest branch 4.4 or backport the patch
> > > e20b38e0084c1f89c43a921a8a2affbea060aaa5 to your version.
> > > 
> > > Cheers,
> > > Daniel
> > > 
> > > 
> > > 
> > > On 28/03/2017 12:15, David Escartín Almudévar wrote:
> > > 
> > > 
> > > > hello Daniel
> > > > 
> > > > it happened only once as far as i know, i tried to duplicate by
> > > > myself but i couldnt create the sipp scenario
> > > > i will try to duplicate it setting the octal parameters in hex
> > > > escaped by % in the SIP uris to see if i can, but i didnt have
> > > > time yet
> > > > 
> > > > in the meantime here you have the information 
> > > > 
> > > > (gdb) frame 6
> > > > #6  0x004696c4 in dns_srv_sip_resolvehost
> > > > (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1
> > > > "\001\330\023") at dns_cache.c:2679
> > > > 2679 he=dns_get_he(name, dns_flags);
> > > > (gdb) p *name
> > > > $1 = {s = 0x0, len = 0}
> > > > (gdb) p *port
> > > > $2 = 5080
> > > > 
> > > > thanks a lot and regards
> > > > david
> > > > 
> > > > 
> > > > 
> > > > El lun, 27-03-2017 a las 21:04 +0200, Daniel-Constantin Mierla
> > > > escribió:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > did it happen only once, or it can be reproduced?
> > > > > 
> > > > > Can you also get from gdb:
> > > > > 
> > > > > frame 6
> > > > > 
> > > > > p *name
> > > > > 
> > > > > p *port
> > > > > 
> > > > > 
> > > > > Cheers,
> > > > > Daniel
> > > > > 
> > > > > 
> > > > > 
> > > > > On 27/03/2017 16:43, David Escartín Almudévar wrote:
> > > > > 
> > > > > 
> > > > > > hello Daniel
> > > > > > 
> > > > > > here you have
> > > > > > 
> > > > > > (gdb) frame 1
> > > > > > #1  0x0045b472 in _dns_hash_find
> > > > > > (name=0x7f6906943188, type=1, h=0x7fff120793cc,
> > > > > > err=0x7fff120793ac) at dns_cache.c:535
> > > > > > 535 *h=dns_hash_no(name->s, name->len, type);
> > > > > > (gdb) info locals
> > > > > > e = 0x7f69069015b8
> > > > > > tmp = 0x7f69069247e0
> > > > > > ret = 0x0
> > > > > > now = 689922868
> > > > > > cname_chain = 0
> > > > > > cname = {s = 0xab0e93 "Via: SIP/2.0/UDP \020?\337\v\234\262
> > > > > > \264\016 :5080;received=;rport=5080;branch=\020?\337\v\234
> > > > > > \262\264\016 \r\nContent-Length: 0\r\n\r\n", len = 11210375}
> > > > > > __FUNCTION__ = "_dns_hash_find"
> > > > > > (gdb) list
> > > > > > 530 cname_chain=0;
> > > > > > 531 ret=0;
> > > > > > 532 now=get_ticks_raw();
> > > > > > 533 *err=0;
> > > > > > 534 again:
> > > > > > 535 *h=dns_hash_no(name->s, name->len, type);
> > > > > > 536 #ifdef DNS_CACHE_DEBUG
> > > > > > 537 LM_DBG("(%.*s(%d), %d), h=%d\n", name->len, name->s,
> > > > > > name->len, type, *h);
> > > > > > 538 #endif
> > > > > > 539 clist_foreach_safe(_hash[*h], e, tmp, next){
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > thanks a lot and regards
> > > > > > david
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > El lun, 27-03-2017 a las 13:54 +0200, Daniel-Constantin
> > > > > > Mierla escribió:
> > > > > > 
> > > > > > > Hello,
> > > > > > > 
> > > > > > > the backtrace is no longer matching the 4.4 branch code,
> > > > > > > as you run an older release in that series.
> > > > > > > 
> > > > > > > Can you get with gdb from the core the output of the
> > > > > > > following commands:
> > > > > > > 
> > > > > > > frame 1
> > > > > > > 
> > > > > > > info locals
> > > > > > > 
> > > > > > > list
> > > > > > > 
> > > > > > > 
> > > > > > > and send them here on the mailing list.
> > > > > > > 
> > > > > > > Cheers,
> > > > > > > Daniel
> > > > > > > 
> > > > > > > On 24/03/2017 14:50, David Escartín Almudévar wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > > hello all, Daniel
> > > > > > > > 
> > > > > > > > checking the core with the gdb, we have checked the
> > > > > > > > variables at the frames of the backtrace, to try to get
> > > > > > > > the full sip message seems it seemed truncated.
> > > > > > > > checking the buf variable of the frame 11 which
> > > > > > > 

Re: [SR-Users] kamailio 4.4.1 crash on bad sip response

2017-03-28 Thread Daniel-Constantin Mierla
Hello,

it is already backported to branch 4.4 -- I said that you can use latest
4.4 branch from git -- backporting was only if you want to still use
4.4.1 snapshot + this patch.

Therefore next release in 4.4 series will have it as well.

Cheers,
Daniel


On 28/03/2017 13:42, David Escartín Almudévar wrote:
> hello Daniel
>
> thanks a lot.
> we actually will start testing 5.0 to migrate to it, but in the
> meantime it's great if we can patch it on the 4.4
>
> best regards
> david
>
>
> El mar, 28-03-2017 a las 13:37 +0200, Daniel-Constantin Mierla escribió:
>> Hello,
>>
>> I pushed a safety checks to avoid crash in this situation. I will
>> have to investigate deeper why it got to this state, but for now the
>> fix should avoid this crash in a similar situation. You have to use
>> the latest branch 4.4 or backport the patch
>> e20b38e0084c1f89c43a921a8a2affbea060aaa5 to your version.
>>
>> Cheers,
>> Daniel
>>
>>
>>
>> On 28/03/2017 12:15, David Escartín Almudévar wrote:
>>
>>> hello Daniel
>>>
>>> it happened only once as far as i know, i tried to duplicate by
>>> myself but i couldnt create the sipp scenario
>>> i will try to duplicate it setting the octal parameters in hex
>>> escaped by % in the SIP uris to see if i can, but i didnt have time yet
>>>
>>> in the meantime here you have the information
>>>
>>> (gdb) frame 6
>>> #6  0x004696c4 in dns_srv_sip_resolvehost
>>> (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1
>>> "\001\330\023") at dns_cache.c:2679
>>> 2679 he=dns_get_he(name, dns_flags);
>>> (gdb) p *name
>>> $1 = {s = 0x0, len = 0}
>>> (gdb) p *port
>>> $2 = 5080
>>>
>>> thanks a lot and regards
>>> david
>>>
>>>
>>>
>>> El lun, 27-03-2017 a las 21:04 +0200, Daniel-Constantin Mierla escribió:
 Hello,

 did it happen only once, or it can be reproduced?

 Can you also get from gdb:

 frame 6

 p *name

 p *port


 Cheers,
 Daniel



 On 27/03/2017 16:43, David Escartín Almudévar wrote:

> hello Daniel
>
> here you have
>
> (gdb) frame 1
> #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188,
> type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
> 535 *h=dns_hash_no(name->s, name->len, type);
> (gdb) info locals
> e = 0x7f69069015b8
> tmp = 0x7f69069247e0
> ret = 0x0
> now = 689922868
> cname_chain = 0
> cname = {s = 0xab0e93 "Via: SIP/2.0/UDP
> \020?\337\v\234\262\264\016
> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
> \r\nContent-Length: 0\r\n\r\n", len = 11210375}
> __FUNCTION__ = "_dns_hash_find"
> (gdb) list
> 530 cname_chain=0;
> 531 ret=0;
> 532 now=get_ticks_raw();
> 533 *err=0;
> 534 again:
> 535 *h=dns_hash_no(name->s, name->len, type);
> 536 #ifdef DNS_CACHE_DEBUG
> 537 LM_DBG("(%.*s(%d), %d), h=%d\n", name->len, name->s,
> name->len, type, *h);
> 538 #endif
> 539 clist_foreach_safe(_hash[*h], e, tmp, next){
>
>
>
> thanks a lot and regards
> david
>
>
>
>
> El lun, 27-03-2017 a las 13:54 +0200, Daniel-Constantin Mierla
> escribió:
>> Hello,
>>
>> the backtrace is no longer matching the 4.4 branch code, as you
>> run an older release in that series.
>>
>> Can you get with gdb from the core the output of the following
>> commands:
>>
>> frame 1
>>
>> info locals
>>
>> list
>>
>>
>> and send them here on the mailing list.
>>
>> Cheers,
>> Daniel
>>
>> On 24/03/2017 14:50, David Escartín Almudévar wrote:
>>
>>> hello all, Daniel
>>>
>>> checking the core with the gdb, we have checked the variables at
>>> the frames of the backtrace, to try to get the full sip message
>>> seems it seemed truncated.
>>> checking the buf variable of the frame 11 which theorically
>>> contains the sip msg to parse we have the string
>>>
>>>
>>> SIP/2.0 487 Request Terminated\r\nFrom:
>>> \"881237046977\";tag=B7jgc8jQ4m5pB\r\nTo:
>>> ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
>>> \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP
>>> L\263\264\016\020?\337\v\234\262\264\016
>>> ;branch=\327\f\340\r\nVia: SIP/2.0/UDP
>>> \020?\337\v\234\262\264\016
>>> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
>>> \r\nContent-Length: 0\r\n\r\n
>>>
>>> this is i guess how gdb parses the message, so i guess i cannot
>>> introduce this like that in a xml sipp formal, since CRLF is
>>> represented as \r\n, so others parts like l\337K\016\213\347:
>>> \344\003 i have no idea what they are, because they also seem to
>>> be out of the ASCII table ¿?
>>> anycase, seems the message is very bad formed, and the kamailio

Re: [SR-Users] kamailio 4.4.1 crash on bad sip response

2017-03-28 Thread David Escartín Almudévar
hello Daniel

thanks a lot.
we actually will start testing 5.0 to migrate to it, but in the meantime
it's great if we can patch it on the 4.4

best regards
david


El mar, 28-03-2017 a las 13:37 +0200, Daniel-Constantin Mierla escribió:

> Hello,
> 
> I pushed a safety checks to avoid crash in this situation. I will have
> to investigate deeper why it got to this state, but for now the fix
> should avoid this crash in a similar situation. You have to use the
> latest branch 4.4 or backport the patch
> e20b38e0084c1f89c43a921a8a2affbea060aaa5 to your version.
> 
> Cheers,
> Daniel
> 
> 
> 
> 
> On 28/03/2017 12:15, David Escartín Almudévar wrote:
> 
> > 
> > hello Daniel
> > 
> > it happened only once as far as i know, i tried to duplicate by
> > myself but i couldnt create the sipp scenario
> > i will try to duplicate it setting the octal parameters in hex
> > escaped by % in the SIP uris to see if i can, but i didnt have time
> > yet
> > 
> > in the meantime here you have the information 
> > 
> > (gdb) frame 6
> > #6  0x004696c4 in dns_srv_sip_resolvehost
> > (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1
> > "\001\330\023") at dns_cache.c:2679
> > 2679 he=dns_get_he(name, dns_flags);
> > (gdb) p *name
> > $1 = {s = 0x0, len = 0}
> > (gdb) p *port
> > $2 = 5080
> > 
> > thanks a lot and regards
> > david
> > 
> > 
> > 
> > El lun, 27-03-2017 a las 21:04 +0200, Daniel-Constantin Mierla
> > escribió:
> > 
> > > Hello,
> > > 
> > > did it happen only once, or it can be reproduced?
> > > 
> > > Can you also get from gdb:
> > > 
> > > frame 6
> > > 
> > > p *name
> > > 
> > > p *port
> > > 
> > > 
> > > Cheers,
> > > Daniel
> > > 
> > > 
> > > 
> > > On 27/03/2017 16:43, David Escartín Almudévar wrote:
> > > 
> > > 
> > > > hello Daniel
> > > > 
> > > > here you have
> > > > 
> > > > (gdb) frame 1
> > > > #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188,
> > > > type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
> > > > 535 *h=dns_hash_no(name->s, name->len, type);
> > > > (gdb) info locals
> > > > e = 0x7f69069015b8
> > > > tmp = 0x7f69069247e0
> > > > ret = 0x0
> > > > now = 689922868
> > > > cname_chain = 0
> > > > cname = {s = 0xab0e93 "Via: SIP/2.0/UDP \020?\337\v\234\262\264
> > > > \016 :5080;received=;rport=5080;branch=\020?\337\v\234\262\264
> > > > \016 \r\nContent-Length: 0\r\n\r\n", len = 11210375}
> > > > __FUNCTION__ = "_dns_hash_find"
> > > > (gdb) list
> > > > 530 cname_chain=0;
> > > > 531 ret=0;
> > > > 532 now=get_ticks_raw();
> > > > 533 *err=0;
> > > > 534 again:
> > > > 535 *h=dns_hash_no(name->s, name->len, type);
> > > > 536 #ifdef DNS_CACHE_DEBUG
> > > > 537 LM_DBG("(%.*s(%d), %d), h=%d\n", name->len, name->s,
> > > > name->len, type, *h);
> > > > 538 #endif
> > > > 539 clist_foreach_safe(_hash[*h], e, tmp, next){
> > > > 
> > > > 
> > > > 
> > > > thanks a lot and regards
> > > > david
> > > > 
> > > > 
> > > > 
> > > > 
> > > > El lun, 27-03-2017 a las 13:54 +0200, Daniel-Constantin Mierla
> > > > escribió:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > the backtrace is no longer matching the 4.4 branch code, as
> > > > > you run an older release in that series.
> > > > > 
> > > > > Can you get with gdb from the core the output of the following
> > > > > commands:
> > > > > 
> > > > > frame 1
> > > > > 
> > > > > info locals
> > > > > 
> > > > > list
> > > > > 
> > > > > 
> > > > > and send them here on the mailing list.
> > > > > 
> > > > > Cheers,
> > > > > Daniel
> > > > > 
> > > > > On 24/03/2017 14:50, David Escartín Almudévar wrote:
> > > > > 
> > > > > 
> > > > > > hello all, Daniel
> > > > > > 
> > > > > > checking the core with the gdb, we have checked the
> > > > > > variables at the frames of the backtrace, to try to get the
> > > > > > full sip message seems it seemed truncated.
> > > > > > checking the buf variable of the frame 11 which theorically
> > > > > > contains the sip msg to parse we have the string
> > > > > > 
> > > > > > 
> > > > > > SIP/2.0 487 Request Terminated\r\nFrom: \"881237046977
> > > > > > \";tag=B7jgc8jQ4m5pB\r\nTo:
> > > > > >  
> > > > > > ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
> > > > > >  \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP 
> > > > > > L\263\264\016\020?\337\v\234\262\264\016 ;branch=\327\f\340\r\nVia: 
> > > > > > SIP/2.0/UDP \020?\337\v\234\262\264\016 
> > > > > > :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016 
> > > > > > \r\nContent-Length: 0\r\n\r\n
> > > > > > 
> > > > > > this is i guess how gdb parses the message, so i guess i
> > > > > > cannot introduce this like that in a xml sipp formal, since
> > > > > > CRLF is represented as \r\n, so others parts like l\337K\016
> > > > > > \213\347: \344\003 i have no idea what they are, because
> > > > > > they also seem to be out of the ASCII table ¿?
> > > > > > anycase, seems the message is very bad 

Re: [SR-Users] kamailio 4.4.1 crash on bad sip response

2017-03-28 Thread Daniel-Constantin Mierla
Hello,

I pushed a safety checks to avoid crash in this situation. I will have
to investigate deeper why it got to this state, but for now the fix
should avoid this crash in a similar situation. You have to use the
latest branch 4.4 or backport the patch
e20b38e0084c1f89c43a921a8a2affbea060aaa5 to your version.

Cheers,
Daniel


On 28/03/2017 12:15, David Escartín Almudévar wrote:
> hello Daniel
>
> it happened only once as far as i know, i tried to duplicate by myself
> but i couldnt create the sipp scenario
> i will try to duplicate it setting the octal parameters in hex escaped
> by % in the SIP uris to see if i can, but i didnt have time yet
>
> in the meantime here you have the information
>
> (gdb) frame 6
> #6  0x004696c4 in dns_srv_sip_resolvehost
> (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1
> "\001\330\023") at dns_cache.c:2679
> 2679 he=dns_get_he(name, dns_flags);
> (gdb) p *name
> $1 = {s = 0x0, len = 0}
> (gdb) p *port
> $2 = 5080
>
> thanks a lot and regards
> david
>
>
>
> El lun, 27-03-2017 a las 21:04 +0200, Daniel-Constantin Mierla escribió:
>> Hello,
>>
>> did it happen only once, or it can be reproduced?
>>
>> Can you also get from gdb:
>>
>> frame 6
>>
>> p *name
>>
>> p *port
>>
>>
>> Cheers,
>> Daniel
>>
>>
>>
>> On 27/03/2017 16:43, David Escartín Almudévar wrote:
>>
>>> hello Daniel
>>>
>>> here you have
>>>
>>> (gdb) frame 1
>>> #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188,
>>> type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
>>> 535 *h=dns_hash_no(name->s, name->len, type);
>>> (gdb) info locals
>>> e = 0x7f69069015b8
>>> tmp = 0x7f69069247e0
>>> ret = 0x0
>>> now = 689922868
>>> cname_chain = 0
>>> cname = {s = 0xab0e93 "Via: SIP/2.0/UDP \020?\337\v\234\262\264\016
>>> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
>>> \r\nContent-Length: 0\r\n\r\n", len = 11210375}
>>> __FUNCTION__ = "_dns_hash_find"
>>> (gdb) list
>>> 530 cname_chain=0;
>>> 531 ret=0;
>>> 532 now=get_ticks_raw();
>>> 533 *err=0;
>>> 534 again:
>>> 535 *h=dns_hash_no(name->s, name->len, type);
>>> 536 #ifdef DNS_CACHE_DEBUG
>>> 537 LM_DBG("(%.*s(%d), %d), h=%d\n", name->len, name->s, name->len,
>>> type, *h);
>>> 538 #endif
>>> 539 clist_foreach_safe(_hash[*h], e, tmp, next){
>>>
>>>
>>>
>>> thanks a lot and regards
>>> david
>>>
>>>
>>>
>>>
>>> El lun, 27-03-2017 a las 13:54 +0200, Daniel-Constantin Mierla escribió:
 Hello,

 the backtrace is no longer matching the 4.4 branch code, as you run
 an older release in that series.

 Can you get with gdb from the core the output of the following
 commands:

 frame 1

 info locals

 list


 and send them here on the mailing list.

 Cheers,
 Daniel

 On 24/03/2017 14:50, David Escartín Almudévar wrote:

> hello all, Daniel
>
> checking the core with the gdb, we have checked the variables at
> the frames of the backtrace, to try to get the full sip message
> seems it seemed truncated.
> checking the buf variable of the frame 11 which theorically
> contains the sip msg to parse we have the string
>
>
> SIP/2.0 487 Request Terminated\r\nFrom:
> \"881237046977\";tag=B7jgc8jQ4m5pB\r\nTo:
> ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
> \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP
> L\263\264\016\020?\337\v\234\262\264\016
> ;branch=\327\f\340\r\nVia: SIP/2.0/UDP \020?\337\v\234\262\264\016
> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
> \r\nContent-Length: 0\r\n\r\n
>
> this is i guess how gdb parses the message, so i guess i cannot
> introduce this like that in a xml sipp formal, since CRLF is
> represented as \r\n, so others parts like l\337K\016\213\347:
> \344\003 i have no idea what they are, because they also seem to
> be out of the ASCII table ¿?
> anycase, seems the message is very bad formed, and the kamailio
> tries to resolve the host of the Via and it gets nothing, so the
> function get_hash1_case_raw is fed by a nul value and seems that
> the reason it crashes
>
> hope you can retrieve information from that message to find out
> what kind of message it exactly is and see if it's possible to
> avoid kamailio's crash in this scenario
>
>
> best regards
> david
>
>
>
> El vie, 24-03-2017 a las 12:10 +0100, David Escartín Almudévar
> escribió:
>> hello all
>>
>> we have experienced a crash and tracing the logs and the core,
>> seems it was because a sip response from an endpoint.
>> a UDP receiver (26248) crashed and the last message we see on it
>> is a 487 quite bad formed
>>
>> Mar 24 01:58:02 mia-proxy-inout-1-stby
>> /usr/local/kamailio/sbin/kamailio[26248]: ERROR: tm
>> 

Re: [SR-Users] kamailio 4.4.1 crash on bad sip response

2017-03-28 Thread David Escartín Almudévar
hello Daniel

it happened only once as far as i know, i tried to duplicate by myself
but i couldnt create the sipp scenario
i will try to duplicate it setting the octal parameters in hex escaped
by % in the SIP uris to see if i can, but i didnt have time yet

in the meantime here you have the information 

(gdb) frame 6
#6  0x004696c4 in dns_srv_sip_resolvehost (name=0x7f6906943188,
port=0x7fff120795e2, proto=0x7fff120795e1 "\001\330\023") at
dns_cache.c:2679
2679he=dns_get_he(name, dns_flags);
(gdb) p *name
$1 = {s = 0x0, len = 0}
(gdb) p *port
$2 = 5080

thanks a lot and regards
david



El lun, 27-03-2017 a las 21:04 +0200, Daniel-Constantin Mierla escribió:

> Hello,
> 
> did it happen only once, or it can be reproduced?
> 
> Can you also get from gdb:
> 
> frame 6
> 
> p *name
> 
> p *port
> 
> 
> Cheers,
> Daniel
> 
> 
> 
> 
> On 27/03/2017 16:43, David Escartín Almudévar wrote:
> 
> > 
> > hello Daniel
> > 
> > here you have
> > 
> > (gdb) frame 1
> > #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188,
> > type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
> > 535 *h=dns_hash_no(name->s, name->len, type);
> > (gdb) info locals
> > e = 0x7f69069015b8
> > tmp = 0x7f69069247e0
> > ret = 0x0
> > now = 689922868
> > cname_chain = 0
> > cname = {s = 0xab0e93 "Via: SIP/2.0/UDP \020?\337\v\234\262\264
> > \016 :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
> > \r\nContent-Length: 0\r\n\r\n", len = 11210375}
> > __FUNCTION__ = "_dns_hash_find"
> > (gdb) list
> > 530 cname_chain=0;
> > 531 ret=0;
> > 532 now=get_ticks_raw();
> > 533 *err=0;
> > 534 again:
> > 535 *h=dns_hash_no(name->s, name->len, type);
> > 536 #ifdef DNS_CACHE_DEBUG
> > 537 LM_DBG("(%.*s(%d), %d), h=%d\n", name->len, name->s, name->len,
> > type, *h);
> > 538 #endif
> > 539 clist_foreach_safe(_hash[*h], e, tmp, next){
> > 
> > 
> > 
> > thanks a lot and regards
> > david
> > 
> > 
> > 
> > 
> > El lun, 27-03-2017 a las 13:54 +0200, Daniel-Constantin Mierla
> > escribió:
> > 
> > > Hello,
> > > 
> > > the backtrace is no longer matching the 4.4 branch code, as you
> > > run an older release in that series.
> > > 
> > > Can you get with gdb from the core the output of the following
> > > commands:
> > > 
> > > frame 1
> > > 
> > > info locals
> > > 
> > > list
> > > 
> > > 
> > > and send them here on the mailing list.
> > > 
> > > Cheers,
> > > Daniel
> > > 
> > > On 24/03/2017 14:50, David Escartín Almudévar wrote:
> > > 
> > > 
> > > > hello all, Daniel
> > > > 
> > > > checking the core with the gdb, we have checked the variables at
> > > > the frames of the backtrace, to try to get the full sip message
> > > > seems it seemed truncated.
> > > > checking the buf variable of the frame 11 which theorically
> > > > contains the sip msg to parse we have the string
> > > > 
> > > > 
> > > > SIP/2.0 487 Request Terminated\r\nFrom: \"881237046977
> > > > \";tag=B7jgc8jQ4m5pB
> > > > \r\nTo:
> > > > ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
> > > >  \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP 
> > > > L\263\264\016\020?\337\v\234\262\264\016 ;branch=\327\f\340\r\nVia: 
> > > > SIP/2.0/UDP \020?\337\v\234\262\264\016 
> > > > :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016 
> > > > \r\nContent-Length: 0\r\n\r\n
> > > > 
> > > > this is i guess how gdb parses the message, so i guess i cannot
> > > > introduce this like that in a xml sipp formal, since CRLF is
> > > > represented as \r\n, so others parts like l\337K\016\213\347:
> > > > \344\003 i have no idea what they are, because they also seem to
> > > > be out of the ASCII table ¿?
> > > > anycase, seems the message is very bad formed, and the kamailio
> > > > tries to resolve the host of the Via and it gets nothing, so the
> > > > function get_hash1_case_raw is fed by a nul value and seems that
> > > > the reason it crashes
> > > > 
> > > > hope you can retrieve information from that message to find out
> > > > what kind of message it exactly is and see if it's possible to
> > > > avoid kamailio's crash in this scenario
> > > > 
> > > > 
> > > > best regards
> > > > david
> > > > 
> > > > 
> > > > 
> > > > El vie, 24-03-2017 a las 12:10 +0100, David Escartín Almudévar
> > > > escribió:
> > > > 
> > > > > hello all 
> > > > > 
> > > > > we have experienced a crash and tracing the logs and the core,
> > > > > seems it was because a sip response from an endpoint.
> > > > > a UDP receiver (26248) crashed and the last message we see on
> > > > > it is a 487 quite bad formed
> > > > > 
> > > > > Mar 24 01:58:02
> > > > > mia-proxy-inout-1-stby /usr/local/kamailio/sbin/kamailio[26248]: 
> > > > > ERROR: tm [t_lookup.c:1055]: t_check_msg(): ERROR: reply doesn't have 
> > > > > a via, cseq or call-id header
> > > > > Mar 24 01:58:17
> > > > > mia-proxy-inout-1-stby /usr/local/kamailio/sbin/kamailio[26230]: 
> > > > > 

Re: [SR-Users] Kamailio Registration load Issue

2017-03-28 Thread Daniel-Constantin Mierla
Hello,

besides Alex' suggestion to look at AWS PPS limits, few things to take
in consideration in such case:

  - if CPU usage is low, then if you use DNS for routing, be sure that
DNS server is very responsive
  - if you do auth with database, be sure that database is very responsive
  - if you print extensive log messages, be sure syslog is configured
asynchronous
  - check the received queue on sip port with netstat, if it is high
value, then kamailio is stuck in some operations (like those above) and
doesn't read as fast as the end point transmits
  - if sipp runs on a low capacity system, I noticed that it cannot
handle the responses at high throughput even when they are sent to it
and it actually thinks it hasn't received them and do retransmissions

Cheers,
Daniel


On 27/03/2017 21:09, Jade SZ wrote:
> Hi Guys,
>
> I am running a simple REGISTER load test on:
>
> 1) Kamailio sever with 2 cores - mem 5G
> 2) Kamailio server with 4 cores - mem 16G
>
> Both are EC2 instances.
>
> At -r = 500 i.e. 500 reg/sec sipP test works fine with very few
> re-trans. But when i increase it to 800 reg/sec it starts
> retransmissions in bulk. 
>
> I don't see server's CPU, load-avg or memory shooting. Running
> everything by default, even using kamctl to start the instance. So I
> have not tuned any params yet. 
>
> My main concern is how can I make server choke and get its actual
> capacity, and avoid these retransmissions as apparently kamailio is
> not even utilizing 2 cores and CPU usage is under 10 always.
>
> Results of both server is same i.e. 500 reg/sec max so I am sure there
> is some problem that needs a fix, but need some hints here.
>
> Also used multiple SIPp's to rule out if it is SIPp issue, but after
> 500 I see same problem.
>
>
> Regards,
> JSZ
>
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio Registration load Issue

2017-03-28 Thread Daniel-Constantin Mierla


On 27/03/2017 21:15, Alex Balashov wrote:
> You might be running into semi-invisible/not widely publicised (but 
> definitely very real) PPS limits on given instance sizes. 

I assume you refer to AWS instance packets per second limits -- I was
not aware of it, although I expected somehow. Has anyone encountered a
similar situation and can share some numbers that they faced during past
experiences? It would be useful to have in mind when dimensioning sip
server deployments...

Cheers,
Daniel

>
> On March 27, 2017 3:09:56 PM EDT, Jade SZ  wrote:
>> Hi Guys,
>>
>> I am running a simple REGISTER load test on:
>>
>> 1) Kamailio sever with 2 cores - mem 5G
>> 2) Kamailio server with 4 cores - mem 16G
>>
>> Both are EC2 instances.
>>
>> At -r = 500 i.e. 500 reg/sec sipP test works fine with very few
>> re-trans.
>> But when i increase it to 800 reg/sec it starts retransmissions in
>> bulk.
>>
>> I don't see server's CPU, load-avg or memory shooting. Running
>> everything
>> by default, even using kamctl to start the instance. So I have not
>> tuned
>> any params yet.
>>
>> My main concern is how can I make server choke and get its actual
>> capacity,
>> and avoid these retransmissions as apparently kamailio is not even
>> utilizing 2 cores and CPU usage is under 10 always.
>>
>> Results of both server is same i.e. 500 reg/sec max so I am sure there
>> is
>> some problem that needs a fix, but need some hints here.
>>
>> Also used multiple SIPp's to rule out if it is SIPp issue, but after
>> 500 I
>> see same problem.
>>
>>
>> Regards,
>> JSZ
>
> -- Alex
>
> --
> Principal, Evariste Systems LLC (www.evaristesys.com)
>
> Sent from my Google Nexus.
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio Registration load Issue

2017-03-27 Thread Alex Balashov
On Tue, Mar 28, 2017 at 12:52:32AM +0500, Jade SZ wrote:

> PS: Also thanks a lot for the great blog post on SIP server tuning.

You're very welcome. Glad it proved useful to someone!

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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] Kamailio Registration load Issue

2017-03-27 Thread Jade SZ
Thanks Alex, that's a great hint. I'll check.


PS: Also thanks a lot for the great blog post on SIP server tuning.

On Tue, Mar 28, 2017 at 12:15 AM, Alex Balashov 
wrote:

> You might be running into semi-invisible/not widely publicised (but
> definitely very real) PPS limits on given instance sizes.
>
> On March 27, 2017 3:09:56 PM EDT, Jade SZ  wrote:
> >Hi Guys,
> >
> >I am running a simple REGISTER load test on:
> >
> >1) Kamailio sever with 2 cores - mem 5G
> >2) Kamailio server with 4 cores - mem 16G
> >
> >Both are EC2 instances.
> >
> >At -r = 500 i.e. 500 reg/sec sipP test works fine with very few
> >re-trans.
> >But when i increase it to 800 reg/sec it starts retransmissions in
> >bulk.
> >
> >I don't see server's CPU, load-avg or memory shooting. Running
> >everything
> >by default, even using kamctl to start the instance. So I have not
> >tuned
> >any params yet.
> >
> >My main concern is how can I make server choke and get its actual
> >capacity,
> >and avoid these retransmissions as apparently kamailio is not even
> >utilizing 2 cores and CPU usage is under 10 always.
> >
> >Results of both server is same i.e. 500 reg/sec max so I am sure there
> >is
> >some problem that needs a fix, but need some hints here.
> >
> >Also used multiple SIPp's to rule out if it is SIPp issue, but after
> >500 I
> >see same problem.
> >
> >
> >Regards,
> >JSZ
>
>
> -- Alex
>
> --
> Principal, Evariste Systems LLC (www.evaristesys.com)
>
> Sent from my Google Nexus.
>
___
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] Kamailio Registration load Issue

2017-03-27 Thread Alex Balashov
You might be running into semi-invisible/not widely publicised (but definitely 
very real) PPS limits on given instance sizes. 

On March 27, 2017 3:09:56 PM EDT, Jade SZ  wrote:
>Hi Guys,
>
>I am running a simple REGISTER load test on:
>
>1) Kamailio sever with 2 cores - mem 5G
>2) Kamailio server with 4 cores - mem 16G
>
>Both are EC2 instances.
>
>At -r = 500 i.e. 500 reg/sec sipP test works fine with very few
>re-trans.
>But when i increase it to 800 reg/sec it starts retransmissions in
>bulk.
>
>I don't see server's CPU, load-avg or memory shooting. Running
>everything
>by default, even using kamctl to start the instance. So I have not
>tuned
>any params yet.
>
>My main concern is how can I make server choke and get its actual
>capacity,
>and avoid these retransmissions as apparently kamailio is not even
>utilizing 2 cores and CPU usage is under 10 always.
>
>Results of both server is same i.e. 500 reg/sec max so I am sure there
>is
>some problem that needs a fix, but need some hints here.
>
>Also used multiple SIPp's to rule out if it is SIPp issue, but after
>500 I
>see same problem.
>
>
>Regards,
>JSZ


-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com)

Sent from my Google Nexus.

___
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] Kamailio Registration load Issue

2017-03-27 Thread Jade SZ
Hi Guys,

I am running a simple REGISTER load test on:

1) Kamailio sever with 2 cores - mem 5G
2) Kamailio server with 4 cores - mem 16G

Both are EC2 instances.

At -r = 500 i.e. 500 reg/sec sipP test works fine with very few re-trans.
But when i increase it to 800 reg/sec it starts retransmissions in bulk.

I don't see server's CPU, load-avg or memory shooting. Running everything
by default, even using kamctl to start the instance. So I have not tuned
any params yet.

My main concern is how can I make server choke and get its actual capacity,
and avoid these retransmissions as apparently kamailio is not even
utilizing 2 cores and CPU usage is under 10 always.

Results of both server is same i.e. 500 reg/sec max so I am sure there is
some problem that needs a fix, but need some hints here.

Also used multiple SIPp's to rule out if it is SIPp issue, but after 500 I
see same problem.


Regards,
JSZ
___
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] kamailio 4.4.1 crash on bad sip response

2017-03-27 Thread Daniel-Constantin Mierla
Hello,

did it happen only once, or it can be reproduced?

Can you also get from gdb:

frame 6

p *name

p *port

Cheers,
Daniel


On 27/03/2017 16:43, David Escartín Almudévar wrote:
> hello Daniel
>
> here you have
>
> (gdb) frame 1
> #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188, type=1,
> h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
> 535 *h=dns_hash_no(name->s, name->len, type);
> (gdb) info locals
> e = 0x7f69069015b8
> tmp = 0x7f69069247e0
> ret = 0x0
> now = 689922868
> cname_chain = 0
> cname = {s = 0xab0e93 "Via: SIP/2.0/UDP \020?\337\v\234\262\264\016
> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
> \r\nContent-Length: 0\r\n\r\n", len = 11210375}
> __FUNCTION__ = "_dns_hash_find"
> (gdb) list
> 530 cname_chain=0;
> 531 ret=0;
> 532 now=get_ticks_raw();
> 533 *err=0;
> 534 again:
> 535 *h=dns_hash_no(name->s, name->len, type);
> 536 #ifdef DNS_CACHE_DEBUG
> 537 LM_DBG("(%.*s(%d), %d), h=%d\n", name->len, name->s, name->len,
> type, *h);
> 538 #endif
> 539 clist_foreach_safe(_hash[*h], e, tmp, next){
>
>
>
> thanks a lot and regards
> david
>
>
>
>
> El lun, 27-03-2017 a las 13:54 +0200, Daniel-Constantin Mierla escribió:
>> Hello,
>>
>> the backtrace is no longer matching the 4.4 branch code, as you run
>> an older release in that series.
>>
>> Can you get with gdb from the core the output of the following commands:
>>
>> frame 1
>>
>> info locals
>>
>> list
>>
>>
>> and send them here on the mailing list.
>>
>> Cheers,
>> Daniel
>>
>> On 24/03/2017 14:50, David Escartín Almudévar wrote:
>>
>>> hello all, Daniel
>>>
>>> checking the core with the gdb, we have checked the variables at the
>>> frames of the backtrace, to try to get the full sip message seems it
>>> seemed truncated.
>>> checking the buf variable of the frame 11 which theorically contains
>>> the sip msg to parse we have the string
>>>
>>>
>>> SIP/2.0 487 Request Terminated\r\nFrom:
>>> \"881237046977\";tag=B7jgc8jQ4m5pB\r\nTo:
>>> ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
>>> \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP
>>> L\263\264\016\020?\337\v\234\262\264\016 ;branch=\327\f\340\r\nVia:
>>> SIP/2.0/UDP \020?\337\v\234\262\264\016
>>> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
>>> \r\nContent-Length: 0\r\n\r\n
>>>
>>> this is i guess how gdb parses the message, so i guess i cannot
>>> introduce this like that in a xml sipp formal, since CRLF is
>>> represented as \r\n, so others parts like l\337K\016\213\347:
>>> \344\003 i have no idea what they are, because they also seem to be
>>> out of the ASCII table ¿?
>>> anycase, seems the message is very bad formed, and the kamailio
>>> tries to resolve the host of the Via and it gets nothing, so the
>>> function get_hash1_case_raw is fed by a nul value and seems that the
>>> reason it crashes
>>>
>>> hope you can retrieve information from that message to find out what
>>> kind of message it exactly is and see if it's possible to avoid
>>> kamailio's crash in this scenario
>>>
>>>
>>> best regards
>>> david
>>>
>>>
>>>
>>> El vie, 24-03-2017 a las 12:10 +0100, David Escartín Almudévar escribió:
 hello all

 we have experienced a crash and tracing the logs and the core,
 seems it was because a sip response from an endpoint.
 a UDP receiver (26248) crashed and the last message we see on it is
 a 487 quite bad formed

 Mar 24 01:58:02 mia-proxy-inout-1-stby
 /usr/local/kamailio/sbin/kamailio[26248]: ERROR: tm
 [t_lookup.c:1055]: t_check_msg(): ERROR: reply doesn't have a via,
 cseq or call-id header
 Mar 24 01:58:17 mia-proxy-inout-1-stby
 /usr/local/kamailio/sbin/kamailio[26230]: ALERT: 
 [main.c:739]: handle_sigs(): child process 26248 exited by a signal 11


 the backtrace of the core
 (gdb) backtrace
 #0  0x00457ab9 in get_hash1_case_raw (s=0x0, len=0) at
 hashes.h:210
 #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188,
 type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
 #2  0x00461285 in dns_hash_get (name=0x7f6906943188,
 type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:762
 #3  0x00467194 in dns_get_entry (name=0x7f6906943188,
 type=1) at dns_cache.c:2102
 #4  0x00468a05 in dns_a_get_he (name=0x7f6906943188) at
 dns_cache.c:2432
 #5  0x00468bb9 in dns_get_he (name=0x7f6906943188, flags=1)
 at dns_cache.c:2505
 #6  0x004696c4 in dns_srv_sip_resolvehost
 (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1
 "\001\330\023") at dns_cache.c:2679
 #7  0x0046aa37 in dns_sip_resolvehost (name=0x7f6906943188,
 port=0x7fff120795e2, proto=0x7fff120795e1 "\001\330\023") at
 dns_cache.c:2849
 #8  0x0049519e in update_sock_struct_from_via
 (to=0x7fff12079708, 

Re: [SR-Users] kamailio 4.4.1 crash on bad sip response

2017-03-27 Thread Daniel-Constantin Mierla
Hello,

the backtrace is no longer matching the 4.4 branch code, as you run an
older release in that series.

Can you get with gdb from the core the output of the following commands:

frame 1

info locals

list

and send them here on the mailing list.

Cheers,
Daniel

On 24/03/2017 14:50, David Escartín Almudévar wrote:
> hello all, Daniel
>
> checking the core with the gdb, we have checked the variables at the
> frames of the backtrace, to try to get the full sip message seems it
> seemed truncated.
> checking the buf variable of the frame 11 which theorically contains
> the sip msg to parse we have the string
>
>
> SIP/2.0 487 Request Terminated\r\nFrom:
> \"881237046977\";tag=B7jgc8jQ4m5pB\r\nTo:
> ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
> \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP
> L\263\264\016\020?\337\v\234\262\264\016 ;branch=\327\f\340\r\nVia:
> SIP/2.0/UDP \020?\337\v\234\262\264\016
> :5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016
> \r\nContent-Length: 0\r\n\r\n
>
> this is i guess how gdb parses the message, so i guess i cannot
> introduce this like that in a xml sipp formal, since CRLF is
> represented as \r\n, so others parts like l\337K\016\213\347: \344\003
> i have no idea what they are, because they also seem to be out of the
> ASCII table ¿?
> anycase, seems the message is very bad formed, and the kamailio tries
> to resolve the host of the Via and it gets nothing, so the function
> get_hash1_case_raw is fed by a nul value and seems that the reason it
> crashes
>
> hope you can retrieve information from that message to find out what
> kind of message it exactly is and see if it's possible to avoid
> kamailio's crash in this scenario
>
>
> best regards
> david
>
>
>
> El vie, 24-03-2017 a las 12:10 +0100, David Escartín Almudévar escribió:
>> hello all
>>
>> we have experienced a crash and tracing the logs and the core, seems
>> it was because a sip response from an endpoint.
>> a UDP receiver (26248) crashed and the last message we see on it is a
>> 487 quite bad formed
>>
>> Mar 24 01:58:02 mia-proxy-inout-1-stby
>> /usr/local/kamailio/sbin/kamailio[26248]: ERROR: tm
>> [t_lookup.c:1055]: t_check_msg(): ERROR: reply doesn't have a via,
>> cseq or call-id header
>> Mar 24 01:58:17 mia-proxy-inout-1-stby
>> /usr/local/kamailio/sbin/kamailio[26230]: ALERT:  [main.c:739]:
>> handle_sigs(): child process 26248 exited by a signal 11
>>
>>
>> the backtrace of the core
>> (gdb) backtrace
>> #0  0x00457ab9 in get_hash1_case_raw (s=0x0, len=0) at
>> hashes.h:210
>> #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188,
>> type=1, h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
>> #2  0x00461285 in dns_hash_get (name=0x7f6906943188, type=1,
>> h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:762
>> #3  0x00467194 in dns_get_entry (name=0x7f6906943188, type=1)
>> at dns_cache.c:2102
>> #4  0x00468a05 in dns_a_get_he (name=0x7f6906943188) at
>> dns_cache.c:2432
>> #5  0x00468bb9 in dns_get_he (name=0x7f6906943188, flags=1)
>> at dns_cache.c:2505
>> #6  0x004696c4 in dns_srv_sip_resolvehost
>> (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1
>> "\001\330\023") at dns_cache.c:2679
>> #7  0x0046aa37 in dns_sip_resolvehost (name=0x7f6906943188,
>> port=0x7fff120795e2, proto=0x7fff120795e1 "\001\330\023") at
>> dns_cache.c:2849
>> #8  0x0049519e in update_sock_struct_from_via
>> (to=0x7fff12079708, msg=0x7f69069a1dd8, via=0x7f69068f82a8) at
>> forward.c:704
>> #9  0x00495ee5 in do_forward_reply (msg=0x7f69069a1dd8,
>> mode=0) at forward.c:766
>> #10 0x004970af in forward_reply (msg=0x7f69069a1dd8) at
>> forward.c:849
>> #11 0x005197ef in receive_msg (
>> buf=0xab0d80 "SIP/2.0 487 Request Terminated\r\nFrom:
>> \"88\";tag=B7jgc8jQ4m5pB\r\nTo:
>> ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016"...,
>> len=367, rcv_info=0x7fff12079a10) at receive.c:299
>> #12 0x00627b43 in udp_rcv_loop () at udp_server.c:495
>> #13 0x004b107a in main_loop () at main.c:1600
>> #14 0x004b842f in main (argc=13, argv=0x7fff12079fb8) at
>> main.c:2616
>>
>>
>> i have tried to duplicate the issue, but i dont know how to translate
>> l\337K\016 to a xml notation
>> i guess this is some weird that cannot be processed for kamailio
>>
>> could you please take a look and let me know if you know how to
>> duplicate and fix this crash?
>>
>> thanks a lot and regards
>> david
>
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda

Re: [SR-Users] kamailio 4.4.1 crash on bad sip response

2017-03-24 Thread David Escartín Almudévar
hello all, Daniel

checking the core with the gdb, we have checked the variables at the
frames of the backtrace, to try to get the full sip message seems it
seemed truncated.
checking the buf variable of the frame 11 which theorically contains the
sip msg to parse we have the string


SIP/2.0 487 Request Terminated\r\nFrom: \"881237046977
\";tag=B7jgc8jQ4m5pB\r\nTo:
;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r\nl\337K\016\213\347:
 \344\003\r\nCSeq: 104824272 INVITE\r\nVia: SIP/2.0/UDP 
L\263\264\016\020?\337\v\234\262\264\016 ;branch=\327\f\340\r\nVia: SIP/2.0/UDP 
\020?\337\v\234\262\264\016 
:5080;received=;rport=5080;branch=\020?\337\v\234\262\264\016 
\r\nContent-Length: 0\r\n\r\n

this is i guess how gdb parses the message, so i guess i cannot
introduce this like that in a xml sipp formal, since CRLF is represented
as \r\n, so others parts like l\337K\016\213\347: \344\003 i have no
idea what they are, because they also seem to be out of the ASCII table
¿?
anycase, seems the message is very bad formed, and the kamailio tries to
resolve the host of the Via and it gets nothing, so the function
get_hash1_case_raw is fed by a nul value and seems that the reason it
crashes

hope you can retrieve information from that message to find out what
kind of message it exactly is and see if it's possible to avoid
kamailio's crash in this scenario


best regards
david



El vie, 24-03-2017 a las 12:10 +0100, David Escartín Almudévar escribió:

> hello all 
> 
> we have experienced a crash and tracing the logs and the core, seems
> it was because a sip response from an endpoint.
> a UDP receiver (26248) crashed and the last message we see on it is a
> 487 quite bad formed
> 
> Mar 24 01:58:02
> mia-proxy-inout-1-stby /usr/local/kamailio/sbin/kamailio[26248]:
> ERROR: tm [t_lookup.c:1055]: t_check_msg(): ERROR: reply doesn't have
> a via, cseq or call-id header
> Mar 24 01:58:17
> mia-proxy-inout-1-stby /usr/local/kamailio/sbin/kamailio[26230]:
> ALERT:  [main.c:739]: handle_sigs(): child process 26248 exited
> by a signal 11
> 
> 
> the backtrace of the core
> (gdb) backtrace
> #0  0x00457ab9 in get_hash1_case_raw (s=0x0, len=0) at
> hashes.h:210
> #1  0x0045b472 in _dns_hash_find (name=0x7f6906943188, type=1,
> h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
> #2  0x00461285 in dns_hash_get (name=0x7f6906943188, type=1,
> h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:762
> #3  0x00467194 in dns_get_entry (name=0x7f6906943188, type=1)
> at dns_cache.c:2102
> #4  0x00468a05 in dns_a_get_he (name=0x7f6906943188) at
> dns_cache.c:2432
> #5  0x00468bb9 in dns_get_he (name=0x7f6906943188, flags=1) at
> dns_cache.c:2505
> #6  0x004696c4 in dns_srv_sip_resolvehost
> (name=0x7f6906943188, port=0x7fff120795e2, proto=0x7fff120795e1 "\001
> \330\023") at dns_cache.c:2679
> #7  0x0046aa37 in dns_sip_resolvehost (name=0x7f6906943188,
> port=0x7fff120795e2, proto=0x7fff120795e1 "\001\330\023") at
> dns_cache.c:2849
> #8  0x0049519e in update_sock_struct_from_via
> (to=0x7fff12079708, msg=0x7f69069a1dd8, via=0x7f69068f82a8) at
> forward.c:704
> #9  0x00495ee5 in do_forward_reply (msg=0x7f69069a1dd8,
> mode=0) at forward.c:766
> #10 0x004970af in forward_reply (msg=0x7f69069a1dd8) at
> forward.c:849
> #11 0x005197ef in receive_msg (
> buf=0xab0d80 "SIP/2.0 487 Request Terminated\r\nFrom: \"88
> \";tag=B7jgc8jQ4m5pB\r\nTo:
> ;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r
> \nl\337K\016"..., len=367, rcv_info=0x7fff12079a10) at receive.c:299
> #12 0x00627b43 in udp_rcv_loop () at udp_server.c:495
> #13 0x004b107a in main_loop () at main.c:1600
> #14 0x004b842f in main (argc=13, argv=0x7fff12079fb8) at
> main.c:2616
> 
> 
> i have tried to duplicate the issue, but i dont know how to translate
> l\337K\016 to a xml notation
> i guess this is some weird that cannot be processed for kamailio
> 
> could you please take a look and let me know if you know how to
> duplicate and fix this crash?
> 
> thanks a lot and regards
> david


___
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] kamailio 4.4.1 crash on bad sip response

2017-03-24 Thread David Escartín Almudévar
hello all 

we have experienced a crash and tracing the logs and the core, seems it
was because a sip response from an endpoint.
a UDP receiver (26248) crashed and the last message we see on it is a
487 quite bad formed

Mar 24 01:58:02
mia-proxy-inout-1-stby /usr/local/kamailio/sbin/kamailio[26248]: ERROR:
tm [t_lookup.c:1055]: t_check_msg(): ERROR: reply doesn't have a via,
cseq or call-id header
Mar 24 01:58:17
mia-proxy-inout-1-stby /usr/local/kamailio/sbin/kamailio[26230]: ALERT:
 [main.c:739]: handle_sigs(): child process 26248 exited by a
signal 11


the backtrace of the core
(gdb) backtrace
#0  0x00457ab9 in get_hash1_case_raw (s=0x0, len=0) at
hashes.h:210
#1  0x0045b472 in _dns_hash_find (name=0x7f6906943188, type=1,
h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:535
#2  0x00461285 in dns_hash_get (name=0x7f6906943188, type=1,
h=0x7fff120793cc, err=0x7fff120793ac) at dns_cache.c:762
#3  0x00467194 in dns_get_entry (name=0x7f6906943188, type=1) at
dns_cache.c:2102
#4  0x00468a05 in dns_a_get_he (name=0x7f6906943188) at
dns_cache.c:2432
#5  0x00468bb9 in dns_get_he (name=0x7f6906943188, flags=1) at
dns_cache.c:2505
#6  0x004696c4 in dns_srv_sip_resolvehost (name=0x7f6906943188,
port=0x7fff120795e2, proto=0x7fff120795e1 "\001\330\023") at
dns_cache.c:2679
#7  0x0046aa37 in dns_sip_resolvehost (name=0x7f6906943188,
port=0x7fff120795e2, proto=0x7fff120795e1 "\001\330\023") at
dns_cache.c:2849
#8  0x0049519e in update_sock_struct_from_via
(to=0x7fff12079708, msg=0x7f69069a1dd8, via=0x7f69068f82a8) at
forward.c:704
#9  0x00495ee5 in do_forward_reply (msg=0x7f69069a1dd8, mode=0)
at forward.c:766
#10 0x004970af in forward_reply (msg=0x7f69069a1dd8) at
forward.c:849
#11 0x005197ef in receive_msg (
buf=0xab0d80 "SIP/2.0 487 Request Terminated\r\nFrom: \"88
\";tag=B7jgc8jQ4m5pB\r\nTo:
;tag=e0d50be-13c4-58d47cba-a2ed9808-36fa\r
\nl\337K\016"..., len=367, rcv_info=0x7fff12079a10) at receive.c:299
#12 0x00627b43 in udp_rcv_loop () at udp_server.c:495
#13 0x004b107a in main_loop () at main.c:1600
#14 0x004b842f in main (argc=13, argv=0x7fff12079fb8) at
main.c:2616


i have tried to duplicate the issue, but i dont know how to translate l
\337K\016 to a xml notation
i guess this is some weird that cannot be processed for kamailio

could you please take a look and let me know if you know how to
duplicate and fix this crash?

thanks a lot and regards
david
___
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] Kamailio does'nt respond to packets from specific addresses

2017-03-15 Thread Daniel-Constantin Mierla
Hello,

maybe there is some IP routing mis-configuration in the server. What did
you use to see that the packets arrive on the sip server system? ngrep
or something similar?

Cheers,
Daniel


On 14/03/2017 22:06, עדי ויזגן wrote:
>
> Hi, yes Kamailio is listening to all addresses, even the destination
> address and still no response. It is weird because it only happens
> with 172.. addresses. What I did for now is I put a MikroTik router
> between the Kamailio server and the switch, and I configured it to do
> src-nat and change the source address from 172.. address to 192..
> address and now the Kamailio respond!
> So I fixed it but I don't like this solution.
> I would like to find out what causes the problem so I can really fix it.
>
>
> בתאריך יום ג׳, 14 במרץ 2017, 18:25, מאת Daniel-Constantin Mierla
> ‏>:
>
> Hello,
>
> is Kamailio listening on all the IP addresses you need to received
> the traffic? You can do:
>
> kamctl ps
>
> Also, check if you have any firewall rules blocking traffic from
> those IP addresses.
>
> Cheers,
> Daniel
>
>
> On 14/03/2017 11:34, עדי ויזגן wrote:
>> Hi everyone,
>> I have the following problem:
>> I have a Kamailio server that is connected to several Asterisk
>> servers for load balacing in a LAN network with the IP's of
>> 192.168.16.X.
>> I recently connected with another company that is supposed to
>> send me calls through the Kamailio server.
>> The problem is this:
>> I am connected to then with a cable from their network to mine.
>> My port has the address 10.9.18.198 and they come from the
>> address 172.18.177.18.
>> When I get packets from their address (172...) I can see them
>> getting to my Kamailio server, but the Kamailio does not respond.
>> It only happens when I get packets from 172 source address.
>> If I get from 192 or 10 adresses from my LAN network it works,
>> and if I get packets from real world IP's through my WAN it works.
>> Does anyone have any idea why the Kamailio does'nt respond to
>> packets from 172 adresses?
>> And how to fix this?
>> Thanks in advance!
>>
>>
>> ___
>> 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
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda  -- 
> www.linkedin.com/in/miconda 
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com 
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com 
> 
>
> ___
> 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
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio World 2017 - A selection of presentations

2017-03-15 Thread Daniel-Constantin Mierla
Hello,

I would like to announce that many of the presentations at Kamailio
World 2017 (May 8-10, in Berlin, Germany) are now listed at:

  - https://www.kamailioworld.com/k05/schedule/

Just several are not published yet, working to get all their details in
place and expect to have the first draft of the schedule very soon.

This edition takes place again at the same location in the famous city
center of Berlin, the number of seats is limited, last year the event
was fully booked. Do not delay too much your registration if you want to
attend this year:

  - https://www.kamailioworld.com/k05/registration/

Thanks to the sponsors (https://www.kamailioworld.com/k05/sponsors/), it
looks like we will be able to offer again some grants for students or
underrepresented groups. More details will be sent out in the near future.

Looking forward to meeting many of you in Berlin!

Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio does'nt respond to packets from specific addresses

2017-03-14 Thread עדי ויזגן
Hi, yes Kamailio is listening to all addresses, even the destination
address and still no response. It is weird because it only happens with
172.. addresses. What I did for now is I put a MikroTik router between the
Kamailio server and the switch, and I configured it to do src-nat and
change the source address from 172.. address to 192.. address and now the
Kamailio respond!
So I fixed it but I don't like this solution.
I would like to find out what causes the problem so I can really fix it.

בתאריך יום ג׳, 14 במרץ 2017, 18:25, מאת Daniel-Constantin Mierla ‏<
mico...@gmail.com>:

> Hello,
>
> is Kamailio listening on all the IP addresses you need to received the
> traffic? You can do:
>
> kamctl ps
>
> Also, check if you have any firewall rules blocking traffic from those IP
> addresses.
>
> Cheers,
> Daniel
>
> On 14/03/2017 11:34, עדי ויזגן wrote:
>
> Hi everyone,
> I have the following problem:
> I have a Kamailio server that is connected to several Asterisk servers for
> load balacing in a LAN network with the IP's of 192.168.16.X.
> I recently connected with another company that is supposed to send me
> calls through the Kamailio server.
> The problem is this:
> I am connected to then with a cable from their network to mine. My port
> has the address 10.9.18.198 and they come from the address 172.18.177.18.
> When I get packets from their address (172...) I can see them getting to
> my Kamailio server, but the Kamailio does not respond.
> It only happens when I get packets from 172 source address.
> If I get from 192 or 10 adresses from my LAN network it works, and if I
> get packets from real world IP's through my WAN it works.
> Does anyone have any idea why the Kamailio does'nt respond to packets from
> 172 adresses?
> And how to fix this?
> Thanks in advance!
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
> ___
> 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] Kamailio does'nt respond to packets from specific addresses

2017-03-14 Thread Daniel-Constantin Mierla
Hello,

is Kamailio listening on all the IP addresses you need to received the
traffic? You can do:

kamctl ps

Also, check if you have any firewall rules blocking traffic from those
IP addresses.

Cheers,
Daniel


On 14/03/2017 11:34, עדי ויזגן wrote:
> Hi everyone,
> I have the following problem:
> I have a Kamailio server that is connected to several Asterisk servers
> for load balacing in a LAN network with the IP's of 192.168.16.X.
> I recently connected with another company that is supposed to send me
> calls through the Kamailio server.
> The problem is this:
> I am connected to then with a cable from their network to mine. My
> port has the address 10.9.18.198 and they come from the address
> 172.18.177.18.
> When I get packets from their address (172...) I can see them getting
> to my Kamailio server, but the Kamailio does not respond.
> It only happens when I get packets from 172 source address.
> If I get from 192 or 10 adresses from my LAN network it works, and if
> I get packets from real world IP's through my WAN it works.
> Does anyone have any idea why the Kamailio does'nt respond to packets
> from 172 adresses?
> And how to fix this?
> Thanks in advance!
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio does'nt respond to packets from specific addresses

2017-03-14 Thread עדי ויזגן
Hi everyone,
I have the following problem:
I have a Kamailio server that is connected to several Asterisk servers for
load balacing in a LAN network with the IP's of 192.168.16.X.
I recently connected with another company that is supposed to send me calls
through the Kamailio server.
The problem is this:
I am connected to then with a cable from their network to mine. My port has
the address 10.9.18.198 and they come from the address 172.18.177.18.
When I get packets from their address (172...) I can see them getting to my
Kamailio server, but the Kamailio does not respond.
It only happens when I get packets from 172 source address.
If I get from 192 or 10 adresses from my LAN network it works, and if I get
packets from real world IP's through my WAN it works.
Does anyone have any idea why the Kamailio does'nt respond to packets from
172 adresses?
And how to fix this?
Thanks in advance!
___
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] Kamailio Presence help required.

2017-03-08 Thread Phil Lavin
See what Igor mentioned previously about presence vs dialogs. The phone is 
subscribing for dialog-info and is being told about all the dialogs (calls) the 
UA is or has recently been on. In this case, 1 call which has ended (hence 
terminated state).

If the user was on a call at the time your phone registers, their light should 
go on.

I suggest also turning off “force_single_dialog” as it causes issues most of 
the time.


Cheers

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
SamyGo
Sent: 08 March 2017 15:38
To: Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] Kamailio Presence help required.

Hi Phil,
That did help improve the situation; but I've noticed that now when a phone 
boots up and sends for SUBSCRIBE its gets a NOTIFY for the request with state 
'terminated' even if the other side is Online/Active.

Here is a sample of the Immediate NOTIFY:

To: 
<sip:1...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=2731947019
From: 
<sip:2...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=5d081ad8df67fd2b232f5240ec63c6ff-f422
CSeq: 2 NOTIFY
Call-ID: 0_1231439266@192.168.1.19<mailto:0_1231439266@192.168.1.19>
Content-Length: 267
User-Agent: kamailio (4.4.4 (x86_64/linux))
Max-Forwards: 70
Event: dialog
Contact: 
Subscription-State: active;expires=1800
Content-Type: application/dialog-info+xml


mailto:sip%3a...@presence.voipguy.ca>">
  
terminated
  


In above case the 201 device was Registered but its state is set as terminated. 
Same signal goes for offline users as well. Is this a standard reply or 
something is missing ?

Thanks for your time Phil.

Regards,
Sammy


On Tue, Mar 7, 2017 at 1:54 PM, Phil Lavin 
<phil.la...@cloudcall.com<mailto:phil.la...@cloudcall.com>> wrote:
Looks fairly sane. Try setting “pua” db_mode to 0. db_mode 2 takes a very 
different path through the code of the pua module and we have found it to be 
somewhat broken beyond repair. Our config is as follows. You may not have some 
of the stuff highlighted in yellow as I recently added those features to 
Kamailio. Depends which version you’re running. They’re not necessary for 
normal operation, however.

modparam("presence", "db_url", DBURL)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 60)
modparam("presence", "local_log_facility", "LOG_LOCAL3")
modparam("presence", "max_expires", 14430)

modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)

modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", 0) # Memory only. Required due to the "multiple 
states for a single dialog" bug
modparam("pua", "update_period", 20)
modparam("pua", "outbound_proxy", MY_SIP_URL)

modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
modparam("pua_dialoginfo", "override_lifetime", 14420)
modparam("pua_dialoginfo", "callee_trying", 1)
modparam("pua_dialoginfo", "disable_caller_publish_flag", 
FLT_DISABLE_CALLER_PUBLISH)
modparam("pua_dialoginfo", "disable_callee_publish_flag", 
FLT_DISABLE_CALLEE_PUBLISH)


From: sr-users 
[mailto:sr-users-boun...@lists.sip-router.org<mailto:sr-users-boun...@lists.sip-router.org>]
 On Behalf Of SamyGo
Sent: 06 March 2017 22:51
To: Kamailio (SER) - Users Mailing List 
<sr-users@lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>

Subject: Re: [SR-Users] Kamailio Presence help required.


Phil, here are all the Presence related modules and their params.

Igor, I go clearly understand that difference and I accept it. However, Im 
finding it difficult to digest that FreeSWITCH sends back initial NOTIFY and 
phone light works while Kamailio is unable to do the same.


#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_reginfo.so"
loadmodule "pua.so"
loadmodule "pua_dialoginfo.so"
loadmodule "pua_reginfo.so"
loadmodule "pua_usrloc.so"
#!endif


#!ifdef WITH_PRESENCE
# - presence params -
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "sip:ServerIP:5060" )
modparam("presence", "send_fast_notify", 0)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 40)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "fetch_rows", 1000)

# - pres

Re: [SR-Users] Kamailio Presence help required.

2017-03-08 Thread SamyGo
Hi Phil,
That did help improve the situation; but I've noticed that now when a phone
boots up and sends for SUBSCRIBE its gets a NOTIFY for the request with
state 'terminated' even if the other side is Online/Active.

Here is a sample of the Immediate NOTIFY:

To: <sip:1...@presence.voipguy.ca <sip%3a...@presence.voipguy.ca>
>;tag=2731947019
From: <sip:2...@presence.voipguy.ca <sip%3a...@presence.voipguy.ca>
>;tag=5d081ad8df67fd2b232f5240ec63c6ff-f422
CSeq: 2 NOTIFY
Call-ID: 0_1231439266@192.168.1.19
Content-Length: 267
User-Agent: kamailio (4.4.4 (x86_64/linux))
Max-Forwards: 70
Event: dialog
Contact: 
Subscription-State: active;expires=1800
Content-Type: application/dialog-info+xml



  
terminated
  


In above case the 201 device was Registered but its state is set as
terminated. Same signal goes for offline users as well. Is this a standard
reply or something is missing ?

Thanks for your time Phil.

Regards,
Sammy


On Tue, Mar 7, 2017 at 1:54 PM, Phil Lavin <phil.la...@cloudcall.com> wrote:

> Looks fairly sane. Try setting “pua” db_mode to 0. db_mode 2 takes a very
> different path through the code of the pua module and we have found it to
> be somewhat broken beyond repair. Our config is as follows. You may not
> have some of the stuff highlighted in yellow as I recently added those
> features to Kamailio. Depends which version you’re running. They’re not
> necessary for normal operation, however.
>
>
>
> modparam("presence", "db_url", DBURL)
>
> modparam("presence", "db_update_period", 20)
>
> modparam("presence", "clean_period", 60)
>
> modparam("presence", "local_log_facility", "LOG_LOCAL3")
>
> modparam("presence", "max_expires", 14430)
>
>
>
> modparam("presence_xml", "db_url", DBURL)
>
> modparam("presence_xml", "force_active", 1)
>
>
>
> modparam("pua", "db_url", DBURL)
>
> modparam("pua", "db_mode", 0) # Memory only. Required due to the "multiple
> states for a single dialog" bug
>
> modparam("pua", "update_period", 20)
>
> modparam("pua", "outbound_proxy", MY_SIP_URL)
>
>
>
> modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
>
> modparam("pua_dialoginfo", "override_lifetime", 14420)
>
> modparam("pua_dialoginfo", "callee_trying", 1)
>
> modparam("pua_dialoginfo", "disable_caller_publish_flag",
> FLT_DISABLE_CALLER_PUBLISH)
>
> modparam("pua_dialoginfo", "disable_callee_publish_flag",
> FLT_DISABLE_CALLEE_PUBLISH)
>
>
>
>
>
> *From:* sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of *SamyGo
> *Sent:* 06 March 2017 22:51
> *To:* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
>
> *Subject:* Re: [SR-Users] Kamailio Presence help required.
>
>
>
>
>
> Phil, here are all the Presence related modules and their params.
>
> Igor, I go clearly understand that difference and I accept it. However, Im
> finding it difficult to digest that FreeSWITCH sends back initial NOTIFY
> and phone light works while Kamailio is unable to do the same.
>
>
>
>
>
> #!ifdef WITH_PRESENCE
>
> loadmodule "presence.so"
>
> loadmodule "presence_xml.so"
>
> loadmodule "presence_dialoginfo.so"
>
> loadmodule "presence_reginfo.so"
>
> loadmodule "pua.so"
>
> loadmodule "pua_dialoginfo.so"
>
> loadmodule "pua_reginfo.so"
>
> loadmodule "pua_usrloc.so"
>
> #!endif
>
>
>
>
>
> #!ifdef WITH_PRESENCE
>
> # - presence params -
>
> modparam("presence", "db_url", DBURL)
>
> modparam("presence", "server_address", "sip:ServerIP:5060" )
>
> modparam("presence", "send_fast_notify", 0)
>
> modparam("presence", "db_update_period", 20)
>
> modparam("presence", "clean_period", 40)
>
> modparam("presence", "subs_db_mode", 2)
>
> modparam("presence", "fetch_rows", 1000)
>
>
>
> # - presence_xml params -
>
> modparam("presence_xml", "db_url", DBURL)
>
> modparam("presence_xml", "force_active", 1)
>
> modparam("presence_xml", "force_dummy_presence", 1)
>
>
>
>
>
> # - presence_dialoginfo params -
>
&

[SR-Users] Kamailio push for Android VoIP Application and VoIP Contacts update

2017-03-08 Thread sscc
good day, i have a running kamailio server having 200 users. I maintain the
user ids in a vcf (vCard Format) form. i have developed an Android VoIP
application. Android application is given to the user along with the contact
vcf. The contact list get increased day by day and consequently the user ids
in vcf (vCard Format) as well. the application is also updated. Aim is to
update application and the contact list by sending push notification to
user. (we don't want to place our application at play store). i want to do
push notification from Kamilio server for application and contact list
update. Is there any way to do push notification from server to users to
update the app and VoIP contact list. regards sscc 



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/Kamailio-push-for-Android-VoIP-Application-and-VoIP-Contacts-update-tp156632.html
Sent from the Users mailing list archive at Nabble.com.

___
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] Kamailio Presence help required.

2017-03-07 Thread Phil Lavin
Looks fairly sane. Try setting “pua” db_mode to 0. db_mode 2 takes a very 
different path through the code of the pua module and we have found it to be 
somewhat broken beyond repair. Our config is as follows. You may not have some 
of the stuff highlighted in yellow as I recently added those features to 
Kamailio. Depends which version you’re running. They’re not necessary for 
normal operation, however.

modparam("presence", "db_url", DBURL)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 60)
modparam("presence", "local_log_facility", "LOG_LOCAL3")
modparam("presence", "max_expires", 14430)

modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)

modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", 0) # Memory only. Required due to the "multiple 
states for a single dialog" bug
modparam("pua", "update_period", 20)
modparam("pua", "outbound_proxy", MY_SIP_URL)

modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
modparam("pua_dialoginfo", "override_lifetime", 14420)
modparam("pua_dialoginfo", "callee_trying", 1)
modparam("pua_dialoginfo", "disable_caller_publish_flag", 
FLT_DISABLE_CALLER_PUBLISH)
modparam("pua_dialoginfo", "disable_callee_publish_flag", 
FLT_DISABLE_CALLEE_PUBLISH)


From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
SamyGo
Sent: 06 March 2017 22:51
To: Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] Kamailio Presence help required.


Phil, here are all the Presence related modules and their params.

Igor, I go clearly understand that difference and I accept it. However, Im 
finding it difficult to digest that FreeSWITCH sends back initial NOTIFY and 
phone light works while Kamailio is unable to do the same.


#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_reginfo.so"
loadmodule "pua.so"
loadmodule "pua_dialoginfo.so"
loadmodule "pua_reginfo.so"
loadmodule "pua_usrloc.so"
#!endif


#!ifdef WITH_PRESENCE
# - presence params -
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "sip:ServerIP:5060" )
modparam("presence", "send_fast_notify", 0)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 40)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "fetch_rows", 1000)

# - presence_xml params -
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "force_dummy_presence", 1)


# - presence_dialoginfo params -
modparam("presence_dialoginfo", "force_single_dialog", 1)
modparam("presence_dialoginfo", "force_dummy_dialog", 0)

# - pua params -
modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", 2)
modparam("pua", "update_period", 60)
modparam("pua", "dlginfo_increase_version", 0)
modparam("pua", "reginfo_increase_version", 0)
modparam("pua", "check_remote_contact", 1)
modparam("pua", "fetch_rows", 1000)

# - pua_dialoginfo params -
modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
modparam("pua_dialoginfo", "caller_confirmed", 0)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "override_lifetime", 124)

modparam("pua_reginfo|pua_usrloc", "default_domain", 
"voipguy.ca<http://voipguy.ca>")
modparam("pua_reginfo", "server_address", "sip:REGINFO@ServerIP")
modparam("pua_usrloc", "branch_flag", FLT_DLGINFO)

#!endif


Thanks for helping me out on this.

Regards,
Sammy


On Mon, Mar 6, 2017 at 4:31 PM, Igor Olhovskiy 
<igorolhovs...@gmail.com<mailto:igorolhovs...@gmail.com>> wrote:
Hi, Samy.

Point, there is 2 modes of presence. Based on 'presence' and 'dialog'. Only 
'presence' indicates states like online/offline, 'dialog' indicates only 
different call states, but also hold more info about a call. In 'dialog' case 
XML 

Re: [SR-Users] Kamailio core dumped

2017-03-07 Thread Alexey V. Panfilov
Hello, Daniel!

Sure, issue is here - https://github.com/kamailio/kamailio/issues/1021

Thanks!


07.03.2017 12:58, Daniel-Constantin Mierla wrote:
> Hello,
> 
> can you open an issue on bug tracker? Having it there ensure that it is
> not forgotten and properly handles -- sometimes people travel and miss
> various messages on the mailing list. As a matter of fact for this
> specific case, your messages is put in spam folder for me by the gmail
> server and only spotted now as I looked into the mailing list archive.
> 
> I will try to look at it as soon as I get a chance, right now being out
> of the office.
> 
> Cheers,
> Daniel
> 
> On 07/03/2017 09:08, Alexey V. Panfilov wrote:
>> Hello,
>>
>> 01.03.2017 13:51, Alexey V. Panfilov wrote:
>>> Hi there,
>>>
>>> I've kamailio 4.2.3 (i386/freebsd) which works perfectly with 200-300
>>> cps for years.
>>>
>>> Now I need migrate to freebsd amd64. I've installed kamailio 4.4.5
>>> (amd64/freebsd), copied kamailio.cfg, made a test call - it was all right.
>>>
>>> But when I start work load (200-300 cps), kamailio core dumped and
>>> exited. In logs (skipped 

Re: [SR-Users] Kamailio core dumped

2017-03-07 Thread Daniel-Constantin Mierla
Hello,

can you open an issue on bug tracker? Having it there ensure that it is
not forgotten and properly handles -- sometimes people travel and miss
various messages on the mailing list. As a matter of fact for this
specific case, your messages is put in spam folder for me by the gmail
server and only spotted now as I looked into the mailing list archive.

I will try to look at it as soon as I get a chance, right now being out
of the office.

Cheers,
Daniel

On 07/03/2017 09:08, Alexey V. Panfilov wrote:
> Hello,
>
> 01.03.2017 13:51, Alexey V. Panfilov wrote:
>> Hi there,
>>
>> I've kamailio 4.2.3 (i386/freebsd) which works perfectly with 200-300
>> cps for years.
>>
>> Now I need migrate to freebsd amd64. I've installed kamailio 4.4.5
>> (amd64/freebsd), copied kamailio.cfg, made a test call - it was all right.
>>
>> But when I start work load (200-300 cps), kamailio core dumped and
>> exited. In logs (skipped 

Re: [SR-Users] Kamailio 4.2 crashed

2017-03-07 Thread Igor Potjevlesch
quot;

ret = -1

seed = 2069815000

rfd = 4

debug_save = 0

debug_flag = 0

dont_fork_cnt = 0

n_lst = 0x40d134

p = 0xc2 

    __FUNCTION__ = "main"



Regards,



Igor.



De : Igor Potjevlesch [mailto:igor.potjevle...@gmail.com]
Envoyé : vendredi 24 février 2017 11:50
À : mico...@gmail.com; 'Kamailio (SER) - Users Mailing List' 
<sr-users@lists.sip-router.org>
Objet : RE: [SR-Users] Kamailio 4.2 crashed



Hello,



Oh no.

The first coredump:



[…]



Regards,



Igor.



De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de 
Daniel-Constantin Mierla
Envoyé : jeudi 23 février 2017 20:37
À : Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org 
<mailto:sr-users@lists.sip-router.org> >
Objet : Re: [SR-Users] Kamailio 4.2 crashed



Hello,

is that all the output of 'bt full'? Having just frame 0 is quite odd.

Cheers,
Daniel



On 23/02/2017 16:44, Igor Potjevlesch wrote:

Hello,



I got two coredumps:

(gdb) bt full

#0  0x0061ab8e in qm_insert_free (qm=0x7f0f7fca7000, 
frag=0x7f0f8f6f6268) at mem/q_malloc.c:180

f = 0x7f0f8f6c45e8

prev = 0x0

hash = 5



And

(gdb) bt full

#0  0x0061b935 in qm_detach_free (qm=0x7f0f7fca7000, 
frag=0x7f0f8f6d70b8) at mem/q_malloc.c:271

prev = 0x7f0f7fca7248

next = 0x7f0f8f6c45e8



What are necessary to diagnose how this issue occurs? Thank you for your 
support.



Regards,



Igor.




  _


 
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>

L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
www.avast.com 
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>






___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Daniel-Constantin Mierla
www.twitter.com/miconda <http://www.twitter.com/miconda>  -- 
www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com <http://www.asipto.com>
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com 
<http://www.kamailioworld.com>



  _


 
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>

L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
www.avast.com 
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>





---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
___
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] Kamailio core dumped

2017-03-07 Thread Alexey V. Panfilov
Hello,

01.03.2017 13:51, Alexey V. Panfilov wrote:
> Hi there,
> 
> I've kamailio 4.2.3 (i386/freebsd) which works perfectly with 200-300
> cps for years.
> 
> Now I need migrate to freebsd amd64. I've installed kamailio 4.4.5
> (amd64/freebsd), copied kamailio.cfg, made a test call - it was all right.
> 
> But when I start work load (200-300 cps), kamailio core dumped and
> exited. In logs (skipped 

Re: [SR-Users] Kamailio Presence help required.

2017-03-06 Thread SamyGo
Phil, here are all the Presence related modules and their params.

Igor, I go clearly understand that difference and I accept it. However, Im
finding it difficult to digest that FreeSWITCH sends back initial NOTIFY
and phone light works while Kamailio is unable to do the same.


#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_reginfo.so"
loadmodule "pua.so"
loadmodule "pua_dialoginfo.so"
loadmodule "pua_reginfo.so"
loadmodule "pua_usrloc.so"
#!endif


#!ifdef WITH_PRESENCE
# - presence params -
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "sip:ServerIP:5060" )
modparam("presence", "send_fast_notify", 0)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 40)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "fetch_rows", 1000)

# - presence_xml params -
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "force_dummy_presence", 1)


# - presence_dialoginfo params -
modparam("presence_dialoginfo", "force_single_dialog", 1)
modparam("presence_dialoginfo", "force_dummy_dialog", 0)

# - pua params -
modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", 2)
modparam("pua", "update_period", 60)
modparam("pua", "dlginfo_increase_version", 0)
modparam("pua", "reginfo_increase_version", 0)
modparam("pua", "check_remote_contact", 1)
modparam("pua", "fetch_rows", 1000)

# - pua_dialoginfo params -
modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
modparam("pua_dialoginfo", "caller_confirmed", 0)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "override_lifetime", 124)

modparam("pua_reginfo|pua_usrloc", "default_domain", "voipguy.ca")
modparam("pua_reginfo", "server_address", "sip:REGINFO@ServerIP")
modparam("pua_usrloc", "branch_flag", FLT_DLGINFO)

#!endif


Thanks for helping me out on this.

Regards,
Sammy


On Mon, Mar 6, 2017 at 4:31 PM, Igor Olhovskiy <igorolhovs...@gmail.com>
wrote:

> Hi, Samy.
>
> Point, there is 2 modes of presence. Based on 'presence' and 'dialog'.
> Only 'presence' indicates states like online/offline, 'dialog' indicates
> only different call states, but also hold more info about a call. In
> 'dialog' case XML does not even has an option to indicate, that phone is
> online or offline.
>
> Refer to *https://tools.ietf.org/html/rfc3856*
> <https://tools.ietf.org/html/rfc3856> and
> *https://tools.ietf.org/html/rfc4235*
> <https://tools.ietf.org/html/rfc4235>
> So, when phone subscribes to 'dialog', according to rfc, they just want to
> know active states and not care about online/offline.
>
> Regards, Igor
>
> 6 марта 2017 г., 18:00 +0200, Phil Lavin <phil.la...@cloudcall.com>,
> писал:
>
> You should get an initial NOTIFY when you subscribe. Can you share the
> parts of your config that are relevant to presence/pua/etc.?
>
>
>
>
>
> *From:* sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of* SamyGo
> *Sent:* 06 March 2017 15:50
> *To:* Daniel-Constantin Mierla <mico...@gmail.com>; Kamailio (SER) -
> Users Mailing List <sr-users@lists.sip-router.org>
> *Subject:* Re: [SR-Users] Kamailio Presence help required.
>
>
>
> Thanks Daniel for replying,
>
> Yes the BLF/Callstates are working fine. Problem arise when a phone
> reboots and initially has no Lights indication.
>
>
>
> These are the traces from a Working old-box(not-kamailio) - Kindly guide
> why my Kamailio is unable to send the "immediate NOTIFY" regarding the
> current state of the subscribed extension. If it can do that then I don't
> need to write anything.
>
>
>
>
>
>
>
> SUBSCRIBE sip:3...@presence.voipguy.ca SIP/2.0.
>
> Via: SIP/2.0/UDP 10.0.2.95:5060;branch=z9hG4bK-5ef31b0b.
>
> From: "299" <sip:2...@presence.voipguy.ca>;tag=40ab701f5717f5e9.
>
> To: <sip:3...@presence.voipguy.ca>.
>
> Call-ID: 7f166cd7-a89e6091@10.0.2.95.
>
> CSeq: 7888 SUBSCRIBE.
>
> Max

Re: [SR-Users] Kamailio Presence help required.

2017-03-06 Thread Igor Olhovskiy
Hi, Samy.

Point, there is 2 modes of presence. Based on 'presence' and 'dialog'. Only 
'presence' indicates states like online/offline, 'dialog' indicates only 
different call states, but also hold more info about a call. In 'dialog' case 
XML does not even has an option to indicate, that phone is online or offline.

Refer to https://tools.ietf.org/html/rfc3856 and 
https://tools.ietf.org/html/rfc4235
So, when phone subscribes to 'dialog', according to rfc, they just want to know 
active states and not care about online/offline.

Regards, Igor

6 марта 2017 г., 18:00 +0200, Phil Lavin <phil.la...@cloudcall.com>, писал:
>
> You should get an initial NOTIFY when you subscribe. Can you share the parts 
> of your config that are relevant to presence/pua/etc.?
>
>
>
>
>
>
>
>
> From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
> SamyGo
> Sent: 06 March 2017 15:50
> To: Daniel-Constantin Mierla <mico...@gmail.com>; Kamailio (SER) - Users 
> Mailing List <sr-users@lists.sip-router.org>
> Subject: Re: [SR-Users] Kamailio Presence help required.
>
>
>
>
>
> Thanks Daniel for replying,
>
>
> Yes the BLF/Callstates are working fine. Problem arise when a phone reboots 
> and initially has no Lights indication.
>
>
>
>
>
>
>
> These are the traces from a Working old-box(not-kamailio) - Kindly guide why 
> my Kamailio is unable to send the "immediate NOTIFY" regarding the current 
> state of the subscribed extension. If it can do that then I don't need to 
> write anything.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> SUBSCRIBE sip:3...@presence.voipguy.ca (mailto:sip%3a...@presence.voipguy.ca) 
> SIP/2.0.
>
>
>
> Via: SIP/2.0/UDP 10.0.2.95:5060;branch=z9hG4bK-5ef31b0b.
>
>
>
> From: "299" <sip:2...@presence.voipguy.ca 
> (mailto:sip%3a...@presence.voipguy.ca)>;tag=40ab701f5717f5e9.
>
>
>
> To: <sip:3...@presence.voipguy.ca (mailto:sip%3a...@presence.voipguy.ca)>.
>
>
>
> Call-ID: 7f166cd7-a89e6091@10.0.2.95 (mailto:7f166cd7-a89e6091@10.0.2.95).
>
>
>
> CSeq: 7888 SUBSCRIBE.
>
>
>
> Max-Forwards: 70.
>
>
>
> Contact: "299" <sip:299@10.0.2.95:5060 (http://sip:299@10.0.2.95:5060)>.
>
>
>
> Accept: application/dialog-info+xml.
>
>
>
> Accept: application/x-broadworks-hoteling+xml.
>
>
>
> Expires: 1800.
>
>
>
> Event: dialog.
>
>
>
> User-Agent: Cisco/SPA504G-7.5.6.
>
>
>
> Content-Length: 0.
>
>
>
> .
>
>
>
>
>
>
>
>
>
>
>
> Server_IP:5060 -> Client_IP:1042
>
>
>
>
>
>
>
> SIP/2.0 202 Accepted.
>
>
>
> v:SIP/2.0/UDP 
> 10.0.2.95:5060;branch=z9hG4bK-5ef31b0b;received=Server_IP;rport=1042.
>
>
>
> f:"299"<sip:2...@presence.voipguy.ca 
> (mailto:sip%3a...@presence.voipguy.ca)>;tag=40ab701f5717f5e9.
>
>
>
> t:<sip:3...@presence.voipguy.ca 
> (mailto:sip%3a...@presence.voipguy.ca)>;tag=jYj0rSoBG7KA.
>
>
>
> i:7f166cd7-a89e6091@10.0.2.95 (mailto:i%3A7f166cd7-a89e6091@10.0.2.95).
>
>
>
> CSeq:7888 SUBSCRIBE.
>
>
>
> m:<sip:314@Client_IP:5060>.
>
>
>
> Expires:1800.
>
>
>
> User-Agent:HV.
>
>
>
> Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE.
>
>
>
> k:timer,path,replaces.
>
>
>
> u:talk,hold,conference,presence,as-feature-event,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer.
>
>
>
> Subscription-State:active;expires=1800.
>
>
>
> l:0.
>
>
>
> .
>
>
>
>
>
>
>
>
>
>
>
> Server_IP:5060 -> Client_IP:1042
>
>
>
>
>
>
>
> NOTIFY sip:299@10.0.2.95:5060 (http://sip:299@10.0.2.95:5060) SIP/2.0.
>
>
>
> v:SIP/2.0/UDP Client_IP;rport;branch=z9hG4bKUQ5v41FcK0Bvm.
>
>
>
> Route:;transport=udp.
>
>
>
> Max-Forwards:70.
>
>
>
> f:<sip:3...@presence.voipguy.ca 
> (mailto:sip%3a...@presence.voipguy.ca)>;tag=jYj0rSoBG7KA.
>
>
>
> t:"299"<sip:2...@presence.voipguy.ca 
> (mailto:sip%3a...@presence.voipguy.ca)>;tag=40ab701f5717f5e9.
>
>
>
> i:7f166cd7-a89e6091@10.0.2.95 (mailto:i%3A7f166cd7-a89e6091@10.0.2.95).
>
>
>
> CSeq:261575252 (tel:261575252) NOTIFY.
>
>
>
> m:sip:314@Client_IP:5060.
>
>
>
> User-Agent:HV.
>
>
>
> Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE.
>
>
>
> k:timer,path,replaces.

Re: [SR-Users] Kamailio Presence help required.

2017-03-06 Thread Phil Lavin
You should get an initial NOTIFY when you subscribe. Can you share the parts of 
your config that are relevant to presence/pua/etc.?


From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
SamyGo
Sent: 06 March 2017 15:50
To: Daniel-Constantin Mierla <mico...@gmail.com>; Kamailio (SER) - Users 
Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] Kamailio Presence help required.

Thanks Daniel for replying,
Yes the BLF/Callstates are working fine. Problem arise when a phone reboots and 
initially has no Lights indication.

These are the traces from a Working old-box(not-kamailio) - Kindly guide why my 
Kamailio is unable to send the "immediate NOTIFY" regarding the current state 
of the subscribed extension. If it can do that then I don't need to write 
anything.



SUBSCRIBE sip:3...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca> 
SIP/2.0.
Via: SIP/2.0/UDP 10.0.2.95:5060;branch=z9hG4bK-5ef31b0b.
From: "299" 
<sip:2...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=40ab701f5717f5e9.
To: <sip:3...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>.
Call-ID: 7f166cd7-a89e6091@10.0.2.95<mailto:7f166cd7-a89e6091@10.0.2.95>.
CSeq: 7888 SUBSCRIBE.
Max-Forwards: 70.
Contact: "299" <sip:299@10.0.2.95:5060<http://sip:299@10.0.2.95:5060>>.
Accept: application/dialog-info+xml.
Accept: application/x-broadworks-hoteling+xml.
Expires: 1800.
Event: dialog.
User-Agent: Cisco/SPA504G-7.5.6.
Content-Length: 0.
.


Server_IP:5060 -> Client_IP:1042

SIP/2.0 202 Accepted.
v:SIP/2.0/UDP 
10.0.2.95:5060;branch=z9hG4bK-5ef31b0b;received=Server_IP;rport=1042.
f:"299"<sip:2...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=40ab701f5717f5e9.
t:<sip:3...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=jYj0rSoBG7KA.
i:7f166cd7-a89e6091@10.0.2.95<mailto:i%3A7f166cd7-a89e6091@10.0.2.95>.
CSeq:7888 SUBSCRIBE.
m:<sip:314@Client_IP:5060>.
Expires:1800.
User-Agent:HV.
Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE.
k:timer,path,replaces.
u:talk,hold,conference,presence,as-feature-event,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer.
Subscription-State:active;expires=1800.
l:0.
.


Server_IP:5060 -> Client_IP:1042

NOTIFY sip:299@10.0.2.95:5060<http://sip:299@10.0.2.95:5060> SIP/2.0.
v:SIP/2.0/UDP Client_IP;rport;branch=z9hG4bKUQ5v41FcK0Bvm.
Route:;transport=udp.
Max-Forwards:70.
f:<sip:3...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=jYj0rSoBG7KA.
t:"299"<sip:2...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=40ab701f5717f5e9.
i:7f166cd7-a89e6091@10.0.2.95<mailto:i%3A7f166cd7-a89e6091@10.0.2.95>.
CSeq:261575252 NOTIFY.
m:sip:314@Client_IP:5060.
User-Agent:HV.
Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE.
k:timer,path,replaces.
o:dialog.
u:talk,hold,conference,presence,as-feature-event,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer.
Subscription-State:active;expires=1800.
c:application/dialog-info+xml.
l:166.
.

mailto:sip%3a...@presence.voipguy.ca>">



Client_IP:1042 -> Server_IP:5060

SIP/2.0 200 OK.
t:"299"<sip:2...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=40ab701f5717f5e9.
f:<sip:3...@presence.voipguy.ca<mailto:sip%3a...@presence.voipguy.ca>>;tag=jYj0rSoBG7KA.
i:7f166cd7-a89e6091@10.0.2.95<mailto:i%3A7f166cd7-a89e6091@10.0.2.95>.
CSeq:261575252 NOTIFY.
v:SIP/2.0/UDP Client_IP;branch=z9hG4bKUQ5v41FcK0Bvm.
Server: Cisco/SPA504G-7.5.6.
Content-Length: 0.
.




Regards,
Sammy


On Mon, Mar 6, 2017 at 2:22 AM, Daniel-Constantin Mierla 
<mico...@gmail.com<mailto:mico...@gmail.com>> wrote:

Hello,

from your description, I don't see a problem from the specs point of view, but 
more like something that you would like to have.

If UA subscribers only for dialog event, then it gets NOTIFY requests only for 
dialog states (new call, ..., termintated call). When it subscribers for 
presence, then it gets UA availability states.

And I think this is what you also get based on description. Am I wright?

Mixing the states of presence for dialog notifications is not possible, not in 
the specs, but eventually you can write a module yourself and map as you 
want/need presence states over dialog states.

Cheers,
Daniel
On 03/03/2017 19:13, SamyGo wrote:
Hi,
I'm in need of making/tweak an existing Kamailio Presence setup which is giving 
some tough time.
Whats already working:
BLF dialog states changes are already sent across the users. SCA is working as 
well.

What isn't working:
When a User comes online then it sends SUBSCRIBE with Event: dialog a

Re: [SR-Users] Kamailio Presence help required.

2017-03-06 Thread SamyGo
Thanks Daniel for replying,
Yes the BLF/Callstates are working fine. Problem arise when a phone reboots
and initially has no Lights indication.

These are the traces from a Working old-box(not-kamailio) - Kindly guide
why my Kamailio is unable to send the "immediate NOTIFY" regarding the
current state of the subscribed extension. If it can do that then I don't
need to write anything.



SUBSCRIBE sip:3...@presence.voipguy.ca SIP/2.0.
Via: SIP/2.0/UDP 10.0.2.95:5060;branch=z9hG4bK-5ef31b0b.
From: "299" ;tag=40ab701f5717f5e9.
To: .
Call-ID: 7f166cd7-a89e6091@10.0.2.95.
CSeq: 7888 SUBSCRIBE.
Max-Forwards: 70.
Contact: "299" .
Accept: application/dialog-info+xml.
Accept: application/x-broadworks-hoteling+xml.
Expires: 1800.
Event: dialog.
User-Agent: Cisco/SPA504G-7.5.6.
Content-Length: 0.
.


Server_IP:5060 -> Client_IP:1042

SIP/2.0 202 Accepted.
v:SIP/2.0/UDP 10.0.2.95:5060
;branch=z9hG4bK-5ef31b0b;received=Server_IP;rport=1042.
f:"299";tag=40ab701f5717f5e9.
t:;tag=jYj0rSoBG7KA.
i:7f166cd7-a89e6091@10.0.2.95.
CSeq:7888 SUBSCRIBE.
m:.
Expires:1800.
User-Agent:HV.
Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE.
k:timer,path,replaces.
u:talk,hold,conference,presence,as-feature-event,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer.
Subscription-State:active;expires=1800.
l:0.
.


Server_IP:5060 -> Client_IP:1042

NOTIFY sip:299@10.0.2.95:5060 SIP/2.0.
v:SIP/2.0/UDP Client_IP;rport;branch=z9hG4bKUQ5v41FcK0Bvm.
Route:;transport=udp.
Max-Forwards:70.
f:;tag=jYj0rSoBG7KA.
t:"299";tag=40ab701f5717f5e9.
i:7f166cd7-a89e6091@10.0.2.95.
CSeq:261575252 NOTIFY.
m:sip:314@Client_IP:5060.
User-Agent:HV.
Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE.
k:timer,path,replaces.
o:dialog.
u:talk,hold,conference,presence,as-feature-event,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer.
Subscription-State:active;expires=1800.
c:application/dialog-info+xml.
l:166.
.





Client_IP:1042 -> Server_IP:5060

SIP/2.0 200 OK.
t:"299";tag=40ab701f5717f5e9.
f:;tag=jYj0rSoBG7KA.
i:7f166cd7-a89e6091@10.0.2.95.
CSeq:261575252 NOTIFY.
v:SIP/2.0/UDP Client_IP;branch=z9hG4bKUQ5v41FcK0Bvm.
Server: Cisco/SPA504G-7.5.6.
Content-Length: 0.
.




Regards,
Sammy


On Mon, Mar 6, 2017 at 2:22 AM, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> from your description, I don't see a problem from the specs point of view,
> but more like something that you would like to have.
>
> If UA subscribers only for dialog event, then it gets NOTIFY requests only
> for dialog states (new call, ..., termintated call). When it subscribers
> for presence, then it gets UA availability states.
>
> And I think this is what you also get based on description. Am I wright?
>
> Mixing the states of presence for dialog notifications is not possible,
> not in the specs, but eventually you can write a module yourself and map as
> you want/need presence states over dialog states.
>
> Cheers,
> Daniel
> On 03/03/2017 19:13, SamyGo wrote:
>
> Hi,
> I'm in need of making/tweak an existing Kamailio Presence setup which is
> giving some tough time.
>
> *Whats already working:*
> BLF dialog states changes are already sent across the users. SCA is
> working as well.
>
> *What isn't working:*
> When a User comes online then it sends SUBSCRIBE with *Event: dialog* and
> don't get notified of its subscribers state right then unless the monitored
> extensions make a call (BLF works)
>
>
>
> *Why is it not working: *
> As evident from wireshark traces, the user IP phones (Test sets: Polycoms,
> Yealink, CISCO, Grandstream) don't send our *Event: presence* rather only
> *Event:dialog* and Kamailio do not send NOTIFY out to everyone. Though
> yes there is an internally generated PUBLISH seen and handled properly upon
> registration state changes.
>
> Jitsi has been tested and Kamailio send out these registration state
> change info to jitsi, somce jitsi sends *Event:presence *in SUBSCRIBE.
>
> I need dialog based NOTIFY to be sent out on registration state-change.
>
> Need pointers and help on the topic, looking forward to some feedback.
>
> Regards,
> Sammy
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - 

Re: [SR-Users] Kamailio Presence help required.

2017-03-05 Thread Daniel-Constantin Mierla
Hello,

from your description, I don't see a problem from the specs point of
view, but more like something that you would like to have.

If UA subscribers only for dialog event, then it gets NOTIFY requests
only for dialog states (new call, ..., termintated call). When it
subscribers for presence, then it gets UA availability states.

And I think this is what you also get based on description. Am I wright?

Mixing the states of presence for dialog notifications is not possible,
not in the specs, but eventually you can write a module yourself and map
as you want/need presence states over dialog states.

Cheers,
Daniel

On 03/03/2017 19:13, SamyGo wrote:
> Hi,
> I'm in need of making/tweak an existing Kamailio Presence setup which
> is giving some tough time.
>
> _Whats already working:_
> BLF dialog states changes are already sent across the users. SCA is
> working as well.
>
> _What isn't working:_
> When a User comes online then it sends SUBSCRIBE with *Event: dialog*
> and don't get notified of its subscribers state right then unless the
> monitored extensions make a call (BLF works)
>
> _Why is it not working:
>
> _
> As evident from wireshark traces, the user IP phones (Test sets:
> Polycoms, Yealink, CISCO, Grandstream) don't send our *Event:
> presence* rather only *Event:dialog* and Kamailio do not send NOTIFY
> out to everyone. Though yes there is an internally generated PUBLISH
> seen and handled properly upon registration state changes.
>
> Jitsi has been tested and Kamailio send out these registration state
> change info to jitsi, somce jitsi sends *Event:presence *in SUBSCRIBE.
>
> I need dialog based NOTIFY to be sent out on registration state-change.
>
> Need pointers and help on the topic, looking forward to some feedback.
>
> Regards,
> Sammy
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio Presence help required.

2017-03-03 Thread SamyGo
Hi,
I'm in need of making/tweak an existing Kamailio Presence setup which is
giving some tough time.

*Whats already working:*
BLF dialog states changes are already sent across the users. SCA is working
as well.

*What isn't working:*
When a User comes online then it sends SUBSCRIBE with *Event: dialog* and
don't get notified of its subscribers state right then unless the monitored
extensions make a call (BLF works)



*Why is it not working:*
As evident from wireshark traces, the user IP phones (Test sets: Polycoms,
Yealink, CISCO, Grandstream) don't send our *Event: presence* rather only
*Event:dialog* and Kamailio do not send NOTIFY out to everyone. Though yes
there is an internally generated PUBLISH seen and handled properly upon
registration state changes.

Jitsi has been tested and Kamailio send out these registration state change
info to jitsi, somce jitsi sends *Event:presence *in SUBSCRIBE.

I need dialog based NOTIFY to be sent out on registration state-change.

Need pointers and help on the topic, looking forward to some feedback.

Regards,
Sammy
___
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] kamailio re.subst question.

2017-03-02 Thread José Seabra
Hi Daniel,

Sorry, I misconfused you with Daniel Constantin :), Miconda was the who
that sent that Email explaining the {line.sw,match} some time ago.

Regarding with $, i will take your advice :)

Once again, thank you.

Best Regards

José

2017-03-02 17:23 GMT+00:00 Daniel Tryba :

> On Thu, Mar 02, 2017 at 03:46:01PM +, José Seabra wrote:
> > I changed the way that i was trying to get it done.
> >
> > Now I'm using the {line.sw,match} ( you had already mentioned this
> function
> > on an old email),
>
> Im not that Daniel :)
> Or my memory starts to fail me.
>
> > to split the string by line, then i apply the following
> > regex: ^Calling-Name: ?(.{2,50}>)$.
> >
> > This way I get what i need, that is the sip uri and display name.
>
> Only thing I'd change would be to remove the $ for end of line, just to
> make it more generic. But if you are sure that these headerlines end
> with >, that would not make a difference.
>
>
> ___
> 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
>



-- 
Cumprimentos
José Seabra
___
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] kamailio re.subst question.

2017-03-02 Thread Daniel Tryba
On Thu, Mar 02, 2017 at 03:46:01PM +, José Seabra wrote:
> I changed the way that i was trying to get it done.
> 
> Now I'm using the {line.sw,match} ( you had already mentioned this function
> on an old email), 

Im not that Daniel :) 
Or my memory starts to fail me.

> to split the string by line, then i apply the following
> regex: ^Calling-Name: ?(.{2,50}>)$.
> 
> This way I get what i need, that is the sip uri and display name.

Only thing I'd change would be to remove the $ for end of line, just to
make it more generic. But if you are sure that these headerlines end
with >, that would not make a difference.


___
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] kamailio re.subst question.

2017-03-02 Thread José Seabra
Hi Daniel,
Just to give you feedback about the way i have implemented this.

I changed the way that i was trying to get it done.

Now I'm using the {line.sw,match} ( you had already mentioned this function
on an old email), to split the string by line, then i apply the following
regex: ^Calling-Name: ?(.{2,50}>)$.

This way I get what i need, that is the sip uri and display name.

Thank you.

José Seabra

2017-03-02 15:28 GMT+00:00 José Seabra :

> Hi Daniel,
> Thank you for your hint.
> I will continuing investigating and try to reach my goal.
>
> Best regards
> José
>
> 2017-03-02 14:29 GMT+00:00 Daniel Tryba :
>
>> On Wed, Mar 01, 2017 at 04:58:00PM +, José Seabra wrote:
>> > #015#012Calling-Name-Status: available#015#012Calling-Name: "josé" <
>> > sip:52@10.10.10.10>#015#012Presentation-Indicator:
>> allowed#015#012
>> >
>> > The Kamailio re.subst function is constructed as the following:
>> >
>> > $sht(cnam=>$ci::calling_name)=$(var(rb){re.subst,/(.*)Calling-Name:
>> > ?([\W|0-9A-Za-z_]{5,500} ?[<>:@.|0-9A-Za-z_]{5,500})(.*)$/\2/s});
>> >
>> > The issue here is that this re.subst function doesn't match the
>> accents, I
>> > have tested this regex on regex101.com and it does match. My question
>> is
>> > how i can get the same result with re.subst?
>> > Anyone can help?
>>
>> Maybe regexo101.com is wrong? \W is ^\w, \w contains [A-Za-z0-9_] but
>> depending on the lib might include much more like latin or UTF8. So if é
>> matches \w in kamailio but obviuosly never matches [A-Za-z0-9_], the é
>> doesn't match \W and thus "josé" doesn't match the minimum 5 chars.
>>
>> [\W|\w]{5,500} would match, but that looks the same as .{5,500}
>>
>> Never looked whether kamailio supports it but there is something that
>> matches non ascii word characters in regexp libs:
>> http://www.regular-expressions.info/unicode.html
>>
>> ___
>> 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
>>
>
>
>
> --
> Cumprimentos
> José Seabra
>



-- 
Cumprimentos
José Seabra
___
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] kamailio re.subst question.

2017-03-02 Thread José Seabra
Hi Daniel,
Thank you for your hint.
I will continuing investigating and try to reach my goal.

Best regards
José

2017-03-02 14:29 GMT+00:00 Daniel Tryba :

> On Wed, Mar 01, 2017 at 04:58:00PM +, José Seabra wrote:
> > #015#012Calling-Name-Status: available#015#012Calling-Name: "josé" <
> > sip:52@10.10.10.10>#015#012Presentation-Indicator:
> allowed#015#012
> >
> > The Kamailio re.subst function is constructed as the following:
> >
> > $sht(cnam=>$ci::calling_name)=$(var(rb){re.subst,/(.*)Calling-Name:
> > ?([\W|0-9A-Za-z_]{5,500} ?[<>:@.|0-9A-Za-z_]{5,500})(.*)$/\2/s});
> >
> > The issue here is that this re.subst function doesn't match the accents,
> I
> > have tested this regex on regex101.com and it does match. My question is
> > how i can get the same result with re.subst?
> > Anyone can help?
>
> Maybe regexo101.com is wrong? \W is ^\w, \w contains [A-Za-z0-9_] but
> depending on the lib might include much more like latin or UTF8. So if é
> matches \w in kamailio but obviuosly never matches [A-Za-z0-9_], the é
> doesn't match \W and thus "josé" doesn't match the minimum 5 chars.
>
> [\W|\w]{5,500} would match, but that looks the same as .{5,500}
>
> Never looked whether kamailio supports it but there is something that
> matches non ascii word characters in regexp libs:
> http://www.regular-expressions.info/unicode.html
>
> ___
> 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
>



-- 
Cumprimentos
José Seabra
___
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] kamailio re.subst question.

2017-03-02 Thread Daniel Tryba
On Wed, Mar 01, 2017 at 04:58:00PM +, José Seabra wrote:
> #015#012Calling-Name-Status: available#015#012Calling-Name: "josé" <
> sip:52@10.10.10.10>#015#012Presentation-Indicator: allowed#015#012
> 
> The Kamailio re.subst function is constructed as the following:
> 
> $sht(cnam=>$ci::calling_name)=$(var(rb){re.subst,/(.*)Calling-Name:
> ?([\W|0-9A-Za-z_]{5,500} ?[<>:@.|0-9A-Za-z_]{5,500})(.*)$/\2/s});
> 
> The issue here is that this re.subst function doesn't match the accents, I
> have tested this regex on regex101.com and it does match. My question is
> how i can get the same result with re.subst?
> Anyone can help?

Maybe regexo101.com is wrong? \W is ^\w, \w contains [A-Za-z0-9_] but
depending on the lib might include much more like latin or UTF8. So if é
matches \w in kamailio but obviuosly never matches [A-Za-z0-9_], the é
doesn't match \W and thus "josé" doesn't match the minimum 5 chars.

[\W|\w]{5,500} would match, but that looks the same as .{5,500}

Never looked whether kamailio supports it but there is something that
matches non ascii word characters in regexp libs:
http://www.regular-expressions.info/unicode.html

___
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] kamailio re.subst question.

2017-03-01 Thread José Seabra
Hello There,
I'm trying using the following regexp on re.subst function:

(.*)Calling-Name: ?([\W|0-9A-Za-z_]{5,500} ?[<>:@.|0-9A-Za-z_]{5,500})(.*)$

And the string used for match is the following:

#015#012Calling-Name-Status: available#015#012Calling-Name: "josé" <
sip:52@10.10.10.10>#015#012Presentation-Indicator: allowed#015#012

The Kamailio re.subst function is constructed as the following:

$sht(cnam=>$ci::calling_name)=$(var(rb){re.subst,/(.*)Calling-Name:
?([\W|0-9A-Za-z_]{5,500} ?[<>:@.|0-9A-Za-z_]{5,500})(.*)$/\2/s});

The issue here is that this re.subst function doesn't match the accents, I
have tested this regex on regex101.com and it does match. My question is
how i can get the same result with re.subst?
Anyone can help?

Thank you
Regards
-- 
José Seabra
___
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] Kamailio -can we change 478 to 503 when dns fails?

2017-03-01 Thread José Seabra
Hello Daniel,

Thank you for your help.

Best Regards
José

2017-03-01 14:25 GMT+00:00 Daniel-Constantin Mierla :

> Hello,
>
> so it seems that the error happens before the transaction is created, as I
> see SL in the response...
>
> Can you try with:
>
> https://www.kamailio.org/docs/modules/stable/modules/tm.
> html#tm.f.t_set_disable_internal_reply
>
> before t_relay() and then catch the failure execution with if(!t_relay())
> and send there response you want there.
>
> Cheers,
> Daniel
>
> On 01/03/2017 15:11, José Seabra wrote:
>
> Hi Daniel,
> I'm using t_relay().
>
> Regards
> José
>
> 2017-03-01 14:09 GMT+00:00 Daniel-Constantin Mierla :
>
>> Hello,
>>
>> are you using forward() or t_relay() to send out?
>>
>> Cheers,
>> Daniel
>>
>> On 28/02/2017 12:32, José Seabra wrote:
>>
>> Hello there,
>> Some times dns server fails and my kamailio server start replying
>> "Unresolvable destination (478/SL)".
>>
>> The propose of my email is to know if is there any possibility to change
>> this reply (478) to for example one of 5XX replies.
>>
>> I have modparam("sl", "default_code", 503) but in situations where dns
>> fails, kamailio doesn't reply 503.
>>
>>
>> Thank you for your support
>>
>> Regards
>> José Seabra
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierlawww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
>> www.asipto.com
>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>
>> ___ SIP Express Router (SER)
>> and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org http://lists.sip-router.org/cg
>> i-bin/mailman/listinfo/sr-users
>
> --
> Cumprimentos
> José Seabra
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>


-- 
Cumprimentos
José Seabra
___
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] Kamailio -can we change 478 to 503 when dns fails?

2017-03-01 Thread Daniel-Constantin Mierla
Hello,

so it seems that the error happens before the transaction is created, as
I see SL in the response...

Can you try with:

https://www.kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_set_disable_internal_reply

before t_relay() and then catch the failure execution with
if(!t_relay()) and send there response you want there.

Cheers,
Daniel


On 01/03/2017 15:11, José Seabra wrote:
> Hi Daniel,
> I'm using t_relay().
>
> Regards
> José
>
> 2017-03-01 14:09 GMT+00:00 Daniel-Constantin Mierla  >:
>
> Hello,
>
> are you using forward() or t_relay() to send out?
>
> Cheers,
> Daniel
>
>
> On 28/02/2017 12:32, José Seabra wrote:
>> Hello there,
>> Some times dns server fails and my kamailio server start replying
>> "Unresolvable destination (478/SL)".
>>
>> The propose of my email is to know if is there any possibility to
>> change this reply (478) to for example one of 5XX replies.
>>
>> I have modparam("sl", "default_code", 503) but in situations
>> where dns fails, kamailio doesn't reply 503.
>>
>>
>> Thank you for your support
>>
>> Regards
>> José Seabra
>>
>>
>> ___
>> 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
>> 
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda  -- 
> www.linkedin.com/in/miconda 
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com 
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com 
> 
>
> ___ 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
>  
>
> -- 
> Cumprimentos
> José Seabra
-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
___
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] Kamailio -can we change 478 to 503 when dns fails?

2017-03-01 Thread José Seabra
Hi Daniel,
I'm using t_relay().

Regards
José

2017-03-01 14:09 GMT+00:00 Daniel-Constantin Mierla :

> Hello,
>
> are you using forward() or t_relay() to send out?
>
> Cheers,
> Daniel
>
> On 28/02/2017 12:32, José Seabra wrote:
>
> Hello there,
> Some times dns server fails and my kamailio server start replying
> "Unresolvable destination (478/SL)".
>
> The propose of my email is to know if is there any possibility to change
> this reply (478) to for example one of 5XX replies.
>
> I have modparam("sl", "default_code", 503) but in situations where dns
> fails, kamailio doesn't reply 503.
>
>
> Thank you for your support
>
> Regards
> José Seabra
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> 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
>
>


-- 
Cumprimentos
José Seabra
___
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] Kamailio -can we change 478 to 503 when dns fails?

2017-03-01 Thread Daniel-Constantin Mierla
Hello,

are you using forward() or t_relay() to send out?

Cheers,
Daniel


On 28/02/2017 12:32, José Seabra wrote:
> Hello there,
> Some times dns server fails and my kamailio server start replying
> "Unresolvable destination (478/SL)".
>
> The propose of my email is to know if is there any possibility to
> change this reply (478) to for example one of 5XX replies.
>
> I have modparam("sl", "default_code", 503) but in situations where dns
> fails, kamailio doesn't reply 503.
>
>
> Thank you for your support
>
> Regards
> José Seabra
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio 4.3.x location_attrs update issue

2017-02-24 Thread Mridul B
Thanks for the reply, Daniel.
We're using db_mode: 3

modparam("usrloc", "db_mode", 3)

Please let me know if you need more information.

Best regards,

*MRIDUL* | SOFTWARE ENGINEER
Plivo, Inc. 340 Pine St, San Francisco - 94104, USA
Web: www.plivo.com | Twitter: @plivo

Signup for Zentrunk - Plivo's SIP Trunking service


On Mon, Feb 20, 2017 at 2:47 PM, Mridul B  wrote:

> Hi,
>
> We've noticed a case where the *location_attrs* table isn't updated when
> there's an unexpected shutdown of a SIP device (here there'll be no
> REGISTER message sent with expires=0).
>
> We're using Kamailio v4.3.x
>
> When the SIP device shuts down ungracefully. The location table is updated
> using DELETE query
> This is done by the timer which deletes the expired contacts, by default
> the timer_interval is set as 60.
>
> Here, the logs of auto-removal of expired contacts entries by the timer
>
>
>> Feb 17 17:16:13 localhost kamailio[23273]: DEBUG: db_postgres
>> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
>> 0x7f34969433c8 (1) - [delete from location where expires<'2017-02-17
>> 17:16:14' AND expires<>'1970-01-01 00:00:00']
>>
>
>
> Feb 17 17:16:14 localhost kamailio[23272]: DEBUG: db_postgres
>> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
>> 0x7f34969433c8 (1) - [delete from location where expires<'2017-02-17
>> 17:16:15' AND expires<>'1970-01-01 00:00:00']
>
>
>
>
> The delete operation is only on location table, shouldn't we have the same
> implementation on the location_attrs table based upon ruid or username?
>
> We're getting duplicate entries in the location_attrs table of the same
> sip user after it registers.
>
> But when the SIP device un-registers, the entries in the location as well
> as in the location_attrs table is deleted
>
> Feb 17 18:14:32 localhost kamailio[23249]: DEBUG: usrloc
>> [ucontact.c:1725]: uldb_delete_attrs(): trying to delete location attributes
>> Feb 17 18:14:32 localhost kamailio[23249]: DEBUG: db_postgres
>> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
>> 0x7f3496941888 (1) - [delete from location_attrs where username='mridul'
>> AND ruid='uloc-58a72243-5ace-2']
>>
>
>
> Feb 17 18:14:32 localhost kamailio[23249]: DEBUG: db_postgres
>> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
>> 0x7f3496941888 (1) - [delete from location where username='mridul' AND
>> contact='sip:mridul@127.0.0.1:37881;rinstance=b841a8c916e47dfa']
>
>
>
> I think the usrloc module should have the implementation of deleting the
> entries of expired sip users based on its ruid/username in the
> location_attrs table also.
>
> Thanks for the help.
>
> Best regards,
> MRIDUL
>
>
___
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] Kamailio 4.2 crashed

2017-02-23 Thread Daniel-Constantin Mierla
Hello,

is that all the output of 'bt full'? Having just frame 0 is quite odd.

Cheers,
Daniel


On 23/02/2017 16:44, Igor Potjevlesch wrote:
>
> Hello,
>
>  
>
> I got two coredumps:
>
> (gdb) bt full
>
> #0  0x0061ab8e in qm_insert_free (qm=0x7f0f7fca7000,
> frag=0x7f0f8f6f6268) at mem/q_malloc.c:180
>
> f = 0x7f0f8f6c45e8
>
> prev = 0x0
>
> hash = 5
>
>  
>
> And
>
> (gdb) bt full
>
> #0  0x0061b935 in qm_detach_free (qm=0x7f0f7fca7000,
> frag=0x7f0f8f6d70b8) at mem/q_malloc.c:271
>
> prev = 0x7f0f7fca7248
>
> next = 0x7f0f8f6c45e8
>
>  
>
> What are necessary to diagnose how this issue occurs? Thank you for
> your support.
>
>  
>
> Regards,
>
>  
>
> Igor.
>
>
>
> 
> Avast logo
> 
>   
>
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> www.avast.com
> 
>
>
>
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio 4.2 crashed

2017-02-23 Thread Igor Potjevlesch
Hello,



I got two coredumps:

(gdb) bt full

#0  0x0061ab8e in qm_insert_free (qm=0x7f0f7fca7000,
frag=0x7f0f8f6f6268) at mem/q_malloc.c:180

f = 0x7f0f8f6c45e8

prev = 0x0

hash = 5



And

(gdb) bt full

#0  0x0061b935 in qm_detach_free (qm=0x7f0f7fca7000,
frag=0x7f0f8f6d70b8) at mem/q_malloc.c:271

prev = 0x7f0f7fca7248

next = 0x7f0f8f6c45e8



What are necessary to diagnose how this issue occurs? Thank you for your
support.



Regards,



Igor.



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
___
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] kamailio memory leak in private memory

2017-02-22 Thread David Escartín Almudévar
hello Daniel

we applied the change you suggested and monitored for a day and seems
the free pkg memory is stable. 
by now we are going to leave it this way and if we have to handle with a
hash in lua we will do in that way with a $var for the index
thanks a lot 

best regards
david


El lun, 20-02-2017 a las 19:48 +0100, Daniel-Constantin Mierla escribió:

> Hello,
> 
> this doesn't sound like a leak, but more like the side effect of
> defining a lot of variables, which use pkg memory.
> 
> In order to speed up (but also avoid some situations the could end up
> in leaks when parsing the pv spec allocates memory), kamailio is
> caching the definitions of the variables used in the scripts
> (kamailio.cfg, but also the scripts for embedded interpreters).
> 
> So, if you use:
> 
> $var(x) = "abc";
> 
> $sht(t=>$var(x)) = 1;
> 
> $var(x) = "xyz";
> 
> $sht(t=>$var(x)) = 1;
> 
> there are two definitions, respectively for: $var(x) and
> $sht(t=>$var(x)).
> 
> On the other hand, if you use:
> 
> $var(x) = "abc";
> 
> $sht(t=>$var(x)) = 1;
> 
> $sht(t=>xyz) = 1;
> 
> there are three definitions, respectively for: $var(x),
> $sht(t=>$var(x)) and $sht(t=>xyz). As you use different values after
> "t=>...", there will be different definitions.
> 
> 
> To avoid defining a lot of variable specs, you can try to do:
> 
>local  = string.match(variable_a, "^%+?.-([%d|#]+)$") or
> "anonymous"
>sr.pv.sets("$var(vname)", )
>local  = sr.pv.get("$sht(table=>$var(vname))")
> if not  then
> return
> end
> sr.pv.sets("$avp(s:)", )
> 
> 
> I will try to think of a solution to avoid defining unlimited pv
> specs, but for the moment this should be a solution.
> 
> Cheers,
> Daniel
> 
> On 20/02/2017 18:42, david wrote:
> 
> > 
> > hello Daniel
> > 
> > We have been trying to isolate the issue as much as possible.
> > At first we though that since the issue was affecting only some UDP
> > receivers, it could be related with some customers traffic profile,
> > but since the decreased seemed abnormally "constant", and wondering
> > it might be related to a recent change we did on the configuration,
> > i think we finally found something that could be the cause (¿?)
> > 
> > when we query a hash table from a lua file, seems somehow private
> > memory is involved and not properly released. 
> > We just loaded a kamailio config file doing only this thing on
> > request route
> > request_route {
> > 
> > xlog("L_INFO","Call-ID $ci: doing lua\n");
> > lua_run("table","$fU");
> > xlog("L_INFO","Call-ID $ci: done lua\n");
> > drop();
> > }
> > 
> > the remarked lua command:
> > function table(variable_a)
> > local  = string.match(variable_a, "^%+?.-([%d|#]+)$") or
> > "anonymous"
> >local  = sr.pv.get("$sht(table=>" ..  .. ")")
> > if not  then
> > return
> > end
> > sr.pv.sets("$avp(s:)", )
> > end
> > 
> > 
> > and launched some sip request to exceute the function, and this
> > seems to be causing the issue and doing the free pkg mem to
> > decrease. see file attached
> > (variable_a is passed to lua function as parameter from an $avp kam
> > variable too in some other tests and the result is also the same).
> > 
> > this is the log in debug mode when we make only a query on the hash
> > to assign it to a lua variable
> > 
> > 1(12776) INFO: Test Call-ID 1-15610@1.1.1.1: doing lua
> > 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 472) called from core:
> > parser/parse_from.c: parse_from_header(63)
> > 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 472) returns address 0x7f9b2be61990
> > 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 48) called from core:
> > parser/parse_addr_spec.c: parse_to_param(281)
> > 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 48) returns address 0x7f9b2be5f0c8
> > 1(12776) DEBUG:  [parser/parse_addr_spec.c:172]:
> > parse_to_param(): DEBUG: add_param: tag=15610SIPpTag001
> > 1(12776) DEBUG:  [parser/parse_addr_spec.c:894]:
> > parse_addr_spec(): end of header reached, state=29
> > 1(12776) DEBUG: app_lua [app_lua_api.c:643]: app_lua_run(): reload
> > deactivated
> > 1(12776) DEBUG: app_lua [app_lua_api.c:644]: app_lua_run():
> > executing Lua function: [[table]]
> > 1(12776) DEBUG: app_lua [app_lua_api.c:645]: app_lua_run(): lua top
> > index is: 4
> > 1(12776) DEBUG: app_lua [app_lua_sr.c:892]: lua_sr_pv_get(): pv get:
> > $sht(table=>2424627806)
> > 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 166) called from core: pvapi.c:
> > pv_cache_add(272)
> > 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 168) returns address 0x7f9b2be4a878
> > 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> > fm_malloc(0x7f9b2be0a010, 32) called from htable: 

Re: [SR-Users] kamailio memory leak in private memory

2017-02-20 Thread Daniel-Constantin Mierla
Hello,

this doesn't sound like a leak, but more like the side effect of
defining a lot of variables, which use pkg memory.

In order to speed up (but also avoid some situations the could end up in
leaks when parsing the pv spec allocates memory), kamailio is caching
the definitions of the variables used in the scripts (kamailio.cfg, but
also the scripts for embedded interpreters).

So, if you use:

$var(x) = "abc";

$sht(t=>$var(x)) = 1;

$var(x) = "xyz";

$sht(t=>$var(x)) = 1;

there are two definitions, respectively for: $var(x) and $sht(t=>$var(x)).

On the other hand, if you use:

$var(x) = "abc";

$sht(t=>$var(x)) = 1;

$sht(t=>xyz) = 1;

there are three definitions, respectively for: $var(x), $sht(t=>$var(x))
and $sht(t=>xyz). As you use different values after "t=>...", there will
be different definitions.

To avoid defining a lot of variable specs, you can try to do:

   local  = string.match(variable_a, "^%+?.-([%d|#]+)$") or "anonymous"
   sr.pv.sets("$var(vname)", )
   *local  = sr.pv.get("$sht(table=>$var(vname))")*
if not  then
return
end
sr.pv.sets("$avp(s:)", )

I will try to think of a solution to avoid defining unlimited pv specs,
but for the moment this should be a solution.

Cheers,
Daniel

On 20/02/2017 18:42, david wrote:
> hello Daniel
>
> We have been trying to isolate the issue as much as possible.
> At first we though that since the issue was affecting only some UDP
> receivers, it could be related with some customers traffic profile,
> but since the decreased seemed abnormally "constant", and wondering it
> might be related to a recent change we did on the configuration, i
> think we finally found something that could be the cause (¿?)
>
> when we query a hash table from a lua file, seems somehow private
> memory is involved and not properly released. 
> We just loaded a kamailio config file doing only this thing on request
> route
> request_route {
> 
> xlog("L_INFO","Call-ID $ci: doing lua\n");
> lua_run("table","$fU");
> xlog("L_INFO","Call-ID $ci: done lua\n");
> drop();
> }
>
> the remarked lua command:
> function table(variable_a)
> local  = string.match(variable_a, "^%+?.-([%d|#]+)$") or
> "anonymous"
>*local  = sr.pv.get("$sht(table=>" ..  .. ")")*
> if not  then
> return
> end
> sr.pv.sets("$avp(s:)", )
> end
>
>
> and launched some sip request to exceute the function, and this seems
> to be causing the issue and doing the free pkg mem to decrease. see
> file attached
> (variable_a is passed to lua function as parameter from an $avp kam
> variable too in some other tests and the result is also the same).
>
> this is the log in debug mode when we make only a query on the hash to
> assign it to a lua variable
>
> 1(12776) INFO: Test Call-ID 1-15610@1.1.1.1
> : doing lua
> 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 472) called from core: parser/parse_from.c:
> parse_from_header(63)
> 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 472) returns address 0x7f9b2be61990
> 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 48) called from core:
> parser/parse_addr_spec.c: parse_to_param(281)
> 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 48) returns address 0x7f9b2be5f0c8
> 1(12776) DEBUG:  [parser/parse_addr_spec.c:172]:
> parse_to_param(): DEBUG: add_param: tag=15610SIPpTag001
> 1(12776) DEBUG:  [parser/parse_addr_spec.c:894]:
> parse_addr_spec(): end of header reached, state=29
> 1(12776) DEBUG: app_lua [app_lua_api.c:643]: app_lua_run(): reload
> deactivated
> 1(12776) DEBUG: app_lua [app_lua_api.c:644]: app_lua_run(): executing
> Lua function: [[table]]
> 1(12776) DEBUG: app_lua [app_lua_api.c:645]: app_lua_run(): lua top
> index is: 4
> 1(12776) DEBUG: app_lua [app_lua_sr.c:892]: lua_sr_pv_get(): pv get:
> $sht(table=>2424627806)
> 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 166) called from core: pvapi.c:
> pv_cache_add(272)
> 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 168) returns address 0x7f9b2be4a878
> 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 32) called from htable: ht_var.c:
> pv_parse_ht_name(135)
> 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 32) returns address 0x7f9b2be4a800
> 1(12776) DEBUG: htable [ht_var.c:172]: pv_parse_ht_name(): htable
> [table] - key [2424627806]
> 1(12776) WARNING:  [mem/f_malloc.c:439]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 32) called from core: pvapi.c:
> pv_parse_format(1075)
> 1(12776) WARNING:  [mem/f_malloc.c:514]: fm_malloc():
> fm_malloc(0x7f9b2be0a010, 32) returns address 0x7f9b2be5efb8
> 1(12776) DEBUG: htable [ht_api.c:246]: ht_get_table(): htable found
> [table]
> 1(12776) 

Re: [SR-Users] Kamailio 4.4 with 2 Asterisk 13

2017-02-20 Thread Daniel-Constantin Mierla
Hello,

can you share the relevant parts of your configuration file related to
use of dispatcher module? Can you check again if the proper load
balancing algorithm is used?

Cheers,
Daniel


On 19/02/2017 09:56, Graham Brown wrote:
> I'm trying to load balance 2 Asterisk servers with Kamailio offloading
> the registration to Kamailio using the Asterisk real-time database
> tables. 
> I have a problem with the dispatcher module, if there is a
> t_on_failure route it always goes into that, if I remove that then I
> would expect every call to round robin but I'm only ever hitting the
> same server from the same extension (seems like sticky session based
> on source ip).
>
> 1. how do I fix my failure route so I can reboot server 1 and server 2
> will be used
> 2. how to I change the sticky session behaviour.
>
> Another issue I am facing with extensions registering to Asterisk are
> only avaliable on the server they routed to My assumption was if using
> the Asterisk real-time database I would get the contact on both
> servers.  Maybe my architecture is incorrect, I'm open to suggestions.
> Currently Kamailio is not storing locations (assuming that is the
> extension contact) maybe that is a better solution, but I dont know
> how to configure Asterisk to forward everything to Kamailio then or
> integrate via the database or something.
>
> Thanks in advance for any help
>
> Regards
> Graham
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio 4.4 with 2 Asterisk 13

2017-02-19 Thread Graham Brown
I'm trying to load balance 2 Asterisk servers with Kamailio offloading the
registration to Kamailio using the Asterisk real-time database tables.
I have a problem with the dispatcher module, if there is a t_on_failure
route it always goes into that, if I remove that then I would expect every
call to round robin but I'm only ever hitting the same server from the same
extension (seems like sticky session based on source ip).

1. how do I fix my failure route so I can reboot server 1 and server 2 will
be used
2. how to I change the sticky session behaviour.

Another issue I am facing with extensions registering to Asterisk are only
avaliable on the server they routed to My assumption was if using the
Asterisk real-time database I would get the contact on both servers.  Maybe
my architecture is incorrect, I'm open to suggestions. Currently Kamailio
is not storing locations (assuming that is the extension contact) maybe
that is a better solution, but I dont know how to configure Asterisk to
forward everything to Kamailio then or integrate via the database or
something.

Thanks in advance for any help

Regards
Graham


kamailio.cfg
Description: Binary data
___
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] Kamailio 4.3.x location_attrs update issue

2017-02-18 Thread Mridul B
Hi,

We've noticed a case where the *location_attrs* table isn't updated when
there's an unexpected shutdown of a SIP device (here there'll be no
REGISTER message sent with expires=0).

We're using Kamailio v4.3.x

When the SIP device shuts down ungracefully. The location table is updated
using DELETE query
This is done by the timer which deletes the expired contacts, by default
the timer_interval is set as 60.

Here, the logs of auto-removal of expired contacts entries by the timer


> Feb 17 17:16:13 localhost kamailio[23273]: DEBUG: db_postgres
> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
> 0x7f34969433c8 (1) - [delete from location where expires<'2017-02-17
> 17:16:14' AND expires<>'1970-01-01 00:00:00']
>


Feb 17 17:16:14 localhost kamailio[23272]: DEBUG: db_postgres
> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
> 0x7f34969433c8 (1) - [delete from location where expires<'2017-02-17
> 17:16:15' AND expires<>'1970-01-01 00:00:00']




The delete operation is only on location table, shouldn't we have the same
implementation on the location_attrs table based upon ruid or username?

We're getting duplicate entries in the location_attrs table of the same sip
user after it registers.

But when the SIP device un-registers, the entries in the location as well
as in the location_attrs table is deleted

Feb 17 18:14:32 localhost kamailio[23249]: DEBUG: usrloc [ucontact.c:1725]:
> uldb_delete_attrs(): trying to delete location attributes
> Feb 17 18:14:32 localhost kamailio[23249]: DEBUG: db_postgres
> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
> 0x7f3496941888 (1) - [delete from location_attrs where username='mridul'
> AND ruid='uloc-58a72243-5ace-2']
>


Feb 17 18:14:32 localhost kamailio[23249]: DEBUG: db_postgres
> [km_dbase.c:272]: db_postgres_submit_query(): sending query ok:
> 0x7f3496941888 (1) - [delete from location where username='mridul' AND
> contact='sip:mridul@127.0.0.1:37881;rinstance=b841a8c916e47dfa']



I think the usrloc module should have the implementation of deleting the
entries of expired sip users based on its ruid/username in the
location_attrs table also.

Thanks for the help.

Best regards,
MRIDUL
___
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] kamailio memory leak in private memory

2017-02-17 Thread david
hello Daniel

i forgot to specify that in the dump attached, the first lines are for
the process UDP receiver carrying the traffic on an affected IP,
yesterday during the test we started the kamailio only with 1 children
per IP, so all the messages would have been processed by that process

i see that all the information of allocated mem for the root process is
the same in both moments after and before the traffic load, but in the
PID affected we see more hashes used after the load, i dont know how to
deal with that information, anything you need from us please let us know
and we will pleased to provide if possible

best regards
david



El vie, 17-02-2017 a las 14:17 +0100, david escribió:

> hello DAniel
> 
> we have 4.4.1 sorry
> we are only handling SIP calls without REGISTER messages
> 
> best regards
> david
> 
> El vie, 17-02-2017 a las 13:53 +0100, Daniel-Constantin Mierla
> escribió:
> 
> > Hello,
> > 
> > what kamailio version?
> > 
> > Are registrations handled by kamailio, or is just used for calls?
> > 
> > Cheers,
> > Daniel
> > 
> > 
> > 
> > On 17/02/2017 13:31, david wrote:
> > 
> > 
> > > Hello all
> > > 
> > > We are observing an issue in one kamailio proxy we use.
> > > The consecuence of an unknow cause is that the private memory of
> > > some UDP receiver processes in where we listen from a particular
> > > IP, seems to be draining along the time while processing traffic.
> > > Quite "slowly" but maybe aroung 200K in 3-4hours, depending on the
> > > moment of the day.
> > > 
> > > This is quite weird for us, because it seemed like it was caused
> > > by some particular traffic profile, since we have several IP
> > > listening (8 children each) and we only see the issue in the UDP
> > > receiver processes of some of those IPs. Besides we have moved the
> > > kamailio service listening on the same IP to several different
> > > physical servers, and the behaviour is the same.
> > > We look at it ussing pkg.stats kamcmd command and for instance if
> > > we track one of the process affected
> > > pid: 23784
> > > rank: 53
> > > used: 2838616
> > > free: 13005408
> > > real_used: 3771808
> > > 
> > > pid: 23784
> > > rank: 53
> > > used: 2842584
> > > free: 12999280
> > > real_used: 3777936
> > > 
> > > This 2 outputs were taken with 10min diff between each other.
> > > 
> > > But we dont know where or how to look at it.
> > > We have been these last days trying to search for patterns to
> > > allocate some particular traffic source causing something weird,
> > > but no luck.
> > > We have checked all the SIP INVITE messages looking for anything
> > > weird at any field but no luck, besides we sometimes see some bad
> > > headers with blank spaces in the uri or thing like that but those
> > > cases we have an error and we dont think it can cause a memory
> > > leak.
> > > Shared memory seems to be stable.
> > > 
> > > We also have checked the config we are using and we have been
> > > discarding possible issues since we dont think the $var variables
> > > we are using could cause that issue (but you never know)
> > > 
> > > We tried to debug the kamailio on one affected IP compiling it
> > > with DBG_SYS_MALLOC , and doing the dump of the pkg mem status
> > > when the kamailio was restarted and no traffic was processed, and
> > > also when it had traffic processed. in this last case, we removed
> > > traffic, waited for 20min and made the dump
> > > 
> > > i attach you both files, we have the debug logs, but they are very
> > > big to be passed here, and we dont know what to look for :)
> > > 
> > > could you please give us some guidance or clue to at least start
> > > to searching for something that can cause this issue?
> > > 
> > > thanks  alot and regards
> > > david 
> > > 
> > > 
> > > ___
> > > 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
> 
> 
___
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] kamailio memory leak in private memory

2017-02-17 Thread david
hello DAniel

we have 4.4.1 sorry
we are only handling SIP calls without REGISTER messages

best regards
david

El vie, 17-02-2017 a las 13:53 +0100, Daniel-Constantin Mierla escribió:

> Hello,
> 
> what kamailio version?
> 
> Are registrations handled by kamailio, or is just used for calls?
> 
> Cheers,
> Daniel
> 
> 
> 
> 
> On 17/02/2017 13:31, david wrote:
> 
> > 
> > Hello all
> > 
> > We are observing an issue in one kamailio proxy we use.
> > The consecuence of an unknow cause is that the private memory of
> > some UDP receiver processes in where we listen from a particular IP,
> > seems to be draining along the time while processing traffic. Quite
> > "slowly" but maybe aroung 200K in 3-4hours, depending on the moment
> > of the day.
> > 
> > This is quite weird for us, because it seemed like it was caused by
> > some particular traffic profile, since we have several IP listening
> > (8 children each) and we only see the issue in the UDP receiver
> > processes of some of those IPs. Besides we have moved the kamailio
> > service listening on the same IP to several different physical
> > servers, and the behaviour is the same.
> > We look at it ussing pkg.stats kamcmd command and for instance if we
> > track one of the process affected
> > pid: 23784
> > rank: 53
> > used: 2838616
> > free: 13005408
> > real_used: 3771808
> > 
> > pid: 23784
> > rank: 53
> > used: 2842584
> > free: 12999280
> > real_used: 3777936
> > 
> > This 2 outputs were taken with 10min diff between each other.
> > 
> > But we dont know where or how to look at it.
> > We have been these last days trying to search for patterns to
> > allocate some particular traffic source causing something weird, but
> > no luck.
> > We have checked all the SIP INVITE messages looking for anything
> > weird at any field but no luck, besides we sometimes see some bad
> > headers with blank spaces in the uri or thing like that but those
> > cases we have an error and we dont think it can cause a memory leak.
> > Shared memory seems to be stable.
> > 
> > We also have checked the config we are using and we have been
> > discarding possible issues since we dont think the $var variables we
> > are using could cause that issue (but you never know)
> > 
> > We tried to debug the kamailio on one affected IP compiling it with
> > DBG_SYS_MALLOC , and doing the dump of the pkg mem status when the
> > kamailio was restarted and no traffic was processed, and also when
> > it had traffic processed. in this last case, we removed traffic,
> > waited for 20min and made the dump
> > 
> > i attach you both files, we have the debug logs, but they are very
> > big to be passed here, and we dont know what to look for :)
> > 
> > could you please give us some guidance or clue to at least start to
> > searching for something that can cause this issue?
> > 
> > thanks  alot and regards
> > david 
> > 
> > 
> > ___
> > 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
> 
> 
> 
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
> ___
> 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] kamailio memory leak in private memory

2017-02-17 Thread Daniel-Constantin Mierla
Hello,

what kamailio version?

Are registrations handled by kamailio, or is just used for calls?

Cheers,
Daniel


On 17/02/2017 13:31, david wrote:
> Hello all
>
> We are observing an issue in one kamailio proxy we use.
> The consecuence of an unknow cause is that the private memory of some
> UDP receiver processes in where we listen from a particular IP, seems
> to be draining along the time while processing traffic. Quite "slowly"
> but maybe aroung 200K in 3-4hours, depending on the moment of the day.
>
> This is quite weird for us, because it seemed like it was caused by
> some particular traffic profile, since we have several IP listening (8
> children each) and we only see the issue in the UDP receiver processes
> of some of those IPs. Besides we have moved the kamailio service
> listening on the same IP to several different physical servers, and
> the behaviour is the same.
> We look at it ussing pkg.stats kamcmd command and for instance if we
> track one of the process affected
> pid: 23784
> rank: 53
> used: 2838616
> *free: 13005408*
> real_used: 3771808
>
> pid: 23784
> rank: 53
> used: 2842584
> *free: 12999280*
> real_used: 3777936
>
> This 2 outputs were taken with 10min diff between each other.
>
> But we dont know where or how to look at it.
> We have been these last days trying to search for patterns to allocate
> some particular traffic source causing something weird, but no luck.
> We have checked all the SIP INVITE messages looking for anything weird
> at any field but no luck, besides we sometimes see some bad headers
> with blank spaces in the uri or thing like that but those cases we
> have an error and we dont think it can cause a memory leak.
> Shared memory seems to be stable.
>
> We also have checked the config we are using and we have been
> discarding possible issues since we dont think the $var variables we
> are using could cause that issue (but you never know)
>
> We tried to debug the kamailio on one affected IP compiling it with
> DBG_SYS_MALLOC , and doing the dump of the pkg mem status when the
> kamailio was restarted and no traffic was processed, and also when it
> had traffic processed. in this last case, we removed traffic, waited
> for 20min and made the dump
>
> i attach you both files, we have the debug logs, but they are very big
> to be passed here, and we dont know what to look for :)
>
> could you please give us some guidance or clue to at least start to
> searching for something that can cause this issue?
>
> thanks  alot and regards
> david
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] kamailio memory leak in private memory

2017-02-17 Thread david
Hello all

We are observing an issue in one kamailio proxy we use.
The consecuence of an unknow cause is that the private memory of some
UDP receiver processes in where we listen from a particular IP, seems to
be draining along the time while processing traffic. Quite "slowly" but
maybe aroung 200K in 3-4hours, depending on the moment of the day.

This is quite weird for us, because it seemed like it was caused by some
particular traffic profile, since we have several IP listening (8
children each) and we only see the issue in the UDP receiver processes
of some of those IPs. Besides we have moved the kamailio service
listening on the same IP to several different physical servers, and the
behaviour is the same.
We look at it ussing pkg.stats kamcmd command and for instance if we
track one of the process affected
pid: 23784
rank: 53
used: 2838616
free: 13005408
real_used: 3771808

pid: 23784
rank: 53
used: 2842584
free: 12999280
real_used: 3777936

This 2 outputs were taken with 10min diff between each other.

But we dont know where or how to look at it.
We have been these last days trying to search for patterns to allocate
some particular traffic source causing something weird, but no luck.
We have checked all the SIP INVITE messages looking for anything weird
at any field but no luck, besides we sometimes see some bad headers with
blank spaces in the uri or thing like that but those cases we have an
error and we dont think it can cause a memory leak.
Shared memory seems to be stable.

We also have checked the config we are using and we have been discarding
possible issues since we dont think the $var variables we are using
could cause that issue (but you never know)

We tried to debug the kamailio on one affected IP compiling it with
DBG_SYS_MALLOC , and doing the dump of the pkg mem status when the
kamailio was restarted and no traffic was processed, and also when it
had traffic processed. in this last case, we removed traffic, waited for
20min and made the dump

i attach you both files, we have the debug logs, but they are very big
to be passed here, and we dont know what to look for :)

could you please give us some guidance or clue to at least start to
searching for something that can cause this issue?

thanks  alot and regards
david


mem_dump_empty.gz
Description: application/gzip


mem_dump_load.gz
Description: application/gzip
___
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] Kamailio 4.2 on Debian 8 and dispatcher problem

2017-02-16 Thread Daniel Tryba
On Thu, Feb 16, 2017 at 03:02:15PM +0100, przeqpiciel wrote:
> I'm trying to setup dispatcher module to working with mysql database but
> when i put to kamailio.cfg below lines then kamailio wont starts.

> i tried connect to mysql with credentials which you can see in mod_param
> line and i could query all kamailio database. im really new in this and i
> dont know how to debug this, is anybody could help me with it ?

So what is the error message? 

See /var/log/syslog and if you don't see anything increase the debug
level in the config.


___
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] Kamailio 4.2 on Debian 8 and dispatcher problem

2017-02-16 Thread przeqpiciel
Hi,

I'm trying to setup dispatcher module to working with mysql database but
when i put to kamailio.cfg below lines then kamailio wont starts.

loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", "mysql://kamailioro:kamailioro@localhost
/kamailio")
modparam("dispatcher", "table_name", "dispatcher")

i tried connect to mysql with credentials which you can see in mod_param
line and i could query all kamailio database. im really new in this and i
dont know how to debug this, is anybody could help me with it ?

Best regards,
Tomasz
___
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] kamailio with cassandra

2017-02-08 Thread Никитенко Виталий
Hi.
>> Can you provide more details for what you need it,maybe we can provide some 
>> hints?
I want to store the data of registered users (location) in the database 
cassandra (it would be great also dialog stored in cassandra). 
>>Can you provide access to a test system/vm where to try to fix it
Yes, I can it, will prepare today the VM for access to public network and send 
to email data access.

Thanks for the help.


> Hello,
>
> unfortunately the module was not maintained for a while. Can you provide
> access to a test system/vm where to try to fix it, because I don't use
> it and have no platform where to test?
>
> There is another module, ndb_cassandra, depending of what you want to
> do, it might help. Can you provide more details for what you need it,
> maybe we can provide some hints?
>
> Cheers,
> Daniel
>
> On 07/02/2017 10:55, Никитенко Виталий wrote:
>>  Hi!
>>  I want start kamailio with db_cassandra. do as it written in 
>> https://www.kamailio.org/docs/modules/4.2.x/modules/db_cassandra.html. Then 
>> trying kamctl start, failed with error "table version does not exist!".
>>  From CQLSH table is view
>>  cqlsh:kamailio> Describe tables;
>>  version location
>>
>>  cqlsh:kamailio> select * from version;
>>   table_name | table_version
>>  +---
>>  version | 1
>>
>>  Tell me please wherein may be trouble? Full log below
>>
>>  ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): 
>> Full dir name= /usr/local/etc/kamailio/cassandra/location
>>  ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): 
>> Full dir name= /usr/local/etc/kamailio/cassandra/version
>>  INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import bind_ob
>>  INFO: rr [rr_mod.c:160]: mod_init(): outbound module not available
>>  INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 1024
>>  INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count 
>> (nc_enabled) support disabled
>>  INFO: permissions [parse_config.c:251]: parse_config_file(): file not 
>> found: /usr/local/etc/kamailio//permissions.allow
>>  INFO: permissions [permissions.c:608]: mod_init(): default allow file 
>> (/usr/local/etc/kamailio//permissions.allow) not found => empty rule set
>>  INFO: permissions [parse_config.c:251]: parse_config_file(): file not 
>> found: /usr/local/etc/kamailio//permissions.deny
>>  INFO: permissions [permissions.c:617]: mod_init(): default deny file 
>> (/usr/local/etc/kamailio//permissions.deny) not found => empty rule set
>>  INFO: misc_radius [misc_radius.c:164]: mod_init(): initializing...
>>  ERROR: db_cassandra [dbcassa_base.cpp:449]: cassa_translate_query(): table 
>> version does not exist!
>>  ERROR: db_cassandra [dbcassa_base.cpp:962]: db_cassa_query(): Failed to 
>> query Cassandra cluster
>>  ERROR:  [db.c:401]: db_table_version(): error in db_query
>>  ERROR:  [db.c:440]: db_check_table_version(): querying version for 
>> table location
>>  ERROR: usrloc [dlist.c:640]: register_udomain(): error during table version 
>> check.
>>  ERROR: registrar [reg_mod.c:554]: domain_fixup(): failed to register domain
>>  ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
>> cfg:/usr/local/etc/kamailio//kamailio.cfg:982
>>  ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
>> cfg:/usr/local/etc/kamailio//kamailio.cfg:987
>>  ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
>> cfg:/usr/local/etc/kamailio//kamailio.cfg:992
>>
>>  ___
>>  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
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
> --

___
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] kamailio with cassandra

2017-02-07 Thread Daniel-Constantin Mierla
Hello,

unfortunately the module was not maintained for a while. Can you provide
access to a test system/vm where to try to fix it, because I don't use
it and have no platform where to test?

There is another module, ndb_cassandra, depending of what you want to
do, it might help. Can you provide more details for what you need it,
maybe we can provide some hints?

Cheers,
Daniel


On 07/02/2017 10:55, Никитенко Виталий wrote:
> Hi!
> I want start kamailio with db_cassandra. do as it written in 
> https://www.kamailio.org/docs/modules/4.2.x/modules/db_cassandra.html. Then 
> trying kamctl start, failed with error "table version does not exist!".
> From CQLSH table is view
> cqlsh:kamailio> Describe tables;
> version  location
>
>
> cqlsh:kamailio> select * from version;
>  table_name | table_version
> +---
> version | 1
> 
>
> Tell me please wherein may be trouble? Full log below
> 
>
> ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): Full 
> dir name= /usr/local/etc/kamailio/cassandra/location
> ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): Full 
> dir name= /usr/local/etc/kamailio/cassandra/version
> INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import bind_ob
> INFO: rr [rr_mod.c:160]: mod_init(): outbound module not available
> INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 1024
> INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count 
> (nc_enabled) support disabled
> INFO: permissions [parse_config.c:251]: parse_config_file(): file not found: 
> /usr/local/etc/kamailio//permissions.allow
> INFO: permissions [permissions.c:608]: mod_init(): default allow file 
> (/usr/local/etc/kamailio//permissions.allow) not found => empty rule set
> INFO: permissions [parse_config.c:251]: parse_config_file(): file not found: 
> /usr/local/etc/kamailio//permissions.deny
> INFO: permissions [permissions.c:617]: mod_init(): default deny file 
> (/usr/local/etc/kamailio//permissions.deny) not found => empty rule set
> INFO: misc_radius [misc_radius.c:164]: mod_init(): initializing...
> ERROR: db_cassandra [dbcassa_base.cpp:449]: cassa_translate_query(): table 
> version does not exist!
> ERROR: db_cassandra [dbcassa_base.cpp:962]: db_cassa_query(): Failed to query 
> Cassandra cluster
> ERROR:  [db.c:401]: db_table_version(): error in db_query
> ERROR:  [db.c:440]: db_check_table_version(): querying version for 
> table location
> ERROR: usrloc [dlist.c:640]: register_udomain(): error during table version 
> check.
> ERROR: registrar [reg_mod.c:554]: domain_fixup(): failed to register domain
> ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
> cfg:/usr/local/etc/kamailio//kamailio.cfg:982
> ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
> cfg:/usr/local/etc/kamailio//kamailio.cfg:987
> ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
> cfg:/usr/local/etc/kamailio//kamailio.cfg:992
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] kamailio with cassandra

2017-02-07 Thread Никитенко Виталий
Hi!
I want start kamailio with db_cassandra. do as it written in 
https://www.kamailio.org/docs/modules/4.2.x/modules/db_cassandra.html. Then 
trying kamctl start, failed with error "table version does not exist!".
From CQLSH table is view
cqlsh:kamailio> Describe tables;
version  location


cqlsh:kamailio> select * from version;
 table_name | table_version
+---
version | 1


Tell me please wherein may be trouble? Full log below


ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): Full 
dir name= /usr/local/etc/kamailio/cassandra/location
ERROR: db_cassandra [dbcassa_table.c:592]: dbcassa_read_table_schemas(): Full 
dir name= /usr/local/etc/kamailio/cassandra/version
INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import bind_ob
INFO: rr [rr_mod.c:160]: mod_init(): outbound module not available
INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 1024
INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count 
(nc_enabled) support disabled
INFO: permissions [parse_config.c:251]: parse_config_file(): file not found: 
/usr/local/etc/kamailio//permissions.allow
INFO: permissions [permissions.c:608]: mod_init(): default allow file 
(/usr/local/etc/kamailio//permissions.allow) not found => empty rule set
INFO: permissions [parse_config.c:251]: parse_config_file(): file not found: 
/usr/local/etc/kamailio//permissions.deny
INFO: permissions [permissions.c:617]: mod_init(): default deny file 
(/usr/local/etc/kamailio//permissions.deny) not found => empty rule set
INFO: misc_radius [misc_radius.c:164]: mod_init(): initializing...
ERROR: db_cassandra [dbcassa_base.cpp:449]: cassa_translate_query(): table 
version does not exist!
ERROR: db_cassandra [dbcassa_base.cpp:962]: db_cassa_query(): Failed to query 
Cassandra cluster
ERROR:  [db.c:401]: db_table_version(): error in db_query
ERROR:  [db.c:440]: db_check_table_version(): querying version for table 
location
ERROR: usrloc [dlist.c:640]: register_udomain(): error during table version 
check.
ERROR: registrar [reg_mod.c:554]: domain_fixup(): failed to register domain
ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
cfg:/usr/local/etc/kamailio//kamailio.cfg:982
ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
cfg:/usr/local/etc/kamailio//kamailio.cfg:987
ERROR:  [route.c:1189]: fix_actions(): fixing failed (code=-1) at 
cfg:/usr/local/etc/kamailio//kamailio.cfg:992

___
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] Kamailio parse failed message

2017-02-07 Thread Hai Bui Duc Ha
Hi Daniel,

It didn't fixed, I just send you more information about the capturing on
both client and server side.

Regards,
Hai Bui

On Tue, Feb 7, 2017 at 1:40 PM, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> with TCP there is no MTU. In the previous pcap you sent there was a wrong
> Content-Length value. Was that fixed?
>
> Cheers,
> Daniel
>
> On 06/02/2017 12:24, Hai Bui Duc Ha wrote:
>
> Hi Daniel,
>
> I send you the pcap files on both client and server side.
> Analyse this files, I see the packet can not "reassemble"  INVITE message
> at server side:
> - At client.pcapng, it can detect 6 and 7th packets are one.
> - But on server.pcap, it can not "reassemble" 18 and 21st packets.
>
> I just explain as my understand. If you have any information, please ask
> me.
> I think the problem relate the MTU - fragmentation. But I'm not sure about
> this.
> Thank you for support !
>
> Regards,
> Hai Bui
>
> On Sun, Jan 22, 2017 at 4:33 PM, Hai Bui Duc Ha 
> wrote:
>
>> Hi Daniel,
>>
>> Thank for your advice.
>> I will capture and analyze the call log on both client and kamailio to
>> check the packet size.
>>
>> Regards,
>> Hai Bui
>>
>>
>> On Fri, Jan 20, 2017 at 3:38 PM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>>
>>>
>>> On 19/01/2017 22:56, Daniel-Constantin Mierla wrote:
>>>
>>> Hello,
>>>
>>> On 19/01/2017 10:48, Hai Bui Duc Ha wrote:
>>>
>>> Hi Daniel,
>>>
>>> Thank you for reply.
>>>
>>> On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
 Hello,

 apparently I missed the follow ups on this discussion, dragged in by
 other topics on mailing list.

>>> Can you get the pcap with all the traffic taken on kamailio server for
 the call (from initial invite to the end of the call)?

>>> I send you the pcap at enclosed file. You can see the packet *No.5 *,
>>> it missing SIP message body:
>>> *Media Attribute (a): rtpmap:8 PCMA/8000*
>>> *Media Attribute (a): rtpmap:101 telephone-event/8000*
>>> *Media Attribute (a): fmtp:101 0-16*
>>>
 I expect that content length is mismatching or there is a '\0' inside
 the sdp.

>>> Can you explain me more about this ?
>>>
>>> TCP is a stream protocol, meaning that the application (kamailio) need
>>> to read and parse to figure out the end of a SIP message. The state machine
>>> as per RFC requires the application to read and identify the Content-Length
>>> header, take its value, read until the end of headers is found (an empty
>>> line) and from there on read as much as the value of Content-Length to get
>>> the body and consider the end of message there.
>>>
>>> If the sending application puts a lower value in the Content-Length than
>>> the number of chars in the body, the rest remains in the buffer and the
>>> receiving application (kamailio) attempts to parse a new SIP message.
>>>
>>> The other thing I was thinking of was the presence of '\0' which marks
>>> the end of string in C.
>>>
>>> I will look at the pcap very soon and see what I find there.
>>>
>>> The problem is the value of Content-Lenght set by the client -- it is
>>> set only to the size that it is view as part of the invite. A bit later the
>>> client sends more sdp, but exceeding the size sent in C-L header. That part
>>> of SDP remains as garbage.
>>>
>>> So there is a bug in client app.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> Daniel-Constantin Mierlawww.twitter.com/miconda -- 
>>> www.linkedin.com/in/miconda
>>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>>
>>>
>>
>>
>> --
>> Hai Bui
>> VoIP engineer, Cvoice team, HTK-HCM Office
>> Mobile: +84-165-618-9876
>>
>
>
>
> --
> Hai Bui
> VoIP engineer, Cvoice team, HTK-HCM Office
> Mobile: +84-165-618-9876
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
>
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>


-- 
Hai Bui
VoIP engineer, Cvoice team, HTK-HCM Office
Mobile: +84-165-618-9876
___
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] Kamailio + Asterisk with multidomain

2017-02-06 Thread Tomas Zanet
Hello, thanks to this guide
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
I successfully installed Asterisk 11.6 and Kamailio 4.4.4 on the same machine. 
Everything works fine.

Right now I would like to extend this scenario adding MULTIDOMAIN support, 
which is not enabled by default

Do you see any problems / technical limitations to add multidomain support in 
this scenario?
Before enhancing Kamailio cfg file and Asterisk configuration I would like to 
know: is this possible?
As far as I know Kamailio works fine with multidomain support but I don’t know 
if Asterisk or both processes can support it.


Thanks in advance
Regards,
T.



Tomas Zanet
Software Design Department
tza...@came.com
CAME S.p.A.

___
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] kamailio proxy behind firewall

2017-02-06 Thread Daniel-Constantin Mierla
Hello,

have you set the advertise address with public for listen socket (on
private ip)?

Cheers,
Daniel


On 06/02/2017 21:25, JBF wrote:
> Hello, yes, we kept TLS between kamailio and F5, and kamailio indeed have a
> private address, and doesnt see the firewall public address: the only way
> for the proxy to  reply to the F5  is through the client socket opened by
> the F5 connection
>
>
>
> --
> View this message in context: 
> http://sip-router.1086192.n5.nabble.com/kamailio-proxy-behind-firewall-tp155379p155711.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] kamailio proxy behind firewall

2017-02-06 Thread JBF
Hello, yes, we kept TLS between kamailio and F5, and kamailio indeed have a
private address, and doesnt see the firewall public address: the only way
for the proxy to  reply to the F5  is through the client socket opened by
the F5 connection



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/kamailio-proxy-behind-firewall-tp155379p155711.html
Sent from the Users mailing list archive at Nabble.com.

___
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] Kamailio parse failed message

2017-02-06 Thread Daniel-Constantin Mierla
Hello,

with TCP there is no MTU. In the previous pcap you sent there was a
wrong Content-Length value. Was that fixed?

Cheers,
Daniel


On 06/02/2017 12:24, Hai Bui Duc Ha wrote:
> Hi Daniel,
>
> I send you the pcap files on both client and server side.
> Analyse this files, I see the packet can not "reassemble"  INVITE
> message at server side:
> - At client.pcapng, it can detect 6 and 7th packets are one.
> - But on server.pcap, it can not "reassemble" 18 and 21st packets.
>
> I just explain as my understand. If you have any information, please
> ask me.
> I think the problem relate the MTU - fragmentation. But I'm not sure
> about this.
> Thank you for support !
>
> Regards,
> Hai Bui
>
> On Sun, Jan 22, 2017 at 4:33 PM, Hai Bui Duc Ha  > wrote:
>
> Hi Daniel,
>
> Thank for your advice.
> I will capture and analyze the call log on both client and
> kamailio to check the packet size.
>
> Regards,
> Hai Bui
>
>
> On Fri, Jan 20, 2017 at 3:38 PM, Daniel-Constantin Mierla
> > wrote:
>
>
>
> On 19/01/2017 22:56, Daniel-Constantin Mierla wrote:
>>
>> Hello,
>>
>>
>> On 19/01/2017 10:48, Hai Bui Duc Ha wrote:
>>> Hi Daniel,
>>>
>>> Thank you for reply.
>>>  
>>> On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla
>>> > wrote:
>>>
>>> Hello,
>>>
>>> apparently I missed the follow ups on this discussion,
>>> dragged in by other topics on mailing list. 
>>>
>>> Can you get the pcap with all the traffic taken on
>>> kamailio server for the call (from initial invite to the
>>> end of the call)?
>>>
>>> I send you the pcap at enclosed file. You can see the packet
>>> *No.5 *, it missing SIP message body:
>>> /*Media Attribute (a): rtpmap:8 PCMA/8000*/
>>> /*Media Attribute (a): rtpmap:101
>>> telephone-event/8000*/
>>> /*Media Attribute (a): fmtp:101 0-16*/
>>>
>>> I expect that content length is mismatching or there is
>>> a '\0' inside the sdp.
>>>
>>> Can you explain me more about this ?
>> TCP is a stream protocol, meaning that the application
>> (kamailio) need to read and parse to figure out the end of a
>> SIP message. The state machine as per RFC requires the
>> application to read and identify the Content-Length header,
>> take its value, read until the end of headers is found (an
>> empty line) and from there on read as much as the value of
>> Content-Length to get the body and consider the end of
>> message there.
>>
>> If the sending application puts a lower value in the
>> Content-Length than the number of chars in the body, the rest
>> remains in the buffer and the receiving application
>> (kamailio) attempts to parse a new SIP message.
>>
>> The other thing I was thinking of was the presence of '\0'
>> which marks the end of string in C.
>>
>> I will look at the pcap very soon and see what I find there.
>>
> The problem is the value of Content-Lenght set by the client
> -- it is set only to the size that it is view as part of the
> invite. A bit later the client sends more sdp, but exceeding
> the size sent in C-L header. That part of SDP remains as garbage.
>
> So there is a bug in client app.
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda  -- 
> www.linkedin.com/in/miconda 
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com 
> 
>
>
>
>
> -- 
> Hai Bui
> VoIP engineer, Cvoice team, HTK-HCM Office
> Mobile: +84-165-618-9876
>
>
>
>
> -- 
> Hai Bui
> VoIP engineer, Cvoice team, HTK-HCM Office
> Mobile: +84-165-618-9876

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] kamailio proxy behind firewall

2017-02-05 Thread Daniel-Constantin Mierla
Hello,

is Kamailio also listening on TLS? Or is the firewall converting to UDP
or TCP?

Has Kamailio a private IP and only the firewall a public IP?

Cheers,
Daniel


On 25/01/2017 17:23, JBF wrote:
> Hello, 
> we have the following Configuration for our kamailio installation (we are
> using TLS and not udp)
>
> (1) F5 Firewall (configured as message fowarding), opening a TLS server on
> the outside
> (2) SIP proxy, with a TLS server accessed by the F5 . The SIP proxy doesnt
> see the F5 TLS server
> (3) SIP registrar
>
> REGISTER works find
>
> We have the following issue on INVITE: 
> A sends an INVITE to B.
>
> The Registrar patches the R-URI with the content of location, which contains
> the publi ip of the Device (because the device used stun)
> we force the routing from registrar to proxy by using t_relay (SIP_PROXY_IP)
> /The proxy tries to route to this R-URI, which is not visible/
>
> I am not sure how to fix that:
>
> Record Route is for a true sip proxy, but the Firewall does not have an
> server facing the SIP proxy: the sip proxy needs to find the proper client
> socket opened at register to route the INVITE
>
> We  have arranged for the Firewall to add its own Via, but if i understand
> correctly, this is used for replies, and here we are dealing with a request
> forwarding, and t_relay uses the r-ruri  to route requests. IT might be why
> REGISTER works correctly (ie the 200 OK is routed correctly from proxy to
> firewall)
>
> I could arrange for the location table to contain the private ip and port of
> the firewall connection (through the use of the received/rport info inserted
> in the  Via by the proxy )
> That would mean, however that the contact of the user will contain the
> private interface of the F5 which i found weird.
>
> How do you think i should proceed ? any advices are welcome
> Thank you
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://sip-router.1086192.n5.nabble.com/kamailio-proxy-behind-firewall-tp155379.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio 4.2.3-3.1 Segfaulting - Need debuginfo RPM for kamailio-4.2.3-3.1.x86_64

2017-02-05 Thread Daniel-Constantin Mierla
Hello,

can you upgrade to latest 4.2.x? No changes to config or db are
required. Then you should get the debuginfo rpm, but also run the
version in branch 4.2 which has more fixes than 4.2.3.

Cheers,
Daniel


On 01/02/2017 21:25, Peter DiSanto wrote:
> Our Kamailio 4.2.3 recently began seg-faulting in production.  I ran a
> bt full, but without the debuginfo I presume it isn't much use.  We
> cannot locate the original RPMs for this version to be able to obtain
> the debuginfo RPM.  We are running the kamailio-4.2.3-3.1.x86_64 RPM
> for CentOS6. Anybody have it or can help us find the debug, or offer
> other advice?
>
>
>
>
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio 4.2.3-3.1 Segfaulting - Need debuginfo RPM for kamailio-4.2.3-3.1.x86_64

2017-02-01 Thread Peter DiSanto
Our Kamailio 4.2.3 recently began seg-faulting in production.  I ran a bt
full, but without the debuginfo I presume it isn't much use.  We cannot
locate the original RPMs for this version to be able to obtain the
debuginfo RPM.  We are running the kamailio-4.2.3-3.1.x86_64 RPM for
CentOS6. Anybody have it or can help us find the debug, or offer other
advice?
___
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] kamailio proxy behind firewall

2017-01-25 Thread JBF
Hello, 
we have the following Configuration for our kamailio installation (we are
using TLS and not udp)

(1) F5 Firewall (configured as message fowarding), opening a TLS server on
the outside
(2) SIP proxy, with a TLS server accessed by the F5 . The SIP proxy doesnt
see the F5 TLS server
(3) SIP registrar

REGISTER works find

We have the following issue on INVITE: 
A sends an INVITE to B.

The Registrar patches the R-URI with the content of location, which contains
the publi ip of the Device (because the device used stun)
we force the routing from registrar to proxy by using t_relay (SIP_PROXY_IP)
/The proxy tries to route to this R-URI, which is not visible/

I am not sure how to fix that:

Record Route is for a true sip proxy, but the Firewall does not have an
server facing the SIP proxy: the sip proxy needs to find the proper client
socket opened at register to route the INVITE

We  have arranged for the Firewall to add its own Via, but if i understand
correctly, this is used for replies, and here we are dealing with a request
forwarding, and t_relay uses the r-ruri  to route requests. IT might be why
REGISTER works correctly (ie the 200 OK is routed correctly from proxy to
firewall)

I could arrange for the location table to contain the private ip and port of
the firewall connection (through the use of the received/rport info inserted
in the  Via by the proxy )
That would mean, however that the contact of the user will contain the
private interface of the F5 which i found weird.

How do you think i should proceed ? any advices are welcome
Thank you















--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/kamailio-proxy-behind-firewall-tp155379.html
Sent from the Users mailing list archive at Nabble.com.

___
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] Kamailio IMS Secure Websocket closes connection

2017-01-22 Thread Serhat Guler
Dear all,

I am trying to make a call between 2 sipml5 client over WSS. Everything
works fine and as expected when using WS. While using WSS, the clients are
registered successfully, but when I make a call, the called party is
disconnected from the network and the caller gets "User offline" message.
There a wireshark capture here:
https://drive.google.com/file/d/0B6LMw8kmoAMYMGhrYXNUVXJySEk/view?usp=sharing

The call is made from Alice to Bob, the port Nrs: 4060: PCSCF, 5060:ICSCF,
and 6060 SCSCF. WWS is running on 4443.

The error message that is shown in Firefox console: "The connection to
wss://192.168.0.11:4443/ was interrupted while the page was loading."

Thanks in advance,
Serhat
___
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] Kamailio parse failed message

2017-01-22 Thread Hai Bui Duc Ha
Hi Daniel,

Thank for your advice.
I will capture and analyze the call log on both client and kamailio to
check the packet size.

Regards,
Hai Bui


On Fri, Jan 20, 2017 at 3:38 PM, Daniel-Constantin Mierla  wrote:

>
>
> On 19/01/2017 22:56, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> On 19/01/2017 10:48, Hai Bui Duc Ha wrote:
>
> Hi Daniel,
>
> Thank you for reply.
>
> On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> apparently I missed the follow ups on this discussion, dragged in by
>> other topics on mailing list.
>>
> Can you get the pcap with all the traffic taken on kamailio server for the
>> call (from initial invite to the end of the call)?
>>
> I send you the pcap at enclosed file. You can see the packet *No.5 *, it
> missing SIP message body:
> *Media Attribute (a): rtpmap:8 PCMA/8000*
> *Media Attribute (a): rtpmap:101 telephone-event/8000*
> *Media Attribute (a): fmtp:101 0-16*
>
>> I expect that content length is mismatching or there is a '\0' inside the
>> sdp.
>>
> Can you explain me more about this ?
>
> TCP is a stream protocol, meaning that the application (kamailio) need to
> read and parse to figure out the end of a SIP message. The state machine as
> per RFC requires the application to read and identify the Content-Length
> header, take its value, read until the end of headers is found (an empty
> line) and from there on read as much as the value of Content-Length to get
> the body and consider the end of message there.
>
> If the sending application puts a lower value in the Content-Length than
> the number of chars in the body, the rest remains in the buffer and the
> receiving application (kamailio) attempts to parse a new SIP message.
>
> The other thing I was thinking of was the presence of '\0' which marks the
> end of string in C.
>
> I will look at the pcap very soon and see what I find there.
>
> The problem is the value of Content-Lenght set by the client -- it is set
> only to the size that it is view as part of the invite. A bit later the
> client sends more sdp, but exceeding the size sent in C-L header. That part
> of SDP remains as garbage.
>
> So there is a bug in client app.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>


-- 
Hai Bui
VoIP engineer, Cvoice team, HTK-HCM Office
Mobile: +84-165-618-9876
___
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] Kamailio parse failed message

2017-01-20 Thread Daniel-Constantin Mierla


On 19/01/2017 22:56, Daniel-Constantin Mierla wrote:
>
> Hello,
>
>
> On 19/01/2017 10:48, Hai Bui Duc Ha wrote:
>> Hi Daniel,
>>
>> Thank you for reply.
>>  
>> On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla
>> > wrote:
>>
>> Hello,
>>
>> apparently I missed the follow ups on this discussion, dragged in
>> by other topics on mailing list. 
>>
>> Can you get the pcap with all the traffic taken on kamailio
>> server for the call (from initial invite to the end of the call)?
>>
>> I send you the pcap at enclosed file. You can see the packet *No.5 *,
>> it missing SIP message body:
>> /*Media Attribute (a): rtpmap:8 PCMA/8000*/
>> /*Media Attribute (a): rtpmap:101 telephone-event/8000*/
>> /*Media Attribute (a): fmtp:101 0-16*/
>>
>> I expect that content length is mismatching or there is a '\0'
>> inside the sdp.
>>
>> Can you explain me more about this ?
> TCP is a stream protocol, meaning that the application (kamailio) need
> to read and parse to figure out the end of a SIP message. The state
> machine as per RFC requires the application to read and identify the
> Content-Length header, take its value, read until the end of headers
> is found (an empty line) and from there on read as much as the value
> of Content-Length to get the body and consider the end of message there.
>
> If the sending application puts a lower value in the Content-Length
> than the number of chars in the body, the rest remains in the buffer
> and the receiving application (kamailio) attempts to parse a new SIP
> message.
>
> The other thing I was thinking of was the presence of '\0' which marks
> the end of string in C.
>
> I will look at the pcap very soon and see what I find there.
>
The problem is the value of Content-Lenght set by the client -- it is
set only to the size that it is view as part of the invite. A bit later
the client sends more sdp, but exceeding the size sent in C-L header.
That part of SDP remains as garbage.

So there is a bug in client app.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio parse failed message

2017-01-19 Thread Daniel-Constantin Mierla
Hello,


On 19/01/2017 10:48, Hai Bui Duc Ha wrote:
> Hi Daniel,
>
> Thank you for reply.
>  
> On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla
> > wrote:
>
> Hello,
>
> apparently I missed the follow ups on this discussion, dragged in
> by other topics on mailing list. 
>
> Can you get the pcap with all the traffic taken on kamailio server
> for the call (from initial invite to the end of the call)?
>
> I send you the pcap at enclosed file. You can see the packet *No.5 *,
> it missing SIP message body:
> /*Media Attribute (a): rtpmap:8 PCMA/8000*/
> /*Media Attribute (a): rtpmap:101 telephone-event/8000*/
> /*Media Attribute (a): fmtp:101 0-16*/
>
> I expect that content length is mismatching or there is a '\0'
> inside the sdp.
>
> Can you explain me more about this ?
TCP is a stream protocol, meaning that the application (kamailio) need
to read and parse to figure out the end of a SIP message. The state
machine as per RFC requires the application to read and identify the
Content-Length header, take its value, read until the end of headers is
found (an empty line) and from there on read as much as the value of
Content-Length to get the body and consider the end of message there.

If the sending application puts a lower value in the Content-Length than
the number of chars in the body, the rest remains in the buffer and the
receiving application (kamailio) attempts to parse a new SIP message.

The other thing I was thinking of was the presence of '\0' which marks
the end of string in C.

I will look at the pcap very soon and see what I find there.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
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] Kamailio not processing SIP TCP

2017-01-19 Thread JR Richardson
root@homer02:~# netstat -altp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address
State   PID/Program name
tcp0  0 homer02.x.xxx:sip*:*
LISTEN  16018/kamailio
tcp0  0 homer02.x.xxx:5066   *:*
LISTEN  16018/kamailio

Thanks.

JR

> If you use netstat, what is in the recv queue for tcp packets on sip ports?
>
> netstat -altp
>
> Cheers,
> Daniel
>
>
> On 18/01/2017 16:43, JR Richardson wrote:
>> Yes, this is a sipcapture node. I'm listening on a switch port that is
>> set to mirror my VoIP traffic. I see all SIP UDP/TCP packets on the
>> mirror port and the Ethernet port of the host node. Just don't see any
>> TCP packets process in kamailio, debug 3. UDP packets are processed as
>> expected.
>>
>> My config is using port mirror for the capture parameters:
>>
>> modparam("sipcapture", "capture_on", 1)
>> modparam("sipcapture", "hep_capture_on", 0)
>> modparam("sipcapture", "raw_ipip_capture_on", 0)
>> modparam("sipcapture", "raw_moni_capture_on", 1)
>>
>> modparam("sipcapture", "raw_sock_children", 4)
>> modparam("sipcapture", "raw_interface", "eth1")
>> modparam("sipcapture", "raw_socket_listen", "10.99.99.99:5060-5070")
>> modparam("sipcapture", "promiscious_on", 1)
>> modparam("sipcapture", "raw_moni_bpf_on", 1)
>>
>> Is there a method I could diagnose if the SIP TCP Packets are getting
>> from the kernel network process and the kamailio process?
>>
>> # ngrep -d eth1 -W byline host x.x.x.x | /var/run/kamailio/kamailio.pid
>>
>> Or pipe to kamailio local unix socket?
>>
>> I don't know, I'm just guessing.
>>
>> Thanks.
>>
>> JR
>>
>>
>>> Somehow is not clear for me how you have the configuration there ...
>>> before commenting further, this needs to be clarified.
>>>
>>> The node you presented the config is a sipcapture instance, right? What
>>> is sending traffic to it? Is another kamailio with siptrace module? Or
>>> the sipcature agent? Or you have a port mirroring in the router?
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 17/01/2017 16:37, JR Richardson wrote:
> On Mon, Jan 16, 2017 at 10:29:39AM -0600, JR Richardson wrote:
>> Yes, I'm familiar with the methods sipcapture uses, I don't use HEP,
>> using raw socket capture, I think this may be a sipcapture issue,
>> debuging kamailio shows normal startup and processing of UDP SIP
>> packets, but does not show any activity with TCP packets.
> I never used HOMER sofar but when I saw your first message my thoughts
> was that this can't work in a simple way since for TCP you need to
> complete a 4 way handshake before you can start to send data.
>
 Interesting. Are you referring to handshaking on the network stack or
 SIP TCP TLS handshaking? I guess I can see it two ways.

 1) if your talking about TCP/IP handshake, even though the SIP packet
 comes into the mirror port on the host node, the kernel processing the
 TCP packet is not establishing a valid connection due to no TCP
 handshake because its only a monitor port, no transmit back, then the
 kernel network stack does not pass the SIP TCP packet to the kamailio
 process for capture because it drops the packet due to no valid
 handshake?

 2) the kernel network stack is passing the SIP TCP packet to the
 kamailio process, but since kamailio cannot handshake back it drops
 the packet and does not process through the sipcapture module. This
 kinda breaks the whole capture ability for homer with SIP TCP. Using
 ngrep, I see all SIP TCP packets, invite -->, trying <--, session
 progress <--, request timeout <--, ack -->, etc...

 So how would I diagnose if the network stack is the culprit? Debugging
 kamailio is pretty straight forward, setup and listening for SIP TCP,
 but never see any processing of any TCP packets.

 Thanks.

 JR
>

___
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] Kamailio parse failed message

2017-01-19 Thread Hai Bui Duc Ha
Hi Daniel,

Thank you for reply.

On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> apparently I missed the follow ups on this discussion, dragged in by other
> topics on mailing list.
>
Can you get the pcap with all the traffic taken on kamailio server for the
> call (from initial invite to the end of the call)?
>
I send you the pcap at enclosed file. You can see the packet *No.5 *, it
missing SIP message body:
*Media Attribute (a): rtpmap:8 PCMA/8000*
*Media Attribute (a): rtpmap:101 telephone-event/8000*
*Media Attribute (a): fmtp:101 0-16*

> I expect that content length is mismatching or there is a '\0' inside the
> sdp.
>
Can you explain me more about this ?

>
> On 06/01/2017 03:39, Hai Bui Duc Ha wrote:
>
> Hello Daniel,
>
> Thank for reply !
>
> do you have the pcap for such message?
>
> Here is the message, I capture via Wireshark on client:
> *Session Initiation Protocol (INVITE)*
> *Request-Line: INVITE
> sip:buiducha...@happy.anttel-pro.ab-kz-02.antbuddy.com
>  SIP/2.0*
> *Message Header*
> *Via: SIP/2.0/TCP
> 10.0.2.15:57735;rport;branch=z9hG4bKPjaXcUF2ZkxyQGYCb3a57cPQ3rkcKMY.eS;alias*
> *Max-Forwards: 70*
> *From: "Phap Huynh"
>  >;tag=zJBNvD67y3E.1I5Y5ZrRI4JmP5JKeNWO*
> *To:  >*
> *Contact: *
> *Call-ID: ftMudIpIQeKWwP8kQDi2z1S0D1sV3KaB*
> *CSeq: 29055 INVITE*
> *Route: *
> *Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE,
> NOTIFY, REFER, MESSAGE, OPTIONS*
> *Supported: replaces, 100rel, timer, norefersub*
> *Session-Expires: 1800*
> *Min-SE: 9*
> *User-Agent: CSipSimple_hlteatt-19/r55*
> * [truncated]Proxy-Authorization: Digest username="huynhngocphap",
> realm="happy.anttel-pro.ab-kz-02.antbuddy.com
> ",
> nonce="452a7bce-d326-11e6-a605-e9dce514db6e",
> uri="sip:buiducha...@happy.anttel-pro.ab-kz-02.antbuddy.com
> ",
> response="71749de*
> *Content-Type: application/sdp*
> *Content-Length:   299*
> *Message Body*
> *Session Description Protocol*
> *Session Description Protocol Version (v): 0*
> *Owner/Creator, Session Id (o): - 3692596134 3692596134 IN IP4
> 10.0.2.15*
> *Session Name (s): pjmedia*
> *Connection Information (c): IN IP4 10.0.2.15*
> *Time Description, active time (t): 0 0*
> *Media Description, name and address (m): audio 4002 RTP/AVP 9
> 0 8 101*
> *Connection Information (c): IN IP4 10.0.2.15*
> *Media Attribute (a): rtcp:4003 IN IP4 10.0.2.15*
> *Media Attribute (a): sendrecv*
> *Media Attribute (a): rtpmap:9 G722/8000*
> *Media Attribute (a): rtpmap:0 PCMU/8000*
> *Media Attribute (a): rtpmap:8 PCMA/8000*
> *Media Attribute (a): rtpmap:101 telephone-event/8000*
> *Media Attribute (a): fmtp:101 0-16*
>
> And this is message I receive on Freeswitch:
>  
>INVITE sip:buiducha...@happy.anttel-pro.ab-kz-02.antbuddy.com SIP/2.0
>Record-Route:  1I5Y5ZrRI4JmP5JKeNWO>
>Via: SIP/2.0/TCP 125.212.212.40:5060;branch=z9hG4bK0d89.
> 3807a4cf41ce9b48a7d1a75826762d6e.0;i=533c
>Via: SIP/2.0/TCP 10.0.2.15:57735;received=49.
> 156.54.54;rport=50785;branch=z9hG4bKPjaXcUF2ZkxyQGYCb3a57cP
> Q3rkcKMY.eS;alias
>Max-Forwards: 50
>From: "Phap Huynh"  anttel-pro.ab-kz-02.antbuddy.com>;tag=zJBNvD67y3E.1I5Y5ZrRI4JmP5JKeNWO
>To: 
>Contact: 
>Call-ID: ftMudIpIQeKWwP8kQDi2z1S0D1sV3KaB
>CSeq: 29055 INVITE
>Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE,
> NOTIFY, REFER, MESSAGE, OPTIONS
>Supported: replaces, 100rel, timer, norefersub
>Session-Expires: 1800
>Min-SE: 9
>User-Agent: CSipSimple_hlteatt-19/r55
>Proxy-Authorization: Digest username="huynhngocphap", realm="
> happy.anttel-pro.ab-kz-02.antbuddy.com", 
> nonce="452a7bce-d326-11e6-a605-e9dce514db6e",
> uri="sip:buiducha...@happy.anttel-pro.ab-kz-02.antbuddy.com", response="
> 71749de35a220aef0b92c9ade03f90b7", algorithm=MD5,
> cnonce="px.OiQUg2zZmYh.0-MmLC0f.-ZPXYa1V", qop=auth, nc=0001
>Content-Type: 

Re: [SR-Users] Kamailio not processing SIP TCP

2017-01-18 Thread Daniel-Constantin Mierla
If you use netstat, what is in the recv queue for tcp packets on sip ports?

netstat -altp

Cheers,
Daniel


On 18/01/2017 16:43, JR Richardson wrote:
> Yes, this is a sipcapture node. I'm listening on a switch port that is
> set to mirror my VoIP traffic. I see all SIP UDP/TCP packets on the
> mirror port and the Ethernet port of the host node. Just don't see any
> TCP packets process in kamailio, debug 3. UDP packets are processed as
> expected.
>
> My config is using port mirror for the capture parameters:
>
> modparam("sipcapture", "capture_on", 1)
> modparam("sipcapture", "hep_capture_on", 0)
> modparam("sipcapture", "raw_ipip_capture_on", 0)
> modparam("sipcapture", "raw_moni_capture_on", 1)
>
> modparam("sipcapture", "raw_sock_children", 4)
> modparam("sipcapture", "raw_interface", "eth1")
> modparam("sipcapture", "raw_socket_listen", "10.99.99.99:5060-5070")
> modparam("sipcapture", "promiscious_on", 1)
> modparam("sipcapture", "raw_moni_bpf_on", 1)
>
> Is there a method I could diagnose if the SIP TCP Packets are getting
> from the kernel network process and the kamailio process?
>
> # ngrep -d eth1 -W byline host x.x.x.x | /var/run/kamailio/kamailio.pid
>
> Or pipe to kamailio local unix socket?
>
> I don't know, I'm just guessing.
>
> Thanks.
>
> JR
>
>
>> Somehow is not clear for me how you have the configuration there ...
>> before commenting further, this needs to be clarified.
>>
>> The node you presented the config is a sipcapture instance, right? What
>> is sending traffic to it? Is another kamailio with siptrace module? Or
>> the sipcature agent? Or you have a port mirroring in the router?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 17/01/2017 16:37, JR Richardson wrote:
 On Mon, Jan 16, 2017 at 10:29:39AM -0600, JR Richardson wrote:
> Yes, I'm familiar with the methods sipcapture uses, I don't use HEP,
> using raw socket capture, I think this may be a sipcapture issue,
> debuging kamailio shows normal startup and processing of UDP SIP
> packets, but does not show any activity with TCP packets.
 I never used HOMER sofar but when I saw your first message my thoughts
 was that this can't work in a simple way since for TCP you need to
 complete a 4 way handshake before you can start to send data.

>>> Interesting. Are you referring to handshaking on the network stack or
>>> SIP TCP TLS handshaking? I guess I can see it two ways.
>>>
>>> 1) if your talking about TCP/IP handshake, even though the SIP packet
>>> comes into the mirror port on the host node, the kernel processing the
>>> TCP packet is not establishing a valid connection due to no TCP
>>> handshake because its only a monitor port, no transmit back, then the
>>> kernel network stack does not pass the SIP TCP packet to the kamailio
>>> process for capture because it drops the packet due to no valid
>>> handshake?
>>>
>>> 2) the kernel network stack is passing the SIP TCP packet to the
>>> kamailio process, but since kamailio cannot handshake back it drops
>>> the packet and does not process through the sipcapture module. This
>>> kinda breaks the whole capture ability for homer with SIP TCP. Using
>>> ngrep, I see all SIP TCP packets, invite -->, trying <--, session
>>> progress <--, request timeout <--, ack -->, etc...
>>>
>>> So how would I diagnose if the network stack is the culprit? Debugging
>>> kamailio is pretty straight forward, setup and listening for SIP TCP,
>>> but never see any processing of any TCP packets.
>>>
>>> Thanks.
>>>
>>> JR

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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] Kamailio v4.4.5 Released

2017-01-18 Thread Daniel-Constantin Mierla
Hello,

Kamailio SIP Server v4.4.5 stable release is out.

This is a maintenance release of the latest stable branch, 4.4, that
includes fixes since the release of v4.4.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v4.4.x. Deployments running previous v4.x.x
versions are strongly recommended to be upgraded to v4.4.5.

For more details about version 4.4.5 (including links and guidelines to
download the tarball or from GIT repository), visit:

  * https://www.kamailio.org/w/2017/01/kamailio-v4-4-5-released/

RPM, Debian/Ubuntu packages will be available soon as well.

Many thanks to all contributing and using Kamailio!

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
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] Kamailio not processing SIP TCP

2017-01-18 Thread JR Richardson
Yes, this is a sipcapture node. I'm listening on a switch port that is
set to mirror my VoIP traffic. I see all SIP UDP/TCP packets on the
mirror port and the Ethernet port of the host node. Just don't see any
TCP packets process in kamailio, debug 3. UDP packets are processed as
expected.

My config is using port mirror for the capture parameters:

modparam("sipcapture", "capture_on", 1)
modparam("sipcapture", "hep_capture_on", 0)
modparam("sipcapture", "raw_ipip_capture_on", 0)
modparam("sipcapture", "raw_moni_capture_on", 1)

modparam("sipcapture", "raw_sock_children", 4)
modparam("sipcapture", "raw_interface", "eth1")
modparam("sipcapture", "raw_socket_listen", "10.99.99.99:5060-5070")
modparam("sipcapture", "promiscious_on", 1)
modparam("sipcapture", "raw_moni_bpf_on", 1)

Is there a method I could diagnose if the SIP TCP Packets are getting
from the kernel network process and the kamailio process?

# ngrep -d eth1 -W byline host x.x.x.x | /var/run/kamailio/kamailio.pid

Or pipe to kamailio local unix socket?

I don't know, I'm just guessing.

Thanks.

JR


> Somehow is not clear for me how you have the configuration there ...
> before commenting further, this needs to be clarified.
>
> The node you presented the config is a sipcapture instance, right? What
> is sending traffic to it? Is another kamailio with siptrace module? Or
> the sipcature agent? Or you have a port mirroring in the router?
>
> Cheers,
> Daniel
>
>
> On 17/01/2017 16:37, JR Richardson wrote:
>>> On Mon, Jan 16, 2017 at 10:29:39AM -0600, JR Richardson wrote:
 Yes, I'm familiar with the methods sipcapture uses, I don't use HEP,
 using raw socket capture, I think this may be a sipcapture issue,
 debuging kamailio shows normal startup and processing of UDP SIP
 packets, but does not show any activity with TCP packets.
>>> I never used HOMER sofar but when I saw your first message my thoughts
>>> was that this can't work in a simple way since for TCP you need to
>>> complete a 4 way handshake before you can start to send data.
>>>
>> Interesting. Are you referring to handshaking on the network stack or
>> SIP TCP TLS handshaking? I guess I can see it two ways.
>>
>> 1) if your talking about TCP/IP handshake, even though the SIP packet
>> comes into the mirror port on the host node, the kernel processing the
>> TCP packet is not establishing a valid connection due to no TCP
>> handshake because its only a monitor port, no transmit back, then the
>> kernel network stack does not pass the SIP TCP packet to the kamailio
>> process for capture because it drops the packet due to no valid
>> handshake?
>>
>> 2) the kernel network stack is passing the SIP TCP packet to the
>> kamailio process, but since kamailio cannot handshake back it drops
>> the packet and does not process through the sipcapture module. This
>> kinda breaks the whole capture ability for homer with SIP TCP. Using
>> ngrep, I see all SIP TCP packets, invite -->, trying <--, session
>> progress <--, request timeout <--, ack -->, etc...
>>
>> So how would I diagnose if the network stack is the culprit? Debugging
>> kamailio is pretty straight forward, setup and listening for SIP TCP,
>> but never see any processing of any TCP packets.
>>
>> Thanks.
>>
>> JR
>

-- 
JR Richardson
Engineering for the Masses
Chasing the Azeotrope

___
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] Kamailio not processing SIP TCP

2017-01-17 Thread Daniel-Constantin Mierla
Somehow is not clear for me how you have the configuration there ...
before commenting further, this needs to be clarified.

The node you presented the config is a sipcapture instance, right? What
is sending traffic to it? Is another kamailio with siptrace module? Or
the sipcature agent? Or you have a port mirroring in the router?

Cheers,
Daniel


On 17/01/2017 16:37, JR Richardson wrote:
>> On Mon, Jan 16, 2017 at 10:29:39AM -0600, JR Richardson wrote:
>>> Yes, I'm familiar with the methods sipcapture uses, I don't use HEP,
>>> using raw socket capture, I think this may be a sipcapture issue,
>>> debuging kamailio shows normal startup and processing of UDP SIP
>>> packets, but does not show any activity with TCP packets.
>> I never used HOMER sofar but when I saw your first message my thoughts
>> was that this can't work in a simple way since for TCP you need to
>> complete a 4 way handshake before you can start to send data.
>>
> Interesting. Are you referring to handshaking on the network stack or
> SIP TCP TLS handshaking? I guess I can see it two ways.
>
> 1) if your talking about TCP/IP handshake, even though the SIP packet
> comes into the mirror port on the host node, the kernel processing the
> TCP packet is not establishing a valid connection due to no TCP
> handshake because its only a monitor port, no transmit back, then the
> kernel network stack does not pass the SIP TCP packet to the kamailio
> process for capture because it drops the packet due to no valid
> handshake?
>
> 2) the kernel network stack is passing the SIP TCP packet to the
> kamailio process, but since kamailio cannot handshake back it drops
> the packet and does not process through the sipcapture module. This
> kinda breaks the whole capture ability for homer with SIP TCP. Using
> ngrep, I see all SIP TCP packets, invite -->, trying <--, session
> progress <--, request timeout <--, ack -->, etc...
>
> So how would I diagnose if the network stack is the culprit? Debugging
> kamailio is pretty straight forward, setup and listening for SIP TCP,
> but never see any processing of any TCP packets.
>
> Thanks.
>
> JR

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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


  1   2   3   4   5   6   7   8   9   10   >