Greetings,

I have a general question about the usage of SIP contact headers in the context of using Kamailio as a SIP proxy.


________________________________

[  A  ] --> [  Kamailio  B ]  ---> [  C ]

Node A originates a SIP invite, containing a valid via header and URI while setting the contact address to a user@itself and delivers it to Kamailio B which is acting as a SIP proxy.

Kamailio B then uses dispatcher routing to direct the Invite to node C, adding a via line with its own information as well as a record-route header with its own proxy information but retaining the same contact address from A.

Node C establishes the call and then sends a re-invite to the Kamailio B proxy which is in turn sent to Node A. Node A responds with a 200 OK

The problem arises when Node C tries to send an Ack in response to this 200 OK. The ack is being sent to the Contact address, rather than the routing already established in the initial dialog.

________________________________

My question is: should kamailio be rewriting this contact address with its own? Is that the best practice? My understanding is that the contact header is more so related to future requests within the same dialog ONLY when a record-route is not used.

I would appreciate any clarification on the RFC or best practices in this scenario.

Thank you,
Jack Davis