Search code examples
authenticationvoipsipasterisksip-server

Sipdroid Authorization Username vs Caller Id


I am very new in VOIP world and working on SIPDroid for one of my client. At the details of SIP Account Preference window of SIPDroid, I can see there are two username field. One is 'Authorization Username' and the other is 'Username or Caller ID'. My client has a REST based web service to communicate with the server behind Asterisk.
My question is, what are the difference between 'Authorization Username' and 'Username or Caller ID' two fields and what is their purpose. I know, I need a unique identifier to dial and receive call, but which field is applicable for this unique value?
Thanks


Solution

  • The CallerID Username is what will be used as the user portion of the SIP URI in your SIP From Header, for example:

    From: "Joe Bloggs" <sip:[email protected]>
    

    The vast majority of SIP servers out there, including Asterisk, will use joe as the username when they receive a request with that From header. Most SIP servers will do some kind of matching on the server portion of the URI as well, in this example from.somwhere.com, in order to determine if the request is from a user wanting to authenticate or from an external party wanting to call a user.

    The Authorization Username is used a lot more infrequently and relates to the value to place in the Digest authentication header that a SIP client must respond to when challenged by the server. An example of an authentication header is:

    Authorization: Digest username="joe",realm="from.somwhere.com",nonce="abcde12345",uri="[email protected]",response="xyx98765",algorithm=MD5
    

    In this case the Authorization Username is also joe. The need for a separate value to be specified for the Authorization Username is where the value the server requires in the Authorization header differs from the value in the From header or as you have termed it the CallerID Username.