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

UDP Transport rules specify use of received header parameter. #134

Open
jeremy-j-ackso opened this issue Nov 8, 2018 · 1 comment
Open

Comments

@jeremy-j-ackso
Copy link
Contributor

UDP Transport rules in RFC 3261 specify the following:

Otherwise (for unreliable unicast transports), if the top Via has a "received" parameter, the response MUST be sent to the address in the "received" parameter, using the port indicated in the "sent-by" value, or using port 5060 if none is specified explicitly.

However, in practice it appears that this library is attempting to use the rules for TCP for UDP as well, which allow re-using the connection, and therefore sending the response back to the sending address:port if it's still open rather than using the received parameter in the header.

It should be sending the UDP response using this address: request.headers.via[0].params.received and a port of request.headers.via[0].params['sent-by'] if present, or 5060 if not present.

@jeremy-j-ackso
Copy link
Contributor Author

And it looks like the exception to this is when rport=XXXX is present per RFC 3581.

jeremy-j-ackso added a commit to jeremy-j-ackso/sip.js that referenced this issue Nov 9, 2018
Chooses the correct port to respond to on the remote host per RFC's 3261
and 3581.

Resolves kirm#134.
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

1 participant