[SR-Users] kamailio asterisk

Slava Bendersky volga629 at networklab.ca
Sat Feb 28 18:53:53 CET 2015


Hello Everyone, 
Trying resolve issue with NOTIFY and OPTIONS that it will be send to client through kamailio from asterisk. 

1. SUBSCRIBE record routes (works). On asterisk I see two records routes. 
2. NOTIFY from asterisk should re use Records routes from SUBSCRIBE and send it to the client (works). I see in asterisk logs Route record. 
3. NOTIFY received, but kamailio should send to client (not working). I see To: private Ip of the client or #4. 
4. NOTIFY|OPTIONS sips to sip translation (not working). I see To: <sip:sips: none substr_uri helps include $rz. 

Here SDP conversation. 

http://fpaste.org/191761/14251457/ 


Feb 28 12:54:58 canlvprx01 /usr/sbin/kamailio[12838]: ERROR: <core> [tcp_main.c:2740]: tcpconn_1st_send(): connect 192.168.88.252:5064 failed (RST) Connection refused 
Feb 28 12:54:58 canlvprx01 /usr/sbin/kamailio[12838]: ERROR: <core> [tcp_main.c:2750]: tcpconn_1st_send(): 192.168.88.252:5064: connect & send for 0x7f00ed4a1228 failed: Connection refused (111) 
Feb 28 12:54:58 canlvprx01 /usr/sbin/kamailio[12838]: ERROR: tm [../../forward.h:247]: msg_send(): tcp_send failed 
Feb 28 12:54:58 canlvprx01 /usr/sbin/kamailio[12838]: WARNING: tm [t_fwd.c:1608]: t_send_branch(): ERROR: t_send_branch: sending request on branch 0 failed 
Feb 28 12:54:58 canlvprx01 /usr/sbin/kamailio[12838]: ERROR: sl [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used: Unfortunately error on sending to next hop occurred (477/SL) 

Slava. 



From: "Slava Bendersky" <volga629 at networklab.ca> 
To: miconda at gmail.com 
Cc: "sr-users" <sr-users at lists.sip-router.org> 
Sent: Friday, February 27, 2015 8:40:10 AM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello Daniel, 
Here paste for gdb 

http://fpaste.org/191338/25043949/ 

I got REGISTER and SUBSCRIBE start working correctly I see on asterisk correct record routes and sip traffic flow, but when asterisk or client ( soft phone) send OPTIONS or NOTIFY can't get properly relay it. 

This is SUBSCRIBE route. 

<--- Transmitting (NAT) to 10.18.130.46:5060 ---> 
SIP/2.0 200 OK 
Via: SIP/2.0/UDP 10.18.130.46;branch=z9hG4bKf852.e0223f39c2bbad8366fdf1b7cb22b336.0;i=8;received=10.18.130.46;rport=5060 
Via: SIP/2.0/TLS 192.168.88.252:5062;received=Client public ip;branch=z9hG4bK0bbe1f7d27257bba9;rport=5062 
Record-Route: <sip:10.18.130.46;r2=on;lr=on;ftag=a185d974ec;nat=yes> 
Record-Route: <sip:PUBLIC_KAMAILIO_IP:5081;transport=tls;r2=on;lr=on;ftag=a185d974ec;nat=yes> 
From: "Slava Bendersky" <sips:10101 at networklab.ca>;tag=a185d974ec 
To: <sips:10101 at networklab.ca>;tag=as00757d3e 
Call-ID: b08adb1ad1804a83 
CSeq: 236711034 SUBSCRIBE 
Server: FPBX-2.11.0(11.15.1) 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE 
Supported: replaces, timer 
Expires: 3600 
Contact: <sip:10101 at 10.18.130.50:5060>;expires=3600 
Content-Length: 0 

Slava. 


From: "Daniel-Constantin Mierla" <miconda at gmail.com> 
To: "Slava Bendersky" <volga629 at networklab.ca> 
Cc: "sr-users" <sr-users at lists.sip-router.org> 
Sent: Friday, February 27, 2015 6:42:33 AM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello, 

I asked for the wrong command, as the bt full was already sent before -- I wanted the output from gdb for: 

p *tcpconn 

Daniel 


On 27/02/15 04:10, Slava Bendersky wrote: 



Hello Daniel, 
Here bt full from back trace. 

http://fpaste.org/191207/50064491/ 

Slava. 


From: "volga629" <volga629 at skillsearch.ca> 
To: miconda at gmail.com , "Slava Bendersky" <volga629 at networklab.ca> 
Cc: "sr-users" <sr-users at lists.sip-router.org> 
Sent: Thursday, February 26, 2015 9:56:48 PM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello Daniel, 
I tried $rz option on top of request route and that where I see wrong request uri like sip:sips : . And as far I can see it happenes only for SUBSCRIBE INVITE and NOTIFY. 

if($rz=="sips") { 
$ru = "sip" + $(ru{s.substr,4,0}); 
} 

Slava. 

Sent from mobile device typos are expected. 

From: Daniel-Constantin Mierla <miconda at gmail.com> 
Sent: Feb 25, 2015 1:04 PM 
To: Slava Bendersky 
Cc: sr-users 
Subject: Re: [SR-Users] kamailio asterisk 


Hello, 

On 25/02/15 17:19, Slava Bendersky wrote: 

BQ_BEGIN

Hello Daniel, 
substr you suggested didn't worked. 
See my previous email. 



your previous email didn't say anything about the results. That's why I asked. Be sure you don't have those spaces that are in the email you wrote. Also, I had more parenthesis in the parameter of the subst_uri(). 

Or you can try the alternative with: 

if($rz=="sips") { 
$ru = "sip" + $(ru{s.substr,4,0}); 
} 

I asked for more details from the backtrace to confirm that what I found is the cause for the crash in this case -- see one of my previous emails from today. 

Cheers, 
Daniel 

BQ_END

-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com 


_______________________________________________ 
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list 
sr-users at lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150228/73379324/attachment.html>


More information about the sr-users mailing list