[SR-Users] About xcap xuid in kamailio

Min Wang ser.basis at gmail.com
Tue Jun 12 12:51:07 CEST 2012


HI Daniel:

    thanks a lot for the explaination.

    I have tried the jitsi and bria.

    jitsi use this kind of xcap uri:
            /xcap/resource-lists/users/sip:w102 at 192.168.51.20/index

    while bria/eyebeam use:
           
/xcap/org.openmobilealliance.pres-rules/users/w103 at 192.168.51.20/pres-rules

    The bria/eyebeam client does not have starting "sip:"  on the xuid 
part.

     so for the bria case the $var(uri) need to be updated as:

           $var(uri) = "sip:"+ $xcapuri(u=>xuid);

     Otherwise the kamailio xcap will give some ERROR: pv 
[pv_trans.c:522]: invalid uri [w103 at 192.168.51.20]

     It is the xcaps_put/del using  $var(uri) that  confuse me a little 
bit, I thought it would store $var(uri) in the db.

  xcaps_put("$var(uri)", "$hu", "$rb");
  xcaps_del("$var(uri)", "$hu");

      After checking the db, it seems the doc_uri has been stored correctly.

      It seems some magic happened in the function: 
xcaps_put("$var(uri)", "$hu", "$rb"); Just wondering why $var(uri) is 
needed if all the info are in $hu? I have not checked the source code. :(




kind regards.


min




On 06/12/2012 12:10 PM, Daniel-Constantin Mierla wrote:
> Hello,
>
> On 6/12/12 11:28 AM, Min Wang wrote:
>> Hi
>>     I am trying to use kamailio xcap server, saw the sample code:
>>
>>
>>      if($xcapuri(u=>xuid)=~"^sip:.+ at .+")
>>             $var(uri) = $xcapuri(u=>xuid);
>>         else
>>             $var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri;
>>
>>
>>     why should the xuid  have sip:xx at domain.com format?
>>
>>     The xcap standard seems does not enforce the format on the xui part?
>>
>>    http://xcap.example.com/root/resource-lists/users/joe
>>    |-------------v-------------||------v------||---v---|
>>           document root               AUID        XUI
>>
>>
> the xuid is not not changed -- $var(uri) is built out of it to get to 
> a SIP address (for a coherent format with xuid with or without domain 
> part), but in database the xcap uri is stored as received.
>
> In sip, the user id is email-like address, some functions required 
> that, so if the domain part is missing, then the local ip is used.
>
> Have you encountered some problem due to this thing or is some field 
> in database stored with wrong value?
>
> Cheers,
> Daniel
>




More information about the sr-users mailing list