[OpenSER-Users] help with using avp...
Daniel-Constantin Mierla
daniel at voice-system.ro
Mon Jul 2 15:22:40 CEST 2007
Hello,
that's a standalone pseudo-variable you can use directlu: $au
http://www.openser.org/dokuwiki/doku.php/pseudovariables:1.1.x#auth_username
You do not need to play with such complex regexp subst.
Daniel
On 07/01/07 10:33, liran tal wrote:
> Hey everyone,
>
> I'm using OpenSER 1.1.1 SVN version.
> I'd like to save the Authorization Digest Username as it appears in
> header into a variable (avp) so
> that later I can use it to set an accounting attribute in the radius.
>
> From the SIP Packet the information is given like this:
> Authorization: Digest username="dsdsds", realm="1.2.3.4
> <http://1.2.3.4>", algorithm=MD5, uri="sip: 1.2.3.4 <http://1.2.3.4>",
> nonce="xxx"
> Where I would like to grab the username part "dsdsds".
>
> From the docs I could only conclude that doing it would be something
> like this:
> avp_write("$hdr[Authorization]","s:12");
> avp_subst("$avp(s:12)", "/.*username=(.*),/\1/");
>
>
>
> I'm not even sure about that piece of code, if someone can help...
>
>
> Thanks,
> Lir.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list