why we need contact in SIP messages?

General discussions about Asterisk.

Moderators: Moderator, Support

why we need contact in SIP messages?

Postby quan1992 » Tue Nov 24, 2015 3:47 pm

In SIP messages, VIA already specify where the client is. Then why we need CONTACT?

Thanks for any help in advance!
quan1992
Newsterisk
 
Posts: 1
Joined: Tue Nov 24, 2015 3:45 pm

Re: why we need contact in SIP messages?

Postby jcolp » Mon Nov 30, 2015 9:18 am

From RFC3261[1]:

"While the Via header field tells other elements where to send the
response, the Contact header field tells other elements where to send
future requests."

As SIP is somewhat of a standard (some points are not clear enough in practice) you can consult the RFC for questions like these.

[1] https://www.ietf.org/rfc/rfc3261.txt
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am

Re: why we need contact in SIP messages?

Postby david55 » Mon Nov 30, 2015 9:36 am

A typical case would be a load balancing proxy. Once the call reaches a particular worker, the contact header will directly identify that worker, so that the proxy is cut out of further interactions.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: why we need contact in SIP messages?

Postby jcolp » Mon Nov 30, 2015 9:42 am

It's also used in a REGISTER to provide a binding for an address of record, so you know where to contact when that AOR is looked up.
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 0 guests