Re: [Asterisk-java-users] Re: Controlling the Queue
Brought to you by:
srt
From: Gerwin B. <ger...@gm...> - 2005-09-27 08:22:21
|
Hi, is there a certain reason why you try to use the manager API for Call =20= handling? Just extend the BaseAGIScript and do your call handling there. More Info can be found here: http://asterisk-java.sourceforge.net/tutorial.html look at the AGI section. Gerwin On Sep 27, 2005, at 10:13 AM, Jan Ekholm wrote: > On Tuesday 27 September 2005 11:00, In=E9s wrote: > >> hello, >> i'm a student, and i'm a beginner in the asterisk world !!! >> i've got a few questions, i hope you can help me : >> - i'm trying to do an application in java, wich receives a call, =20 >> palys >> a audio file, wait for digits, then hangs up. >> but i can't find how to receive the events, and how to asnwer the =20 >> phone. >> > > RedirectAction can be used to answer the phone, but then you'll =20 > need to have > the caller call a queue or similar. I'm not sure if Asterisk-Java =20 > can work as > a softphone by itself, I don't think so. The AGI command =20 > GetDataCommand seems > to be able to read DTMF stuff, but I haven't used it myself. > > > >> voila mon petit code : >> public void run () throws IOException, AuthenticationFailedException, >> TimeoutException, InterruptedException >> { >> //boolean x=3Dtrue; >> >> //register for events >> managerConnection.addEventHandler(this); >> >> // connect to Asterisk and log in >> managerConnection.login(); >> >> >> wait(); >> >> //and finally log off and disconnect >> managerConnection.logoff(); >> >> } >> public void handleEvent(ManagerEvent event) >> { >> // just print received events >> System.out.println("this is an event: "+event); >> String source =3D event.getSource().toString(); >> System.out.println("Source : "+source); >> //print type of event >> System.out.println("Type of the event : >> "+event.getClass().getSimpleName()); >> >> } >> >> On 9/26/05, Alex <ab...@ga...> wrote: >> >>> Hi: >>> >>> My system has the following architecture (in the server side): >>> >>> - An app server (connected to the asterisk console) >>> - An AGI Server (developed with AsteriskJava) >>> - An AGI Script (executed by the above AGI Server) >>> >>> In the client side (Agents answering call center calls): >>> >>> - A softphone >>> - A client program (used to search and register call details) >>> >>> Here is the thing: >>> >>> - =46rom AGI Server I detect that a call is coming from PSTN and =20 >>> launch the >>> AGI Script >>> - =46rom AGI Script I put the call in the queue and I loose the =20 >>> control of >>> the call (here is my first confusion) >>> - The agent answer the call (using his/her softphone) and I get =20 >>> the event >>> from the Asterisk Console with my App Server. >>> >>> Now, I need to play something (TTS, wav, etc) to the caller based =20= >>> on the >>> client application wich is connected to my App Server. What I =20 >>> want you to >>> know is that the information to be played to the caller comes =20 >>> from an >>> external source. >>> >>> So, my two big questions/confusions are: >>> >>> - How can I get the entire control of the call depending on the =20 >>> status of >>> the call, for example, if the call is in the queue and I need to =20 >>> play or >>> do something with it, where and how I have the control? until =20 >>> now, when I >>> put the call in the queue I loss the control until the caller or the >>> agent hangs the call. >>> >>> - Once the call is answered by the Agent, how can I unlink the two >>> channels (releasing the agent) to let the caller hear the text =20 >>> that the >>> agent sent. >>> >>> >>> Thanks in advance, >>> >>> Alejandro >>> >> >> -- >> In=E9s MOUSSA >> =C9l=E8ve ing=E9nieur g=E9nie logiciel >> 21 rue Henri Marrou >> Chatenay-Malabry 92290 >> Tel : 00 33 613984578 >> ine...@gm... >> ine...@ec... >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: >> Tame your development challenges with Apache's Geronimo App Server. >> Download it for free - -and be entered to win a 42" plasma tv or =20 >> your very >> own Sony(tm)PSP. Click here to play: http://sourceforge.net/=20 >> geronimo.php >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > > --=20 > Jan Ekholm > jan...@pl... > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or =20 > your very > own Sony(tm)PSP. Click here to play: http://sourceforge.net/=20 > geronimo.php > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |