[OpenSIPS-Users] Proxy authentication question

Yury Kirsanov y.kirsanov at gmail.com
Fri Oct 27 01:19:50 EDT 2017


Hi,
I've got a question about proxy authentication - is there any way to
determine if we previously already asked remote party to authenticate or
not? For some reason it looks like to me that flags are not persistent
during proxy authentication process, so my code doesn't work as flag is
never set. Here's a code snippet:

if (!proxy_authorize("","subscriber"))
{
 if (isflagset(7))
 {
   # We already tried to authenticate, do some code here
 }
 else
 {
   # We haven't tried to authenticate yet, challenge the request
   setflag(7);
   proxy_challenge("","1");
   exit;
 }
}
else
{
... successful auth done
}

I need this as I want to try to authenticate users and if remote party
can't authenticate - then try to do IP based authentication, for example.

Thanks for help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171027/fb7f5505/attachment.html>


More information about the Users mailing list