UA Request-URI does not point to us

14 views
Skip to first unread message

Raj

unread,
Mar 22, 2022, 10:35:49 PMMar 22
to JsSIP
Hello all,

I am facing an issue with JsSIP not recognizing replies from Kamailio. the call sequence goes as follows:


INVITE ----------------------------->
                <-------------------------------SIP/2.0 100 Trying
                <-------------------------------SIP/2.0 180 Ringing
                <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                 <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                 <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                <-------------------------------SIP/2.0 200 OK
ACK        -------------------------------->
                <-------------------------------BYE
404 Not Found        ---------------------->

When JsSIP receives ACK it prints an error: JsSIP:UA Request-URI does not point to us

From another thread with similar issue at https://groups.google.com/g/sip_js/c/uiaXS_qc2n8 it could be that JsSIP is not recognizing the GRUU is pointing towards it.

In the INVITE message I can see a line "Record-Route: <sip:127.0.0.8;line=sr-N6IAzBFAOBFAOBF7z.1LMBu5oB1dNBu5oB1qCRPQMBIBOEKBWBV*>" Is this normal?

I am at a loss to figure this out, and any help or hint to find out what could be wrong here would be very helpful.

The SIP messages are as follows, as seen from JsSIP:

Send ->
REGISTER sip:erx-staging-q01.mydomain.com SIP/2.0
Via: SIP/2.0/WSS ol3dhprvu7jv.invalid;branch=z9hG4bK3674021
Max-Forwards: 69
To: <sip:Stg-CQD0r...@erx-staging-q01.mydomain.com>
From: "User" <sip:Stg-CQD0r...@erx-staging-q01.mydomain.com>;tag=65u34oje2s
Call-ID: b624vmbvuioma46354gmi5
CSeq: 1 REGISTER
Contact: <sip:93he...@ol3dhprvu7jv.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33>";expires=600
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: path,gruu,outbound
User-Agent: JsSIP 3.9.0
Content-Length: 0

Receive <-
SIP/2.0 200 OK
Via: SIP/2.0/WSS ol3dhprvu7jv.invalid;branch=z9hG4bK3674021;rport=23618;received=145.15.191.170
To: <sip:Stg-CQD0r...@erx-staging-q01.mydomain.com>;tag=ee7bee7ecdf2759680598685ea71a5eb.d5e40000
From: "User" <sip:Stg-CQD0r...@erx-staging-q01.mydomain.com>;tag=65u34oje2s
Call-ID: b624vmbvuioma46354gmi5
CSeq: 1 REGISTER
Contact: <sip:93he...@ol3dhprvu7jv.invalid;transport=ws>;expires=600;received="sip:145.15.191.170:23618;transport=ws";pub-gruu="sip:stg-cqd0r...@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33";temp-gruu="sip:uloc-623966d2-1b...@erx-staging-q01.mydomain.com;gr";+sip.instance="<urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33>";reg-id=1
Server: TLS Kamailio Server
Content-Length: 0

Receive <-
INVITE sip:93he...@ol3dhprvu7jv.invalid;transport=ws SIP/2.0
Record-Route: <sip:68.19.159.72:443;transport=ws;r2=on;lr=on;did=29c.ec62>
Record-Route: <sip:127.0.0.8;line=sr-N6IAzBFAOBFAOBF7z.1LMBu5oB1dNBu5oB1qCRPQMBIBOEKBWBV*>
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bKc3f.2a0c8eb470c9427d6def7b8eaa3e3f8b.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSI6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCEKIMxWr3BN6O.gqMlq1WxerMJ4ZW6aqO.MszSV6z.PwMlqAgc**
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
To: <sip:Stg-CQD0r...@10.10.1.9>
Contact: <sip:127.0.0.8;line=sr-N6IAzEtlpSKLC9WnPxFAOBFAOBF7M.y-WlyAMy**>
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19353 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 69
User-Agent: Asterisk PBX 18.8.0
Content-Type: application/sdp
Content-Length:   881
<skipping SDP>

Send ->
SIP/2.0 100 Trying
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bKc3f.2a0c8eb470c9427d6def7b8eaa3e3f8b.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSI6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCEKIMxWr3BN6O.gqMlq1WxerMJ4ZW6aqO.MszSV6z.PwMlqAgc**
To: <sip:Stg-CQD0r...@10.10.1.9>
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19353 INVITE
Supported: timer,gruu,ice,replaces,outbound
Content-Length: 0

Send ->
SIP/2.0 180 Ringing
Record-Route: <sip:68.19.159.72:443;transport=ws;r2=on;lr=on;did=29c.ec62>
Record-Route: <sip:127.0.0.8;line=sr-N6IAzBFAOBFAOBF7z.1LMBu5oB1dNBu5oB1qCRPQMBIBOEKBWBV*>
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bKc3f.2a0c8eb470c9427d6def7b8eaa3e3f8b.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSI6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCEKIMxWr3BN6O.gqMlq1WxerMJ4ZW6aqO.MszSV6z.PwMlqAgc**
To: <sip:Stg-CQD0r...@10.10.1.9>;tag=6gc6gshfkb
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19353 INVITE
Contact: <sip:stg-cqd0r...@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33>
Supported: timer,gruu,ice,replaces,outbound
Content-Length: 0

Send ->
SIP/2.0 200 OK
Record-Route: <sip:68.19.159.72:443;transport=ws;r2=on;lr=on;did=29c.ec62>
Record-Route: <sip:127.0.0.8;line=sr-N6IAzBFAOBFAOBF7z.1LMBu5oB1dNBu5oB1qCRPQMBIBOEKBWBV*>
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bKc3f.2a0c8eb470c9427d6def7b8eaa3e3f8b.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSI6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCEKIMxWr3BN6O.gqMlq1WxerMJ4ZW6aqO.MszSV6z.PwMlqAgc**
To: <sip:Stg-CQD0r...@10.10.1.9>;tag=6gc6gshfkb
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19353 INVITE
Contact: <sip:stg-cqd0r...@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33>
Session-Expires: 1800;refresher=uas
Supported: timer,gruu,ice,replaces,outbound
Content-Type: application/sdp
Content-Length: 947

Receive <-
ACK sip:stg-cqd0r...@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33 SIP/2.0
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bKc3f.244f565f3d688006fb9c33138458f554.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSW6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCEjuMlWEWB0rO.aJgBc1WSPAMG4Z3RjLO.pqWSPlMRFwWEergc**
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
To: <sip:Stg-CQD0r...@10.10.1.9>;tag=6gc6gshfkb
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19353 ACK
Max-Forwards: 69
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0

tryit-jssip.js:8 JsSIP:UA Request-URI does not point to us +40s

Receive <-
BYE sip:stg-cqd0r...@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33 SIP/2.0
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bK93f.8fbee7f4747c4d72cc73b403fe51c081.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSW6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCBKq36PfMBysO.cA3631Wx3fMmuJ36FuO.PuWEFsgxc4MSKB3A**
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
To: <sip:Stg-CQD0r...@10.10.1.9>;tag=6gc6gshfkb
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19354 BYE
Reason: Q.850;cause=16
Max-Forwards: 69
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0

tryit-jssip.js:8 JsSIP:UA Request-URI does not point to us +3s

Send ->
SIP/2.0 404 Not Found
Via: SIP/2.0/WSS 68.19.159.72:443;branch=z9hG4bK93f.8fbee7f4747c4d72cc73b403fe51c081.0
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.y7M.y7MmZfMxvwMxyAzweI36KYpEKqH.FAOBFAOBF7M.yXKFcQgSW6zweAowe4H.NAMxyX3heroEWvH9vsCFN43q1PCBKq36PfMBysO.cA3631Wx3fMmuJ36FuO.PuWEFsgxc4MSKB3A**
To: <sip:Stg-CQD0r...@10.10.1.9>;tag=6gc6gshfkb
From: "User2" <sip:97478...@erx-staging-q01.mydomain.com>;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
Call-ID: 518500d1-9813-4af8-a249-981ca2ee8a4b
CSeq: 19354 BYE
Content-Length: 0

Raj

unread,
Mar 24, 2022, 12:15:10 PMMar 24
to JsSIP
Did some more digging into the source code of JsSIP. The condition that triggers the error message is:
https://github.com/versatica/JsSIP/blob/3ab1fa7c8e09231c41ca21657bf962323906d5fe/lib/UA.js#L560
/**
* Request reception
*/
receiveRequest(request)
{
const method = request.method;

// Check that request URI points to us.
if (request.ruri.user !== this._configuration.uri.user &&
request.ruri.user !== this._contact.uri.user)
{
logger.debug('Request-URI does not point to us');
if (request.method !== JsSIP_C.ACK)
{
request.reply_sl(404);
}

return;
}

If I understand correctly if ruri.user is neither user in config or user in contact the request gets rejected.

R-URI is:

ACK sip:stg-cqd0r...@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33 SIP/2.0



The SIP URI configured in tryjsip is sip:Stg-CQD0r...@erx-staging-q01.mydomain.com


This does not match, but if I change the SIP URI to

sip:stg-cqd0r...@erx-staging-q01.mydomain.com (all small case) it works fine. I am not sure if this is a bug or violates the any RFC
Reply all
Reply to author
Forward
0 new messages