<font face="arial,helvetica,sans-serif">Hello,<br><br>I am using OpenSIPS with auth_radius module to simulate to radius client with my Diameter/Radius Gateway. With scripting variables I succeeded for a part but I still have some problems. I change some functions to make opensips and my requests fully compliant to RFC 5090.<br>

<br>First, there is some bugs in names. For example, two variables have the same name and one of them was with the wrong number to parse. Here is a propose change:<br>pvar.c<br></font><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

<font face="arial,helvetica,sans-serif">    {{&quot;an&quot;, (sizeof(&quot;an&quot;)-1)}, /* */</font><br><font face="arial,helvetica,sans-serif">        PVT_AUTH_NONCE, pv_get_authattr, 0,</font><br><font face="arial,helvetica,sans-serif">        0, 0, pv_init_iname, 5},</font><br>

<font face="arial,helvetica,sans-serif">    {{&quot;aR&quot;, (sizeof(&quot;aR&quot;)-1)}, /* */</font><br><font face="arial,helvetica,sans-serif">        PVT_AUTH_RESPONSE, pv_get_authattr, 0,</font><br><font face="arial,helvetica,sans-serif">        0, 0, pv_init_iname, 6},</font><br clear="all">

</blockquote><br>Second, I changed some functions in aaa_radius because I need high customization (to make it compliant with RFC5090).<br>I changed &quot;proxy_challenge&quot; and I want to give as parameters realm and nonce (nonce must be done on diameter server). I succeeded in making static parameters but if I try this: <br>

<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">xlog(&quot;realm: $var(realm), nonce: $var(nonce)\n&quot;);<br>proxy_challenge( &quot;$var(realm)&quot;, &quot;$var(nonce)&quot;);<br>

</blockquote>In xlog, everything is Ok but in proxy_challenge, I obtain variables as they are, e.g.&quot;$var(realm)&quot;. It&#39;s hard to get into opensips source in just one day but I found that there is a translator in auth_mod.c.<br>

Here is the non controlled.<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">    {&quot;proxy_challenge&quot;,     (cmd_function)proxy_challenge,         2,<br>

        0, 0, REQUEST_ROUTE},<br></blockquote>Obtained values are as I said before.<br><br>If I try, to activate a translator:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

    {&quot;proxy_challenge&quot;,     (cmd_function)proxy_challenge,         2,<br>
        fixup_pvar_pvar, 0, REQUEST_ROUTE},<br></blockquote>It&#39;s supposed to work but I obtain &quot;N&quot; for both values.<br><br><br>For information, here is my opensips.cfg:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

# We are in REGISTER part!        <br>$var(method)=&quot;REGISTER&quot;;<br><br><br>if ($adu == NULL)<br>{<br>    radius_send_auth(&quot;Frequest&quot;,&quot;challenge&quot;);<br>    #Digest-Realm = $var(realm),Digest-Nonce = $var(nonce),Digest-Qop = $var(qop),Digest-Algorithm = $var(algorithm)<br>

    <br>    xlog(&quot;realm: $var(realm), nonce: $var(nonce)\n&quot;);<br>    <br>    proxy_challenge( &quot;$var(realm)&quot;, &quot;$var(nonce)&quot;);<br>    exit;<br>}<br>else<br>{<br>    radius_send_auth(&quot;request&quot;,&quot;result&quot;);<br>

    xlog( &quot;SECOND REQUEST!!!!!!!!!!!!!!!\n&quot;);<br>}<br>xlog(&quot;**********************************OUT&quot;);<br></blockquote><br>I changed all functions after proxy_challenge (like challenge...) to give the nonce, don&#39;t ask for qop (always on) and don&#39;t manage nonce index as it&#39;s not sip server job.<br>

<br><br>I hope I was clear in my questions.<br><br>Thanks<br><br>Best regards,<br>Alexandre Westfahl,<br>Keio University, Yokohama<br>Teraoka Lab.<br>Linux User: #458230<br>PGP: EACE5768<br>