asterisk-java-devel Mailing List for Asterisk-Java Library (Page 24)
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: Shivram u <shi...@gm...> - 2006-08-11 10:42:00
|
Hi Stefan, > But shouldnt we just wait for the next client connection when the accept > > call fails > > If the server socket has a problem that is usually due to something as > severe as the socket being shutdown. I doubt it is usefull to try to > reuse it after it threw an exception. > If there are IOExceptions on the client sockets (i.e. client just > connects and disconnects) we already do continue with the next client. > > Did you encounter any problems with the code? I havent encountered any problems with that code. I browsing the code came across this. Im not that experienced in java. I assumed that the accept() call would be similar to a C lib accept() call, where an accept can fail if the client aborted the connection(ECONNABORTED) I tried searching the web for the reasons why an IOException could be generated for a socket accept(), but havent found any. Best Regards, Shivram U |
From: Stefan R. <sr...@re...> - 2006-08-11 09:04:29
|
Hi, Shivram u wrote: > How does java work in the statement > while ((socket =3D serverSocket.accept()) !=3D null) >=20 > I assume that it throw an exception and gets handled by the exception > handler. rather than hitting the check for socket being null. You are right, the null check is not needed here. I'll change it for 0.3.= > If my assumption is correct, we hit the catch and then the finally > statement where we close the server socket. correct - at least we try closing the serversocket. > But shouldnt we just wait for the next client connection when the accep= t > call fails If the server socket has a problem that is usually due to something as severe as the socket being shutdown. I doubt it is usefull to try to reuse it after it threw an exception. If there are IOExceptions on the client sockets (i.e. client just connects and disconnects) we already do continue with the next client. Did you encounter any problems with the code? =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |
From: Shivram u <shi...@gm...> - 2006-08-11 07:26:52
|
Hi, In fastagi/DefaultAGIServer.java i had a question w.r.t exception handling of the accept call. How does java work in the statement while ((socket = serverSocket.accept()) != null) I assume that it throw an exception and gets handled by the exception handler. rather than hitting the check for socket being null. If my assumption is correct, we hit the catch and then the finally statement where we close the server socket. But shouldnt we just wait for the next client connection when the accept call fails Something like While (1) { try { socket = accept(); } catch IOException() { continue; /* loop back for the next client connection */ } Below is the piece of code in question Best Regards, Shivram U try { while ((socket = serverSocket.accept()) != null) { logger.info("Received connection."); connectionHandler = new AGIConnectionHandler(socket, mappingStrategy); pool.addJob(connectionHandler); } } catch (IOException e) { // swallow only if shutdown if (!die) { logger.error("IOException while waiting for connections.", e); throw e; } } finally { if (serverSocket != null) { try { serverSocket.close(); } catch (IOException e) { // swallow } } serverSocket = null; pool.shutdown(); logger.info("AGIServer shut down."); } |
From: Stefan R. <sr...@re...> - 2006-08-11 07:10:51
|
Ricardo Gonzalez wrote: > Do you mean I should use this "originateAction.setChannel("SIP/John");"= or > "originateAction.setChannel("ZAP/${PSTN_NUMBER}");" because when I do t= his > nothing goes, no ring, no call, nothing at all. I must be wrong. The Zap string seems wrong in two ways: 1. You must specify an exact zap channel or a group or a ring group just like in your dialplan, e.g. Zap/1/12345 or Zap/g1/12345 2. Unlike in the dialplan you can't use dialplan variables with ${...} you must use the exact number instead. Hope that helps =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Ricardo G. <rgo...@co...> - 2006-08-10 21:11:19
|
Do you mean I should use this "originateAction.setChannel("SIP/John");" or "originateAction.setChannel("ZAP/${PSTN_NUMBER}");" because when I do this nothing goes, no ring, no call, nothing at all. I must be wrong. -----Mensaje original----- De: ast...@li... [mailto:ast...@li...] En nombre de ast...@li... Enviado el: jueves, 10 de agosto de 2006 14:09 Para: ast...@li... Asunto: Asterisk-java-devel Digest, Vol 2, Issue 3 Send Asterisk-java-devel mailing list submissions to ast...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel or, via email, send a message with subject or body 'help' to ast...@li... You can reach the person managing the list at ast...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Asterisk-java-devel digest..." Today's Topics: 1. Place Call with the "Originate" Object (Ricardo Gonzalez) 2. Re: Place Call with the "Originate" Object (Stefan Reuter) ---------------------------------------------------------------------- Message: 1 Date: Thu, 10 Aug 2006 12:14:03 -0500 From: "Ricardo Gonzalez" <rgo...@co...> Subject: [Asterisk-java-devel] Place Call with the "Originate" Object To: <ast...@li...> Message-ID: <200...@co...> Content-Type: text/plain; charset="us-ascii" Hey guys, I hope you can help me! I need to place calls to a Zap channel with Asterisk-Java API, the purpose of this application is to advise users about events on their schedules via phone calls, the backend is ready but I need to place calls on the PSTN via E1 Zap channels. ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-devel/attac hments/20060810/59f36fda/attachment.html ------------------------------ Message: 2 Date: Thu, 10 Aug 2006 19:23:31 +0200 From: Stefan Reuter <sr...@re...> Subject: Re: [Asterisk-java-devel] Place Call with the "Originate" Object To: ast...@li... Message-ID: <44D...@re...> Content-Type: text/plain; charset="iso-8859-1" Ricardo Gonzalez wrote: > I need to place calls to a Zap channel with Asterisk-Java API, the > purpose of this application is to advise users about events on their > schedules via phone calls, the backend is ready but I need to place > calls on the PSTN via E1 Zap channels. Hmm - just do it :) An example is in the tutorial on our website: http://asterisk-java.org/latest/tutorial.html If you encounter any problems please provide some more detail. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 254 bytes Desc: OpenPGP digital signature Url : http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-devel/attac hments/20060810/415b6422/attachment.bin ------------------------------ ------------------------------------------------------------------------- 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 End of Asterisk-java-devel Digest, Vol 2, Issue 3 ************************************************* |
From: Stefan R. <sr...@re...> - 2006-08-10 17:23:45
|
Ricardo Gonzalez wrote: > I need to place calls to a Zap channel with Asterisk-Java API, the > purpose of this application is to advise users about events on their > schedules via phone calls, the backend is ready but I need to place > calls on the PSTN via E1 Zap channels. Hmm - just do it :) An example is in the tutorial on our website: http://asterisk-java.org/latest/tutorial.html If you encounter any problems please provide some more detail. =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Ricardo G. <rgo...@co...> - 2006-08-10 17:13:02
|
Hey guys, I hope you can help me! I need to place calls to a Zap channel with Asterisk-Java API, the purpose of this application is to advise users about events on their schedules via phone calls, the backend is ready but I need to place calls on the PSTN via E1 Zap channels. ideas? Thanks. |
From: Stefan R. <sr...@re...> - 2006-08-09 06:13:00
|
Hi Chris, > Here's a general AGI question for the list. I need to be able to use = > the get options command but I need it to be a variable length =20 > option. For example I want to allow the caller to select 1 for =20 > sales, 2 for support or enter a 4 digit extension. Ok now it gets =20 > even trickier as the 4 digit extension can start wit a 1 or 2 so that = > there needs to be a timeout on the numbers as well. So the caller =20 > can press 1 for sales (and wait for X seconds) or press 1111 and =20 > get short circuited to extension 1111. Has anyone done anything =20 > like this using AJ? yes something similar, though not exactly the same. You can either do it in Java using waitForDigit with appropriate timeout values in a loop or you can exit the AGI script to a specific context in the dialplan (setContext/Exten/Priority), do a Background() there and use the features of the dialplan for pattern matching. Depending on the match you would return to an AGI script or just Dial() the extension. =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Chris H. <ch...@as...> - 2006-08-09 03:51:13
|
Here's a general AGI question for the list. I need to be able to use the get options command but I need it to be a variable length option. For example I want to allow the caller to select 1 for sales, 2 for support or enter a 4 digit extension. Ok now it gets even trickier as the 4 digit extension can start wit a 1 or 2 so that there needs to be a timeout on the numbers as well. So the caller can press 1 for sales (and wait for X seconds) or press 1111 and get short circuited to extension 1111. Has anyone done anything like this using AJ? Cheers, Chris |
From: Stefan R. <sr...@re...> - 2006-08-07 06:49:03
|
Hi Daniel, Daniel McGruer wrote: > When I try to do this, it calls the external number fine but then =20 > hangs up on them when they answer. please show what you get on the Asterisk console while originating the call. User "set verbose 9" to increase verbosity before. =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Daniel M. <da...@ou...> - 2006-08-07 06:42:34
|
Hey, I am trying to use the manager API to start a call between an external number and an extension. In the documentation I have read it says that when you preform a call like this it should 1. Call the external number 2. Once that has been picked up call the extension When I try to do this, it calls the external number fine but then hangs up on them when they answer. Code: //all the login and stuff has been done OriginateAction org = new OriginateAction(); org.setChannel("SIP/"+number+"@myfone-sip"); org.setContext("default"); org.setExten("300"); org.setPriority(1); org.setCallerId("0422439077"); org.setCallingPres(true); org.setTimeout(20000l); ManagerResponse res; try { System.out.println("Calling"); res = dmc.sendAction(org); System.out.println("The resposnse was: "+res.getResponse ()); System.out.println("The message was: "+res.getMessage()); System.out.println("Not calling ne more"); } catch (IOException e) { e.printStackTrace(); } catch (TimeoutException e) { e.printStackTrace(); } End Code Cheers Daniel |
From: Stefan R. <sr...@re...> - 2006-07-20 18:52:31
|
Mircea Postolache wrote: > I will keep that in mind. Do you know what wrong behavior I should > expect if I am using let's say 2 connections? There are rumors that you might get crippled events due to synchronization problems in Asterisk. This will certainly only show up under heavy load and might have been fixed in recent versions of Asterisk= =2E =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Mircea P. <mir...@ya...> - 2006-07-18 11:57:14
|
I will keep that in mind. Do you know what wrong behavior I should expect if I am using let's say 2 connections? Right now i am using 2 (one for handling events and another for things like hangup, originate call, ...).Only one has an eventHandler. I have registered the event class on both connections and now I am not getting the warning anymore. Thank you. Mircea Stefan Reuter <sr...@re...> wrote: Mircea Postolache wrote: > Well it seems that the second message is generated by a second manager > connection that is sometimes open in paralel with this one. I chose to > have a small pool of connections for use in different parts of the > application. It's like this connection also receives this event, but > since I haven't registered the class with it it complains. One solution > would probably be to register the event with all the connections. I > thought that by registering an event I will somehow "filter" the events > received by a certain connection. But that may not be the case. What do > you think? I would stick with one shared connection as asterisk tends to run into trouble when handling multiple concurrent manager api connections. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... ------------------------------------------------------------------------- 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 --------------------------------- Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta. |
From: Stefan R. <sr...@re...> - 2006-07-18 10:52:30
|
Mircea Postolache wrote: > Well it seems that the second message is generated by a second manager > connection that is sometimes open in paralel with this one. I chose to > have a small pool of connections for use in different parts of the > application. It's like this connection also receives this event, but > since I haven't registered the class with it it complains. One solution= > would probably be to register the event with all the connections. I > thought that by registering an event I will somehow "filter" the events= > received by a certain connection. But that may not be the case. What d= o > you think? I would stick with one shared connection as asterisk tends to run into trouble when handling multiple concurrent manager api connections. =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |
From: Mircea P. <mir...@ya...> - 2006-07-18 09:59:49
|
Well it seems that the second message is generated by a second manager connection that is sometimes open in paralel with this one. I chose to have a small pool of connections for use in different parts of the application. It's like this connection also receives this event, but since I haven't registered the class with it it complains. One solution would probably be to register the event with all the connections. I thought that by registering an event I will somehow "filter" the events received by a certain connection. But that may not be the case. What do you think? --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates. |
From: Mircea P. <mir...@ya...> - 2006-07-18 09:44:13
|
Yes I have noticed that in the meantime. It seems that some cleanup is not done right when I redeploy my webapp. I am digging on this issue right now. So this might be the cause of that clean run I had after restarting tomcat. I will let you know what happens. Thanks. Stefan Reuter <sr...@re...> wrote: Mircea Postolache wrote: > I have changed my sources and again I have this warning about the event > "No event class registered for event type 'reply'". I have tried both a) > and b) and I still cannot make it dissapear. Is it mandatory to register > the event on connection creation or before first login? The strange > thing is now my handler gets the event even if I get the warning. > Here you have a snapshot of the log: To me this looks like you have to connections. One with the reply event registered (the first one in the logs where the reply event gets parsed correctly) and another one where you missed the registration. Why else would you see the same MessageWaiting and Reply event twice? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... ------------------------------------------------------------------------- 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 --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs.Try it free. |
From: Stefan R. <sr...@re...> - 2006-07-18 09:21:02
|
Mircea Postolache wrote: > I have changed my sources and again I have this warning about the event= > "No event class registered for event type 'reply'". I have tried both a= ) > and b) and I still cannot make it dissapear. Is it mandatory to registe= r > the event on connection creation or before first login? The strange > thing is now my handler gets the event even if I get the warning. > Here you have a snapshot of the log: To me this looks like you have to connections. One with the reply event registered (the first one in the logs where the reply event gets parsed correctly) and another one where you missed the registration. Why else would you see the same MessageWaiting and Reply event twice? =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |
From: Mircea P. <mir...@ya...> - 2006-07-18 08:25:59
|
I have changed my sources and again I have this warning about the event "No event class registered for event type 'reply'". I have tried both a) and b) and I still cannot make it dissapear. Is it mandatory to register the event on connection creation or before first login? The strange thing is now my handler gets the event even if I get the warning. Here you have a snapshot of the log: 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [event], value: [MessageWaiting] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [privilege], value: [call,all] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [event], value: [MessageWaiting] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [privilege], value: [call,all] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [mailbox], value: [173@default] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [waiting], value: [1] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [new], value: [16] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [old], value: [0] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:232) - attempting to build event: MessageWaiting 07-18@11:13:27 DEBUG (DefaultManagerConnection.java:925) - Dispatching event: net.sf.asterisk.manager.event.MessageWaitingEvent: dateReceived=Tue Jul 18 11:13:27 EEST 2006; privilege=call,all; systemHashcode=31156546 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [event], value: [Reply] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [privilege], value: [user,all] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [channel], value: [SIP/174-8f8f] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [uniqueid], value: [1153210385.9] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [transactionid], value: [1153210297.8] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:232) - attempting to build event: Reply 07-18@11:13:27 DEBUG (DefaultManagerConnection.java:925) - Dispatching event: ro.mcr.genzen.btot.integration.services.manager.events.ReplyEvent: dateReceived=Tue Jul 18 11:13:27 EEST 2006; privilege=user,all; systemHashcode=31170373 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [mailbox], value: [173@default] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [waiting], value: [1] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [new], value: [16] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [old], value: [0] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:232) - attempting to build event: MessageWaiting 07-18@11:13:27 DEBUG (DefaultManagerConnection.java:925) - Dispatching event: net.sf.asterisk.manager.event.MessageWaitingEvent: dateReceived=Tue Jul 18 11:13:27 EEST 2006; privilege=call,all; systemHashcode=28678425 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [event], value: [Reply] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [privilege], value: [user,all] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [channel], value: [SIP/174-8f8f] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [uniqueid], value: [1153210385.9] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:267) - Got name [transactionid], value: [1153210297.8] 07-18@11:13:27 DEBUG (ManagerReaderImpl.java:232) - attempting to build event: Reply 07-18@11:13:27 INFO (EventBuilderImpl.java:262) - No event class registered for event type 'reply', attributes: {privilege=user,all, transactionid=1153210297.8, uniqueid=1153210385.9, event=Reply, channel=SIP/174-8f8f} Stefan Reuter <sr...@re...> wrote: a) The hackish option: ReplyEvent extends UserEvent manager_event(EVENT_FLAG_USER, "UserEventReply", "Channel: %s... b) The not so hackish option: ReplyEvent extends ManagerEvent manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s... Though b) didnt work for you so i would need your log with log level DEBUG to see where the problem is. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... ------------------------------------------------------------------------- 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 --------------------------------- Groups are talking. Were listening. Check out the handy changes to Yahoo! Groups. |
From: Mircea P. <mir...@ya...> - 2006-07-17 07:42:01
|
Sorry for the delay in answering. I tried on Friday to enable the DEBUG on logging and I saw that in order for my .war to get DEBUG logging on, I had to restart Tomcat. It's probably due to the fact that my tomcat has log4j in the common/lib folder. Anyway, after restarting the server I got no more warnings about the event class... Now I see the events from the Event Handler. I don't really understand what happened. Another question that I have regarding Asterisk-Java: is there a way to make the addition/removal of more fastAGI scripts without reloading my webapp? I mean, I would prepare a new FastAGIscripts.jar (which has the properties file bundled) and upload it in my webapp's lib folder. I would then execute a command from the browser to accomodate the changes. The way I implemented this is by wrapping the Default implementation in a class that has start/stop/reload methods. The reload I have implemented by stopping the DefaultAGIServer and replacing it with a new instance. But the properties seem to stay the old way until I reload the entire webapp. I know there is that special way of calling fast agi scripts by fully qualified class name but I would really like to use a mapping file. Thank you. Mircea Stefan Reuter <sr...@re...> wrote: a) The hackish option: ReplyEvent extends UserEvent manager_event(EVENT_FLAG_USER, "UserEventReply", "Channel: %s... b) The not so hackish option: ReplyEvent extends ManagerEvent manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s... Though b) didnt work for you so i would need your log with log level DEBUG to see where the problem is. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... ------------------------------------------------------------------------- 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 --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. |
From: Stefan R. <sr...@re...> - 2006-07-15 02:19:51
|
a) The hackish option: ReplyEvent extends UserEvent manager_event(EVENT_FLAG_USER, "UserEventReply", "Channel: %s... b) The not so hackish option: ReplyEvent extends ManagerEvent manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s... Though b) didnt work for you so i would need your log with log level DEBUG to see where the problem is. =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |
From: Mircea P. <mir...@ya...> - 2006-07-14 10:52:21
|
I am a little confused right now. In the javadoc I read that name of the Event is constructed by appending "Event". So, what should I call my event class? What name shouls I give it in the case I chose to extend ManagerEvent or in the case of UserEvent? And how am I supposed to name the event in the C file of asterisk? Currently it's: manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s\r\nUniqueId: %s\r\nTransactionId: %s\r\n", chan->name, chan->uniqueid, transactionId); The event is sent by asterisk towards java, but I always get that error I told you about. So far the problem seems to be that EventBuilderImpl.java:262 doesn't know what class should instantiate for this event. --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. |
From: Stefan R. <sr...@re...> - 2006-07-14 10:16:24
|
Stefan Reuter wrote: > Mircea Postolache wrote: >> I have changed the ReplyEvent class to extend ManagerEvent (I have add= ed >> the channel and uniqueId to it as they are not inherited anymore). >> The register I left as it was. I still get the log message: >> >> No event class registered for event type 'reply', attributes: >> {privilege=3Duser,all, transactionid=3D1152862210.0, uniqueid=3D115286= 2282.1, >> event=3DReply, channel=3DSIP/174-c026} >=20 > Thats strange. Please enable debug logging and look for something like > 2006-07-14 10:13:08,453 > org.asteriskjava.manager.internal.EventBuilderImpl DEBUG - Registered > event type 'reply' (class ReplyEvent) >=20 > There should be at least one line for your event. >=20 >> Shall I send the event from the server with a different name? Now its >> "Reply". >=20 > You can rename make your event class extend UserEvent and send a > ReplyUserEvent from Asterisk - though that sounds a bit hackish :) sorry - what you have to send is a UserEventReply =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |
From: Stefan R. <sr...@re...> - 2006-07-14 10:15:20
|
Mircea Postolache wrote: > I have changed the ReplyEvent class to extend ManagerEvent (I have adde= d > the channel and uniqueId to it as they are not inherited anymore). > The register I left as it was. I still get the log message: >=20 > No event class registered for event type 'reply', attributes: > {privilege=3Duser,all, transactionid=3D1152862210.0, uniqueid=3D1152862= 282.1, > event=3DReply, channel=3DSIP/174-c026} Thats strange. Please enable debug logging and look for something like 2006-07-14 10:13:08,453 org.asteriskjava.manager.internal.EventBuilderImpl DEBUG - Registered event type 'reply' (class ReplyEvent) There should be at least one line for your event. > Shall I send the event from the server with a different name? Now its > "Reply". You can rename make your event class extend UserEvent and send a ReplyUserEvent from Asterisk - though that sounds a bit hackish :) =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |
From: Mircea P. <mir...@ya...> - 2006-07-14 07:42:38
|
I have changed the ReplyEvent class to extend ManagerEvent (I have added the channel and uniqueId to it as they are not inherited anymore). The register I left as it was. I still get the log message: No event class registered for event type 'reply', attributes: {privilege=user,all, transactionid=1152862210.0, uniqueid=1152862282.1, event=Reply, channel=SIP/174-c026} Shall I send the event from the server with a different name? Now its "Reply". Thank you. Mircea Stefan Reuter <sr...@re...> wrote: Mircea Postolache wrote: > ManagerConnection > con=mgrConnectionFactory.getManagerConnection(); > con.login(); > //register Reply event > con.registerUserEventClass(ReplyEvent.class); > > On the server side I have added some C code into Asterisk's code for > app_voicemail.c to fire the event in a the case of a reply. > > manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s\r\nUniqueid: %s\r\nTransactionId: %s\r\n", chan->name, chan->uniqueid, transactionId); The UserEvent stuff was designed to be used with the UserEvent application. Asterisk-Java registers the event with the extension "UserEvent" if your event extends UserEvent because that application adds that part. So your event wansnt registered as Reply but as ReplyUserEvent. As you are not using the UserEvent application but rather introduce your own new event you should not extend UserEvent but ManagerEvent. You should still be able to register it through con.registerUserEventClass(ReplyEvent.class) though. Does that fix your problem? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. |
From: Stefan R. <sr...@re...> - 2006-07-14 06:46:16
|
Mircea Postolache wrote: > ManagerConnection > con=3DmgrConnectionFactory.getManagerConnection(); > con.login(); > //register Reply event > con.registerUserEventClass(ReplyEvent.class); >=20 > On the server side I have added some C code into Asterisk's code for > app_voicemail.c to fire the event in a the case of a reply. >=20 > manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s\r\nUniqueid: %s\r\= nTransactionId: %s\r\n", chan->name, chan->uniqueid, transactionId); The UserEvent stuff was designed to be used with the UserEvent application. Asterisk-Java registers the event with the extension "UserEvent" if your event extends UserEvent because that application adds that part. So your event wansnt registered as Reply but as ReplyUserEvent. As you are not using the UserEvent application but rather introduce your own new event you should not extend UserEvent but ManagerEvent. You should still be able to register it through con.registerUserEventClass(ReplyEvent.class) though. Does that fix your problem? =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |