[asterisk-users] Add PinCode on my dialplan
Danny Nicholas
danny at debsinc.com
Tue Sep 20 08:57:19 CDT 2011
+1 bakko
Using DISA might open a "hole" you don't want to have
asterisk -rx "core show application disa"
-= Info about application 'DISA' =-
[Synopsis]
DISA (Direct Inward System Access)
[Description]
DISA(<numeric passcode>[|<context>]) or DISA(<filename>)
The DISA, Direct Inward System Access, application allows someone from
outside the telephone switch (PBX) to obtain an "internal" system
dialtone and to place calls from it as if they were placing a call from
within the switch.
DISA plays a dialtone. The user enters their numeric passcode, followed by
the pound sign (#). If the passcode is correct, the user is then given
system dialtone on which a call may be placed. Obviously, this type
of access has SERIOUS security implications, and GREAT care must be
taken NOT to compromise your security.
There is a possibility of accessing DISA without password. Simply
exchange your password with "no-password".
Example: exten => s,1,DISA(no-password|local)
Be aware that using this compromises the security of your PBX.
The arguments to this application (in extensions.conf) allow either
specification of a single global passcode (that everyone uses), or
individual passcodes contained in a file. It also allows specification
of the context on which the user will be dialing. If no context is
specified, the DISA application defaults the context to "disa".
Presumably a normal system will have a special context set up
for DISA use with some or a lot of restrictions.
The file that contains the passcodes (if used) allows specification
of either just a passcode (defaulting to the "disa" context, or
passcode|context on each line of the file. The file may contain blank
lines, or comments starting with "#" or ";". In addition, the
above arguments may have |new-callerid-string appended to them, to
specify a new (different) callerid to be used for this call, for
example: numeric-passcode|context|"My Phone" <(234) 123-4567> or
full-pathname-of-passcode-file|"My Phone" <(234) 123-4567>. Last
but not least, |mailbox[@context] may be appended, which will cause
a stutter-dialtone (indication "dialrecall") to be used, if the
specified mailbox contains any new messages, for example:
numeric-passcode|context||1234 (w/a changing callerid). Note that
in the case of specifying the numeric-passcode, the context must be
specified if the callerid is specified also.
If login is successful, the application looks up the dialed number in
the specified (or default) context, and executes it if found.
If the user enters an invalid extension and extension "i" (invalid)
exists in the context, it will be used. Also, if you set the 5th argument
to 'NOANSWER', the DISA application will not answer initially.
Using Authenticate is a "safer" option
asterisk -rx "core show application authenticate"
-= Info about application 'Authenticate' =-
[Synopsis]
Authenticate a user
[Description]
Authenticate(password[|options[|maxdigits]]): This application asks the
caller
to enter a given password in order to continue dialplan execution. If the
password
begins with the '/' character, it is interpreted as a file which contains a
list of
valid passwords, listed 1 password per line in the file.
When using a database key, the value associated with the key can be
anything.
Users have three attempts to authenticate before the channel is hung up. If
the
passsword is invalid, the 'j' option is specified, and priority n+101
exists,
dialplan execution will continnue at this location.
Options:
a - Set the channels' account code to the password that is entered
d - Interpret the given path as database key, not a literal file
j - Support jumping to n+101 if authentication fails
m - Interpret the given path as a file which contains a list of account
codes and password hashes delimited with ':', listed one per line
in
the file. When one of the passwords is matched, the channel will
have
its account code set to the corresponding account code in the file.
r - Remove the database key upon successful entry (valid with 'd' only)
maxdigits - maximum acceptable number of digits. Stops reading after
maxdigits have been entered (without requiring the user to
press the '#' key).
Defaults to 0 - no limit - wait for the user press the '#' key.
Since you (OP) asked for a "fish" today, here it is
[dial-w-pass]
Exten => s,1,noop(get pass and dial)
Exten => s,n,authenticate(1234,j,4)
Exten => s,n,dial(.)
Exten => s,n,hangup()
Exten => s,101,playback(tt-monkeys)
Exten => s,102,hangup
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of bakko
Sent: Tuesday, September 20, 2011 8:44 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Add PinCode on my dialplan
Or authenticate aplication.
If you want use a database with a user and pin table, so each user have a
pin asigned, you can look a func_odbc function.
Regards
----- Original Message -----
From: Danny Nicholas <mailto:danny at debsinc.com>
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
<mailto:asterisk-users at lists.digium.com>
Sent: Tuesday, September 20, 2011 8:38 AM
Subject: Re: [asterisk-users] Add PinCode on my dialplan
That's what the DISA function is for.
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Malvin Rito
Sent: Tuesday, September 20, 2011 8:34 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Add PinCode on my dialplan
Hi List,
I currently have a asterisk server running used for dialing-out for IDD but
I want to Put a pincode wherein only users with the right pin code will be
allowed to dial IDD. Any sample dialplan you can suggest pls?
Thanks,
Malvin
_____
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110920/ddba3230/attachment.htm>
More information about the asterisk-users
mailing list