asterisk-java-users Mailing List for Asterisk-Java Library (Page 149)
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: Stefan R. <sr...@re...> - 2006-06-09 09:47:25
|
idir arabi wrote: > Her is my code: >=20 > getvar.setVariable("SIP_CODEC"); You can't get the value of built-in channel variables via the Manager API= =2E Thats why I wrote in the javadocs: "You cannot read built-in channel variables such as LANGUAGE or CALLERIDNUM using the Manager API. You can only read channel variables that you have explicitly set using the Set or SetVar (for Asterisk 1.0.x) applications in the dialplan, in an AGI script or by using the SetVarAction through the Manager API itself." =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: idir a. <idi...@ho...> - 2006-06-09 09:28:21
|
Her is my code: GetVarAction getvar; ManagerResponse varResponse; getvar = new GetVarAction(); getvar.setChannel("SIP/86-b00e"); getvar.setVariable("SIP_CODEC"); varResponse = managerConnection.sendAction(getvar); log.debug("Attributs de la variable:" +varResponse.getAttribute("SIP_CODEC")); Results: - Request sent: 2006-06-09 11:22:44,390 DEBUG: net.sf.asterisk.manager.impl.ManagerWriterImpl.sendAction(ManagerWriterImpl.java:82) - Sent GetVar action with actionId 'null': action: GetVar actionid: 16382424_3# variable: SIP_CODEC channel: SIP/86-dd69 -Asterisk answers: 2006-06-09 11:22:44,390 DEBUG: net.sf.asterisk.manager.impl.ManagerReaderImpl.run(ManagerReaderImpl.java:267) - Got name [response], value: [Success] 2006-06-09 11:22:44,390 DEBUG: net.sf.asterisk.manager.impl.ManagerReaderImpl.run(ManagerReaderImpl.java:267) - Got name [variable], value: [SIP_CODEC] 2006-06-09 11:22:44,390 DEBUG: net.sf.asterisk.manager.impl.ManagerReaderImpl.run(ManagerReaderImpl.java:267) - Got name [actionid], value: [16382424_3#] 2006-06-09 11:22:44,406 DEBUG: net.sf.asterisk.manager.impl.ManagerReaderImpl.run(ManagerReaderImpl.java:224) - attempting to build response 2006-06-09 11:22:44,406 DEBUG: net.sf.asterisk.manager.DefaultManagerConnection.dispatchResponse(DefaultManagerConnection.java:865) - Dispatching response with internalActionId '16382424_3': net.sf.asterisk.manager.response.ManagerResponse: actionId='null'; message='null'; response='Success'; uniqueId='null'; systemHashcode=605645 2006-06-09 11:22:44,406 DEBUG: inovatel.callrouting.agi.Events.run(Events.java:123) - Attributs de la variable:null Thanks for your help |
From: Stefan R. <sr...@re...> - 2006-06-09 02:28:11
|
> The types of things I'd like to watch for are: > - Originating channel was created (I didn't screw up with channel data)= > - Origination information was incorrect and call ended > - Originating channel was congested and so call aborted > - Alerting is happening on originating channel > - Origination alerting timed out > - Originator has answered > - Another channel has been linked to call > - A channel in the call is being alerted > - A channel in the call has answered > - One of the channels has hung-up or failed > - Call has ended With the new async originate methods, do you think things are better now?= Do you like the OriginateCallback and the PropertyChangeListener or does it feel strange to register a PropertyChangeListener and you would expect to have a more "natural" listener for channel changes with methods like onNewState or even onHangup and so on? =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: Stefan R. <sr...@re...> - 2006-06-09 02:11:53
|
Stefan Reuter wrote: > Tony Mowers wrote: >> I am guessing that in theory it would now be possible for you to throw= an >> Exception with the origination failure cause contained in the exceptio= n. In >> that case you'd never have to return AsteriskChannel =3D null. >> >> Is that the plan? >=20 > Yes that might be done. - Probably a good idea! I changed it to throw a NoSuchChannelException instead of returning null. A ManagerCommunictionException indicates a lower level problem, i.e. something is wrong with the connection to the Manager API like not being connected. =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: Stefan R. <sr...@re...> - 2006-06-08 22:33:33
|
idir arabi wrote: > I can see that the action has been well sent and asterisk answer me wit= h a=20 > Successful response but i can't see anything about the value of my=20 > variable!!!!! Can you post your code and how you set the variable? > Did someone ever try to use this command and if possible help would be = > appreciated.. Sure, the action works - with the limitations described in the javadocs: http://www.asteriskjava.org/0.3-SNAPSHOT/apidocs/org/asteriskjava/manager= /action/GetVarAction.html =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: idir a. <idi...@ho...> - 2006-06-08 15:40:04
|
I'm trying to retrieve a channel variable using the constructor: GetVarAction(AGIChannel channel, String my_variable)) I can see that the action has been well sent and asterisk answer me with a Successful response but i can't see anything about the value of my variable!!!!! Did someone ever try to use this command and if possible help would be appreciated.. Thanks |
From: Tony M. <to...@am...> - 2006-06-06 18:17:30
|
For some reason I'd missed that you'd added those methods :-) I will probably use the async methods. Just for the record ... your work is very much appreciated and I think the APIs and the overall code is of a very high quality. -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Stefan Reuter Sent: Tuesday, June 06, 2006 7:58 PM To: ast...@li... Subject: Re: [Asterisk-java-users] Asterisk Live Tony Mowers wrote: > I am guessing that in theory it would now be possible for you to throw an > Exception with the origination failure cause contained in the exception. In > that case you'd never have to return AsteriskChannel = null. > > Is that the plan? Yes that might be done. - Probably a good idea! The other idea that gives you even more control is to use the async originate methods, they give you better feedback by calling one of onSuccess(channel) onNoAnswer(channel) onBusy(channel) onFailure() on your callback. =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... |
From: Stefan R. <sr...@re...> - 2006-06-06 17:58:32
|
Tony Mowers wrote: > I am guessing that in theory it would now be possible for you to throw = an > Exception with the origination failure cause contained in the exception= =2E In > that case you'd never have to return AsteriskChannel =3D null. >=20 > Is that the plan? Yes that might be done. - Probably a good idea! The other idea that gives you even more control is to use the async originate methods, they give you better feedback by calling one of onSuccess(channel) onNoAnswer(channel) onBusy(channel) onFailure() on your callback. =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: Tony M. <to...@am...> - 2006-06-06 17:38:37
|
Stefan, I noticed the addition of the ManagerCommunicationException to the originate operations on AsteriskServer. I am guessing that in theory it would now be possible for you to throw an Exception with the origination failure cause contained in the exception. In that case you'd never have to return AsteriskChannel = null. Is that the plan? Tony |
From: Stefan R. <sr...@re...> - 2006-06-06 17:22:47
|
Jan Gerryt du Toit wrote: > Can this be done by Asterisk? > Maybe this is more a Asterisk question itself. Sorry for this. > But if Asterisk can do this then I would like to know how to achieve th= is in > asterisk-java. Afaik not out of the box and not through the Manager API, though it should not be too hard to add it if you know some C and some Asterisk internals. =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: Jan G. du T. <s22...@tu...> - 2006-06-06 08:05:31
|
Hi. I know that asterisk has this functionality (when you are in a meetme room) to press the * key then it brings up an IVR application from where you can adjust your speaking and hearing volume. This is fine when the user wants to adjust his hearing volume, because he himself percieves that his hearing volume is too high/low. But he doesn't necessarily know that his speaking volume needs adjustment - the other people in the conference will perceive this. I have a conference-control application. I would like to give him ( the guy in charge of the conference and user of the application) the ability to change the speaking volume of each individual participant as needed on their behalf - without informing them that they must up/down their speaking volume themselves. Can this be done by Asterisk? Maybe this is more a Asterisk question itself. Sorry for this. But if Asterisk can do this then I would like to know how to achieve this in asterisk-java. Thank you. Regards. This message and attachments are subject to a disclaimer. Please refer to www.it.up.ac.za/documentation/governance/disclaimer/ for full details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule onderhewig. Volledige besonderhede is by www.it.up.ac.za/documentation/governance/disclaimer/ beskikbaar. |
From: Tony M. <to...@am...> - 2006-06-01 10:50:19
|
I meant to say "I do not know what the ideal callback mechanism would = look like for me ..." -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of = Tony Mowers Sent: Thursday, June 01, 2006 12:39 PM To: ast...@li... Subject: Re: [Asterisk-java-users] originateCall in AsteriskManager The asynchronous origination would work for me. I am listening for = channel state changes so it means most things in my particular application are asynchronous. I know what the ideal mechanism would look like for me, so I'll just = talk aloud about some of my thoughts. I would like to be able to register for callbacks before any events are generated for my call. I don't want to miss any events related to my = call. If that can be done by automatically registering my property change = listener to the originating channel immediately then that would be good. I don't know enough about Asterisk to know whether watching the property changes of the originating channel is equivalent to watching a phone = call. I know that intuitively I would like to watch the call. The types of things I'd like to watch for are: - Originating channel was created (I didn't screw up with channel data) - Origination information was incorrect and call ended - Originating channel was congested and so call aborted - Alerting is happening on originating channel=20 - Origination alerting timed out - Originator has answered - Another channel has been linked to call - A channel in the call is being alerted - A channel in the call has answered - One of the channels has hung-up or failed - Call has ended I have to admit that the logical object model for asterisk is not very = clear to me yet. My basic understanding of it is that an originating channel = gets created and then some application is applied to the channel either in = the form of an extension or directly as an application. The application can = do certain things to the channel, such as creating another channel and = linking it to the originating channel. That's my na=EFve understanding of the = logical model. I don't know if this sheds any light on what might be the typical user requirements. -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Stefan Reuter Sent: Thursday, June 01, 2006 12:03 AM To: ast...@li... Subject: Re: [Asterisk-java-users] originateCall in AsteriskManager Hi Tony, these are two very good questions :) What I thought of was to make to call to originate asynchronous so that you could pass it some kind of callback (maybe just a property change listener) that is called on changes to the originated channel. What do you think? =3DStefan Tony Mowers wrote: > Stefan, >=20 > =20 >=20 > I=92ve been playing a little bit with the AsteriskManager interface. = In > my application I have encountered two difficulties: >=20 > =20 >=20 > 1) I have a race condition right after originating the call. I > originate the call, receive the new AsteriskChannel, and then register = a > property change listener with it. I have no way of knowing if the > channel state has changed after origination but before having = registered > the listener. I can probably synchronize on the channel and get a = safe > result, but it feels a bit awkward. >=20 > 2) There is no way for me to determine the reason for the call > failure when the originate returns null. For example if any of the > origination parameters, such as an illegal channel, caused the = failure. >=20 > =20 >=20 > My application code that wraps the AsteriskManager has an interface > somewhat like a JTapi API. >=20 > =20 >=20 > Call call =3D pbxService.createCall(=85); >=20 > call.addObserver(myObserver()); >=20 > call.connect(); >=20 > =20 >=20 > Does anybody have suggestions for how to deal with (1) and (2)? --=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... _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Tony M. <to...@am...> - 2006-06-01 10:39:05
|
The asynchronous origination would work for me. I am listening for = channel state changes so it means most things in my particular application are asynchronous. I know what the ideal mechanism would look like for me, so I'll just = talk aloud about some of my thoughts. I would like to be able to register for callbacks before any events are generated for my call. I don't want to miss any events related to my = call. If that can be done by automatically registering my property change = listener to the originating channel immediately then that would be good. I don't know enough about Asterisk to know whether watching the property changes of the originating channel is equivalent to watching a phone = call. I know that intuitively I would like to watch the call. The types of things I'd like to watch for are: - Originating channel was created (I didn't screw up with channel data) - Origination information was incorrect and call ended - Originating channel was congested and so call aborted - Alerting is happening on originating channel=20 - Origination alerting timed out - Originator has answered - Another channel has been linked to call - A channel in the call is being alerted - A channel in the call has answered - One of the channels has hung-up or failed - Call has ended I have to admit that the logical object model for asterisk is not very = clear to me yet. My basic understanding of it is that an originating channel = gets created and then some application is applied to the channel either in = the form of an extension or directly as an application. The application can = do certain things to the channel, such as creating another channel and = linking it to the originating channel. That's my na=EFve understanding of the = logical model. I don't know if this sheds any light on what might be the typical user requirements. -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Stefan Reuter Sent: Thursday, June 01, 2006 12:03 AM To: ast...@li... Subject: Re: [Asterisk-java-users] originateCall in AsteriskManager Hi Tony, these are two very good questions :) What I thought of was to make to call to originate asynchronous so that you could pass it some kind of callback (maybe just a property change listener) that is called on changes to the originated channel. What do you think? =3DStefan Tony Mowers wrote: > Stefan, >=20 > =20 >=20 > I=92ve been playing a little bit with the AsteriskManager interface. = In > my application I have encountered two difficulties: >=20 > =20 >=20 > 1) I have a race condition right after originating the call. I > originate the call, receive the new AsteriskChannel, and then register = a > property change listener with it. I have no way of knowing if the > channel state has changed after origination but before having = registered > the listener. I can probably synchronize on the channel and get a = safe > result, but it feels a bit awkward. >=20 > 2) There is no way for me to determine the reason for the call > failure when the originate returns null. For example if any of the > origination parameters, such as an illegal channel, caused the = failure. >=20 > =20 >=20 > My application code that wraps the AsteriskManager has an interface > somewhat like a JTapi API. >=20 > =20 >=20 > Call call =3D pbxService.createCall(=85); >=20 > call.addObserver(myObserver()); >=20 > call.connect(); >=20 > =20 >=20 > Does anybody have suggestions for how to deal with (1) and (2)? --=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: Stefan R. <sr...@re...> - 2006-06-01 08:42:58
|
Brett Sutton wrote: > I would vote to have this changed. in 0.3 we have poolSize: number of worker threads in the thread pool. This is the number of threads that are available even if they are idle. maximumPoolSize: maximum number of worker threads in the thread pool. This equals the maximum number of concurrent requests this AgiServer can serve. Is this what you are looking for? =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: Thameem A. <tha...@ya...> - 2006-06-01 08:20:04
|
Hi, In my application there are 100+ concurrent calls and I had only 50 pool size. They worked fine but twice a day it crashes..then i increased the threads to 250 and now no issues. The server load also not that high. -Thameem Brett Sutton <bs...@no...> wrote: This sounds like a problem to me. I would prefer the pool size to be a lower limit on the number of concurrent threads not an effective upper limit. Given we are talking about time sensitive processing I don't think that it would be generally consider acceptable to wait for a thread to become available. Given a large server is only like to have say 250 active channels allowing the number of concurrent threads to grow to 250 isn't really an issue. I would vote to have this changed. Stefan Reuter wrote: Chris Howard wrote: If I'm not mistaken there is a setting for the default thread pool size. Bump that up if you have more concurrent agi connection. Ah....here it is: private static final int DEFAULT_POOL_SIZE = 10 right. though there is no need to change the sources. From the tutorial: Configuration You can tune the DefaultAgiServer by setting two properties: The bindPort and the poolSize. The bindPort determines the TCP port the server will listen on. By default this is the FastAGI port 4573. If you change it make sure to include the new port in the URLs used in extensions.conf. When using bindPort 1234 your extensions.conf will contain: exten => 1300,1,Agi(agi://localhost:1234/hello.agi) To understand the poolSize property you need to know that the DefaultAgiServer uses a fixed size thread pool to serve your AgiScripts. The poolSize determines how many threads are spawned at startup and thus limits the number of AgiScripts that can run at the same time. So you should set the poolSize to at least the number of concurrent calls the AgiServer should be able to handle. The default value is 10. These configuration properties can be set by providing a fastagi.properties file on the classpath. This might look like: bindPort = 1234 poolSize = 20 =Stefan _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates. |
From: Brett S. <bs...@no...> - 2006-06-01 07:02:30
|
This sounds like a problem to me. I would prefer the pool size to be a lower limit on the number of concurrent threads not an effective upper limit. Given we are talking about time sensitive processing I don't think that it would be generally consider acceptable to wait for a thread to become available. Given a large server is only like to have say 250 active channels allowing the number of concurrent threads to grow to 250 isn't really an issue. I would vote to have this changed. Stefan Reuter wrote: > Chris Howard wrote: > >> If I'm not mistaken there is a setting for the default thread pool size. >> Bump that up if you have more concurrent agi connection. Ah....here it >> is: >> >> private static final int DEFAULT_POOL_SIZE = 10 >> > > right. though there is no need to change the sources. From the tutorial: > > Configuration > > You can tune the DefaultAgiServer by setting two properties: The > bindPort and the poolSize. > > The bindPort determines the TCP port the server will listen on. By > default this is the FastAGI port 4573. If you change it make sure to > include the new port in the URLs used in extensions.conf. When using > bindPort 1234 your extensions.conf will contain: > > exten => 1300,1,Agi(agi://localhost:1234/hello.agi) > > To understand the poolSize property you need to know that the > DefaultAgiServer uses a fixed size thread pool to serve your AgiScripts. > The poolSize determines how many threads are spawned at startup and thus > limits the number of AgiScripts that can run at the same time. So you > should set the poolSize to at least the number of concurrent calls the > AgiServer should be able to handle. The default value is 10. > > These configuration properties can be set by providing a > fastagi.properties file on the classpath. > > This might look like: > > bindPort = 1234 > poolSize = 20 > > =Stefan > > |
From: Stefan R. <sr...@re...> - 2006-05-31 22:02:52
|
Hi Tony, these are two very good questions :) What I thought of was to make to call to originate asynchronous so that you could pass it some kind of callback (maybe just a property change listener) that is called on changes to the originated channel. What do you think? =3DStefan Tony Mowers wrote: > Stefan, >=20 > =20 >=20 > I=92ve been playing a little bit with the AsteriskManager interface. I= n > my application I have encountered two difficulties: >=20 > =20 >=20 > 1) I have a race condition right after originating the call. I > originate the call, receive the new AsteriskChannel, and then register = a > property change listener with it. I have no way of knowing if the > channel state has changed after origination but before having registere= d > the listener. I can probably synchronize on the channel and get a safe= > result, but it feels a bit awkward. >=20 > 2) There is no way for me to determine the reason for the call > failure when the originate returns null. For example if any of the > origination parameters, such as an illegal channel, caused the failure.= >=20 > =20 >=20 > My application code that wraps the AsteriskManager has an interface > somewhat like a JTapi API. >=20 > =20 >=20 > Call call =3D pbxService.createCall(=85); >=20 > call.addObserver(myObserver()); >=20 > call.connect(); >=20 > =20 >=20 > Does anybody have suggestions for how to deal with (1) and (2)? --=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: Stefan R. <sr...@re...> - 2006-05-31 21:45:12
|
Chris Howard wrote: > If I'm not mistaken there is a setting for the default thread pool size. > Bump that up if you have more concurrent agi connection. Ah....here it > is: > > private static final int DEFAULT_POOL_SIZE = 10 right. though there is no need to change the sources. From the tutorial: Configuration You can tune the DefaultAgiServer by setting two properties: The bindPort and the poolSize. The bindPort determines the TCP port the server will listen on. By default this is the FastAGI port 4573. If you change it make sure to include the new port in the URLs used in extensions.conf. When using bindPort 1234 your extensions.conf will contain: exten => 1300,1,Agi(agi://localhost:1234/hello.agi) To understand the poolSize property you need to know that the DefaultAgiServer uses a fixed size thread pool to serve your AgiScripts. The poolSize determines how many threads are spawned at startup and thus limits the number of AgiScripts that can run at the same time. So you should set the poolSize to at least the number of concurrent calls the AgiServer should be able to handle. The default value is 10. These configuration properties can be set by providing a fastagi.properties file on the classpath. This might look like: bindPort = 1234 poolSize = 20 =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... |
From: Tony M. <to...@am...> - 2006-05-31 20:43:22
|
Stefan, I've been playing a little bit with the AsteriskManager interface. In my application I have encountered two difficulties: 1) I have a race condition right after originating the call. I originate the call, receive the new AsteriskChannel, and then register a property change listener with it. I have no way of knowing if the channel state has changed after origination but before having registered the listener. I can probably synchronize on the channel and get a safe result, but it feels a bit awkward. 2) There is no way for me to determine the reason for the call failure when the originate returns null. For example if any of the origination parameters, such as an illegal channel, caused the failure. My application code that wraps the AsteriskManager has an interface somewhat like a JTapi API. Call call = pbxService.createCall(.); call.addObserver(myObserver()); call.connect(); Does anybody have suggestions for how to deal with (1) and (2)? Anthony Mowers http://www.amowers.com <http://www.amowers.com/> |
From: Chris H. <ch...@as...> - 2006-05-31 20:01:47
|
-----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Jonathan Augenstine Sent: Tuesday, May 30, 2006 1:43 PM To: ast...@li... Subject: [Asterisk-java-users] AGI script problem --I have been experiencing a problem when launching multiple AGI --scripts. What happens is that if more than 10 calls come into the --Asterisk server, the first 10 connect OK but the remaining calls hang --until the first 10 complete. For instance, if 15 calls come in the --Asterisk server I see 15 SIP invite messages and the server responds --with 15 TRYING messages, but only 10 OK messages. The remaining --scripts hang until they either timeout or the initial 10 complete and --then allow the remaining scripts to continue. I am running Asterisk --v1.2.7.1 and Asterisk-Java v0.2. Has anyone else experienced this --issue and what can I do about it? If I'm not mistaken there is a setting for the default thread pool size. Bump that up if you have more concurrent agi connection. Ah....here it is: private static final int DEFAULT_POOL_SIZE = 10 Chris _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.0/352 - Release Date: 5/30/2006 |
From: Stefan R. <sr...@re...> - 2006-05-30 20:24:49
|
test after sourceforge migration of the mailing list. please ignore this message -- 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: Jonathan A. <jau...@st...> - 2006-05-30 18:43:25
|
I have been experiencing a problem when launching multiple AGI scripts. What happens is that if more than 10 calls come into the Asterisk server, the first 10 connect OK but the remaining calls hang until the first 10 complete. For instance, if 15 calls come in the Asterisk server I see 15 SIP invite messages and the server responds with 15 TRYING messages, but only 10 OK messages. The remaining scripts hang until they either timeout or the initial 10 complete and then allow the remaining scripts to continue. I am running Asterisk v1.2.7.1 and Asterisk-Java v0.2. Has anyone else experienced this issue and what can I do about it? Jonathan Augenstine |
From: Stefan R. <sr...@re...> - 2006-05-21 09:51:14
|
Hi, sure the ManagerConnectionPool is in the javadocs for 0.3: http://www.asteriskjava.org/0.3-SNAPSHOT/apidocs/org/asteriskjava/live/in= ternal/ManagerConnectionPool.html but it won't solve your problem. > I don;t know why I am getting this ClassCastException error. If I > restart the server its fine. Please help me eliminate this errors. Yo are calling login() on a connection that is already logged in. In 0.2 you get that ugly ClassCastException in 0.3 you get an IllegalStateException. So the solution is to call login() only once, e.g. when creating the ManagerConnection and not within every thread. =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: Thameem A. <tha...@ya...> - 2006-05-21 04:55:45
|
Hi Stefan, I would like to know where can I find the ManagerConnectionPool. I am looking into the SNAPSHOT 3.0 version javadocs and I don't find any class. I am also having some thread issues with manager connection. Here is my problem details. I am using a agi to authenticate/originate a call and this agi is called from asterisk extensions. This agi also fires an Timer task, and this timer task will set the timeout every 3 minutes after checking the balance of the user who is already in the call. I am following reserve and capture mechanism to do the calculation. So, if there are 10 calls initiated by agi, there are 10 timer tasks running in 10 threads. I am creating one single manager connection and pass them to TimerTask. Each TimerTask's run() method will do the login everytime we need to send the Timeout action. My finally class has the logout() method for the connection. Whenever the channel hangup, i will check the response from asterisk to determine whether I continue run the timertask or cancel. This works without any problem for sometime. I noticed atleast after 2-3 hours i m getting lots of errors in the application server logs. Here are some samples. 2006-05-20 22:01:30,350 [SIP/9000-1811] ERROR com.somepackage.gateway.manager.TimeoutMonitorTask - ERROR: - java.lang.ClassCastException: net.sf.asterisk.manager.response.ManagerError java.lang.ClassCastException: net.sf.asterisk.manager.response.ManagerError at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:442) at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:377) at com.somepackage.gateway.manager.TimeoutMonitorTask.run(Unknown Source) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2006-05-20 22:01:31,269 [SIP/9000-0bff] ERROR com.somepackage.gateway.manager.TimeoutMonitorTask - ERROR: - java.lang.ClassCastException: net.sf.asterisk.manager.response.ManagerResponse java.lang.ClassCastException: net.sf.asterisk.manager.response.ManagerResponse at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:442) at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:377) at com.somepackage.gateway.manager.TimeoutMonitorTask.run(Unknown Source) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2006-05-20 22:01:31,269 [SIP/9000-0bff] ERROR com.somepackage.gateway.manager.TimeoutMonitorTask - ERROR: - java.lang.ClassCastException: net.sf.asterisk.manager.response.ManagerResponse java.lang.ClassCastException: net.sf.asterisk.manager.response.ManagerResponse at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:442) at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:377) at com.somepackage.gateway.manager.TimeoutMonitorTask.run(Unknown Source) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2006-05-20 22:01:31,782 [SIP/9000-ee4b] DEBUG com.somepackage.gateway.manager.TimeoutMonitorTask - [run] - Thread started for Timeout Monitor Task - Sat May 20 22:01:31 EDT 2006 I don;t know why I am getting this ClassCastException error. If I restart the server its fine. Please help me eliminate this errors. Thanks and sorry for the long email, Thameem Stefan Reuter <sr...@re...> wrote: Hi Paul, yes the ManagerConnectionPool is there but it is only used with one connection right now and that works well even with high traffic servers. The idea behind this is using one connection for receiving events and multiple connections with eventMask set to off for sending actions. I am not sure if this design is superior to using only one connections are there are rumors that Asterisk has synchronisation issues when using multiple concurrent connections. So if you did not experience any problems up to now you are probably fine with just one connection. =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... --------------------------------- Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. |
From: Stefan R. <sr...@re...> - 2006-05-20 19:55:29
|
Hi Paul, yes the ManagerConnectionPool is there but it is only used with one connection right now and that works well even with high traffic servers. The idea behind this is using one connection for receiving events and multiple connections with eventMask set to off for sending actions. I am not sure if this design is superior to using only one connections are there are rumors that Asterisk has synchronisation issues when using multiple concurrent connections. So if you did not experience any problems up to now you are probably fine with just one connection. =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... |