[OpenSIPS-Users] www_authorize return codes

Bruce Borrett bruce_borrett at yahoo.com
Tue Jul 6 22:30:56 CEST 2010


Hi Bogdan

Here is the www_auth block from my config:

        if (!www_authorize("", "subscriber"))
        {
            www_challenge("", "0");
            exit;
             switch ($retcode) 
            {
                case -5:
                    xlog("L_INFO","Error");
                    break;
                case -4:
                    xlog("L_INFO","Please send new Register with auth info");
                    www_challenge("", "0");
                    exit;
                case -2:
                    xlog("L_INFO","Wrong password");
                    break;
                case -1:
                    xlog("L_INFO","User doesnt exist");
                    break;
                default:
                    xlog("L_INFO","Default");
            }
        }

Thanks,
Bruce




________________________________
From: Bogdan-Andrei Iancu <bogdan at voice-system.ro>
To: OpenSIPS users mailling list <users at lists.opensips.org>
Sent: Tue, 6 July, 2010 20:13:03
Subject: Re: [OpenSIPS-Users] www_authorize return codes

Hi Bruce,

no, they did not change. Post your switch to see if correct or not.

Regards,
Bogdan

Bruce Borrett wrote:
> Hi all
>
> I cant get switch to catch any return codes for www_authorize. The 
> default catch works, but -5 through -1 as stated in the docs do not 
> work, I also tried positive 1 through 5... Have these codes changed?
>
> Thanks in advance..
>
> Regards,
> Bruce
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100706/9318a6c9/attachment.htm 


More information about the Users mailing list