Hey everyone,<br><br>I&#39;m using OpenSER 1.1.1 SVN version.<br>I&#39;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Authorization: Digest username=&quot;dsdsds&quot;, realm=&quot;<a href="http://1.2.3.4">1.2.3.4</a>&quot;, algorithm=MD5, uri=&quot;sip:<a href="http://1.2.3.4">
1.2.3.4</a>&quot;, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nonce=&quot;xxx&quot;<br>Where I would like to grab the username part &quot;dsdsds&quot;.<br><br></span>From the docs I could only conclude that doing it would be something like this:<br>
<pre class="programlisting">avp_write(&quot;$hdr[<span>Authorization</span>]&quot;,&quot;s:12&quot;);<br>avp_subst(&quot;$avp(s:12)&quot;, &quot;/.*username=(.*),/\1/&quot;);<br><br><br></pre>I&#39;m not even sure about that piece of code, if someone can help...
<br><br><br>Thanks,<br>Lir.<br>