You can subscribe to this list here.
2005 |
Jan
|
Feb
(8) |
Mar
(33) |
Apr
(36) |
May
(19) |
Jun
(21) |
Jul
(53) |
Aug
(30) |
Sep
(36) |
Oct
(34) |
Nov
(43) |
Dec
(72) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(123) |
Feb
(75) |
Mar
(86) |
Apr
(46) |
May
(41) |
Jun
(29) |
Jul
(76) |
Aug
(38) |
Sep
(39) |
Oct
(68) |
Nov
(16) |
Dec
(17) |
2007 |
Jan
(34) |
Feb
(18) |
Mar
(39) |
Apr
(30) |
May
(20) |
Jun
(10) |
Jul
(59) |
Aug
(54) |
Sep
(60) |
Oct
(22) |
Nov
(14) |
Dec
(10) |
2008 |
Jan
(34) |
Feb
(67) |
Mar
(65) |
Apr
(67) |
May
(60) |
Jun
(51) |
Jul
(88) |
Aug
(75) |
Sep
(47) |
Oct
(143) |
Nov
(54) |
Dec
(42) |
2009 |
Jan
(46) |
Feb
(80) |
Mar
(162) |
Apr
(159) |
May
(200) |
Jun
(34) |
Jul
(46) |
Aug
(59) |
Sep
(5) |
Oct
(35) |
Nov
(73) |
Dec
(30) |
2010 |
Jan
(23) |
Feb
(50) |
Mar
(8) |
Apr
(24) |
May
(19) |
Jun
(49) |
Jul
(56) |
Aug
(35) |
Sep
(26) |
Oct
(79) |
Nov
(39) |
Dec
(34) |
2011 |
Jan
(27) |
Feb
(22) |
Mar
(28) |
Apr
(12) |
May
(16) |
Jun
(19) |
Jul
(1) |
Aug
(64) |
Sep
(19) |
Oct
(11) |
Nov
(17) |
Dec
(12) |
2012 |
Jan
(6) |
Feb
(8) |
Mar
(15) |
Apr
(43) |
May
(41) |
Jun
(14) |
Jul
(32) |
Aug
(3) |
Sep
(4) |
Oct
(7) |
Nov
(11) |
Dec
(11) |
2013 |
Jan
(35) |
Feb
(11) |
Mar
(23) |
Apr
(25) |
May
(37) |
Jun
(47) |
Jul
(25) |
Aug
(21) |
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2014 |
Jan
(26) |
Feb
(2) |
Mar
(18) |
Apr
(41) |
May
(7) |
Jun
(7) |
Jul
(24) |
Aug
(5) |
Sep
(6) |
Oct
(8) |
Nov
(9) |
Dec
(7) |
2015 |
Jan
(7) |
Feb
(15) |
Mar
(8) |
Apr
(12) |
May
(7) |
Jun
|
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(3) |
Nov
(30) |
Dec
(3) |
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(4) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Yves A. <yv...@gm...> - 2013-08-05 16:16:13
|
hi, this looks ok for me... as long as you dont forget to remove the listener. I also would check the impact to the whole system / performance / memory usage depending on the amount of calls your code has to handle... i could imagine that this is not healthy for high traffic... if you have a high call volume you maybe should go another way.... but try it out and give feedback, yves Am 05.08.2013 16:33, schrieb Daniele Renda: > Ah ok, > the problem is that I need to know the value of the variable inside > "private class MyOriginateCallback implements OriginateCallback" > because I need the reference of my "Call" object that is inside this > class. > So every time I should add and remove listener from managerconnection > is this way: > > channel.getServer().getManagerConnection().addEventListener(new > ManagerEventListener() { > > @Override > public void onManagerEvent(ManagerEvent event) { > if (event instanceof VarSetEvent) { > VarSetEvent varEvent = (VarSetEvent) event; > String variabile = varEvent.getVariable(); > log.debug("Impostata variabile: " + variabile > + " su telefonata " + telefonata.getId()); > String valore = varEvent.getValue(); > log.debug("Valore : " + valore + " su > telefonata " + telefonata.getId()); > } > > } > }); > > What do you think? > > Thanks > > > > > 2013/8/5 Yves A. <yv...@gm... <mailto:yv...@gm...>> > > no... > > i don´t think that the propertychangeeventlistener will receive > varsetevents.... > you´ll have to open a managerconnection and add an eventlistener > to it.. > > y. > > > Am 05.08.2013 16:03, schrieb Daniele Renda: >> Hi Yves, >> thanks for your suggestion. >> >> You mean that in ; >> >> channel.addPropertyChangeListener(new PropertyChangeListener() { >> >> @Override >> public void propertyChange(PropertyChangeEvent evt) { >> >> I need to test: >> >> if (evt.getSource() instanceof VarSetEvent) >> >> Right? >> >> Thanks >> >> >> >> 2013/8/5 Yves A. <yv...@gm... <mailto:yv...@gm...>> >> >> Have you tried to "listen" to the VarSetEvent ? >> >> yves >> >> Am 05.08.2013 14:29, schrieb Daniele Renda: >>> Hi yves, >>> sorry for the lack of details. >>> >>> I do this: >>> >>> OriginateAction action = createAction(telefonata); >>> try { >>> telefonata.onCreate(); >>> asteriskServer.originateAsync(action, new >>> MyOriginateCallback(telefonata)); >>> } catch (ManagerCommunicationException e) { >>> log.error(telefonata.getId() + " ha generato un errore", e); >>> telefonata.onFailure(); >>> } >>> >>> 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(); >>> channel.addPropertyChangeListener(new PropertyChangeListener() { >>> >>> @Override >>> public void >>> propertyChange(PropertyChangeEvent evt) { >>> if (evt.getSource() instanceof >>> AsteriskChannel) { >>> >>> // EVENTO DI HANGUP >>> if (channel.getState() == >>> ChannelState.HUNGUP) { >>> String hangupCauseText = ""; >>> if (channel.getHangupCauseText() >>> != null) >>> hangupCauseText = channel.getHangupCauseText(); >>> telefonata.onHangupEvent(channel); >>> } >>> >>> } >>> }); >>> } >>> >>> @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(); >>> } >>> >>> } >>> >>> My dialplan: >>> >>> [test] >>> exten => s,1,Answer() >>> exten => s,1,Playback(smt) >>> exten => 3,n,Set(variable=This is the value of the variable) >>> exten => s,n,Hangup() >>> >>> I've a PropertyChangeListener so I can know when the call >>> hangup. I'd like to get the value of the variable into >>> Javacode in my method onHangupEvent(), so when the call end >>> I need to read that variable. >>> I know that I can create a class that extends BaseAgiScript >>> to get the variable, but there is another way to do this? >>> Would be more convenient to have the variable in the method >>> onHangupEvent() for my case. >>> >>> Thanks >>> >>> >>> 2013/8/5 Yves A. <yv...@gm... <mailto:yv...@gm...>> >>> >>> why do most people always think, one could "guess" their >>> code, settings and environment that causes trouble? >>> >>> every access to a channel lead to an exception, if the >>> channel is already hung up. >>> if you need access to your channelvariables after >>> hangup, you have to go another way... >>> varsetevent and a local static map may be your friends here. >>> >>> of course there exists the h extensions which you could >>> use to call another agi after hangup, but as i wrote >>> before... i have no >>> idea what your objective is, nor do i have any code to >>> comment on... >>> >>> yves >>> >>> >>> Am 05.08.2013 13:00, schrieb Daniele Renda: >>>> Hi, >>>> I need to read a variable that I set from dialplan >>>> after i receive the onHangupEvent() on OriginateAsync. >>>> But I've an exception because Asterisk Java don't find >>>> anymore the channels because is hanged up I guess. >>>> >>>> So, there is another way to get the variable in Java >>>> before the call ends? >>>> >>>> Thanks very much! >>>> >>>> -- >>>> Daniele Renda >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Get your SQL database under version control now! >>>> Version control is standard for application code, but databases havent >>>> caught up. So what steps can you take to put your SQL databases under >>>> version control? Why should you start doing it? Read more to find out. >>>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>>> >>>> >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> ------------------------------------------------------------------------------ >>> Get your SQL database under version control now! >>> Version control is standard for application code, but >>> databases havent >>> caught up. So what steps can you take to put your SQL >>> databases under >>> version control? Why should you start doing it? Read >>> more to find out. >>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> -- >>> Daniele Renda >>> >>> >>> ------------------------------------------------------------------------------ >>> Get your SQL database under version control now! >>> Version control is standard for application code, but databases havent >>> caught up. So what steps can you take to put your SQL databases under >>> version control? Why should you start doing it? Read more to find out. >>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but >> databases havent >> caught up. So what steps can you take to put your SQL >> databases under >> version control? Why should you start doing it? Read more to >> find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2013-08-05 14:33:28
|
Ah ok, the problem is that I need to know the value of the variable inside "private class MyOriginateCallback implements OriginateCallback" because I need the reference of my "Call" object that is inside this class. So every time I should add and remove listener from managerconnection is this way: channel.getServer().getManagerConnection().addEventListener(new ManagerEventListener() { @Override public void onManagerEvent(ManagerEvent event) { if (event instanceof VarSetEvent) { VarSetEvent varEvent = (VarSetEvent) event; String variabile = varEvent.getVariable(); log.debug("Impostata variabile: " + variabile + " su telefonata " + telefonata.getId()); String valore = varEvent.getValue(); log.debug("Valore : " + valore + " su telefonata " + telefonata.getId()); } } }); What do you think? Thanks 2013/8/5 Yves A. <yv...@gm...> > no... > > i don´t think that the propertychangeeventlistener will receive > varsetevents.... > you´ll have to open a managerconnection and add an eventlistener to it.. > > y. > > > Am 05.08.2013 16:03, schrieb Daniele Renda: > > Hi Yves, > thanks for your suggestion. > > You mean that in ; > > channel.addPropertyChangeListener(new PropertyChangeListener() { > > @Override > public void propertyChange(PropertyChangeEvent evt) { > > I need to test: > > if (evt.getSource() instanceof VarSetEvent) > > Right? > > Thanks > > > > 2013/8/5 Yves A. <yv...@gm...> > >> Have you tried to "listen" to the VarSetEvent ? >> >> yves >> >> Am 05.08.2013 14:29, schrieb Daniele Renda: >> >> Hi yves, >> sorry for the lack of details. >> >> I do this: >> >> OriginateAction action = createAction(telefonata); >> try { >> telefonata.onCreate(); >> asteriskServer.originateAsync(action, new >> MyOriginateCallback(telefonata)); >> } catch (ManagerCommunicationException e) { >> log.error(telefonata.getId() + " ha generato un >> errore", e); >> telefonata.onFailure(); >> } >> >> 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(); >> channel.addPropertyChangeListener(new >> PropertyChangeListener() { >> >> @Override >> public void propertyChange(PropertyChangeEvent evt) { >> if (evt.getSource() instanceof AsteriskChannel) { >> >> // EVENTO DI HANGUP >> if (channel.getState() == ChannelState.HUNGUP) >> { >> String hangupCauseText = ""; >> if (channel.getHangupCauseText() != null) >> hangupCauseText = >> channel.getHangupCauseText(); >> telefonata.onHangupEvent(channel); >> } >> >> } >> }); >> } >> >> @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(); >> } >> >> } >> >> My dialplan: >> >> [test] >> exten => s,1,Answer() >> exten => s,1,Playback(smt) >> exten => 3,n,Set(variable=This is the value of the variable) >> exten => s,n,Hangup() >> >> I've a PropertyChangeListener so I can know when the call hangup. I'd >> like to get the value of the variable into Javacode in my method >> onHangupEvent(), so when the call end I need to read that variable. >> I know that I can create a class that extends BaseAgiScript to get the >> variable, but there is another way to do this? Would be more convenient >> to have the variable in the method onHangupEvent() for my case. >> >> Thanks >> >> >> 2013/8/5 Yves A. <yv...@gm...> >> >>> why do most people always think, one could "guess" their code, >>> settings and environment that causes trouble? >>> >>> every access to a channel lead to an exception, if the channel is >>> already hung up. >>> if you need access to your channelvariables after hangup, you have to go >>> another way... >>> varsetevent and a local static map may be your friends here. >>> >>> of course there exists the h extensions which you could use to call >>> another agi after hangup, but as i wrote before... i have no >>> idea what your objective is, nor do i have any code to comment on... >>> >>> yves >>> >>> >>> Am 05.08.2013 13:00, schrieb Daniele Renda: >>> >>> Hi, >>> I need to read a variable that I set from dialplan after i receive the >>> onHangupEvent() on OriginateAsync. >>> But I've an exception because Asterisk Java don't find anymore the >>> channels because is hanged up I guess. >>> >>> So, there is another way to get the variable in Java before the call >>> ends? >>> >>> Thanks very much! >>> >>> -- >>> Daniele Renda >>> >>> >>> ------------------------------------------------------------------------------ >>> Get your SQL database under version control now! >>> Version control is standard for application code, but databases havent >>> caught up. So what steps can you take to put your SQL databases under >>> version control? Why should you start doing it? Read more to find out.http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Get your SQL database under version control now! >>> Version control is standard for application code, but databases havent >>> caught up. So what steps can you take to put your SQL databases under >>> version control? Why should you start doing it? Read more to find out. >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out.http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out.http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2013-08-05 14:20:03
|
no... i don´t think that the propertychangeeventlistener will receive varsetevents.... you´ll have to open a managerconnection and add an eventlistener to it.. y. Am 05.08.2013 16:03, schrieb Daniele Renda: > Hi Yves, > thanks for your suggestion. > > You mean that in ; > > channel.addPropertyChangeListener(new PropertyChangeListener() { > > @Override > public void propertyChange(PropertyChangeEvent evt) { > > I need to test: > > if (evt.getSource() instanceof VarSetEvent) > > Right? > > Thanks > > > > 2013/8/5 Yves A. <yv...@gm... <mailto:yv...@gm...>> > > Have you tried to "listen" to the VarSetEvent ? > > yves > > Am 05.08.2013 14:29, schrieb Daniele Renda: >> Hi yves, >> sorry for the lack of details. >> >> I do this: >> >> OriginateAction action = createAction(telefonata); >> try { >> telefonata.onCreate(); >> asteriskServer.originateAsync(action, new >> MyOriginateCallback(telefonata)); >> } catch (ManagerCommunicationException e) { >> log.error(telefonata.getId() + " ha generato >> un errore", e); >> telefonata.onFailure(); >> } >> >> 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(); >> channel.addPropertyChangeListener(new PropertyChangeListener() { >> >> @Override >> public void propertyChange(PropertyChangeEvent evt) { >> if (evt.getSource() instanceof AsteriskChannel) { >> >> // EVENTO DI HANGUP >> if (channel.getState() == >> ChannelState.HUNGUP) { >> String hangupCauseText = ""; >> if (channel.getHangupCauseText() != null) >> hangupCauseText = >> channel.getHangupCauseText(); >> telefonata.onHangupEvent(channel); >> } >> >> } >> }); >> } >> >> @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(); >> } >> >> } >> >> My dialplan: >> >> [test] >> exten => s,1,Answer() >> exten => s,1,Playback(smt) >> exten => 3,n,Set(variable=This is the value of the variable) >> exten => s,n,Hangup() >> >> I've a PropertyChangeListener so I can know when the call hangup. >> I'd like to get the value of the variable into Javacode in my >> method onHangupEvent(), so when the call end I need to read that >> variable. >> I know that I can create a class that extends BaseAgiScript to >> get the variable, but there is another way to do this? Would be >> more convenient to have the variable in the method >> onHangupEvent() for my case. >> >> Thanks >> >> >> 2013/8/5 Yves A. <yv...@gm... <mailto:yv...@gm...>> >> >> why do most people always think, one could "guess" their >> code, settings and environment that causes trouble? >> >> every access to a channel lead to an exception, if the >> channel is already hung up. >> if you need access to your channelvariables after hangup, you >> have to go another way... >> varsetevent and a local static map may be your friends here. >> >> of course there exists the h extensions which you could use >> to call another agi after hangup, but as i wrote before... i >> have no >> idea what your objective is, nor do i have any code to >> comment on... >> >> yves >> >> >> Am 05.08.2013 13:00, schrieb Daniele Renda: >>> Hi, >>> I need to read a variable that I set from dialplan after i >>> receive the onHangupEvent() on OriginateAsync. >>> But I've an exception because Asterisk Java don't find >>> anymore the channels because is hanged up I guess. >>> >>> So, there is another way to get the variable in Java before >>> the call ends? >>> >>> Thanks very much! >>> >>> -- >>> Daniele Renda >>> >>> >>> ------------------------------------------------------------------------------ >>> Get your SQL database under version control now! >>> Version control is standard for application code, but databases havent >>> caught up. So what steps can you take to put your SQL databases under >>> version control? Why should you start doing it? Read more to find out. >>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but >> databases havent >> caught up. So what steps can you take to put your SQL >> databases under >> version control? Why should you start doing it? Read more to >> find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2013-08-05 14:03:45
|
Hi Yves, thanks for your suggestion. You mean that in ; channel.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { I need to test: if (evt.getSource() instanceof VarSetEvent) Right? Thanks 2013/8/5 Yves A. <yv...@gm...> > Have you tried to "listen" to the VarSetEvent ? > > yves > > Am 05.08.2013 14:29, schrieb Daniele Renda: > > Hi yves, > sorry for the lack of details. > > I do this: > > OriginateAction action = createAction(telefonata); > try { > telefonata.onCreate(); > asteriskServer.originateAsync(action, new > MyOriginateCallback(telefonata)); > } catch (ManagerCommunicationException e) { > log.error(telefonata.getId() + " ha generato un > errore", e); > telefonata.onFailure(); > } > > 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(); > channel.addPropertyChangeListener(new PropertyChangeListener() > { > > @Override > public void propertyChange(PropertyChangeEvent evt) { > if (evt.getSource() instanceof AsteriskChannel) { > > // EVENTO DI HANGUP > if (channel.getState() == ChannelState.HUNGUP) > { > String hangupCauseText = ""; > if (channel.getHangupCauseText() != null) > hangupCauseText = > channel.getHangupCauseText(); > telefonata.onHangupEvent(channel); > } > > } > }); > } > > @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(); > } > > } > > My dialplan: > > [test] > exten => s,1,Answer() > exten => s,1,Playback(smt) > exten => 3,n,Set(variable=This is the value of the variable) > exten => s,n,Hangup() > > I've a PropertyChangeListener so I can know when the call hangup. I'd > like to get the value of the variable into Javacode in my method > onHangupEvent(), so when the call end I need to read that variable. > I know that I can create a class that extends BaseAgiScript to get the > variable, but there is another way to do this? Would be more convenient > to have the variable in the method onHangupEvent() for my case. > > Thanks > > > 2013/8/5 Yves A. <yv...@gm...> > >> why do most people always think, one could "guess" their code, settings >> and environment that causes trouble? >> >> every access to a channel lead to an exception, if the channel is already >> hung up. >> if you need access to your channelvariables after hangup, you have to go >> another way... >> varsetevent and a local static map may be your friends here. >> >> of course there exists the h extensions which you could use to call >> another agi after hangup, but as i wrote before... i have no >> idea what your objective is, nor do i have any code to comment on... >> >> yves >> >> >> Am 05.08.2013 13:00, schrieb Daniele Renda: >> >> Hi, >> I need to read a variable that I set from dialplan after i receive the >> onHangupEvent() on OriginateAsync. >> But I've an exception because Asterisk Java don't find anymore the >> channels because is hanged up I guess. >> >> So, there is another way to get the variable in Java before the call >> ends? >> >> Thanks very much! >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out.http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out.http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2013-08-05 13:03:55
|
Have you tried to "listen" to the VarSetEvent ? yves Am 05.08.2013 14:29, schrieb Daniele Renda: > Hi yves, > sorry for the lack of details. > > I do this: > > OriginateAction action = createAction(telefonata); > try { > telefonata.onCreate(); > asteriskServer.originateAsync(action, new > MyOriginateCallback(telefonata)); > } catch (ManagerCommunicationException e) { > log.error(telefonata.getId() + " ha generato un > errore", e); > telefonata.onFailure(); > } > > 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(); > channel.addPropertyChangeListener(new > PropertyChangeListener() { > > @Override > public void propertyChange(PropertyChangeEvent evt) { > if (evt.getSource() instanceof AsteriskChannel) { > > // EVENTO DI HANGUP > if (channel.getState() == ChannelState.HUNGUP) { > String hangupCauseText = ""; > if (channel.getHangupCauseText() != null) > hangupCauseText = > channel.getHangupCauseText(); > telefonata.onHangupEvent(channel); > } > > } > }); > } > > @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(); > } > > } > > My dialplan: > > [test] > exten => s,1,Answer() > exten => s,1,Playback(smt) > exten => 3,n,Set(variable=This is the value of the variable) > exten => s,n,Hangup() > > I've a PropertyChangeListener so I can know when the call hangup. I'd > like to get the value of the variable into Javacode in my method > onHangupEvent(), so when the call end I need to read that variable. > I know that I can create a class that extends BaseAgiScript to get the > variable, but there is another way to do this? Would be more > convenient to have the variable in the method onHangupEvent() for my case. > > Thanks > > > 2013/8/5 Yves A. <yv...@gm... <mailto:yv...@gm...>> > > why do most people always think, one could "guess" their code, > settings and environment that causes trouble? > > every access to a channel lead to an exception, if the channel is > already hung up. > if you need access to your channelvariables after hangup, you have > to go another way... > varsetevent and a local static map may be your friends here. > > of course there exists the h extensions which you could use to > call another agi after hangup, but as i wrote before... i have no > idea what your objective is, nor do i have any code to comment on... > > yves > > > Am 05.08.2013 13:00, schrieb Daniele Renda: >> Hi, >> I need to read a variable that I set from dialplan after i >> receive the onHangupEvent() on OriginateAsync. >> But I've an exception because Asterisk Java don't find anymore >> the channels because is hanged up I guess. >> >> So, there is another way to get the variable in Java before the >> call ends? >> >> Thanks very much! >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2013-08-05 12:29:31
|
Hi yves, sorry for the lack of details. I do this: OriginateAction action = createAction(telefonata); try { telefonata.onCreate(); asteriskServer.originateAsync(action, new MyOriginateCallback(telefonata)); } catch (ManagerCommunicationException e) { log.error(telefonata.getId() + " ha generato un errore", e); telefonata.onFailure(); } 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(); channel.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getSource() instanceof AsteriskChannel) { // EVENTO DI HANGUP if (channel.getState() == ChannelState.HUNGUP) { String hangupCauseText = ""; if (channel.getHangupCauseText() != null) hangupCauseText = channel.getHangupCauseText(); telefonata.onHangupEvent(channel); } } }); } @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(); } } My dialplan: [test] exten => s,1,Answer() exten => s,1,Playback(smt) exten => 3,n,Set(variable=This is the value of the variable) exten => s,n,Hangup() I've a PropertyChangeListener so I can know when the call hangup. I'd like to get the value of the variable into Javacode in my method onHangupEvent(), so when the call end I need to read that variable. I know that I can create a class that extends BaseAgiScript to get the variable, but there is another way to do this? Would be more convenient to have the variable in the method onHangupEvent() for my case. Thanks 2013/8/5 Yves A. <yv...@gm...> > why do most people always think, one could "guess" their code, settings > and environment that causes trouble? > > every access to a channel lead to an exception, if the channel is already > hung up. > if you need access to your channelvariables after hangup, you have to go > another way... > varsetevent and a local static map may be your friends here. > > of course there exists the h extensions which you could use to call > another agi after hangup, but as i wrote before... i have no > idea what your objective is, nor do i have any code to comment on... > > yves > > > Am 05.08.2013 13:00, schrieb Daniele Renda: > > Hi, > I need to read a variable that I set from dialplan after i receive the > onHangupEvent() on OriginateAsync. > But I've an exception because Asterisk Java don't find anymore the > channels because is hanged up I guess. > > So, there is another way to get the variable in Java before the call ends? > > Thanks very much! > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out.http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2013-08-05 11:14:21
|
why do most people always think, one could "guess" their code, settings and environment that causes trouble? every access to a channel lead to an exception, if the channel is already hung up. if you need access to your channelvariables after hangup, you have to go another way... varsetevent and a local static map may be your friends here. of course there exists the h extensions which you could use to call another agi after hangup, but as i wrote before... i have no idea what your objective is, nor do i have any code to comment on... yves Am 05.08.2013 13:00, schrieb Daniele Renda: > Hi, > I need to read a variable that I set from dialplan after i receive the > onHangupEvent() on OriginateAsync. > But I've an exception because Asterisk Java don't find anymore the > channels because is hanged up I guess. > > So, there is another way to get the variable in Java before the call ends? > > Thanks very much! > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2013-08-05 11:00:53
|
Hi, I need to read a variable that I set from dialplan after i receive the onHangupEvent() on OriginateAsync. But I've an exception because Asterisk Java don't find anymore the channels because is hanged up I guess. So, there is another way to get the variable in Java before the call ends? Thanks very much! -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2013-08-03 14:46:10
|
you use a callbackhandler.... there you have the methods onSuccess, onFailure, onBusy and so on.... yves Am 02.08.2013 18:41, schrieb Daniele Renda: > Hi, > I'm using Asterisk Java to originate calls: > > OriginateAction action = createAction(telefonata); > > action.setActionId("" + telefonata.getId()); > try { > telefonata.onCreate(); > asteriskServer.originateAsync(action, new > MyOriginateCallback(telefonata)); > } catch (ManagerCommunicationException e) { > log.error(telefonata.getId() + " ha generato un > errore", e); > telefonata.onFailure(); > } > > On the call I've a OriginateCallback. > The call arrives in Asterisk dialplan: > [test] > exten => s,1,Answer() > exten => s,1,Playback(smt) > exten =>s,n,Dial(SIP/trunk/003912345678) > exten => s,n,Hangup() > > As you see at certain point in the dialplan the call is forwarded to > an external number. The problem is that is the dial fails for several > reason (user busy, channel congestion and so on), I don't receive any > event in Java Asterisk so I don't receive the hangup event!!!! So I > don't know if the call is finished or not. > Instead if the Dial work, then I receive Hangup event correctly. > > Any idea of the reason of this behaior? > > Thanks! > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2013-08-02 16:41:22
|
Hi, I'm using Asterisk Java to originate calls: OriginateAction action = createAction(telefonata); action.setActionId("" + telefonata.getId()); try { telefonata.onCreate(); asteriskServer.originateAsync(action, new MyOriginateCallback(telefonata)); } catch (ManagerCommunicationException e) { log.error(telefonata.getId() + " ha generato un errore", e); telefonata.onFailure(); } On the call I've a OriginateCallback. The call arrives in Asterisk dialplan: [test] exten => s,1,Answer() exten => s,1,Playback(smt) exten =>s,n,Dial(SIP/trunk/003912345678) exten => s,n,Hangup() As you see at certain point in the dialplan the call is forwarded to an external number. The problem is that is the dial fails for several reason (user busy, channel congestion and so on), I don't receive any event in Java Asterisk so I don't receive the hangup event!!!! So I don't know if the call is finished or not. Instead if the Dial work, then I receive Hangup event correctly. Any idea of the reason of this behaior? Thanks! -- Daniele Renda |
From: George S. <gs...@gn...> - 2013-08-01 14:56:04
|
Dear all , I m new to Java ( got some experience with asterisk) I m trying to get the caller ID of the caller that reached an agent. I m going through the managerevents and I am a bit confiused I can see the agentCalled event that has the caller Id info but the agent connect does not.. It is obvious that I am missing something here .. How can I get the caller ID when an agent actually answers the phone ??? I m pretty sure it is something simple that I can not find out... TIA -- ---------- George |
From: Rounak S. <rou...@gm...> - 2013-07-26 09:57:39
|
Hello this is my code getOption is returning an empty char why? public void service(AgiRequest request, AgiChannel channel) throws AgiException { answer(); System.out.println("Trying getOption"); GetOptionCommand a=new GetOptionCommand("main-menu","0#",10000); char b=getOption(a.getFile(),a.getEscapeDigits(),a.getTimeout()); System.out.println(b); System.out.println(a.getTimeout()); hangup(); } Output Trying getOption 10000 I can hear the main-menu being played but its not taking any dtmf as Input |
From: Rounak S. <rou...@gm...> - 2013-07-26 07:58:41
|
Hello Everyone, I am using googleTTS to play sounds(not pre recorded voice) This is how I am playing String command="googletts.agi,\""+dynamicmessageToPlay+"\""+",\""+ preferLanguage+"\""; exec("AGI",command); I am able to play the voice.After playing voice from googleTTS I want to get the *DTMF key entered by the user.* How can I get that? GetOption won't work as I am not playing any pre recorded file |
From: matthieu h. <mat...@gm...> - 2013-07-23 07:49:45
|
Hi every one, I use Asterisk 11.2.1 with asterisk-java1.0.0.0. and snom360. I want to send an action to auto-answer a channel when it ring. Before that, I use the patch below to auto answer an originate action: http://www.xtelsio.com/hlp/de/ast/chan_sip.c.patch-originate-auto-answer.txt It works fine for an originate action. I want to use the same variable to auto answer the snom360 when it is called by a queue. I try setVarAction to do it: SetVarAction action = new SetVarAction(); action.setChannel(Client.getChannel()); action.setVariable("AUTO_ANSWER_A"); action.setValue("1"); I send this action when phone ring. What is wrong in this action? I find this: SIPAddHeader(Call-Info:<sip:domain>\;answer-after=0) How can I use it with setVarAction? Thanks for your response, Matthieu |
From: Rounak S. <rou...@gm...> - 2013-07-22 15:30:15
|
Hello everyone, This one may be pretty basic but I can't find a command to get a 5 digit input from user. Which command takes a list of DTMF input from user? |
From: Rounak S. <rou...@gm...> - 2013-07-22 15:28:20
|
Hii, Actually I am using googleTTS.agi to play voice. So I have now two agis.One which handles the incoming-call and second the googletts.agi Though I am able to avhieve what I wanted by setting channel variables I wonder if there is a better way to do it. What about using exec command?will it work. On Sat, Jul 20, 2013 at 9:09 PM, Yves A. <yv...@gm...> wrote: > with that little info given it is hard to see, what your objective is... > but it seems quite complicated, what you are doing... > why two agi`s ? > anyways... to access variables that have the scope beyond just the current > call make them "static" (java) or, if you want to > use "static" variables in your dialplan, make them "global"... see > asterisk-reference / docs > but static variables always have the disadvantage, that if parallel calls > occur, each agi may be influencing the value at the > same time which in turn may result in unpredictable behaviour... > i am sure, there exist better ways to solve your problem... if i only > knew, what you wish to do.... > > yves > > > > Am 20.07.2013 10:01, schrieb Rounak Saha: > > Hii everyone, > I have my dial plan like > [outgoing-call] > exten=>100,1,AGI(agi://127.0.0.1/*hello1*.agi?count=${var1}) > exten=>100,2,AGI(agi://127.0.0.2/*hello2*.agi?count=${var1}) > exten=>100,3,GOTO(outgoing-call,100,1) > > the hello1.agi is incrementing var1 everytime and will hangup once its > greater than 4. > > In my hello1.agi I am downloading some data(list of strings) from my > database.And I want to use that data in all the calls. > Write now once I am out of AGI(hello1.agi) I am unable to access that data > the next time. > Is there a way that I will be able to access the data the next time? > > > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today!http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Chris M. <ch...@mr...> - 2013-07-21 22:20:14
|
You probably can't cluster the connection to asterisk? Or keep the asteriisk server connection in a singleton's field for using later? I use glass fish, do not cluster and do something similar with a singleton. YMMV On Jul 22, 2013 7:30 AM, "$angaran" <san...@gm...> wrote: > Hi Everyone, > > I am using JBoss Server in clustered mode. When the init request comes to > first server in the cluster, it creates an AsteriskServer instance. When > the future requests goes to other servers, the asterisk server instance is > replicated. But when I access the methods in the server instance, it throws > null pointer exception at initializeIfNeeded() in AsteriskServerImpl. > > Please help me to resolve. > > Regards, > Sangaran > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: $angaran <san...@gm...> - 2013-07-21 21:34:08
|
Hi Everyone, I am using JBoss Server in clustered mode. When the init request comes to first server in the cluster, it creates an AsteriskServer instance. When the future requests goes to other servers, the asterisk server instance is replicated. But when I access the methods in the server instance, it throws null pointer exception at initializeIfNeeded() in AsteriskServerImpl. Please help me to resolve. Regards, Sangaran |
From: $angaran <san...@gm...> - 2013-07-21 21:28:40
|
Hi Everyone, I am using JBoss Server in clustered mode. When the init request comes to first server in the cluster, it creates an AsteriskServer instance. When the future requests goes to other servers, the asterisk server instance is replicated. But when I access the methods in the server instance, it throws null pointer exception at initializeIfNeeded() in AsteriskServerImpl. Please help me to resolve. Regards, Sangaran |
From: Yves A. <yv...@gm...> - 2013-07-20 15:41:32
|
with that little info given it is hard to see, what your objective is... but it seems quite complicated, what you are doing... why two agi`s ? anyways... to access variables that have the scope beyond just the current call make them "static" (java) or, if you want to use "static" variables in your dialplan, make them "global"... see asterisk-reference / docs but static variables always have the disadvantage, that if parallel calls occur, each agi may be influencing the value at the same time which in turn may result in unpredictable behaviour... i am sure, there exist better ways to solve your problem... if i only knew, what you wish to do.... yves Am 20.07.2013 10:01, schrieb Rounak Saha: > Hii everyone, > I have my dial plan like > [outgoing-call] > exten=>100,1,AGI(agi://127.0.0.1/ > <http://127.0.0.1/>*hello1*.agi?count=${var1}) > exten=>100,2,AGI(agi://127.0.0.2/ > <http://127.0.0.2/>*hello2*.agi?count=${var1}) > exten=>100,3,GOTO(outgoing-call,100,1) > > the hello1.agi is incrementing var1 everytime and will hangup once its > greater than 4. > > In my hello1.agi I am downloading some data(list of strings) from my > database.And I want to use that data in all the calls. > Write now once I am out of AGI(hello1.agi) I am unable to access that > data the next time. > Is there a way that I will be able to access the data the next time? > > > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Rounak S. <rou...@gm...> - 2013-07-20 08:01:29
|
Hii everyone, I have my dial plan like [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/*hello1*.agi?count=${var1}) exten=>100,2,AGI(agi://127.0.0.2/*hello2*.agi?count=${var1}) exten=>100,3,GOTO(outgoing-call,100,1) the hello1.agi is incrementing var1 everytime and will hangup once its greater than 4. In my hello1.agi I am downloading some data(list of strings) from my database.And I want to use that data in all the calls. Write now once I am out of AGI(hello1.agi) I am unable to access that data the next time. Is there a way that I will be able to access the data the next time? |
From: Atul A. <adi...@gm...> - 2013-07-16 18:36:49
|
hello Every One, I have googleTTS <http://zaf.github.io/asterisk-googletts/>(which is an agi) installed in my asterisk .Can I use googleTTS while I am still inside asterisk-java AGI . Is there any command for that? -- Atul |
From: Atul A. <adi...@gm...> - 2013-07-16 18:28:36
|
hello Every One, I have googleTTS <http://zaf.github.io/asterisk-googletts/> installed in my asterisk .Can I use googleTTS while I am still inside asterisk-java AGI . Is there any command for that? -- Atul Agrawal |
From: Rounak S. <rou...@gm...> - 2013-07-16 08:47:31
|
Hii I am making a call from Manager AMI and in my dialPlan the caller will be connected to AGI.I want to send a variable var from AMI to AGI through channel variables originateAction.setChannel("SIP/1000abc"); originateAction.setContext("outgoing-call"); originateAction.setExten("100"); originateAction.setVariable("var", " foo baar"); I tried all possible combination of outbound call but none of them working [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/hello.agi?user=${var}) [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/hello.agi?var=${var}) [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/hello.agi,${var}) **AGI** public void service(AgiRequest request, AgiChannel channel) throws AgiException { answer(); System.out.println("Inside"); String a=request.getParameter("var"); // String b=request.getParameter("user"); String c=channel.getVariable("var"); // String d=channel.getVariable("user"); System.out.println(a+"\n"+b+"\n"+c+"\n"+d+"\n"); hangup(); } Output is null all the time. |
From: Rounak S. <rou...@gm...> - 2013-07-16 07:57:20
|
Can Any one tell me the use originate.setvariables(Map<String,Sttring>) with an example. |