I'm sending SIP requests to Twilio SIP Trunk, using Node.js and Kirm/Sip module, I'm trying to cancel the call after receiving '180 Ringing' response.
The problem is that the [CANCEL] SIP request is sent but the server never replies with status '200 Canceling' like it should, instead it replies with a TCP [ACK] and the call remains ringing..
The Cancel request is a copy from the Invite request but changed the Method and CSec Method.
INVITE request:
INVITE sip:123456789@sample.pstn.ie1.twilio.com SIP/2.0
From: <sip:test@sample.pstn.ie1.twilio.com>;tag=168502
To: <sip:123456789@sample.pstn.ie1.twilio.com>
Call-ID: 284466
CSeq: 969240 INVITE
Content-Type: application/sdp
Contact: <sip:test@192.168.61.4>
Via: SIP/2.0/TCP 192.168.61.4:61244;branch=z9hG4bK847573
Content-Length: 363
Proxy-Authorization: Digest realm="sip.twilio.com",username="test",nonce="XXXX",uri="sip:123456789@sample.pstn.ie1.twilio.com",nc=00000001,cnonce="XXXXXXX",qop=auth,opaque="XXXXXXX",response="XXXXXXX"
v=0
o=- 3700480907 3700480907 IN IP4 192.168.61.4
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4012 RTP/AVP 123 8 0 101
c=IN IP4 192.168.61.4
b=TIAS:64000
a=rtcp:4013 IN IP4 192.168.61.4
a=sendrecv
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=16000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
CANCEL request:
CANCEL sip:123456789@sample.pstn.ie1.twilio.com SIP/2.0
CSeq: 969240 CANCEL
Call-ID: 284466
From: <sip:test@sample.pstn.ie1.twilio.com>;tag=168502
To: <sip:123456789@sample.pstn.ie1.twilio.com>
Via: SIP/2.0/TCP 192.168.61.4:61244;branch=z9hG4bK847573
Content-Length: 0
So any ideas?
Thanks
via amamdouh
No comments:
Post a Comment