JsSIP icon indicating copy to clipboard operation
JsSIP copied to clipboard

jssip 0.3.0-devel ignores captilization in GRUU URI

Open jlightfoot opened this issue 13 years ago • 10 comments

Using the demo at tryit.jssip.net, I noticed the ACK to the 200OK on call setup wasn't being routed by my proxy. It appears the cause is the failure on the part of jssip to capitalize characters when generating the ACK's Request URI.

The relevant contact header parameter in the 200 from my REGISTER is... pub-gruu="sip:[email protected];gr"

The ACK request line is... ACK sip:[email protected];gr SIP/2.0

jlightfoot avatar Feb 15 '13 19:02 jlightfoot

It seems a bug. Will be fixed.

Thanks a lot.

ibc avatar Feb 16 '13 00:02 ibc

Contact header param values are downcased when parsed. This is an error. It's fixed in my local repo but I want to do some other checks before pushing it.

ibc avatar Feb 16 '13 11:02 ibc

Thanks, Iñaki. I'll check the fix against my proxy when it's pushed.

jlightfoot avatar Feb 16 '13 15:02 jlightfoot

@jlightfoot it is fixed in master (e82d60a4621bfa916c4b04e292948a5b997ad5d7), could you please re-check? it should work now. Thanks a lot!

ibc avatar Feb 16 '13 15:02 ibc

All the addresses look good to me but jssip issues a 404 on the final ACK. Here are the pertinent messages from the receiving end:

JsSIP | EVENT EMITTER | emitting event started jssip-0.3.0-devel.js:176 JsSIP | TRANSPORT | sending WebSocket message:

SIP/2.0 200 OK Record-Route: sip:[email protected]:10080;transport=ws;lr;ovid=dd87f660 Record-Route: sip:91.121.137.85:7060;transport=tcp;lr;ovid=dd87f660 Record-Route: sip:71.106.163.223:5060;lr;sipXecs-CallDest=INT;sipXecs-rs=%2Aauth%7E.%2Afrom%7EZXRmc2FhaTBrcQ%60%60.900_ntap%2Aid%7EMTY1OTQtMA%60%60%21afa96401522fcfdbc112356f34e323ac Record-Route: sip:91.121.137.85:7060;transport=tcp;lr;ovid=dd87f660 Record-Route: sip:[email protected]:10080;transport=ws;lr;ovid=dd87f660 Via: SIP/2.0/WS 91.121.137.85:10080;branch=z9hG4bK73f3bd97efcd90564080361627c3922fa006e5bb;rport Via: SIP/2.0/TCP 71.106.163.223:5060;branch=z9hG4bK-XX-0011wvCtekhFyrni39RsOMPNFw Via: SIP/2.0/UDP 192.168.15.200;branch=z9hG4bK-XX-000eOLUWm8KFD2_ReC_xNKCIog~wzhJmqdKNrPTDfm3edGWuQ;id=16594-0 Via: SIP/2.0/TCP 91.121.137.85:7060;branch=z9hG4bK176ba16a3077d7935b67479c3509d53b596bdca6;rport=40417 Via: SIP/2.0/WS kce5livignes.invalid;branch=z9hG4bK2183672 To: sip:[email protected];tag=1cvtpv5gbo From: "jl" sip:[email protected];tag=etfsaai0kq Call-ID: 2kvar2lnf6j2pp2tjv9a CSeq: 1335 INVITE Contact: sip:[email protected];gr Content-Type: application/sdp Content-Length: 1734

v=0 o=- 503948108 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video m=audio 50411 RTP/SAVPF 103 104 111 0 8 106 105 13 126 c=IN IP4 71.105.88.45 a=rtcp:1 IN IP4 0.0.0.0 a=candidate:3178203907 1 udp 2113937151 192.168.1.194 62478 typ host generation 0 a=candidate:3178203907 1 udp 1677729535 71.105.88.45 50411 typ srflx generation 0 a=ice-ufrag:gp/T1Rk45kbjx89q a=ice-pwd:6iW5yrFPlfbCRUG9/jwdbBB4 a=sendrecv a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:wTxKlZ8lHpbrnoQZvev6phZWN/7s79H5wlzd7aC0 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:111 opus/48000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:126 telephone-event/8000 a=ssrc:845605416 cname:pgxqxMRZYLnoFbbZ a=ssrc:845605416 msid:gTAJyzmEL2ejNzY8mS27fIHbAs6OfPWf61zg a0 a=ssrc:845605416 mslabel:gTAJyzmEL2ejNzY8mS27fIHbAs6OfPWf61zg a=ssrc:845605416 label:gTAJyzmEL2ejNzY8mS27fIHbAs6OfPWf61zga0 m=video 50411 RTP/SAVPF 100 101 102 c=IN IP4 71.105.88.45 a=rtcp:1 IN IP4 0.0.0.0 a=candidate:3178203907 1 udp 2113937151 192.168.1.194 62478 typ host generation 0 a=candidate:3178203907 1 udp 1677729535 71.105.88.45 50411 typ srflx generation 0 a=ice-ufrag:gp/T1Rk45kbjx89q a=ice-pwd:6iW5yrFPlfbCRUG9/jwdbBB4 a=sendrecv a=mid:video a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:wTxKlZ8lHpbrnoQZvev6phZWN/7s79H5wlzd7aC0 a=rtpmap:100 VP8/90000 a=rtpmap:101 red/90000 a=rtpmap:102 ulpfec/90000 a=ssrc:2550279213 cname:pgxqxMRZYLnoFbbZ a=ssrc:2550279213 msid:gTAJyzmEL2ejNzY8mS27fIHbAs6OfPWf61zg v0 a=ssrc:2550279213 mslabel:gTAJyzmEL2ejNzY8mS27fIHbAs6OfPWf61zg a=ssrc:2550279213 label:gTAJyzmEL2ejNzY8mS27fIHbAs6OfPWf61zgv0

jssip-0.3.0-devel.js:573 JsSIP | TRANSPORT | received WebSocket text message:

ACK sip:[email protected];gr SIP/2.0 Via: SIP/2.0/WS 91.121.137.85:10080;branch=z9hG4bKd188c4efa82355be769950fcb451f68099ee248d Via: SIP/2.0/TCP 71.106.163.223:5060;branch=z9hG4bK-XX-0013F6eil76RQrhvcgad5SuPig Via: SIP/2.0/UDP 91.121.137.85:7060;branch=z9hG4bK351fe99110867f5b266d7e73dd78a03e1849d8e1 Via: SIP/2.0/WS kce5livignes.invalid;branch=z9hG4bK7632628 Max-Forwards: 8 To: sip:[email protected];tag=1cvtpv5gbo From: "jl" sip:[email protected];tag=etfsaai0kq Call-ID: 2kvar2lnf6j2pp2tjv9a CSeq: 1335 ACK Supported: path, outbound, gruu User-Agent: JsSIP 0.3.0-devel Content-Length: 0 Date: Sun, 17 Feb 2013 04:43:56 GMT

jssip-0.3.0-devel.js:725 JsSIP | UA | Request-URI does not point to us jssip-0.3.0-devel.js:5287 JsSIP | TRANSPORT | sending WebSocket message:

SIP/2.0 404 Not Found Via: SIP/2.0/WS 91.121.137.85:10080;branch=z9hG4bKd188c4efa82355be769950fcb451f68099ee248d Via: SIP/2.0/TCP 71.106.163.223:5060;branch=z9hG4bK-XX-0013F6eil76RQrhvcgad5SuPig Via: SIP/2.0/UDP 91.121.137.85:7060;branch=z9hG4bK351fe99110867f5b266d7e73dd78a03e1849d8e1 Via: SIP/2.0/WS kce5livignes.invalid;branch=z9hG4bK7632628 To: sip:[email protected];tag=1cvtpv5gbo From: "jl" sip:[email protected];tag=etfsaai0kq Call-ID: 2kvar2lnf6j2pp2tjv9a CSeq: 1335 ACK Content-Length: 0

jssip-0.3.0-devel.js:573

jlightfoot avatar Feb 17 '13 05:02 jlightfoot

The problem is detected. It will be fixed soon.

Regards.

jmillan avatar Feb 17 '13 08:02 jmillan

@jlightfoot,

The proxy should not route the ACK with such Ruri. It must be replaced with the registered contact.

http://tools.ietf.org/html/rfc5627#section-6.1

6.1. Request Targeting

  Note that the "gr" URI parameter is retained just for the purposes of
   finding the GRUU in the location service; if a match is found, the
   Request-URI will be rewritten with the registered contacts, replacing
   the GRUU and its "gr" URI parameter.  The "gr" URI parameter is not
   carried forward into the rewritten Request-URI.

Regards

jmillan avatar Feb 17 '13 10:02 jmillan

@jmillan in any case, JsSIP should not reply to an ACK ;-)

saghul avatar Feb 17 '13 10:02 saghul

That is right ;-)

jmillan avatar Feb 17 '13 10:02 jmillan

Fixed in 5e7d815 :-)

Thanks @saghul

jmillan avatar Feb 17 '13 10:02 jmillan