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, u...@domain or sip:u...@domain.
And $var{uri} is a "sip normalised" form of it, ie: sip:u...@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"<i...@aliax.net>:
2010/10/16 Rouskol Andrey :
> if($hu=~"^/xcap-root/")
> {
> # xcap ops
> $xcapuri(u=>data) = $hu;
> if($xcapuri(u=>xuid)=~"^sip:....@.+")
> $var(uri) = $xcapuri(u=>xuid);
> else if($xcapuri(u=>xuid)=~"....@.+")
> $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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users