Did some more digging into the source code of JsSIP. The condition that triggers the error
message is:
/**
* 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-cqd0r2-10020005@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-CQD0r2-10020005@erx-staging-q01.mydomain.com
This does not match, but if I change the SIP URI to
sip:stg-cqd0r2-10020005@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
Sent with ProtonMail secure email.
------- Original Message -------
On Thursday, March 24th, 2022 at 9:10 PM, Xuo Guoto <xuoguoto(a)protonmail.com>
wrote:
This is the ACK packet that is not getting recognized
by JsSIP
ACK
sip:stg-cqd0r2-10020005@erx-staging-q01.mydomain.com;gr=urn:uuid:b8a691ff-f678-4866-8cf0-780d670e7e33
SIP/2.0
Via: SIP/2.0/WSS 68.19.59.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:9747815015@erx-staging-q01.mydomain.com;tag=27ec81cf-9ccc-45e6-b712-fe23337ed7d9
To: sip:Stg-CQD0r2-10020005@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
------- Original Message -------
On Thursday, March 24th, 2022 at 8:20 PM, Xuo Guoto xuoguoto(a)protonmail.com wrote:
> Hi,
>
> It seems when I paste the message in the web client, it got removed. Now trying
again in text mode.
>
> 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-CQD0r2-10020005@erx-staging-q01.mydomain.com
>
> From: "User"
sip:Stg-CQD0r2-10020005@erx-staging-q01.mydomain.com;tag=65u34oje2s
>
> Call-ID: b624vmbvuioma46354gmi5
>
> CSeq: 1 REGISTER
>
> Contact:
sip:93he4k0p@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
>
> I hadn't noticed that some text was removed by the client.
>
> X.
>
> ------- Original Message -------
>
> On Thursday, March 24th, 2022 at 6:31 PM, Daniel-Constantin Mierla miconda(a)gmail.com
wrote:
>
> > Hello,
> >
> > is the REGISTER without a Contact URI or the message you pasted omitted it?
> >
> > Cheers,
> >
> > Daniel
> >
> > On 22.03.22 10:29, Xuo Guoto wrote:
> >
> > > 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 OKACK
--------------------------------><-------------------------------SIP/2.0 200 OKACK
--------------------------------><-------------------------------SIP/2.0 200 OKACK
--------------------------------><-------------------------------SIP/2.0 200 OKACK
--------------------------------><-------------------------------SIP/2.0 200 OKACK
--------------------------------><-------------------------------SIP/2.0 200 OKACK
--------------------------------><-------------------------------SIP/2.0 200 OKACK
--------------------------------><-------------------------------BYE404 Not Found
---------------------->
> > >
> > > When JsSIP receives ACK it prints an error: JsSIP:UA Request-URI does not
point to us