RE: [Asterisk-java-users] Interrupting StreamFile with DTMF digits.
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2006-01-12 00:03:46
|
> The last comment might suggest that the quotes around the escape digits > might lead the interpreter to play the file fully as the previous example > does not have any quotes on the escape digit. nope escaping just works fine. I suggest you to have a look if your general DTMF setup is ok as this problem does not seem to directly relate to the AGI stuff. > Does anyone have an example of a working AGI STREAM FILE command with esc= ape > digits provided. I tried it in my test environment with Asterisk 1.2.1 and Asterisk-Java 0.2. Here is my code: TestAGI.java public class TestAGI extends BaseAGIScript { public void service(AGIRequest request, AGIChannel channel) throws AGIException { // answer the call answer(); =20 char c =3D streamFile("vm-instructions", "1"); =20 System.out.println("got char: '" + c + "'"); // end the call hangup(); } public static void main(String[] args) throws IOException { new DefaultAGIServer().startup(); } } fastagi-mapping.properties: test.agi =3D TestAGI Output on Asterisk CLI with agi debug: AGI Rx << ANSWER AGI Tx >> 200 result=3D0 AGI Rx << STREAM FILE "vm-instructions" "1" AGI Tx >> 200 result=3D49 endpos=3D45760 AGI Rx << HANGUP Output of the program after pressing DTMF 1: got char: '1' =3DStefan |