What does an IVR pin mean

Multi-digit DTMF numbers possible as a PIN query?

Hello MarcFormD,

First of all, welcome to the community. This is a standard functionality but can be implemented using a script.

Then you make a new script under “Advanced> Scripts” with the following settings:

Designation: ivr
Context: ivr
Include: no
Extension: 200

This means that your script can be reached under 200. Here is an approach how that can be done. It's not complete and out of my mind. But should provide enough approaches:

exten => s, 1, Answer; Answer channel
same => n, playback (please-enter-pin); You have to create an announcement beforehand using the announcement system
same => n, Read (PIN, 4); Query pin with 4 digits and save in variable PIN
same => n, GotoIf ($ “$ {PIN}” = “1234”]? ivr, 1); If the PIN is 1234 then continue on the ivr
same => n, hangup; otherwise hang up

exten => ivr, 1, NoOp (IVR); Log line output that we are in the IVR
same => n, PlayBack (duecke-1-2-3); You have to create an announcement beforehand using the announcement system
same => n, WaitExten (); Wait for dialing (1,2,3, ...)

exten => _X, 1, NoOp (single-digit key pressed)
same => n, Set (KEY = $ {EXTEN}); Save key in variable EXTEN
same => n, AGI (/opt/mein_tolles_java.jar $ {EXTEN} $ {PIN}); Call a Java program and transfer the variables. Set channel variables in there
same => n, GotoIf ($ “$ {RETURN}” = “ok”]? main, 100,1); If the returned channel variable has the value ok then after e.g. after internally discard 100
same => n, hangup; Otherwise hang up

You can find more information about the commands and information about Asterisk scripting at voip-info.org.

You can also find everything about AGIs and examples for JAVA there.

I didn't test the script like this. You should watch on the Asterisk CLI how the script is processed in order to recognize possible errors. See http://wiki.pascom.net/confluence/display/MD74DE/Zugriff+auf+MobyDick#ZugriffaufMobyDick-ZugriffaufdieAsteriskCLI