Re: [Asterisk-java-users] OriginateCallback onNoAnswer
Brought to you by:
srt
From: Daniele R. <dan...@gm...> - 2013-01-20 14:46:43
|
Hi guys, I think that my problem is linked to this bug: https://issues.reucon.com/browse/AJ-320 Any suggestion? THanks 2013/1/19 Shitian Long <lon...@gm...> > Thanks for your message. Actually I didn't implement call back like this > before. > What I implement call back is using "ManagerConnection" sendAction with > an OriginateAction argument. > > looks the "Hello Manager" in the > http://www.asterisk-java.org/development/tutorial.html > > So probably I couldn't help you to much in this case…. > > Anyway good to know your method. I will try it out, and let you know my > result. > > > > > > On Jan 19, 2013, at 3:01 PM, Daniele Renda <dan...@gm...> > wrote: > > In the CLI all works fine, infact the call works but Asterisk Java mark it > as NO_ANSWER always!! > I've set debug log in my class where I'm using AsteriskManager, with old > asterisk-java lib when I make a call I receive the event of RINGING, then > onSuccess() when the user answer the call and so on, instead with the last > asterisk-java lib I get the RINGING event but immediately after I go to > onNoAnswer() method. > > > try { > telefonata.onCreate(); > asteriskServer.originateAsync(action, new MyOriginateCallback(telefonata)); > } catch (ManagerCommunicationException e) { > log.error(telefonata.getId() + " ha generato un errore", e); > telefonata.onFailure(); > } > > and MyOriginateCallback: > private class MyOriginateCallback implements OriginateCallback { > > private final TelefonataInterface telefonata; > > private MyOriginateCallback(TelefonataInterface telefonata) { > > this.telefonata = telefonata; > } > > @Override > public void onDialing(final AsteriskChannel channel) { > log.debug("On dialing comunicazione " + telefonata.getId()); > telefonata.onDialing(); > > ... > ... > > } > > @Override > public void onSuccess(AsteriskChannel channel) { > log.debug("Success " + telefonata.getId() + " " + channel); > > log.debug("La comunicazione è iniziata alle " + channel.getDateOfCreation()); > telefonata.onSuccess(); > } > > @Override > public void onNoAnswer(AsteriskChannel channel) { > log.debug("NoAnswer " + telefonata.getId() + " " + channel); > > telefonata.onNoAnswer(); > } > > @Override > public void onBusy(AsteriskChannel channel) { > log.debug("Busy " + telefonata.getId() + " " + channel); > telefonata.onBusy(); > } > > @Override > public void onFailure(LiveException cause) { > log.debug("OnFailure(...)' - " + telefonata.getId()); > telefonata.onFailure(); > } > } > > I can't see anything strage in this code. > > Thanks very much > > > > 2013/1/19 Shitian Long <lon...@gm...> > >> Any thing happens in the CLI when call back didn't work? >> >> And what is your OriginateAction looks like in java application? >> >> >> On Jan 18, 2013, at 7:23 PM, Daniele Renda <dan...@gm...> >> wrote: >> >> > Hi all, >> > I've a small project that use ManagerConnection and >> asteriskServer.originateAsync(action, new MyOriginateCallback(telefonata)); >> with a callBack. >> > All works fine with asterisk-java-1.0.0.M3 but with >> asterisk-java/1.0.0.CI-SNAPSHOT/asterisk-java-1.0.0.CI-20130102.214528-1134-bin.zip >> I've a big problem: >> > all calls go to onNoAnswer also when they are answered!! >> > >> > There is something changed from the version I'm using? >> > >> > Thanks >> > >> > -- >> > Daniele Renda >> > >> ------------------------------------------------------------------------------ >> > Master HTML5, CSS3, ASP.NET <http://asp.net/>, MVC, AJAX, Knockout.js, >> Web API and >> > much more. Get web development skills now with LearnDevNow - >> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and >> experts. >> > SALE $99.99 this month only -- learn more at: >> > >> http://p.sf.net/sfu/learnmore_122812_______________________________________________ >> > Asterisk-java-users mailing list >> > Ast...@li... >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET <http://asp.net/>, C# >> 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. SALE $99.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122912 >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > > > > -- > Daniele Renda > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > > http://p.sf.net/sfu/learnmore_122912_______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122912 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |