asterisk-java-users Mailing List for Asterisk-Java Library (Page 116)
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: T. L. P. T. <tom...@gm...> - 2008-04-10 03:59:53
|
Hello Satya: Yes, you can integrate Asterisk-Java and FreePBX without any dirty work around. Let's see how this could be achieved. The first thing you should know about FreePBX configuration files is that any modules that generates any configuration files, usually use the name <configuration file>_additional.conf. Normally, a base configuration file will include this FreePBX generated file. For example, the base extensions.conf file that comes with FreePBX includes (among others) the files extensions_additional.conf. It doesn't make any sense to modify extensions_additional.conf, because the next time that changes are applied from the interface, this file will be regenerated; dropping any changes done by hand. Also, the base config file (in this case, extensions.conf) shouldn't be edited. There is a better way to integrate your self developed contexts, extensions and priorities. Most of the base config files of FreePBX include a file named <configuration file>_custom.conf. In this case, you should edit extensions_custom.conf and add your custom context. For example: [custom-myAsteriskJavaApp] exten => 1300,1,Agi(agi://localhost/hello.agi) Now, if you run an "extensions reload" command from the CLI, a new context will be available. We are going to use this context to integrate Asterisk-Java. To attach an inbound route to your Asterisk-Java application, you will need to create a new Inbound route and select "Custom App" in the "Set Destination" combo box. By using "Custom App", any incoming call that matches this inbound route will be delivered to a context (which must start with the "custom-" prefix) available to Asterisk. Copy the name of this new context, the extension and the priority (custom-myAsteriskJavaApp,1300,1) to the input box. Submit the changes and apply the changes to Asterisk. You can now test an incoming call to the DID 1300 and have fun with Asterisk-Java. Your mileage may vary but you should be able to have this example working with little modifications. Let us know if you have any problem. Best regards, Tomás. On Wed, Apr 9, 2008 at 11:30 PM, Satya Parimi <sat...@dh...> wrote: > Hi > > I'm a new user with Asterisk & Asterisk-Java > I installed Asterisk using PBX in a FLASH, which is a bundle of Asterisk > 1.4, FreePBX 2.4 and Cent OS > I'm able to create trunk/inbound route/extension easily using the > FreePBX GUI, it works great with a soft phone > > Now I want to intercept the inbound call, so I'm trying to use > Asterisk-Java (release from 4/9/08). I followed the example but stumbled > on creating an extension as suggested. Since I used FreePBX it generates > the extensions.conf files, so I cannot edit that. Of course I tried to > edit that file to add "exten => 1300,1,Agi(agi://localhost/hello.agi)", > but that didn't work. It doesn't show up on FreePBX GUI, so I cannot > attach that to inbound route. > > If I use FreePBX, can't I setup Asterisk-Java? Is there a work around? > I appreciate any help with this > > Thanks > Satya > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Satya P. <sat...@dh...> - 2008-04-10 02:30:07
|
Hi I'm a new user with Asterisk & Asterisk-Java I installed Asterisk using PBX in a FLASH, which is a bundle of Asterisk 1.4, FreePBX 2.4 and Cent OS I'm able to create trunk/inbound route/extension easily using the FreePBX GUI, it works great with a soft phone Now I want to intercept the inbound call, so I'm trying to use Asterisk-Java (release from 4/9/08). I followed the example but stumbled on creating an extension as suggested. Since I used FreePBX it generates the extensions.conf files, so I cannot edit that. Of course I tried to edit that file to add "exten => 1300,1,Agi(agi://localhost/hello.agi)", but that didn't work. It doesn't show up on FreePBX GUI, so I cannot attach that to inbound route. If I use FreePBX, can't I setup Asterisk-Java? Is there a work around? I appreciate any help with this Thanks Satya |
From: preetha A. <pre...@gm...> - 2008-04-09 06:57:03
|
Hi, I am trying to retreive a value from dialplan exten => _XXX,1,Agi(agi://localhost/hello.agi?location=chennai) In my java program,I am retreiving the value using request.getParameter(location).when i compile this i am getting the null value. how can i use this getParameter? -- Preetha.A |
From: T. L. P. T. <tom...@gm...> - 2008-04-07 18:37:08
|
Hello Gopal: Can you please send us the output of your application? This would be really helpful (along with the Asterisk and Asterisk-Java versions that you are using) to debug your problem and try to find a solution. Thank you. Best regards, Tomás. On Mon, Apr 7, 2008 at 8:11 AM, Darko Drazic <dar...@ce...> wrote: > Hi, > you can use those methods, of course .. I understood that you have a > problem to get meetme room number from the active channel ... > > > On Mon, 2008-04-07 at 14:24 +0530, Gopal krishnan wrote: > > Hi Darko, > > > > I found the command getMeetmeRoom() or getMeetmeRoom number() whith > > this we cant able to capture the meetme rooms? > > > > > > On 4/7/08, Darko Drazic <dar...@ce...> wrote: > > Hello, > > I did not find any other way but to issue "show channels" > > command and > > then to parse result in order to find channel of the > > particular user. > > Once it is found you can issue "show channel" command as to > > get channel > > details - meet me extension will be displayed at the > > 'extension' > > property. It will be the best to try it first from the CLI ... > > > > I hope it helped :) > > > > Regards, > > > > darko > > > > > > > > On Mon, 2008-04-07 at 12:38 +0530, Gopal krishnan wrote: > > > Hi, > > > > > > I am trying to get the meetme room number thru manager > > api or live > > > api. I have tried the example in the asterisk java site. Is > > there > > > anything i need to do with asterisk server? , becuase i am > > not able to > > > get the conference room number since i have logged in a > > meetme. > > > > > > -- > > > Thank you with regards, > > > Gopal, > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by the 2008 JavaOne(SM) > > Conference > > > Register now and save $200. Hurry, offer ends at 11:59 p.m., > > > Monday, April 7! Use priority code J8TLD2. > > > > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) > > Conference > > Register now and save $200. Hurry, offer ends at 11:59 p.m., > > Monday, April 7! Use priority code J8TLD2. > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > -- > > Thank you with regards, > > Gopal, > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Register now and save $200. Hurry, offer ends at 11:59 p.m., > > Monday, April 7! Use priority code J8TLD2. > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Darko D. <dar...@ce...> - 2008-04-07 11:11:27
|
Hi, you can use those methods, of course .. I understood that you have a problem to get meetme room number from the active channel ... On Mon, 2008-04-07 at 14:24 +0530, Gopal krishnan wrote: > Hi Darko, > > I found the command getMeetmeRoom() or getMeetmeRoom number() whith > this we cant able to capture the meetme rooms? > > > On 4/7/08, Darko Drazic <dar...@ce...> wrote: > Hello, > I did not find any other way but to issue "show channels" > command and > then to parse result in order to find channel of the > particular user. > Once it is found you can issue "show channel" command as to > get channel > details - meet me extension will be displayed at the > 'extension' > property. It will be the best to try it first from the CLI ... > > I hope it helped :) > > Regards, > > darko > > > > On Mon, 2008-04-07 at 12:38 +0530, Gopal krishnan wrote: > > Hi, > > > > I am trying to get the meetme room number thru manager > api or live > > api. I have tried the example in the asterisk java site. Is > there > > anything i need to do with asterisk server? , becuase i am > not able to > > get the conference room number since i have logged in a > meetme. > > > > -- > > Thank you with regards, > > Gopal, > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) > Conference > > Register now and save $200. Hurry, offer ends at 11:59 p.m., > > Monday, April 7! Use priority code J8TLD2. > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) > Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > -- > Thank you with regards, > Gopal, > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Gopal k. <gop...@pe...> - 2008-04-07 08:54:31
|
Hi Darko, I found the command getMeetmeRoom() or getMeetmeRoom number() whith this we cant able to capture the meetme rooms? On 4/7/08, Darko Drazic <dar...@ce...> wrote: > > Hello, > I did not find any other way but to issue "show channels" command and > then to parse result in order to find channel of the particular user. > Once it is found you can issue "show channel" command as to get channel > details - meet me extension will be displayed at the 'extension' > property. It will be the best to try it first from the CLI ... > > I hope it helped :) > > Regards, > > darko > > > > On Mon, 2008-04-07 at 12:38 +0530, Gopal krishnan wrote: > > Hi, > > > > I am trying to get the meetme room number thru manager api or live > > api. I have tried the example in the asterisk java site. Is there > > anything i need to do with asterisk server? , becuase i am not able to > > get the conference room number since i have logged in a meetme. > > > > -- > > Thank you with regards, > > Gopal, > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Register now and save $200. Hurry, offer ends at 11:59 p.m., > > Monday, April 7! Use priority code J8TLD2. > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > -- Thank you with regards, Gopal, |
From: Darko D. <dar...@ce...> - 2008-04-07 08:31:10
|
Hello, I did not find any other way but to issue "show channels" command and then to parse result in order to find channel of the particular user. Once it is found you can issue "show channel" command as to get channel details - meet me extension will be displayed at the 'extension' property. It will be the best to try it first from the CLI ... I hope it helped :) Regards, darko On Mon, 2008-04-07 at 12:38 +0530, Gopal krishnan wrote: > Hi, > > I am trying to get the meetme room number thru manager api or live > api. I have tried the example in the asterisk java site. Is there > anything i need to do with asterisk server? , becuase i am not able to > get the conference room number since i have logged in a meetme. > > -- > Thank you with regards, > Gopal, > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Gopal k. <sa...@gm...> - 2008-04-07 07:08:53
|
Hi, I am trying to get the meetme room number thru manager api or live api. I have tried the example in the asterisk java site. Is there anything i need to do with asterisk server? , becuase i am not able to get the conference room number since i have logged in a meetme. -- Thank you with regards, Gopal, |
From: Diboula G. <gre...@gm...> - 2008-04-06 17:25:46
|
Hi, Stefan: Thanks for the neat work. I've been playing around with asterisk-java for a while. One think that I wanted to do is to send an OS command to asterisk and have it executed. Normally, when being in the asterisk CLI, prefixing a command with an exclamation mark (!) would make asterisk send the command to the operating system and have it executed. I have been trying to send commands (prefixed with !) via Asterisk-java to asterisk but haven't got much success. I was trying for instance to move the monitor output (conversation records) to another sever (using rcp). Any idea if I'm doing something wrong? thanks, Gregoire L'ivrogne. -- Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! http://games.entertainment.gmx.net/de/entertainment/games/free |
From: Gaëtan M. <gm...@ea...> - 2008-04-06 10:35:17
|
Hi Thanks for your time. >> 1/ There is no "start" method on the server. Instead it starts "on >> demand" when sending the first action, or worst, when one adds a >> listener on it. > > I think we can fix this by some refactoring and provide an > implementation that initializes automatically and one that throws > MCE or > IllegalStateException when a method is called that requires a > connection > and it is not yet initialized. Indeed I think some minor refactoring is the best option. In fact that's what I initially did but I later reworked this to keep a minimal patch against trunk. The AsteriskServerImpl class should of course maintain the old behavior, hence my idea to move common code in an abstract superclass than requires a connection object, and then handle connection creation/ initialization specifics in the subclasses. > > A simple solution might be to replace to calls to initializeIfNeeded() > by calls to a new protected method called checkInitialize() of > similar, > that can be overridden by subclasses and either throw an exception or > perform the initialization if its not yet initialized. Lol, checkinitialize() was exactly the name I used but once again I renamed it and wrapped it in InitializeifNeeded to reduce the patch size ;) However it should not throw an exception when called from addAsteriskServerListener, or, at least, addAsteriskServerListener should catch it in the service oriented implementation. The AsteriskServer interface should however still declare it throws an MCE but we'll know that it won't happen with the service oriented implementation. > >> Is there a good reason to call initializeIfNeeded() in the >> addAsteriskServerListener() method (and as a consequence have it >> potentially throw a MCE) ? > > The idea behind this that if you register a listener and the object > has > not yet been initialized you won't receive any events. In fact the > public initialize() method was only added later on, originally > AsteriskServer was meant to work out of the box with as few lines of > code as possible. - Maybe it's a bit too smart now :-) And that's really great for starters. We must keep the old behaviour. Another problem is that automatically starting the connection before adding the listener could also cause lost events (ie my "server initialized" event). > > >> 2/ If that very first connection fails in "initializeIfNeeded", >> then the >> method throws an MCE that escalades to the addAsteriskServerListener >> method and eventually reaches the spring context factory. As a >> result, >> the server is down and won't start again until we try to send >> something. >> Moreover as the exception was thrown before the actual >> listeners.add() >> call, our listener is eventually not added. >> So the application completely fails to start in spring if it can't >> reach >> asterisk while starting. >> > > This is a bit harder. Usually I prefer things to fail early so you > notice if you put in the wrong hostname or credentials. I understand > that there are situations where this is not the required behavior. As > you point out preventing the application from deploying due to > Asterisk > maintainance is not acceptable. > To solve this issue we may have to add a feature to force a > ManagerConnection to keep connecting. This won't probably look much > different from the RECONNECTING hack, except for that it's hidden :-) In the demo patch I attached, I now start a background thread whose aim is to try and force the first connection in a loop (and swallow MCE exception for that purpose). > > How should we proceed? > If you're interested in this kind of patch I can try and write it. This should be fairly easy. Gaetan |
From: Stefan R. <ste...@re...> - 2008-04-06 09:57:51
|
Thanks for reporting your success. You can register the event even before logging in, so you receive the events right from the beginning, e.g. connection.registerUserEventClass(CRM_DispoRecordEvent.class); connection.login(); =Stefan Maciek Tokarski wrote: > Hi, > Stefan thanks for the advice. I've implemented a CRM_DispoRecord and > registered it. And now I'm able to handle this event. > > I've done this in this way: > > --- CRM_DispoRecordEvent.java file > > public class CRM_DispoRecordEvent extends ManagerEvent{ > /** > * class body definition > */ > } > > > --- Main application file > > //.... > connection = factory.createManagerConnection(); > > try { > connection.login(); > connection.registerUserEventClass(CRM_DispoRecordEvent.class); > } catch (Exception ex) { > ex.printStackTrace(); > } > //.... > > Most important thing was to extend ManagerEvent not UserEvent class in > CRM_DispoRecordEvent. > > > Regards, Maciek > > > > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On Behalf Of > Stefan Reuter > Sent: Sunday, April 06, 2008 10:24 AM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Gnudialer and asterisk-java, new event > types > > Hi, > > though the registerUserEvent method in ManagerConnection is intended > primarily for user events you can also use it to register "normal" > events. The approach is to implement a class for the CRM_DispoRecord > event and register it. Just have a look at the other events to see how > to do that. > There is no need to recompile or modify the Asterisk-Java jar to add new > events. > > =Stefan > -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Maciek T. <mlo...@gm...> - 2008-04-06 09:44:51
|
Hi, Stefan thanks for the advice. I've implemented a CRM_DispoRecord and registered it. And now I'm able to handle this event. I've done this in this way: --- CRM_DispoRecordEvent.java file public class CRM_DispoRecordEvent extends ManagerEvent{ /** * class body definition */ } --- Main application file //.... connection = factory.createManagerConnection(); try { connection.login(); connection.registerUserEventClass(CRM_DispoRecordEvent.class); } catch (Exception ex) { ex.printStackTrace(); } //.... Most important thing was to extend ManagerEvent not UserEvent class in CRM_DispoRecordEvent. Regards, Maciek -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Stefan Reuter Sent: Sunday, April 06, 2008 10:24 AM To: ast...@li... Subject: Re: [Asterisk-java-users] Gnudialer and asterisk-java, new event types Hi, though the registerUserEvent method in ManagerConnection is intended primarily for user events you can also use it to register "normal" events. The approach is to implement a class for the CRM_DispoRecord event and register it. Just have a look at the other events to see how to do that. There is no need to recompile or modify the Asterisk-Java jar to add new events. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Stefan R. <ste...@re...> - 2008-04-06 08:24:00
|
Hi, though the registerUserEvent method in ManagerConnection is intended primarily for user events you can also use it to register "normal" events. The approach is to implement a class for the CRM_DispoRecord event and register it. Just have a look at the other events to see how to do that. There is no need to recompile or modify the Asterisk-Java jar to add new events. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Stefan R. <ste...@re...> - 2008-04-06 08:22:11
|
Hi, > 1/ There is no "start" method on the server. Instead it starts "on > demand" when sending the first action, or worst, when one adds a > listener on it. > That means that the server automatically tries to start "too early" when > spring wires the listener into it. I think we can fix this by some refactoring and provide an implementation that initializes automatically and one that throws MCE or IllegalStateException when a method is called that requires a connection and it is not yet initialized. A simple solution might be to replace to calls to initializeIfNeeded() by calls to a new protected method called checkInitialize() of similar, that can be overridden by subclasses and either throw an exception or perform the initialization if its not yet initialized. > Is there a good reason to call initializeIfNeeded() in the > addAsteriskServerListener() method (and as a consequence have it > potentially throw a MCE) ? The idea behind this that if you register a listener and the object has not yet been initialized you won't receive any events. In fact the public initialize() method was only added later on, originally AsteriskServer was meant to work out of the box with as few lines of code as possible. - Maybe it's a bit too smart now :-) > 2/ If that very first connection fails in "initializeIfNeeded", then the > method throws an MCE that escalades to the addAsteriskServerListener > method and eventually reaches the spring context factory. As a result, > the server is down and won't start again until we try to send something. > Moreover as the exception was thrown before the actual listeners.add() > call, our listener is eventually not added. > So the application completely fails to start in spring if it can't reach > asterisk while starting. > > NB: However if later asterisk is stopped, everything is fine as the > connection handles the reconnection automatically. So I originally > worked around this using a patched ConnectionImpl that simply started in > the fake "RECONNECTING" state :) This is a bit harder. Usually I prefer things to fail early so you notice if you put in the wrong hostname or credentials. I understand that there are situations where this is not the required behavior. As you point out preventing the application from deploying due to Asterisk maintainance is not acceptable. To solve this issue we may have to add a feature to force a ManagerConnection to keep connecting. This won't probably look much different from the RECONNECTING hack, except for that it's hidden :-) How should we proceed? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Maciek T. <mlo...@gm...> - 2008-04-05 17:08:23
|
Hey all, I'm using gnudialer which defines event named ManagerEvent in Asterisk Manager Interface (there is patch to manager.c file- http://dynx.net/ASTERISK/gnudialer/manager.c.both-patches.txt). Currently I'm developing some application that monitors events form * and there is some problem, because when ManagerEvent reaches my application on Std.err I've got: ---- 008-04-05 18:44:00 org.asteriskjava.manager.internal.EventBuilderImpl buildEvent INFO: No event class registered for event type 'crm_disporecord', attributes: {body=Agent: 300|Dispo: 4|Transfer: TRANSFER|Campaign: test5|Leadid: 185|Channel: Local/693595766@gd-out-9f42,1, event=CRM_DispoRecord, privilege=user,all} ---- My question is: how to define new Asterisk event type (this is _not_ user event) without recompiling asterisk-java code? Is there any way to do this. I know there is registerEventClass method in ManagerReaderImpl class. How to use it? Regards, Maciek |
From: Gaëtan M. <gm...@ea...> - 2008-04-05 13:39:11
|
Hi Stefan We are using the AsteriskServerImpl class inside a spring application. We however faced some problems as the stock AsteriskServerImpl seemed no so spring-friendly. The main problems I faced are the following: 1/ There is no "start" method on the server. Instead it starts "on demand" when sending the first action, or worst, when one adds a listener on it. That means that the server automatically tries to start "too early" when spring wires the listener into it. Is there a good reason to call initializeIfNeeded() in the addAsteriskServerListener() method (and as a consequence have it potentially throw a MCE) ? 2/ If that very first connection fails in "initializeIfNeeded", then the method throws an MCE that escalades to the addAsteriskServerListener method and eventually reaches the spring context factory. As a result, the server is down and won't start again until we try to send something. Moreover as the exception was thrown before the actual listeners.add() call, our listener is eventually not added. So the application completely fails to start in spring if it can't reach asterisk while starting. NB: However if later asterisk is stopped, everything is fine as the connection handles the reconnection automatically. So I originally worked around this using a patched ConnectionImpl that simply started in the fake "RECONNECTING" state :) I recently tried to clean all these modifications to ease my weekly merge against your trunk revision. Here is a patch against head as of today. This is clearly not a request for inclusion but just meant to illustrate how I worked around the problem. Indeed it is really not correct regarding object programing patterns but only meant to be small and not intrusive so you can easily see what I'm trying to implement. If you think that kind of functionality is interesting, maybe I could write some cleaner code and submit it ? In that event, I'd like to have your idea on the subject before I start. I personally think common functionality should then be moved to an abstract AbstractAsterikServerImpl class, with the child AsteriskServerImpl class maintaining the same behavior and semantic as the current one, and another one implementing the other "service- oriented" approach. What do you think ? Kind regards Thanks for your great work. Gaetan |
From: Stefan R. <ste...@re...> - 2008-04-05 06:00:43
|
Eduard Martínez wrote: > Finally I can test it. If it is useful for someone, AGI works OK with > attended transfers. However, if thereis an attended transfer inside an > agi script, AGIChannel.getName() returns the 'old' channel name, and > AGIChannel.getVariable("CHANNEL") returns the updated name. Thanks for this pointer. The AgiRequest is only populated when the AgiScript is started with the data received from Asterisk. The implications are interesting for the new AsyncAGI stuff where AgiCommands are converted to Manager actions that include the channel name. So I guess I have to watch for RenameEvents there and update my AgiWriter in to use the new channel name. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: preetha A. <pre...@gm...> - 2008-04-05 05:08:53
|
Hi, I am trying to get the meetme room number through manager api by the following event: protected *AbstractMeetMeEvent*(java.lang.Object source) what is the Object source here?how do i use it in manager api? my code as follows: import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.response.ManagerResponse; import org.asteriskjava.manager.event.AbstractMeetMeEvent; private AbstractMeetMeEvent abstractMeetme; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String meetMe="21045"; try { ManagerConnectionFactory factory = new ManagerConnectionFactory( "192.168.x.xxx", "admin", "1234"); // this.managerConnection = factory.createManagerConnection(); abstractMeetme.getMeetMe(); out.println(abstractMeetme); managerConnection.login(); // send the originate action and wait for a maximum of 30 seconds // for Asterisk // to send a reply originateResponse = managerConnection.sendAction(originateAction, 30000); // and finally log off and disconnect managerConnection.logoff(); out.println("OK"); } catch (Exception e) { out.println("NOT OK"); e.printStackTrace(); } } when i run this code i amgetting the null pointer exception in the line : abstractMeetme.getMeetMe(); Thanks. Preetha.A |
From: E. M. <mar...@gm...> - 2008-04-04 14:55:02
|
Finally I can test it. If it is useful for someone, AGI works OK with attended transfers. However, if thereis an attended transfer inside an agi script, AGIChannel.getName() returns the 'old' channel name, and AGIChannel.getVariable("CHANNEL") returns the updated name. In example, figure two phones: SIP/101 and SIP/102 and this code for an AGI script in extension 123: //////////////////////////////////////// package test; import org.asteriskjava.fastagi.*; public class HelloAgiScript extends BaseAgiScript{ public void service(AgiRequest request, AgiChannel channel) throws AgiException { answer(); while(true){ streamFile("tt-monkeys"); System.out.println("Original: "+channel.getName()); System.out.println("New channel: "+channel.getVariable("CHANNEL")); } } ////////////////////////////////////////// If SIP/102 does an attended transfer of SIP/101 to this extension, the output of the program is: Original: SIP/102-xxxxx New channel: SIP/101-xxxxx Original: SIP/102-xxxxx New channel: SIP/101-xxxxx Original: SIP/102-xxxxx New channel: SIP/101-xxxxx On Thu, Mar 27, 2008 at 11:27 PM, Eduard Martínez <mar...@gm...> wrote: > Well in my case I was thinking in SIP attended transfers. With SIP phones > in attended transfers the transfered channel starts doing whathever was > doing the other channel: playing a sound, a bridge with another channel etc. > > > On Thu, Mar 27, 2008 at 9:19 PM, Martin Smith <ma...@be...> > wrote: > > > I haven't been able to do an attended transfer to anything natively. I > > was under the impression that app_transfer does not do attended transfers > > and ONLY transfers to an extension location in the dialplan (NOT an > > extension in progress), and you can only do an attended transfer via the > > features.conf method or a phone which knows how with a given channel > > technology that also supports it i.e. NOT an attended transfer to Voicemail, > > Playback, or any other such app. > > > > Maybe someone else here can comment on this. > > > > Martin Smith, Systems Developer > > ma...@be... > > Bureau of Economic and Business Research > > University of Florida > > (352) 392-0171 Ext. 221 > > > > > > ------------------------------ > > *From:* ast...@li... [mailto: > > ast...@li...] *On Behalf Of *Eduard > > Martínez > > *Sent:* Thursday, March 27, 2008 2:36 PM > > *To:* ast...@li... > > *Subject:* Re: [Asterisk-java-users] Agi scripts and native transfers > > > > > > > > On Thu, Mar 27, 2008 at 2:36 PM, Martin Smith <ma...@be...> > > wrote: > > > > > Can ongoing channel be able to be the target of a transfer? [...] > > > > > > > As far as I know, yes. But that's not the point. Maybe a valid example > > for you is: > > Party A calls Party B. Party B puts the call on hold and calls to the > > AGI script with the monkeys. Then Party B does the atended transfer with > > Party A and the AGI call. > > > > Think in the loop directly in the dialplan: > > > > exten => 1234, 1, PlayBack(tt-monkeys) > > exten => 1234, 2, Goto(1) > > > > If Party B does a native transfer to this extension, Party A starts > > hearing the monkeys and the loop continues with his channel. > > > > > > > > > > As an example, I haven't been able (in my one 5 minute try, anyway) to > > > convince Asterisk to do an attended transfer to voicemail. Asterisk-Java is > > > beside the issue here. I don't think you can have a pre-existing channel as > > > the target of an attended transfer, short of using an app that lets channels > > > comingle, like meet me. > > > > > > Hopefully someone can correct me if I'm wrong. > > > > > > > > > Martin Smith, Systems Developer > > > ma...@be... > > > Bureau of Economic and Business Research > > > University of Florida > > > (352) 392-0171 Ext. 221 > > > > > > > > > ------------------------------ > > > *From:* ast...@li... [mailto: > > > ast...@li...] *On Behalf Of *Eduard > > > Martínez > > > *Sent:* Wednesday, March 26, 2008 6:44 PM > > > *To:* ast...@li... > > > *Subject:* [Asterisk-java-users] Agi scripts and native transfers > > > > > > Hello, > > > I'm going to develop an AGI script but first I want to know if they > > > have problems with attended transfers. For instance, imagine an agi script > > > with a loop playing a sound (tt-monkeys?). Party A calls to Party B. Then > > > Party A also calls to the AGI script and start hearing the monkeys. If Party > > > A transfers Party B to the AGI script call, it will work? Sadly now I can > > > test it because I don't have a phone with attended transfer support. > > > Thank you. > > > > > > > > > > > > ------------------------------------------------------------------------- > > > Check out the new SourceForge.net Marketplace. > > > It's the best place to buy or sell services for > > > just about anything Open Source. > > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > _______________________________________________ > > > Asterisk-java-users mailing list > > > Ast...@li... > > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > |
From: preetha A. <pre...@gm...> - 2008-04-04 12:16:40
|
Hi, I am trying to get the meetme room number through manager api by the following event: protected *AbstractMeetMeEvent*(java.lang.Object source) what is the Object source here?how do i use it in manager api? my code as follows: import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.response.ManagerResponse; import org.asteriskjava.manager.event.AbstractMeetMeEvent; private AbstractMeetMeEvent abstractMeetme; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String meetMe="21045"; try { ManagerConnectionFactory factory = new ManagerConnectionFactory( "192.168.x.xxx", "admin", "1234"); // this.managerConnection = factory.createManagerConnection(); abstractMeetme.getMeetMe(); out.println(abstractMeetme); managerConnection.login(); // send the originate action and wait for a maximum of 30 seconds // for Asterisk // to send a reply originateResponse = managerConnection.sendAction(originateAction, 30000); // and finally log off and disconnect managerConnection.logoff(); out.println("OK"); } catch (Exception e) { out.println("NOT OK"); e.printStackTrace(); } } when i run this code i amgetting the null pointer exception in the line : abstractMeetme.getMeetMe(); Thanks. -- Preetha.A |
From: T. L. P. T. <tom...@gm...> - 2008-04-01 18:01:15
|
Hello Sergey: In my opinion, if you can get a development box with an Asterisk server already configured to use with Asterisk Java, and you could receive some help from an Asterisk wizard to debug the low level problems that could arise; you could be writing a simple IVR application in less than a week. If you ask me for a estimation, develop an application with all the features described in your mail, should take you 3 to 5 weeks. It's a good idea to have in mind that you could find some weird problems that could take some time (even some days sometimes) to resolve. Obviously, this estimation is based on my work style (using Maven, JUnit, SVN, deploying, etc.). It could be lower, maybe. Where to start? I suggest you to start with the Asterisk Java Tutorial, then expand your application from there. Whenever you find a problem, or need a suggestion; we are here ;-) Best regards, Tomás. On Tue, Apr 1, 2008 at 2:14 PM, Sergey Samokhodkin <sam...@gm...> wrote: > Hello, people! > > In your opinion, how long could it take for a guy to learn *-java and > what-needed-else to become capable of writing a basic IVR application, > provided that the guy > - is an experienced java developer > - has ZERO knoledge of Asterisk > - has marginal experience in VoIP (setting up dial plans in cisco routers) > - can receive some help from the experienced * admin. > > The IVR app involves receiving and originating calls, playing sound > files, collecting dtmf digits and connecting the calling/called > parties together. > > Is it possible in 2, max 3 weeks? Where to start? > > Thanks in advance! > Sergey > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Stefan R. <ste...@re...> - 2008-04-01 17:36:20
|
Sergey, if we have the same understanding of "experienced" they can be up and running in a few hours. The Asterisk guy will setup an Asterisk server and prepare the dialplan for Fast AGI while the Java guy will set up a basic a basic Java project and look at the AGI tutorial. Then they come together and make sure the "Hello World" example works and they are up and running. =Stefan Sergey Samokhodkin wrote: > Hello, people! > > In your opinion, how long could it take for a guy to learn *-java and > what-needed-else to become capable of writing a basic IVR application, > provided that the guy > - is an experienced java developer > - has ZERO knoledge of Asterisk > - has marginal experience in VoIP (setting up dial plans in cisco routers) > - can receive some help from the experienced * admin. > > The IVR app involves receiving and originating calls, playing sound > files, collecting dtmf digits and connecting the calling/called > parties together. > > Is it possible in 2, max 3 weeks? Where to start? > > Thanks in advance! > Sergey -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Sergey S. <sam...@gm...> - 2008-04-01 17:14:50
|
Hello, people! In your opinion, how long could it take for a guy to learn *-java and what-needed-else to become capable of writing a basic IVR application, provided that the guy - is an experienced java developer - has ZERO knoledge of Asterisk - has marginal experience in VoIP (setting up dial plans in cisco routers) - can receive some help from the experienced * admin. The IVR app involves receiving and originating calls, playing sound files, collecting dtmf digits and connecting the calling/called parties together. Is it possible in 2, max 3 weeks? Where to start? Thanks in advance! Sergey |
From: Gaëtan M. <gm...@ea...> - 2008-04-01 14:14:01
|
Hi Stefan As usual, sorry for the delay :) Here is a tiny patch that starts a pingthread when an AsteriskServer is given a ManagerConnection whose socketReadTimeout>0 and stop it at shutdown(); However I don't really like it as it seems a bit misplaced and orthogonal to me. Maybe it whould be better to hide this in DefaultAsteriskServer ? But then people working directly with AsteriskServerImpl like me wouldn't even use it. Or what about a ManagerConnection subclass / implementation? After all, this is just another interface implementation and the asterisk server needn't know about this PingThread thing. Regards Gaetan On 25/03/2008, at 20:54, Stefan Reuter wrote: > Stefan Reuter wrote: >> Uhh sorry, no reason to feel sorry. It seems I've been dreaming of > > no reason to feel stupid of course :) > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jesus M. <jmo...@gm...> - 2008-03-31 19:47:40
|
There's also an option (only available with 1.6) in the form of app_jack. Check out http://www.jackaudio.org/ For more information maybe you should write to the Asterisk mailing list. Jesus Mogollon http://www.globalipsystems.com 2008/3/30, Klaus Teller <kla...@gm...>: > > Hi Folks, > > I was wondering if you could give me some insight into how to stream an > ongoing asterik call (let's say pipe it to a media server). > > > What I was hopping was that the record produced by the monitor application > could be used for this purpose. Yet, it seems (at least as far as somix is > concerned) that this function is called only at the end of the call. > > > Any idea? > > > Thanks, > > Klaus L'imbecile. > -- > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! > Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |