Can anyone please clarify - if both, contact and from header, contains the address of originator of SIP INVITE request, then what is the difference between them?
From header is the logical identity of the user that will be used for auth/callerid (i.e. sip:[email protected]). The Contact header is the TCP/IP network address where you should send all packets to (i.e. sip:[email protected]:43085;transport=tcp) - IP/port/transport info. While it's not entirely accurate, this is a good way to think about it in most cases.
Contact header does not necessary contain address of originator, but lists URLs used to redirect future requests. It may be same as From, but doesn't have to. One common example is registration when SIP stacks (e.g. one used by Nokia E52 or re/baresip) are replacing user part with some unique identifier that helps distinguish following incoming requests.
© 2022 - 2024 — McMap. All rights reserved.