[SR-Users] null $au

Alex Balashov abalashov at evaristesys.com
Thu Sep 6 00:36:20 CEST 2018


Just grab it right before the consume_credentials() block, after all the challenge stuff. 

--
Sent from mobile. Apologies for brevity and errors. 

-----Original Message-----
From: David Villasmil <david.villasmil.work at gmail.com>
To: "Kamailio (SER) - Users Mailing List" <sr-users at lists.kamailio.org>
Sent: Wed, 05 Sep 2018 6:27 PM
Subject: [SR-Users] null $au

Hello,

in the block:

    if (is_method("REGISTER") || from_uri==myself) {
        # authenticate requests
        if (!auth_check("$fd", "subscriber", "1")) {
            auth_challenge("$fd", "0");
            exit;
        }
        # user authenticated - remove auth header
        if(!is_method("REGISTER|PUBLISH"))
            consume_credentials();
    }

I'm trying to print out $au, but it's coming up NULL many times, i don't
get why this is. If i remember correctly, the script goes through this
block twice, once when we get the REGISTER with no credentials, and once
when the REGISTER comes with credentials after the challenge... is this
correct?

i need to know how to catch $au when the authentication is successful...

help?

Thanks!


David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
ᐧ



More information about the sr-users mailing list