Hey all, I have a dilemma.

I am trying to put together an IVR system for a pharmacy. They want to allow Rx refills over the phone. What I need to figure out is when they choose the option to fill a perscription, after they get the message “Please enter Rx number followed by the # sign” I need to pass the digits they type in to a script that will pass those numbers to a perscription refill system. And based up a code return give them other options. What I really need to know is how to pass the perscription number from asterisk to a script that my colleague is working on so that it may be read by the other system. All I need is to know how to pass that info. Do I need to have a custom context that calls the script? Has anyone attempted this before?

You would use the Read() application.
on cli, do ‘show application read’

so maybe like this:

extem => s,1,Background(welcome)
exten => s,2,Read(RX,enter-rx,3)

Use Read to read the number and pass it to AGI.

exten => s,1,Read(RX|please_enter_your_rx_number)
exten => s,2,AGI(|${RX})

Thanks y’all, I will definitely try that out.
I have my programmer writing the PERL script to accept it and return a true or false. Next step is to take the return value and tell it to play one voice prompt if the return is true and another if the return is false. This is going to get complicated.