In SIP, why the contact header field MUST be present in the invitation request

Typically, the Contact header field in an Invite request is useless. For example, UAC and UAS are in different local networks. Contact field can be:

INVITE sip:bob@sipprovider SIP/2.0 Contact: Alice<alice@192.168.1.10> ..... 

The Contact field is not used while we can still create a dialogue. Then, why is the contact header field required?

+8
sip
source share
2 answers

The contact field contains the address at which the caller can contact the caller for future requests. For example, this is necessary so that the caller can send BYE or re-INVITE to the caller.

+7
source share

The "Contacts" heading indicates where you are (more precisely, where your User Agent is located), while the "From" heading says who you are.

You can have multiple SIP devices, all registered at the same record address (the URI that you entered in the From header).

In addition, REGISTER requests use contact headers to support the SIP definition service: they allow the user agent to update registrar location information.

(Aside, if Alice calls Bob, the Contact header should be in a 2xx response so that Alice can route 2xx ACK to Bob. This points to DarkDust's comment about some SIP proxies related to contact headers: if it doesn't, you find yourself in an uncomfortable position when you call only half: Alice thinks the call is set up because she sent her an ACK, but Bob never received it.An alternative to the proxy contact with contacts uses B2BUA as a network gateway, he will not need to cast Contact header because the Bud header em indicate B2BUA itself.)

In response to Phoenix Luo's comments, due to the shortcomings of using LAN IP addresses in the Contact RFC 5627 header, a solution is described - using globally routable user agent URIs (GRUUs) in the / s header. Contact.

+8
source share

All Articles