How do I interrupt voice promt (asterisk-java) with star?


I’m developing an IVR with asterisk and asterisk-java and I want to be able to interrupt voice prompts, getData(), by pressing star. At the moment I can get the user to interrupt the prompt by pressing 0-9 or # and I get the value passed on to my java app.
However, the prompt is not interrupted when * is pressed but after the getData() times out, I get the value ‘*’ passed on to my java app.

So, how do I get the * to interrupt the prompt like 0-9 and # do?

Also, on a side not, should # really be passed to the java app as null when doing getData()? I can handle it in the app but it seems a bit odd. Especially when * is passed as string value ‘*’ to the app after the timeout.

All help appreciated


I believe the # is the default termination key for whatever DTMF input application GetData is mapped to in the asterisk side… perhaps it’s Read(), but I’m not sure.

If you wanted * to also be a terminator, you may need to dig into the asterisk code and tweak it accordingly.