[SR-Users] Tutorial: SIP SIMPLE Presence Made Simple with Kamailio 3.1

Daniel-Constantin Mierla miconda at gmail.com
Sat Oct 2 10:37:36 CEST 2010


  Hello Andrey,

On 10/1/10 7:47 PM, Rouskol Andrey wrote:
> Daniel,
>
> In addition to my previous letter, for  multidomain case, to prevent user at domain1 from
> changing xcaps for user at domain2, we need do something like this (withing second
> WITH_XHTTPAUTH section):
>
> #!ifdef WITH_MULTIDOMAIN
>          $var(tmp) = "sip:"+$aU;
>          if ($var(uri)!=$var(tmp)) {
> #!else
>          if ($au!=$(var(uri){uri.user})) {
> #!endif
>
But here is like this because your client uses user at domain in username 
field for authentication, right?

However, in many cases, even in multi-domain environment, people still 
use only user part in username field and the domain is taken from R-URI 
or headers like From/To.

To make this complete for multi-domain, I think there must be a 
condition to check for domain in $aU and if missing, try to get it from 
other parts, right?

Cheers,
Daniel

> 01.10.10, 20:12, "Rouskol Andrey"<anry-dev at yandex.ru>:
>
>> Hello,
>>
>>   Daniel, could you verify your tutorial for cases with multidomain support.
>>   I've tried it (with curl as an xcap client) and I had to use user at domain:pass
>>   as an authentication string to pass through www_authorize("xcap", "subscriber"),
>>   after this I had to modify $var(url) assignment a little bit:
>>
>>                   if($xcapuri(u=>xuid)=~"^sip:.+ at .+")
>>                           $var(uri) = $xcapuri(u=>xuid);
>>                   else
>>                           if($xcapuri(u=>xuid)=~".+ at .+")
>>                                   $var(uri) = "sip:"+ $xcapuri(u=>xuid);
>>                           else
>>                                   $var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri;
>>
>>   Could you confirm, that it is correct, or point to my errors, please.
>>
>>   Regards,
>>   Andrey.
>>
>>   _______________________________________________
>>   SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>   sr-users at lists.sip-router.org
>>   http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list