Re: [Asterisk-java-users] how to avoid autohangup AGI
Brought to you by:
srt
From: Yves <yv...@gm...> - 2016-03-14 17:56:22
|
Hi, set the verbosity of your asterisk to at least 3 and see output at cli. if the dialplan you wrote is complete, you will see that your agi returns to the dialplan, but there is no more step to execute in the dialplan and therefor the call is hung up. your agi does nothing more than set a variable and return (immediately). yves Am 14.03.2016 um 09:45 schrieb Иван Виноградов: > Hello. Possible could somebody help me? > I'm trying to use asterisk-java first time. > public class TimeoutCalculationextends BaseAgiScript { > > public void service(AgiRequest request, AgiChannel channel)throws AgiException { > channel.setVariable("dialTimeout", String.valueOf(20)); > } > > [context] > exten => _048XXXXXXX,1,Noop(NoOP) > exten => _048XXXXXXX,n,AGI(agi://localhost/getTimeout.agi) > > but have issue with autohangup > > agi set debug on > AGI Tx >> agi_network: yes > AGI Tx >> agi_network_script: getTimeout.agi > <SIP/2001-00000020>AGI Tx >> agi_request: agi://localhost/getTimeout.agi > <SIP/2001-00000020>AGI Tx >> agi_channel: SIP/2001-00000020 > ................................. > <SIP/2001-00000020>AGI Rx << SET VARIABLE "dialTimeout" "20" > <SIP/2001-00000020>AGI Tx >> 200 result=1 > <SIP/2001-00000020>AGI Rx << SET VARIABLE "AJ_AGISTATUS" "SUCCESS" > <SIP/2001-00000020>AGI Tx >> 200 result=1 > -- <SIP/2001-00000020>AGI Script agi://localhost/getTimeout.agi completed, returning 0 > <SIP/2001-00000020>AGI Tx >> HANGUP > > I don't understand why agi send HANGUP to asterisk? and unfortunately have not find how to disable auto hangup. tried to use channel.setAutoHangup(1000000); but HANGUP sent the same. > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus |