asterisk-java-devel Mailing List for Asterisk-Java Library (Page 21)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
(8) |
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(8) |
Feb
(6) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(17) |
Aug
(21) |
Sep
(2) |
Oct
(7) |
Nov
(8) |
Dec
(12) |
2007 |
Jan
(10) |
Feb
(19) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(6) |
Nov
(1) |
Dec
(5) |
2008 |
Jan
(12) |
Feb
(15) |
Mar
(18) |
Apr
(34) |
May
(3) |
Jun
(34) |
Jul
(5) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
(2) |
Dec
(2) |
2009 |
Jan
(8) |
Feb
(2) |
Mar
(35) |
Apr
(16) |
May
(11) |
Jun
(2) |
Jul
(6) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
|
2010 |
Jan
(43) |
Feb
(15) |
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(7) |
Jul
(1) |
Aug
(3) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(2) |
Mar
(9) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2012 |
Jan
(9) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(10) |
Nov
(10) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
|
2014 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(11) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
(39) |
May
(18) |
Jun
(6) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
(9) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Stefan R. <ste...@re...> - 2007-09-09 15:08:38
|
Patrick, thanks for offering your support. You are welcome to help us improve Asterisk-Java. Finishing the live API is the major piece of work before we reach version 1.0. What can we do to help you get started? =3DStefan --=20 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... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Breucking P. <bre...@go...> - 2007-09-06 14:06:16
|
Dear Developers, we use asterisk-java for our software. While checking for new versions I noticed the "new" Live-API. I am really pleased for that feature. but I miss some things. For example a function to retrieve the logged in/out agents for a queue. My first approach was to extend asterisk-java for my own, but I would like to offer my participation on asterisk java development. This offer is based on our approach to use and develop open source software. Best regards Patrick Breucking Patrick Breucking <bre...@GO...> (System Engineer) * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 * http://www.GONICUS.de *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder *Vorsitzender des Beirats: Juergen Michels *Amtsgericht Arnsberg * HRB 1968 |
From: Carlos G M. <tr...@ac...> - 2007-08-09 09:52:56
|
I guess there is no simple way. If you know all your extensions are of a kind (i.e. all SIP or IAX) you can use a CLI "sip show registry" and parse the output. You have CommandAction and ManagerResponse classes for that. In the case of IAX I'm doing: CommandAction commandAction; ManagerResponse commandResponse; commandAction = new CommandAction(); commandAction.setCommand("database show IAX"); try { commandResponse = managerConnection.sendAction(commandAction, 10000); } catch (TimeoutException te) { log.warn("DBshow action timeout"); return ""; } catch (IOException ioe) { log.warn("DBshow action exception"); return ""; } if (!commandResponse.getResponse().equals("Follows")) { log.warn("DBShow action error:" + commandResponse.getResponse()); return ""; } // 0 1 // 0123456789012345 // /IAX/Registry/31 : 172.30.0.2:4569:60 // --END COMMAND-- for (String line : ((CommandResponse)commandResponse).getResult()) { log.info(line); if (line.substring(0,14).equals("/IAX/Registry/")) { int c1 = line.indexOf(' ',14); int c2 = line.indexOf(':',c1); int c3 = line.indexOf(':',c2+1); String id = line.substring(14,c1); // 31 String ip = line.substring(c2+1,c3).trim(); // 172.30.0.2 iaxpeersId.put(id, ip); iaxpeersIp.put(ip, id); } } HTH. Haar Tobias @ 09/08/2007 04:25 -0300 dixit: > Hi > > I am using your software asterisk-java, but i met a simple problem. > > I would like to get a list of all registered extensions (display name, > id, etc.). > > Many thanks > > Tobias Haar from Germany > software developer > > alpha 2000 GmbH > Robert-Schumann-Str. 13 > 04107 Leipzig > Tel: +49 341 91918-36 > Fax: +49 341 91918-17 > Mail: ha...@al... > Web: www.alpha2000.de > > Hauptsitz: alpha 2000 GmbH, Robert-Schumann-Strasse 13, 04107 Leipzig > Geschaftsfuhrer: Matthias Bruehl, Dietmar Schulz > Registergericht: Amtsgericht Leipzig, HRB 3132 > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > -- Carlos G Mendioroz <tr...@ac...> |
From: Haar T. <ha...@al...> - 2007-08-09 07:25:54
|
Hi I am using your software asterisk-java, but i met a simple problem. I would like to get a list of all registered extensions (display name, id, etc.). Many thanks Tobias Haar from Germany software developer alpha 2000 GmbH Robert-Schumann-Str. 13 04107 Leipzig Tel: +49 341 91918-36 Fax: +49 341 91918-17 Mail: ha...@al... Web: www.alpha2000.de Hauptsitz: alpha 2000 GmbH, Robert-Schumann-Strasse 13, 04107 Leipzig Geschaftsfuhrer: Matthias Bruehl, Dietmar Schulz Registergericht: Amtsgericht Leipzig, HRB 3132 |
From: Vivek G. <vi...@in...> - 2007-04-16 06:32:46
|
Hi All, We are using asterisk-java to give a one ring call to a phone no. Simple flow is - 1. Originate call to a number using 1234567 as caller id 2. Catch the event of new callerid to get the channel id for phone no -1234567 3. Catch the event for new channel event with status ringing. - send the Hangup action 4. Exit But TimeoutException is occuring when we try to hangup. How to get rid of this exception? Please see attached the code and exception stack trace. Thanks in advance.. Regards Vivek |
From: Stefan R. <ste...@re...> - 2007-03-15 07:23:08
|
Johan Jacobsson wrote: > Hi, >=20 > I noticed a drawback with wrapping the java logging api in the asterisk= -java=20 > Log framework. The class and method names printed out by the java Logge= r is=20 > always JavaLoggingLog and the severity method name. Not very useful... >=20 > I have a suggested patch to JavaLoggingLog attached to this mail, which= uses a=20 > StackTraceElement to determine the calling method (in the same manner a= s the=20 > java logging api) and sends that to the Logger class. Thanks for your patch, i've applied it to latest SVN trunk. =3DStefan --=20 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... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Johan J. <joh...@ko...> - 2007-03-14 14:13:04
|
Hi, I noticed a drawback with wrapping the java logging api in the asterisk-java Log framework. The class and method names printed out by the java Logger is always JavaLoggingLog and the severity method name. Not very useful... I have a suggested patch to JavaLoggingLog attached to this mail, which uses a StackTraceElement to determine the calling method (in the same manner as the java logging api) and sends that to the Logger class. Regards, Johan Jacobsson |
From: Stefan R. <ste...@re...> - 2007-02-27 08:02:52
|
Hi Daniel, do you think of the ChanSpy application? Usually I use ChanSpy in my AGI scripts, how would that look like in AsteriskChannel? Can you provide an example for such a use case? =3DStefan --=20 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... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Daniel G. <da...@gr...> - 2007-02-26 09:19:30
|
Hello Stefan, have you tought of a channel spy functionnality? Is there any right now? I was thinking of including this functionnality in AsteriskChannel as the monitoring is included. Do you think it is a good idea or not? Regards, Daniel |
From: <sm...@gm...> - 2007-02-16 21:07:18
|
hey, go here and we both get a free video ipod pretty pretty please :) http://www.getitfree.net/xbhxaasprl http://www.getitfree.net/xbhxaasprl This was sent by sm...@gm... via GetItFree, Box 8156, San Jose CA 95155 Visit this page http://www.getitfree.net/index.php?target=unsubscribe&u=bhxaasprl&mid=1171660023537645 to unsubscribe from all future GetItFree.net email |
From: Stefan R. <ste...@re...> - 2007-02-16 12:41:45
|
Daniel Gradecak wrote: > org.asteriskjava.manager.event.AbstractQueueMemberEvent > private String memberName; >=20 > org.asteriskjava.manager.event.NewChannelEvent > private String callerIdNum; done =3DStefan --=20 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... |
From: Daniel G. <da...@gr...> - 2007-02-16 09:11:46
|
This problem was fixed with using different threads for sendin actions. I really do net get why but must be some thread issues that I just didnt see right now ... My code : Future<String> task = actionExecutorService.submit(new Callable<String>(){ @Override public String call(){ ManagerResponse resp = null; try { resp = serverImpl.getManagerConnection().sendAction(action); } catch (IOException e) { log.error("communication problem", e); return "server communication problem"; } catch (TimeoutException e) { log.error("timeout on sending action : the action could still be sent"); //return "timeout on sending action : the action could still be sent"; } catch (Throwable e){ log.error("unexpected error occured", e); return "unexpected error : "+e.getMessage(); } if( resp != null && resp instanceof ManagerError ){ return "response error : "+resp.getMessage(); }else if ( resp == null ){ return "response error : null"; } else{ return "success"; } } }); Now there is a the same TimeoutException when I wait for the thread to be finished like that ... try { return task.get(); } catch (InterruptedException e1) { log.warn("interrupted", e1); return "failed : interruption"; } catch (ExecutionException e1) { log.error("execution failed", e1); return "failed : execution failed"; } This is really strange. Actually, when I run a simple program as standalone it works fine without Timeout but as I am using Tomcat/Liferay/Portlets/Spring/DWR there might be a threading issue, but I just do not get why asterisk java would break on that. Daniel. Daniel Gradecak wrote: > Hi Stefan, > > do you know why these lines of code throws TimeoutException all the time ? > > try { > > ManagerResponse re = > serverImpl.getManagerConnection().sendAction(new QueueStatusAction()); > }catch (TimeoutException e) { > log.warn("timeout on queue status action", e); > } catch (IOException e) { > log.error("communication problem", e); > return; > } > > I laso did try to send the action via sendEventGeneratingAction as it is > done in org.asteriskjava.live.internal.QueueManager#initialize but I > still receive the timeoute, even > if the events are correctly sent by asterisk, so the action has been > also received by asterisk. I am using asterisk 1.4. > > > So in this first case it is ok, because i know the bug ... but here ... > as you suggested to me in a previous thread I just want to see if i > receive the peer context ... i also receive the TimeoutException. > Whatever i do, event setting the timeout to 20 seconds ... there is no > help. > > CommandAction act = new CommandAction("sip show peer > "+event.getObjectName()); > CommandResponse response = (CommandResponse) > serverImpl.getManagerConnection().sendAction(act,15000); > for (String line : response.getResult()){ > System.out.println("RESP : "+line); > } > > Do you know for what reason? Everything else is fine but sending any > actions cause a TimeoutException. > > Another example is this also ... > > OriginateAction o = new OriginateAction(); > o.setContext(context.getOutgoingContext()); > o.setCallerId(from); > o.setChannel("SIP/"+from); > o.setExten(to); > o.setPriority(1); > //o.setTimeout(new Long(30000)); > > ManagerResponse resp = null; > try { > resp = serverImpl.getManagerConnection().sendAction(o); > > } catch (TimeoutException e) { > //FIXME : there is a problem with timeout > log.warn("Timeout for call from " + from + " to " + to+". > Message : "+e.getMessage()); > //return ""; > } catch (IOException e) { > e.printStackTrace(); > log.error("dial error : server communication",e); > return "dial error : server communication"; > } > > Regards, > Daniel > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > |
From: Daniel G. <da...@gr...> - 2007-02-16 09:05:25
|
Actually I have no real issues right now. It is just about some properties that are renamed or added so, I am using your trunk sources and update them when I see somthing like that. What I can do is when not sending on by one but I can send you the files and the properties that are changed once I have several of them. Anyway for now I added org.asteriskjava.manager.event.AbstractQueueMemberEvent private String memberName; org.asteriskjava.manager.event.NewChannelEvent private String callerIdNum; Regards, Daniel Stefan Reuter wrote: > Daniel Gradecak wrote: > >> just add the following with getter and setter ... (you know) >> private String channelDriver; >> > > It seems like they renamed "channel" to "channelDriver" in 1.4 - I've > fixed it. > Do you have any other issues with 1.4? > > =Stefan > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > |
From: Stefan R. <ste...@re...> - 2007-02-16 04:47:22
|
Daniel Gradecak wrote: > just add the following with getter and setter ... (you know) > private String channelDriver; It seems like they renamed "channel" to "channelDriver" in 1.4 - I've fixed it. Do you have any other issues with 1.4? =3DStefan --=20 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... |
From: Daniel G. <da...@gr...> - 2007-02-15 23:39:17
|
I am not really using it but it is logging a lot of errors so may be would be nice to have it in the trunk ... ERROR -ManagerConnection-0-Reader-0 - org.asteriskjava.manager.internal.EventBuilderImpl - Unable to set property 'channeldriver' to 'IAX2' on org.asteriskjava.manager.event.RegistryEvent: no setter In the class ... org.asteriskjava.manager.event.RegistryEvent just add the following with getter and setter ... (you know) private String channelDriver; I did it (and it is ok). Regards, Daniel |
From: Daniel G. <da...@gr...> - 2007-02-15 15:33:42
|
Hi Stefan, do you know why these lines of code throws TimeoutException all the time ? try { ManagerResponse re = serverImpl.getManagerConnection().sendAction(new QueueStatusAction()); }catch (TimeoutException e) { log.warn("timeout on queue status action", e); } catch (IOException e) { log.error("communication problem", e); return; } I laso did try to send the action via sendEventGeneratingAction as it is done in org.asteriskjava.live.internal.QueueManager#initialize but I still receive the timeoute, even if the events are correctly sent by asterisk, so the action has been also received by asterisk. I am using asterisk 1.4. So in this first case it is ok, because i know the bug ... but here ... as you suggested to me in a previous thread I just want to see if i receive the peer context ... i also receive the TimeoutException. Whatever i do, event setting the timeout to 20 seconds ... there is no help. CommandAction act = new CommandAction("sip show peer "+event.getObjectName()); CommandResponse response = (CommandResponse) serverImpl.getManagerConnection().sendAction(act,15000); for (String line : response.getResult()){ System.out.println("RESP : "+line); } Do you know for what reason? Everything else is fine but sending any actions cause a TimeoutException. Another example is this also ... OriginateAction o = new OriginateAction(); o.setContext(context.getOutgoingContext()); o.setCallerId(from); o.setChannel("SIP/"+from); o.setExten(to); o.setPriority(1); //o.setTimeout(new Long(30000)); ManagerResponse resp = null; try { resp = serverImpl.getManagerConnection().sendAction(o); } catch (TimeoutException e) { //FIXME : there is a problem with timeout log.warn("Timeout for call from " + from + " to " + to+". Message : "+e.getMessage()); //return ""; } catch (IOException e) { e.printStackTrace(); log.error("dial error : server communication",e); return "dial error : server communication"; } Regards, Daniel |
From: Stefan R. <ste...@re...> - 2007-02-15 13:21:24
|
Daniel Gradecak wrote: > I do not know what is the problem i have with this list ... but wheneve= r=20 > i send a mail it is sent several times. Maybe a provider problem, buw=20 > only with this list? > So please excuse me in advance .. Hm the lists are run by sourceforge. And your last email got through only once. As there is not much traffic anyway I dont think its much of problem right now. =3DStefan --=20 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... |
From: Stefan R. <ste...@re...> - 2007-02-15 13:20:12
|
Daniel Gradecak wrote: > is there a way to get the peer context? There are two options: 1) Use the CommandAction issue a "sip show peer xxx" and parse the result (which is kinda clumsy) 2) Submit a patch for Asterisk to include it in the PeerEntryEvent > ERROR -ManagerConnection-0-Reader-0 -=20 > org.asteriskjava.manager.internal.EventBuilderImpl - Unable to set=20 > property 'videosupport' to 'yes' on=20 > org.asteriskjava.manager.event.PeerEntryEvent: no setter I've added the videoSupport and realtimeDevice properties which seem to be new in Asterisk 1.4. =3DStefan --=20 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... |
From: Daniel G. <da...@gr...> - 2007-02-15 12:43:54
|
I do not know what is the problem i have with this list ... but whenever i send a mail it is sent several times. Maybe a provider problem, buw only with this list? So please excuse me in advance .. Daniel Daniel Gradecak wrote: > Hello, > > is there a way to get the peer context? > > For example, this peer that is retrieved from the asterisk CLI shows a > context "from-internal". It seems that in a PeerEntryEvent we can not > get that context. Is there a way to do that? > > protenus-zg-wg01*CLI> sip show peer 1000 > > * Name : 1000 > Secret : <Set> > MD5Secret : <Not set> > Context : from-internal > Subscr.Cont. : <Not set> > Language : CLI> > AMA flags : Unknown > Transfer mode: open > CallingPres : Presentation Allowed, Not Screened > ... > Video Support: Yes> > ... > > So I thought that may be it is because there is no setter as it says for > videosupport in the log below ... but there is no such message for > context, and of course adding this property to the PeerEntryEvent does > not help. Does anyone know how to get that peer context? > ERROR -ManagerConnection-0-Reader-0 - > org.asteriskjava.manager.internal.EventBuilderImpl - Unable to set > property 'videosupport' to 'yes' on > org.asteriskjava.manager.event.PeerEntryEvent: no setter > > Regards, > Daniel > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > |
From: Daniel G. <da...@gr...> - 2007-02-15 12:21:32
|
Hello, is there a way to get the peer context? For example, this peer that is retrieved from the asterisk CLI shows a context "from-internal". It seems that in a PeerEntryEvent we can not get that context. Is there a way to do that? protenus-zg-wg01*CLI> sip show peer 1000 * Name : 1000 Secret : <Set> MD5Secret : <Not set> Context : from-internal Subscr.Cont. : <Not set> Language : CLI> AMA flags : Unknown Transfer mode: open CallingPres : Presentation Allowed, Not Screened ... Video Support: Yes> ... So I thought that may be it is because there is no setter as it says for videosupport in the log below ... but there is no such message for context, and of course adding this property to the PeerEntryEvent does not help. Does anyone know how to get that peer context? ERROR -ManagerConnection-0-Reader-0 - org.asteriskjava.manager.internal.EventBuilderImpl - Unable to set property 'videosupport' to 'yes' on org.asteriskjava.manager.event.PeerEntryEvent: no setter Regards, Daniel |
From: Stefan R. <ste...@re...> - 2007-02-05 07:36:03
|
Hi Steve, thanks for your explanation. Indeed it sounds like a good idea. I'll have a look at the code later and change it accordingly. =3DStefan --=20 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... |
From: Steve P. <sp...@ge...> - 2007-02-04 21:43:48
|
Stefan Reuter wrote: > Steve Prior wrote: >> I think it should be possible to create utility classes which have the >> methods in BaseAgiScript, but aren't actually decendants of AgiScript. >> What I propose is that all the new methods in BaseAgiScript be moved to >> a new class named something like AgiUtil (or whatever) and then >> BaseAgiScript would be declared to implement AgiScript and extend that >> new class name. > > These methods are already available in AgiChannel - if that helps. What I saw was that the code in BaseAGIScript calls getChannel() which is implemented in BaseAGIScript itself. Not that getChanel is very complicated, but I don't see why a user of the API would have to implement their own version of getChannel() themselves if they were implementing utility classes instead of the main class extending BaseAGIScript. > >> This would allow me to declare a class which extends that new class >> which could provide generic Agi utilities which aren't tied to a >> specific project. For example I've now got a couple of methods for >> voice recognition processing which need to call the methods currently in >> BaseAgiScript, but aren't tied to a specific script and this class >> shouldn't implement the service method. > > Why don't you directly extend BaseAgiScript and declare your utility > methods there? In fact as a workaround I've done exactly that, but this means that I needed to implement a dummy void service(AgiRequest request, AgiChannel channel) Not the end of the world, but it really comes down to a bit of a disconnect between a class which can perform operations as part of an AGI script and one which actually is an AGI script. A utility class can perform operations on behalf of the AGI script which invoked it, but by itself is not an AGI script as mandated by extending BaseAGIScript (which requires the service method). So it seemed to me that conceptually there are classes which can perform operations on behalf of an AGI Script (which is the code currently in BaseAgiScript) and then there are classes which can perform those operations which are also in fact AGI scripts. So my thought was to make a new base class named something like BaseAgiOperations into which the current code from BaseAgiScript would be moved. Then the entire code for BaseAgiScript would be: public abstract class BaseAgiScript extends BaseAgiOperations implements AgiScript { } So a utility class like I'm proposing would extend BaseAgiOperations and not have to implementing a useless service(...) method. Any client code which currently extends BaseAgiScript would behave just as it does now (no compatibility problem at all). Steve > > =Stefan > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel |
From: Stefan R. <ste...@re...> - 2007-02-04 21:09:27
|
Steve Prior wrote: > I think it should be possible to create utility classes which have the = > methods in BaseAgiScript, but aren't actually decendants of AgiScript. > What I propose is that all the new methods in BaseAgiScript be moved to= =20 > a new class named something like AgiUtil (or whatever) and then > BaseAgiScript would be declared to implement AgiScript and extend that = > new class name. These methods are already available in AgiChannel - if that helps. > This would allow me to declare a class which extends that new class=20 > which could provide generic Agi utilities which aren't tied to a=20 > specific project. For example I've now got a couple of methods for=20 > voice recognition processing which need to call the methods currently i= n=20 > BaseAgiScript, but aren't tied to a specific script and this class=20 > shouldn't implement the service method. Why don't you directly extend BaseAgiScript and declare your utility methods there? =3DStefan --=20 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... |
From: Steve P. <sp...@ge...> - 2007-02-04 19:21:11
|
I think it should be possible to create utility classes which have the methods in BaseAgiScript, but aren't actually decendants of AgiScript. What I propose is that all the new methods in BaseAgiScript be moved to a new class named something like AgiUtil (or whatever) and then BaseAgiScript would be declared to implement AgiScript and extend that new class name. This would allow me to declare a class which extends that new class which could provide generic Agi utilities which aren't tied to a specific project. For example I've now got a couple of methods for voice recognition processing which need to call the methods currently in BaseAgiScript, but aren't tied to a specific script and this class shouldn't implement the service method. Steve |
From: Stefan R. <ste...@re...> - 2007-02-04 19:07:02
|
Steve Prior wrote: > I'd like to propose that the constructor AgiException(String message) b= e=20 > made public. It seems perfectly reasonable that an Agi program might=20 > want to throw one of these in response to some other Exception it=20 > encounters. Ok, i've changed both constructors to public. =3DStefan --=20 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... |