[Asterisk-Users] Pass variable to Authenticate?
Moises Silva
moises.silva at gmail.com
Mon May 16 15:06:53 MST 2005
Hi Dana.
Not sure how to do it with DBget, but currently im using AGI for all
the authentication process. I Think is a very good solution. Its a lot
easier to make a program in a high level language like PHP and tell
asterisk with a simple SetVar(authenticated=1) if the user is allowed
to continue.
Basically the flow of events is:
- the user dial some number
- asterisk prompts for the agent login and saves it in a channel variable
- asterisk prompts for the agent password and saves it in other channel var
- asterisk launch an AGI application
- the agi script retrieves the login and password saved by Asterisk
- the agi script check the database to find a match entry
- the agi script set an Asterisk variable to tell if the user
its authorized or not
- asterisk reads the variable that agi should have set
- if the variable is 1 continue, otherwise ask the password again or
hangup, or whatever...
If you need more help just ask. I tough many people here knows other
options, or may be a better implementation.
Best Regards
- moy
On 5/16/05, Dana Olson <rickaster at gmail.com> wrote:
> I'm trying to figure out a way to make my own agent login, because I
> don't like how the default works.
>
> I have the login and logout working fine using the dynamic add and
> remove commands, but I need to be able to create a list of users and
> passwords.
>
> I thought of a way to do it using a list of passwords, but the agent
> would only ever be prompted for their password. I won't want that.
>
> Basically, what I want to do is this:
>
> Read in the username, ex. 4567
> Read in the password, ex. 1234
> Pass 12344567 to the Authenticate command, which checks in the file
> for that password.
>
> I can't figure out a way to do it, and it may not even be possible.
>
> Is there another way to do it? Can I somehow utilize the DBget and
> DBput commands? I couldn't find much info on it in the wiki, and my
> impression is that I have to use only the blacklist or cidname
> databases.
>
> Any ideas would be helpful.
> --
> Dana
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
More information about the asterisk-users
mailing list