Asterisk 16 PJSIP invalid value error exception when parsing 'Contact' header

Record-Route only applies to the current request. Contact is the address to be used for subsequent requests in the session.

One reason that they can differ is because of proxies maintaining state, in which case they need to stay in the recorded route until the response is passed back. The only purpose of Contact in an INVITE request is to provide a direct address back that can be used independently of the recorded route.

One reason for maintaining state on a request is that the proxy is sending the 100 responses, so needs to know when there has been a response and it no longer needs to send them.

From questions we have seen in the past, there are some ITSPs that try to read more into Contact than the correct place to which to send subsequent transactions. Typically they expect the Contact header to contain the remote party address. However they are wrong in using it for that purpose.