Hello,

Here are the corrected attachments, I sent the email from Window's wordpad which set it to RTF by default.

Here are proper txt logs.

David

On 2010-07-05 17:47, David wrote:
Hello,

I upgraded to Kamailio 3.0 and the CANCEL is being sent after it receives a 100 Trying, as mentioned in RFC3261 section 9.

I stripped down the config file to the bare minimum so that it is easier to debug ( see attached kamailio.cfg )

I have included my config file as well as a packet sniff that was done with ngrep.

As you can see, the packets are in the correct order, but the Linksys is crying "Call leg Transaction does not exist" despite the fact that the CANCEL has ( as far as I can tell ) responded according to RFC3261. I compared the headers that are required by RFC ( The Request-URI, Call-ID, To, the numeric part of CSeq, and From header fields in the CANCEL request MUST be identical to those in the request being cancelled, including tags. ) but it still says Call Leg Transaction does not exist. ( see ngrep-sip-wip-310.log ).

If I send the CANCEL once the device is ringing, it works fine ( see sip-trace-good.log ).

If I send the CANCEL after the 100 Trying but before the 180 Ringing ( which is acceptable according to RFC3261 ), the device returns call leg incorrect.

This looks suspiciously like a bug in the WIP310, but I am not sure.

Can someone please shed some light on my situation?

Thanks,

David

On 2010-06-17 16:59, Andrei Pelinescu-Onciul wrote:
On Jun 17, 2010 at 16:39, David <kamailio....@spam.lublink.net> wrote:
  
Hello,

I had a look at RFC 3261, section 9.1. The trouble is that Kamailio
is answering "100 Trying" to the caller, so the it is ok for the
caller to send back a CANCEL request. Trouble is Kamailio forwards
the request to the called user even though the called user never
sent a provisional response.

Since the Kamailio server never received a provisional request, it
is therefore incorrect for it to forward the CANCEL request to the
called user. ( correct me if I am wrong ).
    
Try 3.0 (kamailio or sip-router). You can control how unreplied branches
are canceled, see
http://sip-router.org/docbook/sip-router/branch/master/modules/tm/tm.html#cancel_b_method


Andrei
  

_______________________________________________ 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


U 2010/07/05 17:33:23.324200 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
User-Agent: OmniVoIP Server 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 21842 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.


U 2010/07/05 17:33:23.726481 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
User-Agent: OmniVoIP Server 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 21842 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.


U 2010/07/05 17:33:24.704088 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
User-Agent: OmniVoIP Server 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 21842 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.


U 2010/07/05 17:33:26.211633 75.119.248.37:41995 -> kamailio_IP:5060
NOTIFY sip:mydomain.tld SIP/2.0.
Via: SIP/2.0/UDP 192.168.70.138:41995;branch=z9hG4bK-fcc6aed7.
From: "Barny Rubble" <sip:1...@mydomain.tld>;tag=d499bd109a8198bo0.
To: <sip:mydomain.tld>.
Call-ID: da4b3874-b8b43...@192.168.70.138.
CSeq: 17 NOTIFY.
Max-Forwards: 70.
Contact: "Barny Rubble" <sip:1...@75.119.248.37:41995>.
Event: keep-alive.
User-Agent: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:26.211997 kamailio_IP:5060 -> 75.119.248.37:41995
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
192.168.70.138:41995;branch=z9hG4bK-fcc6aed7;received=75.119.248.37.
From: "Barny Rubble" <sip:1...@mydomain.tld>;tag=d499bd109a8198bo0.
To: <sip:mydomain.tld>;tag=f8f2ab2c1295e90ed7dbb499b30f44b2.e349.
Call-ID: da4b3874-b8b43...@192.168.70.138.
CSeq: 17 NOTIFY.
Server: kamailio (3.0.2 (i386/linux)).
Content-Length: 0.
.


U 2010/07/05 17:33:26.217966 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:26.227780 kamailio_IP:5060 -> 75.119.248.37:41995
CANCEL sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Max-Forwards: 70.
Content-Length: 0.
.


U 2010/07/05 17:33:26.345810 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:26.352018 kamailio_IP:5060 -> 75.119.248.37:41995
CANCEL sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Max-Forwards: 70.
Content-Length: 0.
.


U 2010/07/05 17:33:26.352568 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:26.353018 kamailio_IP:5060 -> 75.119.248.37:41995
CANCEL sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Max-Forwards: 70.
Content-Length: 0.
.


U 2010/07/05 17:33:26.357767 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 481 Call Leg/Transaction Does Not Exist.
To: <sip:1...@mydomain.tld;user=phone>;tag=bfa3c33493d729b7i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:27.092210 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 481 Call Leg/Transaction Does Not Exist.
To: <sip:1...@mydomain.tld;user=phone>;tag=bfa3c33493d729b7i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:27.097415 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 481 Call Leg/Transaction Does Not Exist.
To: <sip:1...@mydomain.tld;user=phone>;tag=bfa3c33493d729b7i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:27.182523 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 180 Ringing.
To: <sip:1...@mydomain.tld;user=phone>;tag=22c305845610d9b8i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
Allow-Events: dialog.
.


U 2010/07/05 17:33:27.183085 kamailio_IP:5060 -> 75.119.248.37:41995
CANCEL sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Max-Forwards: 70.
Content-Length: 0.
.


U 2010/07/05 17:33:27.286310 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 481 Call Leg/Transaction Does Not Exist.
To: <sip:1...@mydomain.tld;user=phone>;tag=bfa3c33493d729b7i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 CANCEL.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.




















U 2010/07/05 17:33:35.857218 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 487 Request Terminated.
To: <sip:1...@mydomain.tld;user=phone>;tag=22c305845610d9b8i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bKd9a95e8979ac3e94;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:33:35.857569 kamailio_IP:5060 -> 75.119.248.37:41995
ACK sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bK83a1.17c2e102.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=17965137bdd0bbb1.
To: <sip:1...@mydomain.tld;user=phone>;tag=22c305845610d9b8i0.
Call-ID: 5c8d7d20eca00...@192.168.70.127.
CSeq: 38400 ACK.
Max-Forwards: 70.
Content-Length: 0.
U 2010/07/05 17:42:20.515264 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
User-Agent: Grandstream GXP2000 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 28240 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.


U 2010/07/05 17:42:21.016205 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
User-Agent: Grandstream GXP2000 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 28240 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.


U 2010/07/05 17:42:22.016040 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
User-Agent: Grandstream GXP2000 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 28240 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.







U 2010/07/05 17:42:23.890750 kamailio_IP:5060 -> 75.119.248.37:41995
INVITE sip:1...@75.119.248.37:41995 SIP/2.0.
Record-Route: <sip:kamailio_IP;lr=on>.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
To: <sip:1...@mydomain.tld;user=phone>.
Contact: <sip:1...@75.119.248.37:22440;transport=udp;user=phone>.
Supported: replaces, timer, path.
P-Early-Media: Supported.
Session-Expires: 180.
Min-SE: 90.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
User-Agent: Grandstream GXP2000 1.2.3.5.
Max-Forwards: 70.
Allow: 
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.
Content-Type: application/sdp.
Content-Length: 239.
.
v=0.
o=110 8000 8000 IN IP4 75.119.248.37.
s=SIP Call.
c=IN IP4 75.119.248.37.
t=0 0.
m=audio 28240 RTP/AVP 18 0 101.
a=sendrecv.
a=rtpmap:18 G729/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-11.


U 2010/07/05 17:42:24.010176 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:42:24.265948 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:42:24.272275 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:42:24.278970 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 100 Trying.
To: <sip:1...@mydomain.tld;user=phone>.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.



U 2010/07/05 17:42:28.640544 75.119.248.37:41995 -> kamailio_IP:5060
NOTIFY sip:mydomain.tld SIP/2.0.
Via: SIP/2.0/UDP 192.168.70.138:41995;branch=z9hG4bK-a6453059.
From: "Barny Rubble" <sip:1...@mydomain.tld>;tag=d499bd109a8198bo0.
To: <sip:mydomain.tld>.
Call-ID: da4b3874-b8b43...@192.168.70.138.
CSeq: 43 NOTIFY.
Max-Forwards: 70.
Contact: "Barny Rubble" <sip:1...@75.119.248.37:41995>.
Event: keep-alive.
User-Agent: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:42:28.641136 kamailio_IP:5060 -> 75.119.248.37:41995
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
192.168.70.138:41995;branch=z9hG4bK-a6453059;received=75.119.248.37.
From: "Barny Rubble" <sip:1...@mydomain.tld>;tag=d499bd109a8198bo0.
To: <sip:mydomain.tld>;tag=f8f2ab2c1295e90ed7dbb499b30f44b2.f4eb.
Call-ID: da4b3874-b8b43...@192.168.70.138.
CSeq: 43 NOTIFY.
Server: kamailio (3.0.2 (i386/linux)).
Content-Length: 0.
.


U 2010/07/05 17:42:28.820809 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 180 Ringing.
To: <sip:1...@mydomain.tld;user=phone>;tag=8d2af87d5e612ea9i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
Allow-Events: dialog.
.



























U 2010/07/05 17:42:30.641345 kamailio_IP:5060 -> 75.119.248.37:41995
CANCEL sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
To: <sip:1...@mydomain.tld;user=phone>.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 CANCEL.
Max-Forwards: 70.
Content-Length: 0.
.






U 2010/07/05 17:42:30.771772 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 487 Request Terminated.
To: <sip:1...@mydomain.tld;user=phone>;tag=8d2af87d5e612ea9i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 INVITE.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Via: SIP/2.0/UDP 
192.168.70.127:22440;received=75.119.248.37;branch=z9hG4bK8f706a8a2f9b20e3;rport=22440.
Record-Route: <sip:kamailio_IP;lr=on>.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.


U 2010/07/05 17:42:30.772111 kamailio_IP:5060 -> 75.119.248.37:41995
ACK sip:1...@75.119.248.37:41995 SIP/2.0.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
To: <sip:1...@mydomain.tld;user=phone>;tag=8d2af87d5e612ea9i0.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 ACK.
Max-Forwards: 70.
Content-Length: 0.
.


U 2010/07/05 17:42:30.777105 75.119.248.37:41995 -> kamailio_IP:5060
SIP/2.0 200 OK.
To: <sip:1...@mydomain.tld;user=phone>;tag=8d2af87d5e612ea9i0.
From: "Barny Rubble" <sip:1...@mydomain.tld;user=phone>;tag=9f46dae23c8c8d63.
Call-ID: bb39946c73f6f...@192.168.70.127.
CSeq: 15772 CANCEL.
Via: SIP/2.0/UDP kamailio_IP;branch=z9hG4bKf69f.a8e6e49.0.
Server: Cisco/WIP310-5.0.11(10301355.
Content-Length: 0.
.
debug=4
log_stderror=yes

memdbg=5
memlog=5

log_facility=LOG_LOCAL0

fork=yes
children=4

auto_aliases=yes


port=5060

advertised_address=72.55.182.125

mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"

loadmodule "db_mysql.so"
loadmodule "tm.so" # transactions, t_relay()
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "usrloc.so"
loadmodule "siputils.so"
loadmodule "textops.so"
loadmodule "registrar.so"
loadmodule "xlog.so"
loadmodule "ctl.so"
loadmodule "nathelper.so"

loadmodule "avpops.so"

### Omnity major module additions end ###

# ----- rr params -----
# add value to ;lr param to cope with most of the UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)

modparam("usrloc", "db_mode",   1) # @todo : Review best DB_MODE
modparam("usrloc", "nat_bflag", 6) 

# Long delay for retransmission absorption, see ticket #12759
# RFC asks for 30 seconds, not the default 5 seconds!
modparam("tm", "wt_timer", 30000 )

# @todo : Needed for SIP ping in nathelper
modparam("registrar", "received_avp", "$avp(i:801)")

# MySQL
modparam("db_mysql", "ping_interval", 30)
modparam("db_mysql", "auto_reconnect", 1)

# view must have uuid, username, attribute, value, type (and domain)
modparam("avpops", "avp_table", "avptable")

modparam("usrloc", "db_url", 
"mysql://kamailio_dev:kamailio4n...@192.168.41.105/kamailio_dev")
modparam("avpops", "db_url", 
"mysql://kamailio_dev:kamailio4n...@192.168.41.105/kamailio_dev")

# main request routing logic

route{

     xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");

        # NAT detection
        force_rport();
        if (nat_uac_test("19")) {
                if (method=="REGISTER") {
                        fix_nated_register();
                } else {
                        fix_nated_contact();
                }
                setflag(5);
        }


        if (method == CANCEL) {
                if (!t_relay_cancel()) {  # implicit drop if relaying was 
successful,
                                          # nothing to do

                        # corresponding INVITE transaction found but error 
occurred
                        sl_reply("500", "Internal Server Error");
                        drop;
                }
                # bad luck, corresponding INVITE transaction is missing,
                # do the same as for INVITEs
        }


        # authentication
     # Register has it's own auth method
        if (is_method("SUBSCRIBE") )
     {
          sl_send_reply(403, 'Go away');
          exit ;
     }
        if (is_method("REGISTER"))
     {
          route(REGISTER);
     }

        if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        if (is_method("BYE")) {
                                setflag(1); # do accounting ...
                                setflag(3); # ... even if the transaction fails
                        }
                        route(T_RELAY);
                } else {
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        # non loose-route, but stateful ACK; 
must be an ACK after a 487 or e.g. 404 from upstream server
                                        t_relay();
                                        exit;
                                } else {
                                        # ACK without matching transaction ... 
ignore and discard.\n");
                                        exit;
                                }
                        }
                        sl_send_reply("404","Not here");
                }
                exit;
        }

        #initial requests

     if ( is_method('NOTIFY' ) )
     {
          sl_send_reply('200', 'OK');
          exit; 
     }
     if (is_method("OPTIONS"))
     {
          if (uri==myself) {
               if ((method==OPTIONS) && (! uri=~"sip:....@]+.*")) {
                    options_reply();
               }    
          }    
     }    

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

     t_check_trans();

     record_route();

     if ( !lookup('location') )
     {
          sl_send_reply('404', 'Not found');
          exit; 
     }
     route(T_RELAY);
}

route[T_RELAY] {

        if (!t_relay()) {
                sl_reply_error();
        }
}
route[REGISTER] {
     # Left to handle; unregister

     if (!save("location" ) ) # , "0x04"))
     {
          xlog("L_ERR", "Saving contact failed - M=$rm RURI=$ru F=$fu T=$tu 
IP=$si ID=$ci\n");
          sl_reply_error();
          exit;
     }

     xlog("L_INFO", "Registration successful - M=$rm RURI=$ru F=$fu T=$tu 
IP=$si ID=$ci\n");
     exit;
}
_______________________________________________
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

Reply via email to