Hi.....<br>
<br>
I'm grateful for the tip but within the Openser's Config the variable "$retval" is not recognized....<br>
<br>
Below the log....<br>
ERROR:core:pv_parse_spec: error searching pvar "retval" <br>
May 28 08:18:57 i206529 openser: ERROR:core:pv_parse_spec: wrong char [<br>
May 28 08:18:57 i206529 openser: CRITICAL:core:yyerror: parse error in
config file, line 385, column 12-20: unknown script variable<br>
<br>
and the config script...<br>
............................omitted output.......................<br>
if (!www_authorize("<a href="http://rio.voip.br">rio.voip.br</a>", "subscriber")) {<br>
xlog("L_ALERT", "REGISTER ($fU) ($ru) nao autorizado\n");<br>
log(1, "Enviando 401 - Unauthorized (Username)\n");<br>
# perl_exec("chkval"); # check retval but still not working...<br>
switch ($retval){<br>
case 1:<br>
log("process authentication success");<br>
break;<br>
case -1:<br>
log("Non Existent User");<br>
break;<br>
case -2:<br>
log("Invalid Password");<br>
break;<br>
case -3:<br>
log("Stale Nonce");<br>
break;<br>
case -4:<br>
log("No Credentials");<br>
break;<br>
default:<br>
log("Process Other Requests Here");<br>
}<br>
www_challenge("<a href="http://rio.voip.br">rio.voip.br</a>", "1");<br>
return;<br>
........................omitted output................<br>
<br>
Any hint of how I can make the Openser's config recognize the pvar "$retval"??<br>
<br>
regards,<br>
Marcio<br><br><div class="gmail_quote">2008/5/28 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<div><div></div><div class="Wj3C7c"><br>
<br>
On 05/27/08 22:13, Marcio wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Who would have tips on how to capture the return codes negative of the function "www_authorize" ???<br>
I read somewhere that said to use $retval........but ...How can I to use it ("$retval") ??<br>
<br>
-1 - Non existent user;<br>
-2 - invalid passwd;<br>
-3 - stale nonce;<br>
-4 - no credentials;<br>
-5 - error;<br>
<br>
Any help will be greatly appreciated.<br>
</blockquote></div></div>
one mode is with switch statement:<br>
<br>
www_authorize(...);<br>
switch($retval)<br>
{<br>
case -1:<br>
........<br>
break;<br>
case -2:<br>
.......<br>
break;<br>
....<br>
}<br>
<a href="http://www.openser.org/dokuwiki/doku.php/core-cookbook:devel#switch" target="_blank">http://www.openser.org/dokuwiki/doku.php/core-cookbook:devel#switch</a><br>
<br>
Daniel<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
thx,<br>
<br>
Marcio<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
-- <br>
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<br>
</blockquote></div><br>