Skip to content

fix incorrect request uri for ack#100

Open
yeoleobun wants to merge 2 commits intorestsend:mainfrom
yeoleobun:patch2
Open

fix incorrect request uri for ack#100
yeoleobun wants to merge 2 commits intorestsend:mainfrom
yeoleobun:patch2

Conversation

@yeoleobun
Copy link
Collaborator

For Contact URI that have parameter "ob", the request URI will set to first Route.

This is incorrect, and Kamaillio will reject it.

From RFC 5626:

"ob" Parameter: In a Contact or Route header field
value, it indicates that the UA would like other requests in the
same dialog to be routed over the same flow.

So it only take effect on the destination of message, not the message itself.

Since there are mixd use between Request-URI and destination, I have refactor the make_ack, and add strict route support.

Now make_ack take both initial INVITE and response, for non-200 ACK it use message from the invite(except TO-tag), and use information from the Response for 200 ACK (request URI and Route )

Complement with https://datatracker.ietf.org/doc/html/rfc3261#section-12.2.1.1:

The UAC uses the remote target and route set to build the Request-URI
   and Route header field of the request.

   If the route set is empty, the UAC MUST place the remote target URI
   into the Request-URI.  The UAC MUST NOT add a Route header field to
   the request.

   If the route set is not empty, and the first URI in the route set
   contains the lr parameter (see [Section 19.1.1](https://datatracker.ietf.org/doc/html/rfc3261#section-19.1.1)), the UAC MUST place
   the remote target URI into the Request-URI and MUST include a Route
   header field containing the route set values in order, including all
   parameters.

   If the route set is not empty, and its first URI does not contain the
   lr parameter, the UAC MUST place the first URI from the route set
   into the Request-URI, stripping any parameters that are not allowed
   in a Request-URI.  The UAC MUST add a Route header field containing
   the remainder of the route set values in order, including all
   parameters.  The UAC MUST then place the remote target URI into the
   Route header field as the last value.

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

Successfully merging this pull request may close these issues.

1 participant