• Idefisk
  • Tools
  • Tutorials
  • Reviews
  • VoIP Providers
  • Archives
ZOIPER softphone
Back to Tutorials

6.1.2.8. Authenticate (dialplan application)

1. Authenticate - authenticate an user with a dialled pass code

NOTE: This application is valid for Asterisk version 1.0.9 and above.

 


Syntax:

Authenticate(password[|options]) ;write the password in plain text

Authenticate(/passwordfile|[|options]) ;the character "/" means that the program will accept the argument as a name of file which has to contain a list of passwords.

Authenticate(/dbfamily/key|d) ; the password will be stored in the database


These are the three possible ways to use this command(application).

 


List with the possible options

a - this one will set a code to the password. The variable ${ACCOUNTCODE} will be set
d - Interpret path as database key family
r - This can be used only with the "d" option. It removes the database key after a successful entry.
j - If the authentication fails this one will set the priority to n+101 if there is such priority

 


Purpose and usage

So what is the purpose of this application and what can you use it for?

The purpose is obvious. This application gives you the opportunity to restrict the access to your telephone system.

You can use this command for many things.
For example: let’s say that you want to make an IVR menu. With the help of Authenticate you can make private sections in it. The free part of the menu could contain messages about your new promotions and services. Then the access to the private parts will need an authentication code. For example the sections where you can check your bill or inquire invoice could be payable

Another example: You can restrict the access to the outside telephone system. So the employees from the lower levels can make calls only into the frames of the internal telephone line. However the managers of the company have to make calls to the outside telephone system.

 


Prerequisites

To use this application you need a working Asterisk PBX with registered users in iax.conf, sip.conf or mgcp.conf(It depends on which protocol you would like to use) and made extensions.

To see how the application works we recommend to use our IAX softphone Idefisk. You can download it from here. Please also read our tutorial to learn how to configure it to work with Asterisk PBX.

 

Example of an IVR menu with the usage of Authenticate application

Below I am giving you screenshots of the iax.conf and extensions.conf files.

We have registered two users in the iax.conf - anatoliy and user1 with secret - anatoliy and user1. Type=friend means that this user can make and receive calls. Host=dynamic means that the IP is not static but dynamic through a DHCP server. Context=test - this shows that this user is working with the extensions in this context of the configuration file extensions.conf. Disallow=all means that this user does not support any audio codecs. However the next three lines allow=gsm, =alaw and =ulaw will turn on the support of these three codecs.


The configurations in extensions.conf are more interesting.

Firstly we have to make the context [test] with only one extension. When somebody dials 6000 this extension will transfer his call to the first extension of the next context [test1].

Secondly we have to make the extensions in the context [test1]. Let’s take a close look at them. The first extension says to Asterisk PBX to answer the call. Then a welcome message will be played. The message will tell the caller that if he/she dials 1, he/she will be connected to the user user2, if he /she dials 2, will hear a music and if he/she dials 3, the call will be transfer to the private section of the IVR menu, where an authentication is required. If you write the password correctly you can go forward and you will be connected to the user anatoliy through IAX protocol.
Finally, as you can see the last two extensions contain t and i. These are predefined extension names. t is for timeout and i is for invalid. For more information about predefined extension names you can check here.

So in case of timeout your call will be transferred at the beginning of the context. In case of invalid operation you will hear a goodbye sound and the Asterisk PBX will hang up the line.


 


2. Screenshots of what you can see on your Idefisk and on the CLI of the Asterisk PBX





 


3. Additional information


For more information about extensions.conf you can check here.
For more information about iax.conf you can check here.

This application is tested with our IAX softphone Idefisk. You can download it from here. For more information about this softphone please read our tutorial.

If you would like to test this application with the SIP channel you can read our tutorials about the SIP Softphones to learn how to configure them to work with Asterisk PBX

 


4. Uploaded files

extensions.conf
iax.conf

 

 
User Comments
AndrewMaT (andrewNef at mgmonlinecasino dot us)
05 April 2023 02:42:04

Kudos, Ample knowledge.
<a href="https://studentessaywriting.com/">best essay writing service 2016</a> writing a narrative essay about being judged quizlet <a href="https://essaywritingserviceahrefs.com/">fast essay writing service</a> cv writing service dublin
Greg Barr (greg dot barr at bytecafe dot net)
27 March 2007 19:15:49
I think I found a solution. The password file is a list of passwords ONLY. It looks like this:

password1
password2
...

Is there no way to comment this file so that I know to whom the passwords belong?
Greg Barr (greg dot barr at bytecafe dot net)
27 March 2007 18:50:17
How do I authenticate against a file? How is that file formatted? From what I've read the file should be in the format:

account1:password
account2:password

I want to authenticate customers as they call in to verify they have the appropriate service agreement to be able to proceed in the dial plan. Does the file have to be named in a certain way or be in a specific place? Right now, I'm giving the full path. So far, all authentication is failing.
Jorge Rivera (jorge_riverav at hotmail dot com)
27 April 2006 18:34:07
Can i use the Authenticate Dial Plan application in order to validate a SIP user?

If i want to create a Calling Card Platform based on IVR, could i create an extension associate with a SIP account that do not have the user and account explicitly but have associated variables that can be input by the results of Authenticate?
 
Add Comment
Name:
Email:
Comment:
In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.
Image Verification:
 

Latest Headlines:

  • T.38 faxing with Zoiper 2.15 is now easier than ever
    section: voip software
  • Asterisk 1.4.21 Released
    section: Asterisk
  • Asterisk 1.4.20 Released
    section: Asterisk
  • Asterisk 1.4.20-rc2 Released
    section: Asterisk
  • Asterisk 1.4.20-rc1 Now Available
    section: Asterisk
  • News Archives (older news)

Latest Tutorials:

  • Sending Fax from Zoiper to Zoiper using T.38
    added 08/Dec/2008 18:16
  • VMAuthenticate (dialplan application)
    added 01/Mar/2008 15:57
  • Siptronic ST-530
    added 06/Nov/2007 17:57
  • Siemens C455 IP hardphone
    added 05/Nov/2007 10:24
  • Zoiper
    added 22/Oct/2007 17:53

Latest Comments:

  • https://git-ce.rwth-aachen.de/mbd/kiste_...
    tutorial: Basic Information
  • https://git-ce.rwth-aachen.de/mbd/kiste_...
    tutorial: Basic Information
  • https://www.thebeachlittlehampton.co.uk/...
    tutorial: Digium Wildcard TE405 / Wildcard TE410P
  • https://www.viessmann-community.com/t5/R...
    tutorial: Asterisk Installation
  • https://d2l.msu.edu/d2l/eP/presentations...
    tutorial: Asterisk Realtime configuration
 
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™