[OpenSER-Users] help with using avp...

liran tal liransgarage at gmail.com
Sun Jul 1 09:33:30 CEST 2007


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",
algorithm=MD5, uri="sip: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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070701/12c29f2b/attachment.htm 


More information about the Users mailing list