Re: [Asterisk-java-users] AGI Thread does not break at call Hangup
Brought to you by:
srt
From: Yves A. <yv...@gm...> - 2014-04-03 10:21:43
|
hi, please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. this might already bring the expected behaviour. regards, yves Am 03.04.2014 01:45, schrieb Zoumana TRAORE: > Hi Yves, > > Thanks for helping me out. > Yes, i found that strange too. > Asterisk 11.5 > AJ 0.3.1 > > Here is the code: > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > } > hangup(); > } > > > Here is the output (there is something interesting indeed, > channelStatus=-1 after my hangup, i could try to use that for my need > if nobody sees something more suitable) > INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > channelStatus=6 > playing2 > channelStatus=-1 > playing3 > channelStatus=-1 > Apr 3, 2014 1:42:37 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > > Thanks > > > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > 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 <tel:03.04.2014%2000>: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... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |