You can do this with play_and_get_digits. Just put the correct "pin" value in the regex value of pagd. If they enter the incorrect value then just have the "failure" value be a transfer to a "thank you, goodbye" extension or something like that.<br>
<br>This is your basic pagd syntax:<br><font size="1"><span style="font-family:courier new,monospace"><action application="play_and_get_digits" data="4 4 3 # /enter_pin.wav /invalid_entry.wav digits 1234 2000 oops "/></span><br style="font-family:courier new,monospace">
</font><br>(Note that you need to use real file names - see the play_and_get_digits syntax for all the details.)<br><br>Then you need an "oops" extension for when they enter the wrong value"<br><br><font size="1"><span style="font-family:courier new,monospace"><extension name="oops, wrong PIN"></span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <condition field="destination_number" expression="^oops$"></span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <action application="playback" data="too_many_failed_entries.wav"/></span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <action application="hangup"/></span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> </condition></span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"></extension></span><br style="font-family:courier new,monospace"></font><br>(Again, you'll need a real sound file with some sort of message telling the caller that he/she entered too many failures. Check our list of sound files in the ivr subdir - there might be one you can use.)<br>
<br>Have fun!<br><br>-MC<br><br><div class="gmail_quote">On Mon, Dec 26, 2011 at 1:06 PM, <span dir="ltr"><<a href="mailto:georg@riseup.net">georg@riseup.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
As the subject states: I'm searching for an application similar to<br>
Asterisks 'Authenticate' [1]. The description writes: "The application<br>
requires a user to enter a password in order to continue execution." I've<br>
found on the wiki the function used for conference rooms, however I need<br>
this for a public reachable phone number, which then leads to a call<br>
redirection system.<br>
<br>
Thanks,<br>
Georg<br>
<br>
[1] <a href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Authenticate" target="_blank">http://www.voip-info.org/wiki/view/Asterisk+cmd+Authenticate</a><br><br></blockquote></div>