asterisk-java-users Mailing List for Asterisk-Java Library (Page 105)
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: Muhammad F. <mf...@i2...> - 2008-08-15 09:47:17
|
Hello Fernando, First thanks for your reply. Lets assume I give ("Agent/" + agent) in queueaddAction interface. When a call comes which extension will ring? How I can bind an agent's extension dynamically through AMI. Thanks. Regards, Farooq _____ From: Muhammad Farooq [mailto:mf...@i2...] Sent: Tuesday, August 12, 2008 1:14 PM To: 'ast...@li...' Subject: RE: Login An Agent Throught Asterisk-Java 0.3 At Asterisk 1.2 As you know AgentCallbackLoginAction is deprecated in Asterisk 1.4, so I want to avoid this method for agent login in. However I have tried with <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/action/Queu eAddAction.html> QueueAddAction using asterisk 1.4 but in this way agent extension got fixed. Best regards, Farooq |
From: Fernando B. <fer...@bo...> - 2008-08-12 12:09:57
|
I'm not sure what you mean by "this way agent extension got fixed". What are you adding to the queue as interface? The extension or the agent itself? Maybe this code comes in handy... public void logMeIn(String agent) { QueueAddAction queueAction = new QueueAddAction(); /*queueAction.setInterface("Agent/" + agent);*/ queueAction.setQueue("somequeue"); ManagerResponse queueResponse = managerConnection.sendAction(queueAction); // ... check for errors ... } The previous code assumes you already got an agent number from somewhere (perhaps a login screen?). You just prepend the "Agent/" to the interface name to let asterisk know you will add an agent. I prefer loggin agents and not extensions, basically for two reasons: asterisk seems to behave better that way, and I don't care about how many calls an /extension /handled last week, as it could have been occupied by n agents. But I /do care/ how many calls handled each and every agent who sat at that extension. Regards, Fernando Borcel Muhammad Farooq wrote: > > As you know AgentCallbackLoginAction is deprecated in Asterisk 1.4, so > I want to avoid this method for agent login in. However I have tried > with *QueueAddAction > <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/action/QueueAddAction.html> > *using asterisk 1.4 but in this way agent extension got fixed. > > > > Best regards, > > Farooq > > SBCAO355 > > > > ------------------------------------------------------------------------ > > *From:* Muhammad Farooq [mailto:mf...@i2...] > *Sent:* Monday, August 11, 2008 9:43 PM > *To:* 'ast...@li...' > *Subject:* Login An Agent Throught Asterisk-Java 0.3 At Asterisk 1.2 > > > > Hello All, > > > > Is there any way to login an agent to asterisk 1.2 without using > AgentCallbackLoginAction of asterisk-java Manger (0.3.1) (AMI) in such > a way we can also receive agent related events [like AgentConnectEvent > <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/event/AgentConnectEvent.html> > etc] from Asterisk Manager API. > > > > Thanks in advance. > > > > Regards, > > Farooq > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Muhammad F. <mf...@i2...> - 2008-08-12 07:18:19
|
As you know AgentCallbackLoginAction is deprecated in Asterisk 1.4, so I want to avoid this method for agent login in. However I have tried with <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/action/Queu eAddAction.html> QueueAddAction using asterisk 1.4 but in this way agent extension got fixed. Best regards, Farooq SBCAO355 _____ From: Muhammad Farooq [mailto:mf...@i2...] Sent: Monday, August 11, 2008 9:43 PM To: 'ast...@li...' Subject: Login An Agent Throught Asterisk-Java 0.3 At Asterisk 1.2 Hello All, Is there any way to login an agent to asterisk 1.2 without using AgentCallbackLoginAction of asterisk-java Manger (0.3.1) (AMI) in such a way we can also receive agent related events [like <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/event/Agent ConnectEvent.html> AgentConnectEvent etc] from Asterisk Manager API. Thanks in advance. Regards, Farooq |
From: Stefan R. <ste...@re...> - 2008-08-11 16:18:49
|
Muhammad Farooq wrote: > Is there any way to login an agent to asterisk 1.2 without using > AgentCallbackLoginAction of asterisk-java Manger (0.3.1) (AMI) in such a > way we can also receive agent related events [like AgentConnectEvent > <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/event/AgentConnectEvent.html> > etc] from Asterisk Manager API. Why don't you want to use AgentCallbackLoginAction? =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: Martin S. <ma...@be...> - 2008-08-11 16:17:52
|
Hello, The AgentCallbackLoginAction is intended for that purpose. You can certainly accomplish the same task using the dialplan itself, but of course, you probably want to use Asterisk-Java or you wouldn't be asking here. In Asterisk-Java (in the Manager interface generally), I think AgentCallbackLoginAction is what you want. Is there something wrong with AgentCallbackLoginAction? Cheers, 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 Muhammad Farooq Sent: Monday, August 11, 2008 12:03 PM To: ast...@li... Subject: [Asterisk-java-users] Login An Agent Throught Asterisk-Java 0.3 AtAsterisk 1.2 Hello All, Is there any way to login an agent to asterisk 1.2 without using AgentCallbackLoginAction of asterisk-java Manger (0.3.1) (AMI) in such a way we can also receive agent related events [like AgentConnectEvent <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/event/A gentConnectEvent.html> etc] from Asterisk Manager API. Thanks in advance. Regards, Farooq |
From: Muhammad F. <mf...@i2...> - 2008-08-11 16:07:13
|
Hello All, Is there any way to login an agent to asterisk 1.2 without using AgentCallbackLoginAction of asterisk-java Manger (0.3.1) (AMI) in such a way we can also receive agent related events [like <http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/manager/event/Agent ConnectEvent.html> AgentConnectEvent etc] from Asterisk Manager API. Thanks in advance. Regards, Farooq |
From: Martin S. <ma...@be...> - 2008-08-11 14:19:49
|
Hi folks, There's also a new post on the Asterisk-Java blog (asterisk-java.org) about using the Manager and AGI interface simultaneously. It's using Scala, but the translation to Java is straightfoward. Are you both only trying to setup a blacklist for inbound calls, or are you trying to do more? We can provide some more examples if we know what the tricky part is for folks. Like Stefan said, the set...() methods should let you place your call into practically any dialplan location once your script is done. Cheers, 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 José Luis Trindade Sent: Monday, August 11, 2008 9:54 AM To: bat...@gm...; ast...@li... Subject: [Asterisk-java-users] Restrict access to ACD queue Hi Yury, I'm at the position as you (newbie at asterisk and asterisk-java) and I should do the same thing. I'm trying to define a listener and other things but till now no good news from this side... :S Please if you get it done post the solution. Regards, JL 2008/8/11 Yury Batrakov <bat...@gm...> Hi all! I'm newbie in both Asterisk and Asterisk-Java so I suspect that my problem is solved more than once, but I haven't found the solution though :( I'd like to write simple application that listens incoming calls to ACD group and filters them according to the caller id. The main requirement is that we shouldn't let calls to be distributed to agents until we are sure that callee isn't in blacklist. I read Asterisk and Asterisk-Java documentation to find out how to do this and the only way I see is to wait for calls via FastAGI, verify caller id make our own call via Manager API and bridge them. It seems to me that this isn't good solution, so I'll very appreciate your help. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: J. L. T. <ti...@ad...> - 2008-08-11 13:53:33
|
Hi Yury, I'm at the position as you (newbie at asterisk and asterisk-java) and I should do the same thing. I'm trying to define a listener and other things but till now no good news from this side... :S Please if you get it done post the solution. Regards, JL 2008/8/11 Yury Batrakov <bat...@gm...> Hi all! > > I'm newbie in both Asterisk and Asterisk-Java so I suspect that my > problem is solved more than once, but I haven't found the solution > though :( > I'd like to write simple application that listens incoming calls to > ACD group and filters them according to the caller id. The main > requirement is that we shouldn't let calls to be distributed to agents > until we are sure that callee isn't in blacklist. > I read Asterisk and Asterisk-Java documentation to find out how to do > this and the only way I see is to wait for calls via FastAGI, verify > caller id make our own call via Manager API and bridge them. It seems > to me that this isn't good solution, so I'll very appreciate your > help. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Yury B. <bat...@gm...> - 2008-08-11 13:33:20
|
Stefan, Martin, I'll look to them, thanks for your help! On Mon, Aug 11, 2008 at 5:29 PM, Stefan Reuter <ste...@re...> wrote: > Yury Batrakov wrote: >> If I understand you correctly, I can wait on some extension and >> rethrow a call to ACD's one via dialplan? Could you provide a bit more >> detailed description of this? I read this link >> http://asterisk-java.org/development/apidocs/org/asteriskjava/fastagi/command/package-summary.html >> to discover apropriate AGI command, but haven't found anything useful. > > Have a look at > http://asterisk-java.org/development/apidocs/org/asteriskjava/fastagi/AgiChannel.html > > The methods you may want to use are > setContext() > setExtension() > setPriority() > > This defines the point in your dialplan where the call will continue > when your AGI script returns. > > =Stefan > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Stefan R. <ste...@re...> - 2008-08-11 13:29:30
|
Yury Batrakov wrote: > If I understand you correctly, I can wait on some extension and > rethrow a call to ACD's one via dialplan? Could you provide a bit more > detailed description of this? I read this link > http://asterisk-java.org/development/apidocs/org/asteriskjava/fastagi/command/package-summary.html > to discover apropriate AGI command, but haven't found anything useful. Have a look at http://asterisk-java.org/development/apidocs/org/asteriskjava/fastagi/AgiChannel.html The methods you may want to use are setContext() setExtension() setPriority() This defines the point in your dialplan where the call will continue when your AGI script returns. =Stefan |
From: Yury B. <bat...@gm...> - 2008-08-11 13:14:32
|
Hi Martin, > You can also check your blacklist and then place the call back into the > dialplan at a context and extension where it will end up being routed to > the correct agent already. If I understand you correctly, I can wait on some extension and rethrow a call to ACD's one via dialplan? Could you provide a bit more detailed description of this? I read this link http://asterisk-java.org/development/apidocs/org/asteriskjava/fastagi/command/package-summary.html to discover apropriate AGI command, but haven't found anything useful. Thanks a lot for your help! |
From: Martin S. <ma...@be...> - 2008-08-11 12:54:10
|
Hi Yury, You can also check your blacklist and then place the call back into the dialplan at a context and extension where it will end up being routed to the correct agent already. The advantage to this is that if your Agi script isn't available, the call will still go through. If your Agi script is available, it can decide to hangup() or let the call continue, optionally setting the call into a new context and extension. Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of Yury Batrakov > Sent: Monday, August 11, 2008 8:28 AM > To: ast...@li... > Subject: [Asterisk-java-users] Restrict access to ACD queue > > Hi all! > > I'm newbie in both Asterisk and Asterisk-Java so I suspect that my > problem is solved more than once, but I haven't found the solution > though :( > I'd like to write simple application that listens incoming calls to > ACD group and filters them according to the caller id. The main > requirement is that we shouldn't let calls to be distributed to agents > until we are sure that callee isn't in blacklist. > I read Asterisk and Asterisk-Java documentation to find out how to do > this and the only way I see is to wait for calls via FastAGI, verify > caller id make our own call via Manager API and bridge them. It seems > to me that this isn't good solution, so I'll very appreciate your > help. > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Yury B. <bat...@gm...> - 2008-08-11 12:27:32
|
Hi all! I'm newbie in both Asterisk and Asterisk-Java so I suspect that my problem is solved more than once, but I haven't found the solution though :( I'd like to write simple application that listens incoming calls to ACD group and filters them according to the caller id. The main requirement is that we shouldn't let calls to be distributed to agents until we are sure that callee isn't in blacklist. I read Asterisk and Asterisk-Java documentation to find out how to do this and the only way I see is to wait for calls via FastAGI, verify caller id make our own call via Manager API and bridge them. It seems to me that this isn't good solution, so I'll very appreciate your help. |
From: preetha A. <pre...@gm...> - 2008-08-11 08:53:35
|
Now i am able to print the param name.But how can i retrieve this paramname in a servlet?Any idea Thanks. -- Preetha.A |
From: preetha A. <pre...@gm...> - 2008-08-11 06:01:39
|
Hi, Thanks for your reply.I have tried as per the link like the following. public class Inbound extends BaseAgiScript implements AgiScript//NewIvr14 { Statement st; ResultSet rs=null; Connection conn=null; public void service(AgiRequest request, AgiChannel channel) throws AgiException { String callerid="9941032521"; System.out.println("inbound"); SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd") ; String s = formatter.format (new Date()) ; try { String strurl=" http://localhost:8080/NewWebProject/JavaServlet1"; URL url=new URL(strurl); HttpURLConnection connection = (HttpURLConnection)url.openConnection(); connection.setDoOutput(true); StringBuffer postparameter = new StringBuffer(); String paramName =callerid; postparameter.append(paramName); OutputStreamWriter outStream = new OutputStreamWriter(new BufferedOutputStream(connection.getOutputStream())); outStream.write(postparameter.toString()); outStream.close(); System.out.println(paramName); } catch(Exception e) { e.printStackTrace(); } } } But when i run this program,nothing happened.(ie) No paramName is printed.could you please show me where i am wrong? I am having another doubt.can i open the page " http://localhost:8080/NewWebProject" using urlconnection when i run this program? -- Preetha.A |
From: Thameem A. <tha...@ya...> - 2008-08-09 18:41:59
|
You have to post the parameters to the url not as get query Refer the following sample code. http://forums.sun.com/thread.jspa?threadID=540650&messageID=2621368 -Thameem --- On Sat, 8/9/08, preetha Ayyappan <pre...@gm...> wrote: From: preetha Ayyappan <pre...@gm...> Subject: [Asterisk-java-users] passing parameter from fastagi program to servlet To: ast...@li... Date: Saturday, August 9, 2008, 1:29 AM Hi, I need to pass a parameter ,say callerid from fastagi program using open url connection like the following: public class Inbound extends BaseAgiScript implements AgiScript//NewIvr14 { Statement st; ResultSet rs=null; Connection conn=null; public void service(AgiRequest request, AgiChannel channel) throws AgiException { String callerid="9941032521"; System.out.println("inbound"); SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd") ; String s = formatter.format (new Date()) ; // DataInputStream dis = new DataInputStream(connection.getInputStream()); //streamFile("plase hold th line your call is being trfd to officer"); try { String strurl="http://localhost:8080/NewWebProject/JavaServlet?parameter1= <callerid>"; URL url=new URL(strurl); URLConnection connection=url.openConnection(); connection.setDoOutput(true); } catch(Exception e) { e.printStackTrace(); } } } I am trying to get the parameter in the following servlet code like this.But I am getting the value null . my servlet code is: public class JavaServlet extends HttpServlet { Statement st; ResultSet rs=null; Connection conn=null; public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, java.io.IOException { AgiRequest request=null; AgiChannel channel=null; PrintWriter out=res.getWriter(); String caller=req.getParameter("parameter1"); out.println(caller); try { Class c=Class.forName("Inbound"); Object obj=c.newInstance(); Inbound h=(Inbound)obj; System.out.print(this.getInitParameter("parameter1")); h.service(request, channel); } catch(Exception e) { e.printStackTrace(); } } } Anyone, please assist me where i am wrong.Thanks. -- Preetha.A ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: preetha A. <pre...@gm...> - 2008-08-09 08:28:55
|
Hi, I need to pass a parameter ,say callerid from fastagi program using open url connection like the following: public class Inbound extends BaseAgiScript implements AgiScript//NewIvr14 { Statement st; ResultSet rs=null; Connection conn=null; public void service(AgiRequest request, AgiChannel channel) throws AgiException { String callerid="9941032521"; System.out.println("inbound"); SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd") ; String s = formatter.format (new Date()) ; // DataInputStream dis = new DataInputStream(connection.getInputStream()); //streamFile("plase hold th line your call is being trfd to officer"); try { String strurl=" http://localhost:8080/NewWebProject/JavaServlet?parameter1= <callerid>"; URL url=new URL(strurl); URLConnection connection=url.openConnection(); connection.setDoOutput(true); } catch(Exception e) { e.printStackTrace(); } } } I am trying to get the parameter in the following servlet code like this.But I am getting the value null. my servlet code is: public class JavaServlet extends HttpServlet { Statement st; ResultSet rs=null; Connection conn=null; public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, java.io.IOException { AgiRequest request=null; AgiChannel channel=null; PrintWriter out=res.getWriter(); String caller=req.getParameter("parameter1"); out.println(caller); try { Class c=Class.forName("Inbound"); Object obj=c.newInstance(); Inbound h=(Inbound)obj; System.out.print(this.getInitParameter("parameter1")); h.service(request, channel); } catch(Exception e) { e.printStackTrace(); } } } Anyone, please assist me where i am wrong.Thanks. -- Preetha.A |
From: Matias B. <mr...@li...> - 2008-08-08 16:05:38
|
Sure Stefan, As soon as I finish the project I will be more than happy to share it :) cheers MRB On Fri, Aug 8, 2008 at 4:20 AM, Stefan Reuter <ste...@re...>wrote: > Matias Barletta wrote: > > Thanks Martin, Stefan, > > > > I would reather do that and let you know! thanks.. > > By the way: > > Would you like to write a short posting for the Asterisk-Java blog > talking about your experience in using Jython with Asterisk-Java? > We've already some postings on using Groovy and Beanshell so Jython > would be a great addition :-) > > =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 the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Matias Barletta |
From: Stefan R. <ste...@re...> - 2008-08-08 10:21:12
|
Matias Barletta wrote: > Thanks Martin, Stefan, > > I would reather do that and let you know! thanks.. By the way: Would you like to write a short posting for the Asterisk-Java blog talking about your experience in using Jython with Asterisk-Java? We've already some postings on using Groovy and Beanshell so Jython would be a great addition :-) =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: Martin S. <ma...@be...> - 2008-08-08 04:39:23
|
Hi again all, It also looks like you might be able to hint to Jython what you want, using Java-method signatures: def getTo(self): ""@sig String getTo()"" return self.To I'm sure there's probably a few more ways, but I just came across that one (not tested it yet, though) and figured it might help. I know Stefan has done some A-J posts in Groovy, but maybe we can do some in Jython or Scala as well. I don't mind volunteering. What else are people interested in seeing? I know one I see a lot of on the mailing list is the "originate + recorded message" task. Anything else? Cheers, Martin -----Original Message----- From: ast...@li... on behalf of Matias Barletta Sent: Thu 8/7/2008 2:53 PM To: ast...@li... Subject: Re: [Asterisk-java-users] Custom Action vgsm_sms_tx Thanks Martin, Stefan, I would reather do that and let you know! thanks.. On Wed, Aug 6, 2008 at 7:53 PM, Stefan Reuter <ste...@re...>wrote: > > So your generated class has no "To" property for Asterisk-Java to > > include. I can't speak as to why, as I'm not a Jython user *at all* > > (this is my first time actually running code with it). > > A solution could be to implement your action class in Java and then use > it in jython. This will make sure the class has the correct structure > and Asterisk-Java can handle it while you can keep the application logic > in jython. > > =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 the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Matias Barletta |
From: Matias B. <mr...@li...> - 2008-08-07 18:53:22
|
Thanks Martin, Stefan, I would reather do that and let you know! thanks.. On Wed, Aug 6, 2008 at 7:53 PM, Stefan Reuter <ste...@re...>wrote: > > So your generated class has no "To" property for Asterisk-Java to > > include. I can't speak as to why, as I'm not a Jython user *at all* > > (this is my first time actually running code with it). > > A solution could be to implement your action class in Java and then use > it in jython. This will make sure the class has the correct structure > and Asterisk-Java can handle it while you can keep the application logic > in jython. > > =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 the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Matias Barletta |
From: Stefan R. <ste...@re...> - 2008-08-07 01:53:14
|
> So your generated class has no "To" property for Asterisk-Java to > include. I can't speak as to why, as I'm not a Jython user *at all* > (this is my first time actually running code with it). A solution could be to implement your action class in Java and then use it in jython. This will make sure the class has the correct structure and Asterisk-Java can handle it while you can keep the application logic in jython. =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: Martin S. <ma...@be...> - 2008-08-06 20:47:59
|
Hi Julian, Please check out the Asterisk-Java site at http://asterisk-java.org/. There's a tutorial that should show you how to originate calls and handle events upon those channels. Once you have some more concrete questions, the list would be a great place to pose them. Thanks, 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 Julian Rousselot Sent: Wednesday, August 06, 2008 4:29 PM To: ast...@li... Subject: [Asterisk-java-users] Originate - Help Please, I need some help!, I need to know how can I send a voice message to an active channel at any time like in the middle of the conversation. I'm making an application with asterisk-java, in that application I have to originate a call to two destinations but when the destinations answer the call I have to playback like a welcome message. Can you tell me how can I do that? Thank you very much Julian |
From: Julian R. <jul...@gm...> - 2008-08-06 20:18:11
|
Please, I need some help!, I need to know how can I send a voice message to an active channel at any time like in the middle of the conversation. I'm making an application with asterisk-java, in that application I have to originate a call to two destinations but when the destinations answer the call I have to playback like a welcome message. Can you tell me how can I do that? Thank you very much Julian |
From: Martin S. <ma...@be...> - 2008-08-06 14:04:41
|
Hello Mattias, Asterisk-Java uses reflection to build the string to send to Asterisk. If Jython is generating a method that doesn't look like "public String getTo()", Asterisk-Java won't find and include it. I ran jythonc for the latest stable jython and looked at the output for the class you've supplied. 1. First, I noticed if Asterisk-Java isn't on the class path, your class ends up extending java.lang.Object. I had to make sure I saw: Creating .java files: SMS_tx module SMS_tx extends org.asteriskjava.manager.action.AbstractManagerAction 2. Next, even with that, I ran the following program: Class<SMS_tx> clazz = SMS_tx.class; Map<String, Method> getters = ReflectionUtil.getGetters(clazz); for(String methodName : getters.keySet()) System.out.println("Found method " + methodName); It turns out, the reflection helper class can't even find a method getTo(), so you won't see it used when creating a manager action! When I used reflection to inspect *all* methods on the generated class SMS_tx, like so: Class<SMS_tx> clazz = SMS_tx.class; for(Method m : clazz.getMethods()) if(m.getName().toLowerCase().startsWith("get")) System.out.println("Found method " + m); My output was: Found method public java.lang.String SMS_tx.getAction() Found method public java.lang.String org.asteriskjava.manager.action.AbstractManagerAction.getActionId() Found method public final native java.lang.Class java.lang.Object.getClass() So your generated class has no "To" property for Asterisk-Java to include. I can't speak as to why, as I'm not a Jython user *at all* (this is my first time actually running code with it). Hope this helps, 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 Matias Barletta Sent: Wednesday, August 06, 2008 4:02 AM To: ast...@li... Subject: Re: [Asterisk-java-users] Custom Action vgsm_sms_tx Thanks Stefan, This is the subclass in jython hope you don't mind :) .. I am using jython perfectly with your other classess :) class SMS_tx (AbstractManagerAction): serialVersionUID = 8194597741743334705L def __init__(self): self.To= "+17862399999" self.content="Default content" def getAction(self): return "vgsm_sms_tx" def setTo(self,smsto): self.To = smsto def getTo(self): return self.To def setContent(self,message): self.content = message def getContent(self): return self.content def setContentType(self): self.contenttype="text/plain" def getcontentType(self): return self.contenttype def setTimeOut(self): self.timeout=30000 Cheers! MRB On Wed, Aug 6, 2008 at 1:54 AM, Stefan Reuter <ste...@re...> wrote: Matias, Can you show us your implementation of the custom action and the code you are using to send it to Asterisk? =Stefan On Wed, 6 Aug 2008 00:42:42 -0600, "Matias Barletta" <mr...@li...> wrote: > Hi List!... > > Trying to create a Custom Action for sending vgsm_sms_tx actions... > > I use AbstractManagerAction, and have 2 properties (To and Content - > string > both) but I cannot make it work... > > Debugging the manager it complains about the " Message: To: Header > Missing" > > Is that word "To" reserved? I am forgetting something?? > > Thanks for the guide! > > Cheers > MRB -- 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 ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- Matias Barletta |