[Asterisk-java-users] AGI commands not worked in Thread class
Brought to you by:
srt
From: Balaji C. <bal...@gm...> - 2008-06-11 13:28:21
|
Hi All, I have the situation in my project that needs to run thread for getting DTMF input dynamically. So I have created a new thread and started it from "service" method of the class which extends BaseAgiScript. But AGI commands are not worked in the thread class. I got the exception as Exception in thread "Thread-3" java.lang.IllegalStateException: Trying to send command from an invalid thread at org.asteriskjava.fastagi.AgiOperations.getChannel(AgiOperations.java:74) at org.asteriskjava.fastagi.AgiOperations.sayAlpha(AgiOperations.java:268) at HelloAgiScript$RecordingThread.run(HelloAgiScript.java:195) Can anyone tell whether this can be feasible or not?. How can I achieve the above situation? Thanking you well in advance, Regards, Balaji |