Sunday, April 5, 2015

Contact Header in SIP Request

Contact header provides a meaning which depends on the type of request or response it is in. 
A contact header may provide a display name, a URI with URI parameters and header parameters 

the q and expires are parameters in the in the Contact header. These parameters are contained in a REGISTER request. It is upto the specification if it want to define additional parameters. 

When the header field contains a display name, the URI including all URI parameters are enclosed in “<“ and “>”. If no < and > is present, then all parameters after the URI are header parameters not uri parameters. The display name can be tokens or quoted string if a large character set is desired. 

For e.g. in the Contact header below, 

Contact: ;+sip.custom=“value”;+sip.9193023016-socktest3
tranport=tcp is a contact uri parameter, while + sip.custom =“value” is a contact parameter. 

Even if the display-name is empty, the “name-addr” form MUST be used if the “addr-spec“ contains comma or semicolon or question mark 

The rule for parsing display name, uri and uri parameters also applies to the headers To and From. 

The compact form of the Contact header is “m” (moved) 

Some of the samples are: 
Contact: "Mr. Watson"
         ;q=0.7; expires=3600,
         "Mr. Watson" ;q=0.1
      m: ;expires=60


References:

No comments:

Post a Comment