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.
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users