Hey everyone,<br><br>I'm using OpenSER 1.1.1 SVN version.<br>I'd like to save the Authorization Digest Username as it appears in header into a variable (avp) so<br>that later I can use it to set an accounting attribute in the radius.
<br><br>From the SIP Packet the information is given like this:<br><span> Authorization: Digest username="dsdsds", realm="<a href="http://1.2.3.4">1.2.3.4</a>", algorithm=MD5, uri="sip:<a href="http://1.2.3.4">
1.2.3.4</a>", <br> nonce="xxx"<br>Where I would like to grab the username part "dsdsds".<br><br></span>From the docs I could only conclude that doing it would be something like this:<br>
<pre class="programlisting">avp_write("$hdr[<span>Authorization</span>]","s:12");<br>avp_subst("$avp(s:12)", "/.*username=(.*),/\1/");<br><br><br></pre>I'm not even sure about that piece of code, if someone can help...
<br><br><br>Thanks,<br>Lir.<br>