[Asterisk-java-users] how to avoid autohangup AGI

2016-03-14 Thread Иван Виноградов
Hello. Possible could somebody help me?
I'm trying to use asterisk-java first time.

public class TimeoutCalculation extends BaseAgiScript  {

public void service(AgiRequest request, AgiChannel channel) throws
AgiException {
   channel.setVariable("dialTimeout", String.valueOf(20));
}

[context]
exten => _048XXX,1,Noop(NoOP)
exten => _048XXX,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
AGI Tx >> agi_request: agi://localhost/getTimeout.agi
AGI Tx >> agi_channel: SIP/2001-0020
.
AGI Rx << SET VARIABLE "dialTimeout" "20"
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE "AJ_AGISTATUS" "SUCCESS"
AGI Tx >> 200 result=1
-- AGI Script agi://localhost/getTimeout.agi
completed, returning 0
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(100); 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
Asterisk-java-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asterisk-java-users


Re: [Asterisk-java-users] how to avoid autohangup AGI

2016-03-14 Thread Yves

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 => _048XXX,1,Noop(NoOP)
exten => _048XXX,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
AGI Tx >> agi_request: agi://localhost/getTimeout.agi
AGI Tx >> agi_channel: SIP/2001-0020
.
AGI Rx << SET VARIABLE "dialTimeout" "20"
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE "AJ_AGISTATUS" "SUCCESS"
AGI Tx >> 200 result=1
 -- AGI Script agi://localhost/getTimeout.agi completed, 
returning 0
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(100); 
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
Asterisk-java-users@lists.sourceforge.net
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
--
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
Asterisk-java-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asterisk-java-users