Re: [Asterisk-java-users] asteriskServer.getChannelByName Timeout waiting for events from StatusAct
Brought to you by:
srt
From: Yves A. <yv...@gm...> - 2014-03-11 15:49:57
|
Hi, Just to make sure I understand you right...: 1.) Phone x calls into your conference via pstn 2.) you want to "hijack" the channel or superimpose DTMF ? If you use asterisk 11.x you could do some specials like this, but to call via java into the conference and send the tones would be easier... or is it a constraint, that other users in the conference must not hear the tones? regards, yves Am 11.03.2014 15:03, schrieb Jorge: > Hi: > > I have the next scenario. I am triying to call from pstn to a > conference in Asterisk server. I have set up the dial plan so the main > telephone number is the the conference so calling for example > 555-555555 you get into the conference. > > My objective is capturing this channel from java to send tones from > Asterisk to the phone. What I am triying to do is the next thing : > > managerEventListener = new ManagerEventListener(){ > public void onManagerEvent(ManagerEvent event) { > if(event instanceof MeetMeJoinEvent ){ > MeetMeJoinEvent meetMeJoinEvent = > (MeetMeJoinEvent) event; > String server = meetMeJoinEvent.getServer(); > meetMeJoinEvent.getCallerIdNum(); > System.out.println(meetMeJoinEvent.getChannel()); > try{ > AsteriskChannel asteriskChannel = > asteriskServer.getChannelByName(meetMeJoinEvent.getChannel()); > System.out.println(asteriskChannel); > //asteriskChannel.playDtmf("1"); > System.out.println("terminado"); > }catch(ManagerCommunicationException e){ > logger.error("Error al obtener el canal " + e); > System.out.println("Error " + e); > } > } > } > }; > > That is to say I am capturing the MeetMeJoinEvent to see when this > phone has been connected to the conference. With this event I am able > to get the channel name and with the instruction the channel structure > but I get : "org.asteriskjava.live.ManagerCommunicationException: > Timeout waiting for events from StatusAction" > > The great thing is that when I originate the call from Asterisk with > "asteriskChannel = asteriskServer.originateToExtension("DAHDI/g0/" + > numero, contexto , conferenciaNumeroSip, 1, 10000);" it is able to get > the channel. > > Could you let me know what I am doing wrong? > > Thank you very much for your help. > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |