[SIPForum-discussion] What is the utility of Contact header field?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Mon Dec 28 14:02:19 UTC 2015


I have a question about the utility of Contact header field, from the point of view of an UAC that needs to answer with SIP ACK after receiving a SIP 200 OK.

Use case 1:

I have a SIP Proxy and 2 softphones registered in such proxy. Softphones and proxy are all located in the same domain (they are directly connected to the same router). So they are in the same local network.

When softphone A calls softpohone B, B answers with SIP 200 OK. When A receives SIP 200 OK, it sends SIP ACK to B. Every thing is ok!

Use case 2:

The softphone A is located in another network, somewhere on Internet. So, from the A's point of view, B and the SIP Prpxy are behind a NAT. When A calls B, B receives the SIP INVITE normally and sends SIP 200 OK to A. In this case, the Contact header field in SIP 200 OK message contains an IP that can't be reached from A. Such IP is the one of softphone B, valid only in the local network. (There is no Stun service being used here).  Every time A receives a SIP message having the Contact header field with a invalid IP, such UAC can't send messages to B, let's say a SIP Bye, or SIP ACK. That is why I suspect the field Contact, sometimes, is read by the UAC when such agent needs to send some message to the other peer. Obviously, in this case, the call fails.

So, is the Contact filed really used/read by an UAC that wants to send a message to the other peer, like a SIP ACK? If not, what is the utility of such field?

Why a SIP ACK can't simply be sent to the same address found in the 'To' header filed?

Use case 3:

The softphone A is still located in another network, somewhere on Internet. When A calls B, but no one answers from B, the SIP Proxy sends a SIP message to A. Such message doesn't have a Contact header filed. In this case, A sends its SIP ACK, but using the same value found in the 'To' header field. That is why it seems that when 'Contact' is not present, the value from 'To' is used in this case.  Is the 'Contact' header filed optional? If yes, when it must be present?

Any hint will be very helpful!

Thanks alot.

Inatel Competence Center
Ph: +55 35 3471 9200 RAMAL 979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20151228/f5206f11/attachment-0002.html>

More information about the discussion mailing list