Re: [Asterisk-java-users] AGI Thread does not break at call Hangup
Brought to you by:
srt
From: Yves A. <yv...@gm...> - 2014-04-02 23:17:27
|
hi, normally you would get an exception at any method that accesses a hungup channel. this bevaviour is strange. which version of asterisk and aj are you using? add a system.out.println(channel.getChannelStatus()); before streaming and post the output... yves Am 03.04.2014 00:46, schrieb Zoumana TRAORE: > Hi everybody, > > During an incoming call handled by AGI, i would like to detect > where the caller hangup and then break the IVR scenario at this > precise point. > > For example: > Here is my AGI content: > / > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > channel.streamFile("svi/jingle"); > } > hangup(); > } > / > Each audio play has 7 seconds duration. > Even i hangup the call during the "playing 1", AGI keeps executing all > the sequences. > This is the output: > > /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > playing2 > playing3 > Apr 3, 2014 12:26:52 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > / > Thanks! > > Regards, > Zoumana > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |