[SR-Users] Kamailio not sending reply

Jeremy Betts jeremy.betts at freevoiceusa.com
Thu May 26 18:47:40 CEST 2016


Hello,

I'm having an issue where kamailio is not sending the failure reply as I 
would expect when receiving calls from a certain provider. Kamailio 
sends the 403 response on calls from other providers. The big difference 
I see is that the "problem" provider is using compact headers. I am 
trying to force the 403 response to be sent for testing purposes but I 
just can't get it to reply to this one provider.

I've included traces and configuration excerpts below. Any help is much 
appreciated!

Problem Call (No Reply Sent):

U 63.79.178.192:5060 -> 184.171.164.100:5060
INVITE sip:+19727289377 at 184.171.164.100;transport=UDP;user=phone SIP/2.0.
v: SIP/2.0/UDP 
63.79.178.192:5060;branch=z9hG4bK9a2b97bc805e6a3b73b43e3de4150da5.1d819013.
Record-Route: <sip:63.79.178.192;lr>.
f: 
<sip:+17143258018 at 199.173.94.144:5060;user=phone>;tag=-45026-41c7bce-729616d4-41c7bce.
t: <sip:+19727289377 at 63.79.178.192:5060;user=phone>.
i: b03a96e8905eadc713c441c7bcef439f1124b7ca791c2679c0-0086-5719.
CSeq: 1 INVITE.
Allow: ACK,BYE,CANCEL,INVITE,OPTIONS,INFO,SUBSCRIBE,REFER,NOTIFY,PRACK.
v: SIP/2.0/UDP 
SCR9:5060;maddr=199.173.94.144;branch=z9hG4bK-41c7bce-f439f11-21b78f96;received=199.173.94.144.
Max-Forwards: 27.
m: <sip:199.173.94.144:5060;transport=UDP>.
k: 100rel, resource-priority, replaces.
c: application/sdp.
l: 235.
P-Asserted-Identity: <sip:+17143258018 at 63.79.178.192;user=phone>.
Privacy: none.
.
v=0.
o=PVG 1464277233580 1464277233580 IN IP4 199.173.68.106.
s=-.
p=+1 6135555555.
c=IN IP4 199.173.68.106.
t=0 0.
m=audio 55380 RTP/AVP 18 0 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:20.
a=fmtp:18 annexb=no.

#
U 63.79.178.192:5060 -> 184.171.164.100:5060
ACK sip:+19727289377 at 184.171.164.100;transport=UDP;user=phone SIP/2.0.
v: SIP/2.0/UDP 
63.79.178.192:5060;branch=z9hG4bK9a2b97bc805e6a3b73b43e3de4150da5.1d819013.
f: 
<sip:+17143258018 at 199.173.94.144:5060;user=phone>;tag=-45026-41c7bce-729616d4-41c7bce.
t: 
<sip:+19727289377 at 63.79.178.192:5060;user=phone>;tag=b1eb89aa72a4b2a406f6fb21bbd3e03f.1aac.
i: b03a96e8905eadc713c441c7bcef439f1124b7ca791c2679c0-0086-5719.
CSeq: 1 ACK.
l: 0.
Max-Forwards: 27.
.

Successful Call (Reply Sent):

#
U 64.136.173.31:5060 -> 184.171.164.100:5066
INVITE sip:7146466334 at 184.171.164.100:5066 SIP/2.0.
Via: SIP/2.0/UDP 64.136.173.31:5060;branch=z9hG4bK1sansay3408006464rdb14345.
Record-Route: 
<sip:sansay3408006464rdb14345 at 64.136.173.31:5060;lr;transport=udp>.
To: <sip:7146466334 at 184.171.164.100>.
From: <sip:17143258018 at 64.136.173.31>;tag=sansay3408006464rdb14345.
Call-ID: 1089333243-0-3123809354 at 64.136.173.226.
CSeq: 1 INVITE.
Contact: <sip:17143258018 at 64.136.173.31:5060>.
Supported: timer.
Session-Expires: 1800;refresher=uac.
Min-SE: 90.
P-Asserted-Identity: <sip:17143258018 at 192.168.20.76>.
Privacy: none.
Expires: 120.
Max-Forwards: 67.
Content-Type: application/sdp.
Content-Length: 274.
.
v=0.
o=Sansay-VSXi 188 1 IN IP4 64.136.173.31.
s=Session Controller.
c=IN IP4 69.85.185.142.
t=0 0.
m=audio 37970 RTP/AVP 0 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.
a=ptime:20.


#
U 184.171.164.100:5066 -> 64.136.173.31:5060
SIP/2.0 403 DID Lookup Failed.
Via: SIP/2.0/UDP 64.136.173.31:5060;branch=z9hG4bK1sansay3408006464rdb14345.
To: 
<sip:7146466334 at 184.171.164.100>;tag=b1eb89aa72a4b2a406f6fb21bbd3e03f.d2ec.
From: <sip:17143258018 at 64.136.173.31>;tag=sansay3408006464rdb14345.
Call-ID: 1089333243-0-3123809354 at 64.136.173.226.
CSeq: 1 INVITE.
Server: x-Freevoice SIP Proxy 4.21.
Content-Length: 0.
.

#
U 64.136.173.31:5060 -> 184.171.164.100:5066
ACK sip:7146466334 at 184.171.164.100:5066 SIP/2.0.
Via: SIP/2.0/UDP 64.136.173.31:5060;branch=z9hG4bK1sansay3408006464rdb14345.
To: 
<sip:7146466334 at 184.171.164.100>;tag=b1eb89aa72a4b2a406f6fb21bbd3e03f.d2ec.
From: <sip:17143258018 at 64.136.173.31>;tag=sansay3408006464rdb14345.
Call-ID: 1089333243-0-3123809354 at 64.136.173.226.
CSeq: 1 ACK.
Max-Forwards: 70.
Content-Length: 0.

Kamailio Config:
request_route {

         # per request initial checks
         route(REQINIT);

         # NAT detection
         #route(NATDETECT);

         # handle requests within SIP dialogs
         route(WITHINDLG);

         ### only initial requests (no To tag)

         # CANCEL processing
         if (is_method("CANCEL"))
         {
                 setflag(FLT_ACCFAILED);
                 if (t_check_trans())
                         t_relay();
                 exit;
         }

         t_check_trans();

         if(is_method("INVITE")||is_method("MESSAGE")){
                 route(ORIGINATE);
                 #route(FROMAST);
         }


route[ORIGINATE] {

         sl_send_reply("403", "DID Lookup Failed");
         exit;
}


Jeremy Betts

<https://www.youtube.com/user/FreevoiceLLC>
<https://www.youtube.com/user/FreevoiceLLC>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160526/88022194/attachment.html>


More information about the sr-users mailing list