RE: [Asterisk-java-users] AGI Chanell Issue
Brought to you by:
srt
From: Olivier B. <Oli...@vo...> - 2006-01-30 15:56:37
|
I am running the WIn32 version 0.56 of Asterisk, which is the equivalent = of the Linux version 1.0.10 No error coming out the agi debug cli. =20 Olivier ________________________________ From: ast...@li... on behalf of = Stefan Reuter Sent: Sun 1/29/2006 10:08 AM To: ast...@li... Subject: Re: [Asterisk-java-users] AGI Chanell Issue Hi, what version of Asterisk do you use? Please try to enable agi debugging on the CLI and post the output. Maybe that helps trace the problem: srv1*CLI> agi debug AGI Debugging Enabled =3DStefan On Thu, 2006-01-26 at 16:17 -0800, Olivier Brand wrote: > I am trying to implement the example from the tutorial but the example > hangs when a channel method is called (including of course the answer > method). >=20 > 1) I am using the Asterisk version on Windows. > 2) The extension.conf contains the following line: > exten =3D> 1300,1,Agi(agi://localhost/demo.agi) > 3) I am starting the DefaultAGIServer from Eclipse and see the > following logging info at startup: > Jan 26, 2006 4:07:44 PM net.sf.asterisk.util.impl.JavaLoggingLog > info > > INFO: Thread pool started. > > Jan 26, 2006 4:07:44 PM net.sf.asterisk.util.impl.JavaLoggingLog > info > > INFO: Listening on *:4573. > > > 4) I am calling extension 1300 from an Xlite client, the client tries > to connect >=20 > 5) The following logging info shows up in Asterisk PBX console: >=20 > -- Executing AGI("SIP/olivier-6fd9","agi://localhost/demo.agi") in > new stack >=20 > 6) On Eclipse I can see the following logging info: > Jan 26, 2006 4:11:45 PM net.sf.asterisk.util.impl.JavaLoggingLog > info > > INFO: Received connection. > > Jan 26, 2006 4:11:45 PM net.sf.asterisk.util.impl.JavaLoggingLog > info > > INFO: Added mapping for 'demo.agi' to class class > com.vodafone.asterisk.demo.WeatherScript > > Jan 26, 2006 4:11:45 PM net.sf.asterisk.util.impl.JavaLoggingLog > info > > INFO: Begin AGIScript com.vodafone.asterisk.demo.WeatherScript on > AGIServer-TaskThread-0 > > Jan 26, 2006 4:11:45 PM com.vodafone.asterisk.demo.WeatherScript > service > > INFO: HELLO WORLD > > Jan 26, 2006 4:11:45 PM com.vodafone.asterisk.demo.WeatherScript > service > > INFO: net.sf.asterisk.fastagi.impl.AGIChannelImpl@dbe178 > > > 7) The code of the demo is as follow: >=20 > package com.vodafone.asterisk.demo; >=20 > import java.util.logging.Logger; >=20 > import net.sf.asterisk.fastagi.AGIChannel; > import net.sf.asterisk.fastagi.AGIException; > import net.sf.asterisk.fastagi.AGIRequest; > import net.sf.asterisk.fastagi.BaseAGIScript; >=20 > public class WeatherScript extends BaseAGIScript > { > private static Logger logger =3D Logger.getLogger("WeatherScript"); > public void service(AGIRequest arg0, AGIChannel channel) throws > AGIException > { > =20 > logger.info("HELLO WORLD"); > logger.info(channel.toString()); > logger.info(String.valueOf(channel.getChannelStatus())); // > <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D NEVER GET LOGGED!!! > > channel.answer(); // <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D DOES = NOT EXECUTE > logger.info("Channel answered"); > //sayDigits("1234"); > //streamFile("demo-congrats"); > channel.hangup(); > } >=20 > } > >=20 |