asterisk-java-users Mailing List for Asterisk-Java Library (Page 10)
Brought to you by:
srt
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: Murthy G. <mga...@nt...> - 2014-04-10 00:41:36
|
The following seems to work. Is this the correct way? ManagerConnection source= (ManagerConnection) event.getSource(); if (source == null) { logger.error("Cannot get source"); } else { logger.info("source:" + source.getHostname()); } ________________________________ From: Murthy Gandikota [mailto:mga...@nt...] Sent: Wednesday, April 09, 2014 4:27 PM To: ast...@li... Subject: [Asterisk-java-users] How to get the source/hostname of an Event I would be grateful if Yves or someone can answer my basic question. The Event object has a hostname attribute. But it is coming up as null. Using a proxy, for example: astman, will populate that field. How do they do that? Is there anyother way? I also am grateful if someone can post a clip about astman proxy. Thank you so much. Murthy |
From: Murthy G. <mga...@nt...> - 2014-04-10 00:01:59
|
I would be grateful if Yves or someone can answer my basic question. The Event object has a hostname attribute. But it is coming up as null. Using a proxy, for example: astman, will populate that field. How do they do that? Is there anyother way? I also am grateful if someone can post a clip about astman proxy. Thank you so much. Murthy |
From: Zoumana T. <zou...@gm...> - 2014-04-07 11:01:35
|
Hi, Maybe some volunteers could take over this task. I would be part of it. Thank you for the info. *---* *Zoumana TRAORE* 2014-04-07 11:57 GMT+02:00 Yves A. <yv...@gm...>: > Hi, > > for me it is quite unlikely that there will (ever) be an official release > of 1.0 version... The work on this project seems abandoned unfortunately. > > yves > > > Am 03.04.2014 12:50, schrieb Zoumana TRAORE: > > Hi Yves, > > Thanks, yes maybe. > But i will stick for the moment to the 0.3.1 as 1.0.0 is still a milestone > and we are on production + i have wrote some codes on 0.3.1 thread pool and > queue management for our needs. I will wait 1.0.0 to go general > availability to migrate. > > Following your track on *channel.getChannelStatus* and doing something > like this: > > > > > > > > > > > > > > > > > > * public void service(AgiRequest request, AgiChannel channel) throws > AgiException { boolean hangup = false; > while(channel.getChannelStatus() != -1 && !hangup){ for(int > i=0; i <3; i++){ System.out.println("playing"+(i+1)); > > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); if(i==2){ > hangup=true; } > if(channel.getChannelStatus() == -1){ break; > } } } hangup();* > * }* > > I've reached the expected behaviour. > Many Thanks > > Regards, > Zoumana > > > *--- * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 12:21 GMT+02:00 Yves A. <yv...@gm...>: > >> hi, >> >> please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. >> this might already bring the expected behaviour. >> >> regards, >> yves >> >> Am 03.04.2014 01:45, schrieb Zoumana TRAORE: >> >> Hi Yves, >> >> Thanks for helping me out. >> Yes, i found that strange too. >> Asterisk 11.5 >> AJ 0.3.1 >> >> Here is the code: >> public void service(AgiRequest request, AgiChannel channel) throws >> AgiException { >> >> for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> >> System.out.println("channelStatus="+channel.getChannelStatus()); >> channel.streamFile("svi/jingle"); >> } >> hangup(); >> } >> >> >> Here is the output (there is something interesting indeed, >> channelStatus=-1 after my hangup, i could try to use that for my need if >> nobody sees something more suitable) >> INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> playing1 >> channelStatus=6 >> playing2 >> channelStatus=-1 >> playing3 >> channelStatus=-1 >> Apr 3, 2014 1:42:37 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >> INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> >> Thanks >> >> >> >> >> *--- * >> >> *Zoumana TRAORE* >> >> mob. (+33)0699783622 >> >> >> 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm...>: >> >>> hi, >>> >>> normally you would get an exception at any method that accesses a hungup >>> channel. this bevaviour is strange. >>> which version of asterisk and aj are you using? >>> add a system.out.println(channel.getChannelStatus()); before streaming >>> and post the output... >>> >>> yves >>> >>> Am 03.04.2014 00 <03.04.2014%2000>:46, schrieb Zoumana TRAORE: >>> >>> Hi everybody, >>> >>> During an incoming call handled by AGI, i would like to detect >>> where the caller hangup and then break the IVR scenario at this precise >>> point. >>> >>> For example: >>> Here is my AGI content: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * public void service(AgiRequest request, AgiChannel channel) throws >>> AgiException { for(int i=0; i <3; i++){ >>> System.out.println("playing"+(i+1)); >>> channel.streamFile("svi/jingle"); } hangup(); } * >>> Each audio play has 7 seconds duration. >>> Even i hangup the call during the "playing 1", AGI keeps executing all >>> the sequences. >>> This is the output: >>> >>> >>> >>> >>> >>> >>> >>> *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >>> playing1 playing2 playing3 Apr 3, 2014 12:26:52 AM >>> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End >>> AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 * >>> Thanks! >>> >>> Regards, >>> Zoumana >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees_APR > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-07 09:57:54
|
Hi, for me it is quite unlikely that there will (ever) be an official release of 1.0 version... The work on this project seems abandoned unfortunately. yves Am 03.04.2014 12:50, schrieb Zoumana TRAORE: > Hi Yves, > > Thanks, yes maybe. > But i will stick for the moment to the 0.3.1 as 1.0.0 is still a > milestone and we are on production + i have wrote some codes on 0.3.1 > thread pool and queue management for our needs. I will wait 1.0.0 to > go general availability to migrate. > > Following your track on /channel.getChannelStatus/ and doing something > like this: > > / public void service(AgiRequest request, AgiChannel channel) > throws AgiException { > > boolean hangup = false; > while(channel.getChannelStatus() != -1 && !hangup){ > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > if(i==2){ > hangup=true; > } > if(channel.getChannelStatus() == -1){ > break; > } > } > } > hangup();// > }/ > > I've reached the expected behaviour. > Many Thanks > > Regards, > Zoumana > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 12:21 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > hi, > > please upgrade to latest asterisk-java first... it is somewhat > 1.x.x now. this might already bring the expected behaviour. > > regards, > yves > > Am 03.04.2014 01 <tel:03.04.2014%2001>:45, schrieb Zoumana TRAORE: >> Hi Yves, >> >> Thanks for helping me out. >> Yes, i found that strange too. >> Asterisk 11.5 >> AJ 0.3.1 >> >> Here is the code: >> public void service(AgiRequest request, AgiChannel channel) >> throws AgiException { >> >> for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> System.out.println("channelStatus="+channel.getChannelStatus()); >> channel.streamFile("svi/jingle"); >> } >> hangup(); >> } >> >> >> Here is the output (there is something interesting indeed, >> channelStatus=-1 after my hangup, i could try to use that for my >> need if nobody sees something more suitable) >> INFO: Begin AgiScript SVILegoAgi on Asterisk-Java >> DaemonPool-1-thread-1 >> playing1 >> channelStatus=6 >> playing2 >> channelStatus=-1 >> playing3 >> channelStatus=-1 >> Apr 3, 2014 1:42:37 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >> INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> >> Thanks >> >> >> >> *--- >> * >> >> *Zoumana TRAORE* >> >> mob. (+33)0699783622 <tel:%28%2B33%290699783622> >> >> >> 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm... >> <mailto:yv...@gm...>>: >> >> hi, >> >> normally you would get an exception at any method that >> accesses a hungup channel. this bevaviour is strange. >> which version of asterisk and aj are you using? >> add a system.out.println(channel.getChannelStatus()); before >> streaming and post the output... >> >> yves >> >> Am 03.04.2014 00 <tel:03.04.2014%2000>:46, schrieb Zoumana >> TRAORE: >>> Hi everybody, >>> >>> During an incoming call handled by AGI, i would like to detect >>> where the caller hangup and then break the IVR scenario at >>> this precise point. >>> >>> For example: >>> Here is my AGI content: >>> / >>> public void service(AgiRequest request, AgiChannel channel) >>> throws AgiException { >>> >>> for(int i=0; i <3; i++){ >>> System.out.println("playing"+(i+1)); >>> channel.streamFile("svi/jingle"); >>> } >>> hangup(); >>> } >>> / >>> Each audio play has 7 seconds duration. >>> Even i hangup the call during the "playing 1", AGI keeps >>> executing all the sequences. >>> This is the output: >>> >>> /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java >>> DaemonPool-1-thread-1 >>> playing1 >>> playing2 >>> playing3 >>> Apr 3, 2014 12:26:52 AM >>> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >>> INFO: End AgiScript SVILegoAgi on Asterisk-Java >>> DaemonPool-1-thread-1 >>> / >>> Thanks! >>> >>> Regards, >>> Zoumana >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-03 10:51:00
|
Hi Yves, Thanks, yes maybe. But i will stick for the moment to the 0.3.1 as 1.0.0 is still a milestone and we are on production + i have wrote some codes on 0.3.1 thread pool and queue management for our needs. I will wait 1.0.0 to go general availability to migrate. Following your track on *channel.getChannelStatus* and doing something like this: * public void service(AgiRequest request, AgiChannel channel) throws AgiException { boolean hangup = false; while(channel.getChannelStatus() != -1 && !hangup){ for(int i=0; i <3; i++){ System.out.println("playing"+(i+1)); System.out.println("channelStatus="+channel.getChannelStatus()); channel.streamFile("svi/jingle"); if(i==2){ hangup=true; } if(channel.getChannelStatus() == -1){ break; } } } hangup();* * }* I've reached the expected behaviour. Many Thanks Regards, Zoumana *---* *Zoumana TRAORE* mob. (+33)0699783622 2014-04-03 12:21 GMT+02:00 Yves A. <yv...@gm...>: > hi, > > please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. > this might already bring the expected behaviour. > > regards, > yves > > Am 03.04.2014 01:45, schrieb Zoumana TRAORE: > > Hi Yves, > > Thanks for helping me out. > Yes, i found that strange too. > Asterisk 11.5 > AJ 0.3.1 > > Here is the code: > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > } > hangup(); > } > > > Here is the output (there is something interesting indeed, > channelStatus=-1 after my hangup, i could try to use that for my need if > nobody sees something more suitable) > INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > channelStatus=6 > playing2 > channelStatus=-1 > playing3 > channelStatus=-1 > Apr 3, 2014 1:42:37 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > > Thanks > > > > > *--- * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm...>: > >> hi, >> >> normally you would get an exception at any method that accesses a hungup >> channel. this bevaviour is strange. >> which version of asterisk and aj are you using? >> add a system.out.println(channel.getChannelStatus()); before streaming >> and post the output... >> >> yves >> >> Am 03.04.2014 00:46, schrieb Zoumana TRAORE: >> >> Hi everybody, >> >> During an incoming call handled by AGI, i would like to detect >> where the caller hangup and then break the IVR scenario at this precise >> point. >> >> For example: >> Here is my AGI content: >> >> >> >> >> >> >> >> >> >> * public void service(AgiRequest request, AgiChannel channel) throws >> AgiException { for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> channel.streamFile("svi/jingle"); } hangup(); } * >> Each audio play has 7 seconds duration. >> Even i hangup the call during the "playing 1", AGI keeps executing all >> the sequences. >> This is the output: >> >> >> >> >> >> >> >> *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> playing1 playing2 playing3 Apr 3, 2014 12:26:52 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End >> AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 * >> Thanks! >> >> Regards, >> Zoumana >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-03 10:21:43
|
hi, please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. this might already bring the expected behaviour. regards, yves Am 03.04.2014 01:45, schrieb Zoumana TRAORE: > Hi Yves, > > Thanks for helping me out. > Yes, i found that strange too. > Asterisk 11.5 > AJ 0.3.1 > > Here is the code: > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > } > hangup(); > } > > > Here is the output (there is something interesting indeed, > channelStatus=-1 after my hangup, i could try to use that for my need > if nobody sees something more suitable) > INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > channelStatus=6 > playing2 > channelStatus=-1 > playing3 > channelStatus=-1 > Apr 3, 2014 1:42:37 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > > Thanks > > > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > hi, > > normally you would get an exception at any method that accesses a > hungup channel. this bevaviour is strange. > which version of asterisk and aj are you using? > add a system.out.println(channel.getChannelStatus()); before > streaming and post the output... > > yves > > Am 03.04.2014 00 <tel:03.04.2014%2000>:46, schrieb Zoumana TRAORE: >> Hi everybody, >> >> During an incoming call handled by AGI, i would like to detect >> where the caller hangup and then break the IVR scenario at this >> precise point. >> >> For example: >> Here is my AGI content: >> / >> public void service(AgiRequest request, AgiChannel channel) >> throws AgiException { >> >> for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> channel.streamFile("svi/jingle"); >> } >> hangup(); >> } >> / >> Each audio play has 7 seconds duration. >> Even i hangup the call during the "playing 1", AGI keeps >> executing all the sequences. >> This is the output: >> >> /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java >> DaemonPool-1-thread-1 >> playing1 >> playing2 >> playing3 >> Apr 3, 2014 12:26:52 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >> INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> / >> Thanks! >> >> Regards, >> Zoumana >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-02 23:46:04
|
Hi Yves, Thanks for helping me out. Yes, i found that strange too. Asterisk 11.5 AJ 0.3.1 Here is the code: public void service(AgiRequest request, AgiChannel channel) throws AgiException { for(int i=0; i <3; i++){ System.out.println("playing"+(i+1)); System.out.println("channelStatus="+channel.getChannelStatus()); channel.streamFile("svi/jingle"); } hangup(); } Here is the output (there is something interesting indeed, channelStatus=-1 after my hangup, i could try to use that for my need if nobody sees something more suitable) INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 playing1 channelStatus=6 playing2 channelStatus=-1 playing3 channelStatus=-1 Apr 3, 2014 1:42:37 AM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 Thanks *--- * *Zoumana TRAORE* mob. (+33)0699783622 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm...>: > hi, > > normally you would get an exception at any method that accesses a hungup > channel. this bevaviour is strange. > which version of asterisk and aj are you using? > add a system.out.println(channel.getChannelStatus()); before streaming and > post the output... > > yves > > Am 03.04.2014 00:46, schrieb Zoumana TRAORE: > > Hi everybody, > > During an incoming call handled by AGI, i would like to detect > where the caller hangup and then break the IVR scenario at this precise > point. > > For example: > Here is my AGI content: > > > > > > > > > > * public void service(AgiRequest request, AgiChannel channel) throws > AgiException { for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > channel.streamFile("svi/jingle"); } hangup(); } * > Each audio play has 7 seconds duration. > Even i hangup the call during the "playing 1", AGI keeps executing all > the sequences. > This is the output: > > > > > > > > *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 playing2 playing3 Apr 3, 2014 12:26:52 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End > AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 * > Thanks! > > Regards, > Zoumana > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-02 23:17:27
|
hi, normally you would get an exception at any method that accesses a hungup channel. this bevaviour is strange. which version of asterisk and aj are you using? add a system.out.println(channel.getChannelStatus()); before streaming and post the output... yves Am 03.04.2014 00:46, schrieb Zoumana TRAORE: > Hi everybody, > > During an incoming call handled by AGI, i would like to detect > where the caller hangup and then break the IVR scenario at this > precise point. > > For example: > Here is my AGI content: > / > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > channel.streamFile("svi/jingle"); > } > hangup(); > } > / > Each audio play has 7 seconds duration. > Even i hangup the call during the "playing 1", AGI keeps executing all > the sequences. > This is the output: > > /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > playing2 > playing3 > Apr 3, 2014 12:26:52 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > / > Thanks! > > Regards, > Zoumana > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-02 22:46:57
|
Hi everybody, During an incoming call handled by AGI, i would like to detect where the caller hangup and then break the IVR scenario at this precise point. For example: Here is my AGI content: *public void service(AgiRequest request, AgiChannel channel) throws AgiException { for(int i=0; i <3; i++){ System.out.println("playing"+(i+1)); channel.streamFile("svi/jingle"); } hangup();}* Each audio play has 7 seconds duration. Even i hangup the call during the "playing 1", AGI keeps executing all the sequences. This is the output: *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1playing1playing2playing3Apr 3, 2014 12:26:52 AM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1* Thanks! Regards, Zoumana |
From: MT <moh...@gm...> - 2014-03-19 11:09:23
|
thanks yves this is a very usefull example, i suggest to add it on the tutorial thanks again your example solve my problem and show me a new way to work with AMI. On Tuesday, March 18, 2014, Miguel Santiago <m.s...@gm...> wrote: > Once you are implementing an AGI, yo can look up for the queue containing > the channel you are managing. > El 15/03/2014 17:27, "MT" <moh...@gm...<javascript:_e(%7B%7D,'cvml','moh...@gm...');>> > escribió: > >> Hi everyone, >> >> I want to get Hold Time of specified Queue. >> >> I search everywhere to get it through AGI but there is no such a thing in >> AGI to get you hold time of given queue. >> So I decide to use Manager API and call QueueStatus to get HoldTime on >> the QueueParams section: >> >> this is my Manager Class: >> >> import java.io.IOException; >> >> import org.asteriskjava.manager.AuthenticationFailedException; >> import org.asteriskjava.manager.ManagerConnection; >> import org.asteriskjava.manager.ManagerConnectionFactory; >> import org.asteriskjava.manager.TimeoutException; >> import org.asteriskjava.manager.action.QueueStatusAction; >> import org.asteriskjava.manager.event.QueueParamsEvent; >> import org.asteriskjava.manager.response.ManagerResponse; >> >> public class Manager { >> >> private ManagerConnection managerConnection; >> >> public Manager(String host, String user, String pass) throws >> IOException { >> >> ManagerConnectionFactory factory = new >> ManagerConnectionFactory(host, user, pass); >> this.managerConnection = factory.createManagerConnection(); >> >> } >> >> public void getHoldTime(String queue) throws IOException, >> AuthenticationFailedException, TimeoutException, InterruptedException { >> >> QueueStatusAction queueStatus = new QueueStatusAction(); >> >> ManagerResponse statusResponse; >> >> queueStatus.setQueue(queue); >> >> >> // connect to Asterisk and log in >> managerConnection.login(); >> >> // send the originate action and wait for a maximum of 30 seconds >> for Asterisk >> // to send a reply >> statusResponse = managerConnection.sendAction(queueStatus, 2000); >> >> // print out whether the originate succeeded or not >> System.out.println("Response Result:" + >> statusResponse.toString()); >> >> // and finally log off and disconnect >> managerConnection.logoff(); >> } >> } >> >> >> I call getHoldTime from AGI: >> >> Manager m = new Manager(ip,user,pass); >> m.getHoldTime(queue); >> >> >> but it doesn’t contain queue param section it just say successful for >> this action. >> >> please help me how to get hold time of specific queue with asterisk java. >> >> Mohsen >> >> >> ------------------------------------------------------------------------------ >> 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...<javascript:_e(%7B%7D,'cvml','Ast...@li...');> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> |
From: Miguel S. <m.s...@gm...> - 2014-03-18 08:23:19
|
Once you are implementing an AGI, yo can look up for the queue containing the channel you are managing. El 15/03/2014 17:27, "MT" <moh...@gm...> escribió: > Hi everyone, > > I want to get Hold Time of specified Queue. > > I search everywhere to get it through AGI but there is no such a thing in > AGI to get you hold time of given queue. > So I decide to use Manager API and call QueueStatus to get HoldTime on the > QueueParams section: > > this is my Manager Class: > > import java.io.IOException; > > import org.asteriskjava.manager.AuthenticationFailedException; > import org.asteriskjava.manager.ManagerConnection; > import org.asteriskjava.manager.ManagerConnectionFactory; > import org.asteriskjava.manager.TimeoutException; > import org.asteriskjava.manager.action.QueueStatusAction; > import org.asteriskjava.manager.event.QueueParamsEvent; > import org.asteriskjava.manager.response.ManagerResponse; > > public class Manager { > > private ManagerConnection managerConnection; > > public Manager(String host, String user, String pass) throws > IOException { > > ManagerConnectionFactory factory = new > ManagerConnectionFactory(host, user, pass); > this.managerConnection = factory.createManagerConnection(); > > } > > public void getHoldTime(String queue) throws IOException, > AuthenticationFailedException, TimeoutException, InterruptedException { > > QueueStatusAction queueStatus = new QueueStatusAction(); > > ManagerResponse statusResponse; > > queueStatus.setQueue(queue); > > > // connect to Asterisk and log in > managerConnection.login(); > > // send the originate action and wait for a maximum of 30 seconds > for Asterisk > // to send a reply > statusResponse = managerConnection.sendAction(queueStatus, 2000); > > // print out whether the originate succeeded or not > System.out.println("Response Result:" + statusResponse.toString()); > > // and finally log off and disconnect > managerConnection.logoff(); > } > } > > > I call getHoldTime from AGI: > > Manager m = new Manager(ip,user,pass); > m.getHoldTime(queue); > > > but it doesn't contain queue param section it just say successful for this > action. > > please help me how to get hold time of specific queue with asterisk java. > > Mohsen > > > ------------------------------------------------------------------------------ > 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 > > |
From: Yves A. <yv...@gm...> - 2014-03-16 12:16:18
|
Hi, the events you receive contain information about the queue, so you can crosscheck if the holdtime you get belongs to the query you sent... or you use an unique actionid and check against this to determine, if the event belongs to your request... I´ve given you a working example below. "can i call function through manager api and get the variables on that channel"..? answer: you can retrieve channelvariables, but the function you have to call first to retrieve the queueparametes (QUEUE_VARIABLES) which in turn sets the variables needs a channel... so no chance to use this without agi (where you always have a channel) without huge workarounds. The easiest way is to go the way you already started or to use a special context in your dialplan... but the example below works without modifications of your dialplan. yves import org.asteriskjava.manager.ManagerConnection; import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.ManagerEventListener; import org.asteriskjava.manager.action.QueueStatusAction; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.manager.event.QueueParamsEvent; import org.asteriskjava.manager.event.QueueStatusCompleteEvent; import org.asteriskjava.manager.response.ManagerResponse; public class GetQueueParameters implements ManagerEventListener { String actionID = "QSA_"+System.currentTimeMillis(); boolean waitForCompleteEvent=false; public GetQueueParameters(String queueName,String host, String user, String pass){ ManagerConnectionFactory factory = new ManagerConnectionFactory(host, user, pass); ManagerConnection managerConnection = factory.createManagerConnection(); QueueStatusAction queueStatus = new QueueStatusAction(); queueStatus.setQueue(queueName); queueStatus.setActionId(actionID); managerConnection.addEventListener(this); try{ managerConnection.login(); ManagerResponse mResponse = managerConnection.sendAction(queueStatus); waitForCompleteEvent = mResponse.getResponse().equals("Success"); long timeOutforCompletion=2000; // wait max. 2 Sec. then stop long sleepTime=500; while (waitForCompleteEvent && timeOutforCompletion>0) { Thread.sleep(sleepTime); timeOutforCompletion -= sleepTime; } managerConnection.removeEventListener(this); managerConnection.logoff(); } catch (Exception e){ e.printStackTrace(System.out); } } public void onManagerEvent(ManagerEvent me){ if (me instanceof QueueStatusCompleteEvent){ QueueStatusCompleteEvent qsce = (QueueStatusCompleteEvent) me; if (qsce.getActionId().equals(actionID)) waitForCompleteEvent=false; // we have all we need... so finish execution } if (me instanceof QueueParamsEvent){ QueueParamsEvent qpe = (QueueParamsEvent) me; if (qpe.getActionId().equals(actionID)){ int holdtime = qpe.getHoldTime(); String queueName = qpe.getQueue(); System.out.println("HoldTime for Queue "+queueName+" = " + holdtime); } } } public static void main(String[] args) throws Exception{ new GetQueueParameters("queue to query","yourserver","youruser","yourpass"); } } Am 16.03.2014 08:01, schrieb MT: > Hi yves, > > thanks for reply, > if I use event listener in the multi access system it could be another > QueueParams from another request. > how can I manage that? > about EventGeneratingAction I don't how to use it :( is there any > samples that use EventGeneratingAction? > > I found an asterisk funtion QUEUE_VARIABLES that gives queue name and > it set some variables that contains queue information like hold time > that I need, I can get hold time by AGI but I want to get it from > another server that have AMI access to it. > Can I call function through Manager API and get the variables on that > channel? > > > thanks yves, you are great :) > > Mohsen > > > On Sat, Mar 15, 2014 at 11:33 PM, Yves A. <yv...@gm... > <mailto:yv...@gm...>> wrote: > > Hi, > > the QueueStatusAction class is a so called > "EventGeneratingAction"... that means that asterisk-java will fire > the appropriate events which contain > further information after you sent the action... you have to > implement a listener for these events, catch them (in your case > the QueueParamsEvent) and read their information... > "success" after you snet the action means that your action was > properly sent... but before sending the action, you should have > set up your listeners... > because this is an asynchronous process, you should work with a > thread... (that can terminate after receiving the > (QueueStatusCompleteEvent).. > > regards, > yves > > Am 15.03.2014 17:25, schrieb MT: >> Hi everyone, >> >> I want to get Hold Time of specified Queue. >> >> I search everywhere to get it through AGI but there is no such a >> thing in AGI to get you hold time of given queue. >> So I decide to use Manager API and call QueueStatus to get >> HoldTime on the QueueParams section: >> >> this is my Manager Class: >> >> import java.io.IOException; >> >> import org.asteriskjava.manager.AuthenticationFailedException; >> import org.asteriskjava.manager.ManagerConnection; >> import org.asteriskjava.manager.ManagerConnectionFactory; >> import org.asteriskjava.manager.TimeoutException; >> import org.asteriskjava.manager.action.QueueStatusAction; >> import org.asteriskjava.manager.event.QueueParamsEvent; >> import org.asteriskjava.manager.response.ManagerResponse; >> >> public class Manager { >> >> private ManagerConnection managerConnection; >> >> public Manager(String host, String user, String pass) throws >> IOException { >> >> ManagerConnectionFactory factory = new >> ManagerConnectionFactory(host, user, pass); >> this.managerConnection = factory.createManagerConnection(); >> >> } >> >> public void getHoldTime(String queue) throws IOException, >> AuthenticationFailedException, TimeoutException, >> InterruptedException { >> >> QueueStatusAction queueStatus = new QueueStatusAction(); >> >> ManagerResponse statusResponse; >> >> queueStatus.setQueue(queue); >> >> >> // connect to Asterisk and log in >> managerConnection.login(); >> >> // send the originate action and wait for a maximum of 30 >> seconds for Asterisk >> // to send a reply >> statusResponse = >> managerConnection.sendAction(queueStatus, 2000); >> >> // print out whether the originate succeeded or not >> System.out.println("Response Result:" + >> statusResponse.toString()); >> >> // and finally log off and disconnect >> managerConnection.logoff(); >> } >> } >> >> >> I call getHoldTime from AGI: >> >> Manager m = new Manager(ip,user,pass); >> m.getHoldTime(queue); >> >> >> but it doesn't contain queue param section it just say successful >> for this action. >> >> please help me how to get hold time of specific queue with >> asterisk java. >> >> Mohsen >> >> >> ------------------------------------------------------------------------------ >> 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... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > 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... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > 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 |
From: MT <moh...@gm...> - 2014-03-16 07:01:52
|
Hi yves, thanks for reply, if I use event listener in the multi access system it could be another QueueParams from another request. how can I manage that? about EventGeneratingAction I don't how to use it :( is there any samples that use EventGeneratingAction? I found an asterisk funtion QUEUE_VARIABLES that gives queue name and it set some variables that contains queue information like hold time that I need, I can get hold time by AGI but I want to get it from another server that have AMI access to it. Can I call function through Manager API and get the variables on that channel? thanks yves, you are great :) Mohsen On Sat, Mar 15, 2014 at 11:33 PM, Yves A. <yv...@gm...> wrote: > Hi, > > the QueueStatusAction class is a so called "EventGeneratingAction"... that > means that asterisk-java will fire the appropriate events which contain > further information after you sent the action... you have to implement a > listener for these events, catch them (in your case the QueueParamsEvent) > and read their information... > "success" after you snet the action means that your action was properly > sent... but before sending the action, you should have set up your > listeners... > because this is an asynchronous process, you should work with a thread... > (that can terminate after receiving the (QueueStatusCompleteEvent).. > > regards, > yves > > Am 15.03.2014 17:25, schrieb MT: > > Hi everyone, > > I want to get Hold Time of specified Queue. > > I search everywhere to get it through AGI but there is no such a thing > in AGI to get you hold time of given queue. > So I decide to use Manager API and call QueueStatus to get HoldTime on > the QueueParams section: > > this is my Manager Class: > > import java.io.IOException; > > import org.asteriskjava.manager.AuthenticationFailedException; > import org.asteriskjava.manager.ManagerConnection; > import org.asteriskjava.manager.ManagerConnectionFactory; > import org.asteriskjava.manager.TimeoutException; > import org.asteriskjava.manager.action.QueueStatusAction; > import org.asteriskjava.manager.event.QueueParamsEvent; > import org.asteriskjava.manager.response.ManagerResponse; > > public class Manager { > > private ManagerConnection managerConnection; > > public Manager(String host, String user, String pass) throws > IOException { > > ManagerConnectionFactory factory = new > ManagerConnectionFactory(host, user, pass); > this.managerConnection = factory.createManagerConnection(); > > } > > public void getHoldTime(String queue) throws IOException, > AuthenticationFailedException, TimeoutException, InterruptedException { > > QueueStatusAction queueStatus = new QueueStatusAction(); > > ManagerResponse statusResponse; > > queueStatus.setQueue(queue); > > > // connect to Asterisk and log in > managerConnection.login(); > > // send the originate action and wait for a maximum of 30 seconds > for Asterisk > // to send a reply > statusResponse = managerConnection.sendAction(queueStatus, 2000); > > // print out whether the originate succeeded or not > System.out.println("Response Result:" + statusResponse.toString()); > > // and finally log off and disconnect > managerConnection.logoff(); > } > } > > > I call getHoldTime from AGI: > > Manager m = new Manager(ip,user,pass); > m.getHoldTime(queue); > > > but it doesn’t contain queue param section it just say successful for > this action. > > please help me how to get hold time of specific queue with asterisk java. > > Mohsen > > > ------------------------------------------------------------------------------ > 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > 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 > > |
From: Yves A. <yv...@gm...> - 2014-03-15 20:02:55
|
Hi, the QueueStatusAction class is a so called "EventGeneratingAction"... that means that asterisk-java will fire the appropriate events which contain further information after you sent the action... you have to implement a listener for these events, catch them (in your case the QueueParamsEvent) and read their information... "success" after you snet the action means that your action was properly sent... but before sending the action, you should have set up your listeners... because this is an asynchronous process, you should work with a thread... (that can terminate after receiving the (QueueStatusCompleteEvent).. regards, yves Am 15.03.2014 17:25, schrieb MT: > Hi everyone, > > I want to get Hold Time of specified Queue. > > I search everywhere to get it through AGI but there is no such a thing > in AGI to get you hold time of given queue. > So I decide to use Manager API and call QueueStatus to get HoldTime on > the QueueParams section: > > this is my Manager Class: > > import java.io.IOException; > > import org.asteriskjava.manager.AuthenticationFailedException; > import org.asteriskjava.manager.ManagerConnection; > import org.asteriskjava.manager.ManagerConnectionFactory; > import org.asteriskjava.manager.TimeoutException; > import org.asteriskjava.manager.action.QueueStatusAction; > import org.asteriskjava.manager.event.QueueParamsEvent; > import org.asteriskjava.manager.response.ManagerResponse; > > public class Manager { > > private ManagerConnection managerConnection; > > public Manager(String host, String user, String pass) throws > IOException { > > ManagerConnectionFactory factory = new > ManagerConnectionFactory(host, user, pass); > this.managerConnection = factory.createManagerConnection(); > > } > > public void getHoldTime(String queue) throws IOException, > AuthenticationFailedException, TimeoutException, InterruptedException { > > QueueStatusAction queueStatus = new QueueStatusAction(); > > ManagerResponse statusResponse; > > queueStatus.setQueue(queue); > > > // connect to Asterisk and log in > managerConnection.login(); > > // send the originate action and wait for a maximum of 30 > seconds for Asterisk > // to send a reply > statusResponse = managerConnection.sendAction(queueStatus, 2000); > > // print out whether the originate succeeded or not > System.out.println("Response Result:" + > statusResponse.toString()); > > // and finally log off and disconnect > managerConnection.logoff(); > } > } > > > I call getHoldTime from AGI: > > Manager m = new Manager(ip,user,pass); > m.getHoldTime(queue); > > > but it doesn't contain queue param section it just say successful for > this action. > > please help me how to get hold time of specific queue with asterisk java. > > Mohsen > > > ------------------------------------------------------------------------------ > 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 |
From: MT <moh...@gm...> - 2014-03-15 16:25:56
|
Hi everyone, I want to get Hold Time of specified Queue. I search everywhere to get it through AGI but there is no such a thing in AGI to get you hold time of given queue. So I decide to use Manager API and call QueueStatus to get HoldTime on the QueueParams section: this is my Manager Class: import java.io.IOException; import org.asteriskjava.manager.AuthenticationFailedException; import org.asteriskjava.manager.ManagerConnection; import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.TimeoutException; import org.asteriskjava.manager.action.QueueStatusAction; import org.asteriskjava.manager.event.QueueParamsEvent; import org.asteriskjava.manager.response.ManagerResponse; public class Manager { private ManagerConnection managerConnection; public Manager(String host, String user, String pass) throws IOException { ManagerConnectionFactory factory = new ManagerConnectionFactory(host, user, pass); this.managerConnection = factory.createManagerConnection(); } public void getHoldTime(String queue) throws IOException, AuthenticationFailedException, TimeoutException, InterruptedException { QueueStatusAction queueStatus = new QueueStatusAction(); ManagerResponse statusResponse; queueStatus.setQueue(queue); // connect to Asterisk and log in managerConnection.login(); // send the originate action and wait for a maximum of 30 seconds for Asterisk // to send a reply statusResponse = managerConnection.sendAction(queueStatus, 2000); // print out whether the originate succeeded or not System.out.println("Response Result:" + statusResponse.toString()); // and finally log off and disconnect managerConnection.logoff(); } } I call getHoldTime from AGI: Manager m = new Manager(ip,user,pass); m.getHoldTime(queue); but it doesn’t contain queue param section it just say successful for this action. please help me how to get hold time of specific queue with asterisk java. Mohsen |
From: Yves A. <yv...@gm...> - 2014-03-15 11:20:51
|
Hi, did you follow the link I gave? It says: [...] Variable length DTMF This is a tricky issue: You cannot expect to have control over the duration of your DTMF signal when using out-of-band techniques (SIP INFO in general, or RFC2833 before Asterisk 1.4.0): For example cell phone carriers transmit keys pressed on your GSM phone to fixed length signals regardless of how long you pressed that key. A typical application where you'd want control of the duration of the key press is controlling an electric door opener <http://www.voip-info.org/wiki/view/Asterisk+phone+door>. Inband /Inband/ means that DTMF is transmitted within the audio of the phone conversation, i.e. it is audible to the conversation partners. Therefore only uncompressed codecs like g711 alaw or ulaw can carry inband DTMF reliably. Female voice are known to once in a while trigger the recognition of a DTMF tone. For analog lines inband is the only possible means to transmit DTMF. Changing DTMF duration when sending for ZAP channels You might try increasing the toneduration - or whatever the option is in /etc/asterisk/zapata.conf - Asterisk's default transmitted DTMF tone length is quite short: toneduration=300 [...] So it depends on your configuration and hardware, if you can change the length... Concerning your second question... executing commands like SendDTMF via java you say " But I am not able to use it with Asterisk-java "... what did you try (listing) and what was the result (errors?) All I can say is... you can use this and any other command with java... I would again really recommend you to read into the java-agi tutorials and play around with it. You will see that it will help you a lot achieving your objective. yves Am 13.03.2014 19:15, schrieb Jorge: > Sorry for my bad question. What I want to mean is I whant to send > tones to a device with a length of 80 ms . I have seen that Asterisk > ami allows to send DTMF tones with asteriskChannel.playDtmf("1") for > example. > > Sending a tone, is there a way to set up the tone length? > > I have seen also that Asterisk has way to send n tones with > http://www.voip-info.org/wiki/view/Asterisk+cmd+SendDTMF command. But > I am not able to use it with Asterisk-java. Could you explain me if > there is way to use this commands with Asterisk-java? > > Thank you for your help again. > > Jorge > > ---------------------------------------------------------------------------------------------------------------------------------------------- > > > > En función de la /Ley Orgánica 15/1999/, este mensaje de correo > electrónico y sus documentos adjuntos están dirigidos > /exclusivamente/ a los destinatarios especificados y su información es > de uso /estrictamente privado/ salvo que se especifique lo contrario. > La información contenida puede ser /confidencial/ y/o estar > /legalmente protegida/. Si usted recibe este mensaje por /error/, por > favor comuníqueselo inmediatamente al remitente y /elimínelo/ ya que > carece de autorización de todo tipo. /Se prohíbe expresamente/ la > revelación, distribución, impresión o copia de toda o alguna parte de > la información contenida en este mensaje > > > > El 13 de marzo de 2014, 18:42, Yves A. <yv...@gm... > <mailto:yv...@gm...>> escribió: > > it depends.... > > see here 4 more information: > http://www.voip-info.org/wiki/view/Asterisk+DTMF > > yves > > Am 13.03.2014 17:44, schrieb Jorge: >> Is there a way to set up the DTMF tone length? >> >> Jorge >> >> ---------------------------------------------------------------------------------------------------------------------------------------------- >> >> >> >> >> En función de la /Ley Orgánica 15/1999/, este mensaje de correo >> electrónico y sus documentos adjuntos están dirigidos >> /exclusivamente/ a los destinatarios especificados y su >> información es de uso /estrictamente privado/ salvo que se >> especifique lo contrario. La información contenida puede ser >> /confidencial/ y/o estar /legalmente protegida/. Si usted recibe >> este mensaje por /error/, por favor comuníqueselo inmediatamente >> al remitente y /elimínelo/ ya que carece de autorización de todo >> tipo. /Se prohíbe expresamente/ la revelación, distribución, >> impresión o copia de toda o alguna parte de la información >> contenida en este mensaje >> >> >> >> ------------------------------------------------------------------------------ >> 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... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > 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... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > 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 |
From: Jorge <gus...@gm...> - 2014-03-13 18:16:19
|
Sorry for my bad question. What I want to mean is I whant to send tones to a device with a length of 80 ms . I have seen that Asterisk ami allows to send DTMF tones with asteriskChannel.playDtmf("1") for example. Sending a tone, is there a way to set up the tone length? I have seen also that Asterisk has way to send n tones with http://www.voip-info.org/wiki/view/Asterisk+cmd+SendDTMF command. But I am not able to use it with Asterisk-java. Could you explain me if there is way to use this commands with Asterisk-java? Thank you for your help again. Jorge ---------------------------------------------------------------------------------------------------------------------------------------------- En función de la *Ley Orgánica 15/1999*, este mensaje de correo electrónico y sus documentos adjuntos están dirigidos *exclusivamente* a los destinatarios especificados y su información es de uso *estrictamente privado* salvo que se especifique lo contrario. La información contenida puede ser *confidencial* y/o estar *legalmente protegida*. Si usted recibe este mensaje por *error*, por favor comuníqueselo inmediatamente al remitente y *elimínelo* ya que carece de autorización de todo tipo. *Se prohíbe expresamente* la revelación, distribución, impresión o copia de toda o alguna parte de la información contenida en este mensaje El 13 de marzo de 2014, 18:42, Yves A. <yv...@gm...> escribió: > it depends.... > > see here 4 more information: > http://www.voip-info.org/wiki/view/Asterisk+DTMF > > yves > > Am 13.03.2014 17:44, schrieb Jorge: > > Is there a way to set up the DTMF tone length? > > Jorge > > > ---------------------------------------------------------------------------------------------------------------------------------------------- > > > > > En función de la *Ley Orgánica 15/1999*, este mensaje de correo > electrónico y sus documentos adjuntos están dirigidos *exclusivamente* a > los destinatarios especificados y su información es de uso *estrictamente > privado* salvo que se especifique lo contrario. La información contenida > puede ser *confidencial* y/o estar *legalmente protegida*. Si usted > recibe este mensaje por *error*, por favor comuníqueselo inmediatamente > al remitente y *elimínelo* ya que carece de autorización de todo tipo. *Se > prohíbe expresamente* la revelación, distribución, impresión o copia de > toda o alguna parte de la información contenida en este mensaje > > > > ------------------------------------------------------------------------------ > 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > 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 > > |
From: Yves A. <yv...@gm...> - 2014-03-13 17:52:15
|
Hi, so... if this is not a human call and all you need is call to or receive a call from such a device and kind of control it via dtmf, then I would recommend to use an (java-) agi-script. For an incoming call you route the call to your script and the device is connected to the channel you control with your agi... as long as your script or the device hangs up. For an outgoing call just initiate a call between your extension that routes to the agi-script and the extension / number you have to dial to reach your device. within the agi you have access to the channel and can directly send or receive dtmf-tones. if you want to use java agi scripts, take a look at the docs for asterisk-java. there is a tutorial. java-agi is really great... see it as some kind of a java-dialplan. the only annoying thing is that you have to reload the agi-server each time you modify your agi-classes, as they are cached... I wrote a wrapper that allows me to write java-agi in a text-file that are executed in realtime... so i dont have to compile and deploy them anytime... just change the script and without reloading the server the changes immediately become applied in the next run... yves Am 13.03.2014 15:09, schrieb Jorge: > Hi, > Sorry :( . Let´s start again, I will try to clarify a bit the > scenario. I am really new to Asterisk I will try to do my best. > > I want to talk to a device using DTMF tones using Asterisk. The main > problem is that the device can call o receive a call to/from Asterisk. > The main problem is that if the device is not connected to an > extension (SIP extension) or to a conference, the device hang up the > call so it is finished. > > My idea taken from here > (http://blogtech.cardosi.net/2014/01/15/tutorial-on-lamj-part-4/) is > connecting the device to a conference. And sending the DTMF tones > using the channel that has been created. Is it right? Do you have a > better solution? > > First case, If Asterisk calls I use (from > http://blogtech.cardosi.net/2014/01/15/tutorial-on-lamj-part-4) : > AsteriskChannel asteriskChannel = asteriskServer.originateToExtension(channelName, "default", "8600", 1, 10000); > asteriskChannel.playDtmf("1"); > And a listener that detects the DTMF event that arrives. Like this > (more or less, it is not the exact code I am using) : > ManagerConnectionFactory factory = new ManagerConnectionFactory( > ip, user, password); > managerConnection = factory.createManagerConnection(); > // login to Asterisk > managerConnection.login(); > // Instantiate a new AsteriskServer > asteriskServer = new AsteriskServerImpl(managerConnection); > managerConnection.addEventListener(new ManagerEventListener(){ > public void onManagerEvent(ManagerEvent event) { > if (event instanceof DtmfEvent) { ... > > Second case and here is the problem. What I have done is setting up > the incoming calls to the conference. So when the device calls the > input is directed to the conference and starts sending DTMF tones. > With the DTMF tone I get the channel name (DtmfEvent.getChannel()) > but when I try to get the channel object from the channel name > (asteriskServer.getChannelByName(mensaje.getCanal());) is where I have > the error. > > "org.asteriskjava.live.ManagerCommunicationException: Timeout waiting > for events from StatusAction" > > Please, let me know what is not explained and done properly. > > Kind regards and thank you 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 |
From: Yves A. <yv...@gm...> - 2014-03-13 17:42:27
|
it depends.... see here 4 more information: http://www.voip-info.org/wiki/view/Asterisk+DTMF yves Am 13.03.2014 17:44, schrieb Jorge: > Is there a way to set up the DTMF tone length? > > Jorge > > ---------------------------------------------------------------------------------------------------------------------------------------------- > > > <https://twitter.com/#%21/correderajorge> <http://www.correderajorge.es/> > > En función de la /Ley Orgánica 15/1999/, este mensaje de correo > electrónico y sus documentos adjuntos están dirigidos > /exclusivamente/ a los destinatarios especificados y su información es > de uso /estrictamente privado/ salvo que se especifique lo contrario. > La información contenida puede ser /confidencial/ y/o estar > /legalmente protegida/. Si usted recibe este mensaje por /error/, por > favor comuníqueselo inmediatamente al remitente y /elimínelo/ ya que > carece de autorización de todo tipo. /Se prohíbe expresamente/ la > revelación, distribución, impresión o copia de toda o alguna parte de > la información contenida en este mensaje > > > > ------------------------------------------------------------------------------ > 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 |
From: Jorge <gus...@gm...> - 2014-03-13 16:45:23
|
Is there a way to set up the DTMF tone length? Jorge ---------------------------------------------------------------------------------------------------------------------------------------------- <https://twitter.com/#%21/correderajorge> <http://www.correderajorge.es/> En función de la *Ley Orgánica 15/1999*, este mensaje de correo electrónico y sus documentos adjuntos están dirigidos *exclusivamente* a los destinatarios especificados y su información es de uso *estrictamente privado* salvo que se especifique lo contrario. La información contenida puede ser *confidencial* y/o estar *legalmente protegida*. Si usted recibe este mensaje por *error*, por favor comuníqueselo inmediatamente al remitente y *elimínelo* ya que carece de autorización de todo tipo. *Se prohíbe expresamente* la revelación, distribución, impresión o copia de toda o alguna parte de la información contenida en este mensaje |
From: Jorge <gus...@gm...> - 2014-03-13 14:09:37
|
Hi, Sorry :( . Let´s start again, I will try to clarify a bit the scenario. I am really new to Asterisk I will try to do my best. I want to talk to a device using DTMF tones using Asterisk. The main problem is that the device can call o receive a call to/from Asterisk. The main problem is that if the device is not connected to an extension (SIP extension) or to a conference, the device hang up the call so it is finished. My idea taken from here ( http://blogtech.cardosi.net/2014/01/15/tutorial-on-lamj-part-4/) is connecting the device to a conference. And sending the DTMF tones using the channel that has been created. Is it right? Do you have a better solution? First case, If Asterisk calls I use (from http://blogtech.cardosi.net/2014/01/15/tutorial-on-lamj-part-4) : AsteriskChannel asteriskChannel = asteriskServer.originateToExtension(channelName, "default", "8600", 1, 10000); asteriskChannel.playDtmf("1"); And a listener that detects the DTMF event that arrives. Like this (more or less, it is not the exact code I am using) : ManagerConnectionFactory factory = new ManagerConnectionFactory( ip, user, password); managerConnection = factory.createManagerConnection(); // login to Asterisk managerConnection.login(); // Instantiate a new AsteriskServer asteriskServer = new AsteriskServerImpl(managerConnection); managerConnection.addEventListener(new ManagerEventListener(){ public void onManagerEvent(ManagerEvent event) { if (event instanceof DtmfEvent) { ... Second case and here is the problem. What I have done is setting up the incoming calls to the conference. So when the device calls the input is directed to the conference and starts sending DTMF tones. With the DTMF tone I get the channel name (DtmfEvent.getChannel()) but when I try to get the channel object from the channel name (asteriskServer.getChannelByName(mensaje.getCanal());) is where I have the error. "org.asteriskjava.live.ManagerCommunicationException: Timeout waiting for events from StatusAction" Please, let me know what is not explained and done properly. Kind regards and thank you for your help. |
From: Yves A. <yv...@gm...> - 2014-03-12 07:25:50
|
Hi, for me, up to now AJ worked with any asterisk release I tried... from 1.2 up to 11.7 (did not try the most latest releases 12.x or... or are we higher meanwhile ? ;-) ) The only thing I also realized is the one with the event classes, that you already wrote about... but if you don´t need these events, you can ignore it and if you need these events to be fired or listened to in asterisk-java, you have to write the according classes yourself. looking into the sources you can see that this is not a too hard task.. regards, yves Am 11.03.2014 20:34, schrieb Torbjörn Abrahamsson: > > Anyone? J > > I really like asterisk-java, I have been using it for many years with > Asterisk 1.2. I would like to continue, so I hope there is support for > version 12 as well, or that there will be in the not so distant future... > > BR, > > Torbjörn Abrahamsson > > *From:*Torbjörn Abrahamsson [mailto:tor...@gm...] > *Sent:* den 20 februari 2014 13:31 > *To:* ast...@li... > *Subject:* Supported versions of Asterisk > > Hello everyone! > > I would only like know what versions of Asterisk are supported when > using Asterisk-Java? > > I looked at the javadocs and saw that there are events in Asterisk 12 > that do not have corresponding classes. This was just a basic check, > so of course may I have missed something. > > I will use both AMI and FastAGI, but I am concerned about version > compatibility. > > BR, > > Torbjörn Abrahamsson > > > > ------------------------------------------------------------------------------ > 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 |
From: Yves A. <yv...@gm...> - 2014-03-12 07:21:16
|
hi, well... now I am more confused than before... would be helpful to read your scenario and objective from the beginning... Dont save words, the more you explain, the better... What is the purpose of sending DTMF into a conversation? Incoming calls can be handled either by hooking on events or routing the call to a (java-)agi. But again, as long as I do not exactly understand your objective / problem / scenario these are only common tips... yves Am 11.03.2014 17:03, schrieb Jorge: > Hi : > > Thank you very much for your answer. What I would like to do is to > send and receive dtmf tones when Asterisk call to a telephone o > receive a call from a telephone. The problem I had I don´t know how to > manage the call connection so I decided to call to a conference. On > this way the call is not hung up while I am sending the tones. > > The idea is the other won´t listen the tones so I can manage n > connections using only one conference room. > > I think 2) really dosen´t matter because no other data will flow > throught this call only DTMF tones. I am not sure if I understood this > point properly. > > You said "call via java into the conference and send the tones would > be easier." I think this is right but I need to handle incoming > calls, this why I need the channel. > > Do you need more information? > > Thank you for your answer. > > > > Jorge > > ---------------------------------------------------------------------------------------------------------------------------------------------- > > > <https://twitter.com/#%21/correderajorge> <http://www.correderajorge.es/> > > En función de la /Ley Orgánica 15/1999/, este mensaje de correo > electrónico y sus documentos adjuntos están dirigidos > /exclusivamente/ a los destinatarios especificados y su información es > de uso /estrictamente privado/ salvo que se especifique lo contrario. > La información contenida puede ser /confidencial/ y/o estar > /legalmente protegida/. Si usted recibe este mensaje por /error/, por > favor comuníqueselo inmediatamente al remitente y /elimínelo/ ya que > carece de autorización de todo tipo. /Se prohíbe expresamente/ la > revelación, distribución, impresión o copia de toda o alguna parte de > la información contenida en este mensaje > > > > 2014-03-11 16:49 GMT+01:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > 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... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > 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... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > 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 |
From: Torbjörn A. <tor...@gm...> - 2014-03-11 19:34:48
|
Anyone? J I really like asterisk-java, I have been using it for many years with Asterisk 1.2. I would like to continue, so I hope there is support for version 12 as well, or that there will be in the not so distant future BR, Torbjörn Abrahamsson From: Torbjörn Abrahamsson [mailto:tor...@gm...] Sent: den 20 februari 2014 13:31 To: ast...@li... Subject: Supported versions of Asterisk Hello everyone! I would only like know what versions of Asterisk are supported when using Asterisk-Java? I looked at the javadocs and saw that there are events in Asterisk 12 that do not have corresponding classes. This was just a basic check, so of course may I have missed something. I will use both AMI and FastAGI, but I am concerned about version compatibility. BR, Torbjörn Abrahamsson |
From: Jorge <gus...@gm...> - 2014-03-11 16:03:33
|
Hi : Thank you very much for your answer. What I would like to do is to send and receive dtmf tones when Asterisk call to a telephone o receive a call from a telephone. The problem I had I don´t know how to manage the call connection so I decided to call to a conference. On this way the call is not hung up while I am sending the tones. The idea is the other won´t listen the tones so I can manage n connections using only one conference room. I think 2) really dosen´t matter because no other data will flow throught this call only DTMF tones. I am not sure if I understood this point properly. You said "call via java into the conference and send the tones would be easier." I think this is right but I need to handle incoming calls, this why I need the channel. Do you need more information? Thank you for your answer. Jorge ---------------------------------------------------------------------------------------------------------------------------------------------- <https://twitter.com/#%21/correderajorge> <http://www.correderajorge.es/> En función de la *Ley Orgánica 15/1999*, este mensaje de correo electrónico y sus documentos adjuntos están dirigidos *exclusivamente* a los destinatarios especificados y su información es de uso *estrictamente privado* salvo que se especifique lo contrario. La información contenida puede ser *confidencial* y/o estar *legalmente protegida*. Si usted recibe este mensaje por *error*, por favor comuníqueselo inmediatamente al remitente y *elimínelo* ya que carece de autorización de todo tipo. *Se prohíbe expresamente* la revelación, distribución, impresión o copia de toda o alguna parte de la información contenida en este mensaje 2014-03-11 16:49 GMT+01:00 Yves A. <yv...@gm...>: > 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > 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 > > |