Board logo

標題: Authenticate application (from other website) [打印本頁]

作者: ckleea    時間: 2011-9-22 07:53     標題: Authenticate application (from other website)

I saw this spanish

Translated to English for sharing

Page 1
Published in VozToVoice ( http://www.voztovoice.org )
Home > Print PDF > Print PDF
Asterisk PBX 1.6.2.X: As authorize calls
an international application using PIN
Authenticate
Wed, 21/09/2011 - 10:46? admin
In many companies often present the problem of how to control calls made ​​by the
employees, especially international ones.
In this article we will see how to authenticate the employee with the Authenticate application.
We know the command syntax:
asterisk? rvvvvvvvvvvvvvv
CLI> core show application authenticate
[Syntax]
Authenticate (password [, options [, maxdigits, [prompt]]])
Page 2
[Arguments]
password
Should know the user password
options
to: Set the channels' account code to the password That Is Entered
d: Interpret the path as database key Given, not a literal file
m: Interpret The Given as a file path contains a list of Which account
password hashes codes and delimited with ':', listed one per line in the
file. When one of the passwords is matched, the channel Will Have STIs
account code in September to the Corresponding code in the account file.
r: Remove the key database upon Successful entry (valid with 'd'
only)
maxdigits
maximum acceptable number of digits. After reading maxdigits Stops
Have Been Entered (without Requiring the user to press the '#' key).
Defaults to 0 - no limit - wait for the user press the '#' key.
prompt
Override prompt the agent-pass file.
As you can see the password option can contain a value or reference to a text file
contains a list of names with the respective passwords separated by the character:
Good. Assuming that we have to create the PIN for three employees:
Name
PIN
Fulano
1234
Zutano
1235
Mengano
1236
Now we encrypt the passwords:
echo-n "1234" | md5sum
the result is:
81dc9bdb52d04dc20036dbd8313ed055
We continue with the remaining two:
echo-n "1235" | md5sum
9996535e07258a7bbfd8b132435c5962
echo-n "1236" | md5sum
Page 3
7bccfde7714a1ebadf06c5f4cea752c1
We create the text file with the names of employees and the respective encrypted passwords:
nano / tmp / pin.txt
paste the following lines:
Fulano: 81dc9bdb52d04dc20036dbd8313ed055
Zutano: 9996535e07258a7bbfd8b132435c5962
Mengano: 7bccfde7714a1ebadf06c5f4cea752c1
Save the changes.
Now we can modify the dial plan to create a section dedicated to authentication for calls
international. Assuming that the context is used for international calls is? Internat?,
put:
nano / etc / asterisk / extensions.conf
[Int'l]
exten => _00., 1, NoOp
Same => n, Authenticate (/ tmp / pin.txt, am, 4)
Same => n, Dial (SIP / provider / $ {FILTER (0-9, $ {EXTEN})})
Same => n, Hangup
The first parameter defines the folder and name the file containing the passwords.
Option to set that record calls accountcode field contains the name of
employee (so we can monitor all calls made ​​by each employee)
regardless of the extent you have used.
The m option defines the text file will contain passwords encrypted with MD5.
The last parameter indicates that the PIN is 4 digits of avoiding having to use the number key
to finish sending the digits.
If the password is typed in the text file created, the dialplan will do the line following nde
start talking (assuming that the call using the syntax: 00 + code
country code + number).
The changes are saved and reload the dialplan:
asterisk? rvvvvvvvvvv
CLI> dialplan reload
Now click an international number and use the PIN Smith. After the call in the CDR
(Recording of calls) will see:
Page 4
[1]
Accountcode appear in the employee's name Smith.
In a forthcoming article illustrates how to authenticate employees for international calls through
a database and func_odbc function with the possibility to change the PIN at any time.
Asterisk 1.6.2.X
[2]
Authenticate
[3]
International Calling
[4]
PIN
[5]
Source URL (retrieved on 21/09/2011 - 18:43): http://www.voztovoice.org/?q=node/477
Links:
[1]
[2] http://www.voztovoice.org/?q=taxonomy/term/319
[3] http://www.voztovoice.org/?q=taxonomy/term/537
[4] http://www.voztovoice.org/?q=taxonomy/term/538
[5] http://www.voztovoice.org/?q=taxonomy/term/539
RuneScape Wiki: Page 1 is a quest item used in the Slug Menace quest. →
作者: alang    時間: 2011-9-22 10:19

除了這個,還有另一個可以整合 voicemail 的密碼的認證程序,用戶不需另外再記憶其他密碼,詳細可參考指令
asterisk -rx "core show application VMAuthenticate"




歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2