Hi Tito,

you can do :

switch ( www_authorize(...) ) {
    case 1 :
        # success
        break;
    case -1:
        break;
    case -2:
        # wrong passwd
        break;
    default:
        ....
}


or if you want to actually print the ret code :

$var(rc) = www_authorize(...);
xlog("Return code is $var(rc) \n")

switch ( $var(rc) ) {
    case 1 :
        # success
        break;
    case -1:
        break;
    case -2:
        # wrong passwd
        break;
    default:
        ....
}

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 28.05.2014 07:45, Tito Cumpen wrote:
Group,


I am looking for the ability to deal with return code -2 in a switch statement with the intent to trigger a reply specifying that the password is incorrect during registration. Can anyone provide examples? I have tried including my case statement within www_authorize but have not been able to trigger the return code.


Thanks,
Tito


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to