[SR-Users] Fwd: Tutorial: SIP SIMPLE Presence Made Simple with Kamailio 3.1
Daniel-Constantin Mierla
miconda at gmail.com
Tue Oct 19 09:57:56 CEST 2010
Hello,
the module parses inside the xcap uri, but you can build a custom one in
config and give it as parameter to xcap server functions. In this way
you can do normalization, sanity checks, etc.
For these kind of operations I added a variable that can be used to
access parts of an xcap uri very easily in configuration file, not to
fight with complex regular expression substitutions or other string
functions/transformations.
Cheers,
Daniel
On 10/17/10 1:05 AM, Rouskol Andrey wrote:
> Iñaki,
>
> Yes, it does. Xcap module parses request url, and produces $xcapuri(u=>xuid),
> which could have different formats: user, user at domain or sip:user at domain.
> And $var{uri} is a "sip normalised" form of it, ie: sip:user at domain.
>
> This part was taken from Daniels tutorial as is. My question was about
> authorization part.
>
> Regards,
> Andrey.
>
> 16.10.10, 13:58, "Iñaki Baz Castillo"<ibc at aliax.net>:
>
>> 2010/10/16 Rouskol Andrey :
>> > if($hu=~"^/xcap-root/")
>> > {
>> > # xcap ops
>> > $xcapuri(u=>data) = $hu;
>> > 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;
>> >
>>
>> Doesn't the module automatically parse the URL's auid, xui, document,
>> document path and so?
>>
>>
> _______________________________________________
> 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