Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Contact Header in 200 OK response to SIP Register by Web Socket based User Agent #108

Open
p-akshay opened this issue May 31, 2021 · 4 comments

Comments

@p-akshay
Copy link

Hi,

I am trying to get a web socket based client registered on sip server using Drachtio. My web socket client is based on latest SIP.js library.
While doing the registration, on node, I have observed that the registration call flow is correct (Register, 401 Unauthorized, Register and then 200 OK). I have also observed the same message sequence on client as well. However, despite that, the client is NOT changing the state to REGISTERED.

Based on the error logs of SIP.js, this is due to some issue in Contact Header received by SIP.js Client in 200 OK.

I then tried the same scenario with latest branch of FreeSWITCH server and this time the SIP.js client did successful registration (also changed the state to REGISTERED)

Here are the two contact headers:

  1. Sent By Drachtio
    Contact: sip:[email protected];transport=ws;expires=30

  2. Sent By FreeSWITCH
    Contact: sip:[email protected];transport=ws;expires=30

Analyzing the two strings, I think the problem is because of placement of '>' in the contact header value of drachtio. As you can see, the transport string ("transport=ws") is added after the main contact part by drachtio server where as it is part of contact string in FS.

Do you agree with this observation? or I am doing something wrong here?

Also, let me know if this can be fixed?

Thanks

@davehorton
Copy link
Collaborator

can you send the entire drachtio server log file for a registration?

@davehorton
Copy link
Collaborator

also, angle brackets did not appear in your examples

@p-akshay
Copy link
Author

p-akshay commented May 31, 2021

Sorry...looks like they were removed ...trying again...

Here are the two contact headers:

Sent By Drachtio
Contact: <sip:[email protected]>;transport=ws;expires=30

Sent By FreeSWITCH
Contact: <sip:[email protected];transport=ws>;expires=30

@p-akshay
Copy link
Author

p-akshay commented May 31, 2021

drachtio-seerver-registration-log.log

Here is the log file

...
Line 323 shows the contact header sent in 200 Ok response

line 311 shows the value of contact header passed by node module to drachtio server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants