Chinese Yellow Pages | Classifieds | Knowledge | Tax | IME

The RFC 3262 said:

The To header field contains the address of record 
whose registration is to be created, queried, or modified. 

That means TO contains AoR, and it should be some sort of sip uri. Normally we will see display name part in front of the sip uri. So if we send sip register msg like

   F1 REGISTER B -> SIP Server
   Via: SIP/2.0/UDP
   From: LittleGuy <>
   To: LittleGuy <>   <--- sip uri should contain AoR, LittleGuy is display name
   Contact: <sip:UserB@>
   Contact: <;user=phone>
   Contact: tel:+1-972-555-2222
   Content-Length: 0

So we should expect sip: was our AoR. But if we check kamailio using kamctl ul show, we got:

 "AoRs": [{
 "Info": {
 "AoR": "UserB",
 "HashID": -1589985196,
 "Contacts": [{
 "Contact": {
 "Address": "sip:userb@;reg-alias=0acdbd32e97b7c21;transport=udp",

hmm, so where is the domain part ( )? It turns out kamailio has a configure part ( usrloc module), by default is 0

modparam("usrloc", "use_domain", 0)

This flag said:
If the domain part of the user should be also saved and used 
for identifying the user (along with the username part). 
Useful in multi domain scenarios. Non 0 value means true.

That is why we do not see that domain part. Later on, when we use lookup() to find the AoR, kamailio will only use the number/username part to match. ( no domain is used)

Leave a Reply

Your email address will not be published. Required fields are marked *