Friday, March 20, 2015

SIP Learning Part II - Generating SIP Request Essential Headers


From Header
From header indicates logical identify of the initiator of the request, possibly the user’s address-of-record. Like the To header field, it contains a URI and optionally a display name. It is used by the SIP elements to determine which processing rules to apply to a request for e.g. automatic call rejection. As such, the from uri should not contain the IP address or FQDN of the host on which the UA is running, since these are not logical names. 

If the identity of the client to be hidden, UA should use the “Anonymous” word for the display name and an invalid but yet syntactically correct sip address for e.g. thesis@anonymous.invalid 

The From header field MUST contain a new “tag” parameter, chosen by the UAC. 

Some of the examples of From header area below 

From : “Bob” ; tag=148s
From : sip+12312321@phone2net.com;tag=23432
From: Anonymous ; tag=hysa

Call - ID
Call ID header field acts as a unique identifier to group together a series of messages. It must be the same for all the requests and responses sent by either UA in a dialog. IT should be the same in each registration from a UA. 

In a new request created by a UAC of any dialog, the call-id header field must be selected by the UAC as a globally unique identifier over space and time unless overridden by the method specific behaviour. If suppose a 401 error is received by the UA and then a retry is done with correct authorisation, then the call id should not change. 

Use of cryptographycally random identifiers in the generation of Call-IDs is recommended. Implementation may use localid@host. Call ids are case sensitive and are just compared byte by byte. 

e.g. for Call ID is Call-ID : fasdas-sdasd-sd@foo.bar.com


references:

No comments:

Post a Comment