<div dir="ltr"><div><div><div>Greetings, <br><br></div>I have a general question about the usage of SIP contact headers in the context of using Kamailio as a SIP proxy. <br><br><br>________________________________<br><br></div><div>[  A  ] --> [  Kamailio  B ]  ---> [  C ]<br></div><div><br></div>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. <br><br></div>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. <br><div><div><div><div><div><br></div><div>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<br><br></div><div>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.<br><br>________________________________<br><br></div><div>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. <br><br></div><div>I would appreciate any clarification on the RFC or best practices in this scenario. <br><br></div><div>Thank you, <br></div><div>Jack Davis<br></div></div></div></div></div></div>