asterisk-java-users Mailing List for Asterisk-Java Library (Page 176)
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: Ben H. <bra...@gm...> - 2005-05-18 23:47:48
|
The asterisk-java.patch should work on the 0.2 snapshot dated 5/8. The asterisk.patch should work on asterisk 1.0.7 I went ahead and added 2 new objects: Call and Originate (for lack of a better name). Since there are so many parameters that are possible for an originate I just copied the relevant parts of OriginateAction instead of breaking it into several smaller objects like Channel and DialPlanEntry, etc. I think it can stand some refactoring in the future. Feel free to make modifications and/or tell me how to clean it up. Changes in the patch: 1. AsteriskManager Originate signature and it now also throws generic Exceptions to cover other possible implementations or circumstances. (ie InterruptedException when the thread waits for the Originate to finish). 2. Added event handlers for the Originate related events to DefaultAsteriskManager 3. Added a calls map to DefaultAsteriskManager to keep track of the calls that are going out by actionid. They are removed after they originate, but could be stored and used later. (maybe combined w/ channel for CDR like information) 4. Changed DefaultManagerConnection createInternalActionId to createUniqueActionId and made it part of the interface. (it was useful to create a connection specific uniqueid) 5. Added uniqueId and reason to the Originate Events (as per the asterisk implementation in CVS) With these changes, It works with the * implementation of the uniqueId tracking that is implemented in the latest CVS and the provided patch to 1.0.7. It might not work with your bristuff patched system unless bristuff also added the uniqueid and reason to the originate events. Since *-j didn't have these, I assume it is probably not in there. It should be possible with a few modifications to work with both mainstream and bristuff branches of asterisk. ie just check for uniqueid in the response and use that instead of actionid for the calls map and event handlers. There may be a small race possibility if * sends back the originate event before the sendAction call returns and the call is put in the calls collection. The Async=3Dtrue setting should make this a slim possibility but still a possibility. Any ideas? - Ben |
From: <MAI...@me...> - 2005-05-18 08:46:55
|
This is the mail delivery agent at messagelabs.com. I was not able to deliver your message to the following addresses. <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: <E1D...@te...>: 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable 63.75.216.4 does not like recipient. Remote host said: 550 Requested action not taken: mailbox unavailable --- Below this line is a copy of the message. Return-Path: <ast...@li...> X-VirusChecked: Checked X-Env-Sender: ast...@li... X-Msg-Ref: server-6.tower-108.messagelabs.com!1116405934!27747251!1 X-StarScan-Version: 5.4.15; banners=-,-,- X-Originating-IP: [216.59.227.175] Received: (qmail 5098 invoked from network); 18 May 2005 08:46:42 -0000 Received: from 227-175.speede.golden.net (HELO gkpnc.net) (216.59.227.175) by server-6.tower-108.messagelabs.com with SMTP; 18 May 2005 08:46:42 -0000 From: ast...@li... To: E1D...@te... Date: Wed, 18 May 2005 08:30:43 GMT Subject: Deutsche Buerger trauen sich nicht ... Importance: Normal X-Priority: 3 (Normal) MIME-Version: 1.0 Message-ID: <ffb...@li...> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Auslaenderbanden terrorisieren Wahlkampf - deutsche Buerger trauen sich nicht ihre Meinung zu sagen! Weiter auf: http://www.npd-nrw.net/aktuelles/03_2005/ak_presse_nrw_1603.htm Auslaender ueberfallen nationale Aktivisten: http://www.npd.de/npd_info/meldungen/2005/m0505-13.html http://www.npd.de/npd_info/meldungen/2005/m0505-14.html ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
From: Stefan R. <sr...@re...> - 2005-05-17 23:07:49
|
> Would it make sense to create a psudo ManagerResponse called > OriginateResponse that has all of the info? ie proposed new method: >=20 > public OriginateResponse originateCall(OriginateAction > originateAction, long timeout) throws TimeoutException, IOException the AsteriskManager interface is meant to me more abstract, so you dont have to handle the details of actions and responses. If you look at getCalls() for example thats how i think it should work. The current method String originateCall(OriginateAction originateAction) is therefore not that well designed as the signature should not depend on the OriginateAction. Returning only the uniqueId isn't sufficient either as we also need to indicate success or failure. The best way would be to design some more "domain objects" like Channel or Queue that can be translated to and from events and actions. I think of something like Call originateCall(String sourceChannel, DialPlanEntry destination) throws OriginateFailureException Call originateCall(String sourceChannel, Application destination) throws OriginateFailureException assuming Call to be a collection of linked (bridged) channels, DialPlanEntry to contain exten, contect and priority and Application to contain application and data. whats your opinion on this? =3DStefan |
From: Ben H. <bra...@gm...> - 2005-05-17 22:46:27
|
On 5/17/05, Stefan Reuter <sr...@re...> wrote: >=20 > I hope those events include the ActionId sent with your OriginateAction. > Several Actions don't send their result as a Response but use > ManagerEvents instead. Another famous examples for this is the > StatusAction. Leaving all these details up to the user of Asterisk-Java > seems not to be the best solution. Yes, they do. The events only get posted if the Originate is Async though. >=20 > So if you would like to contribute feel free to change the originateCall > method in the DefaultAsteriskManager and submit your patches. Sure, I would be happy to contribute. Would it make sense to create a psudo ManagerResponse called OriginateResponse that has all of the info? ie proposed new method: public OriginateResponse originateCall(OriginateAction originateAction, long timeout) throws TimeoutException, IOException The originate would also have to set the action's Async setting. Let me know what you think and I'll get to work :-) - Ben |
From: Stefan R. <sr...@re...> - 2005-05-17 22:13:51
|
On Tue, 2005-05-17 at 14:54 -0700, Ben Hencke wrote: > I'm working on a method to do an originate and listen for the events. > This should be compatible with future versions of asterisk that at > least have the UniqueId in the Originate related events. > I'll post some code and interim * patches when I have it working. I hope those events include the ActionId sent with your OriginateAction. Several Actions don't send their result as a Response but use ManagerEvents instead. Another famous examples for this is the StatusAction. Leaving all these details up to the user of Asterisk-Java seems not to be the best solution.=20 So if you would like to contribute feel free to change the originateCall method in the DefaultAsteriskManager and submit your patches. =3DStefan |
From: Ben H. <bra...@gm...> - 2005-05-17 21:54:06
|
I tried the bristuff patches, but everything is glommed into one patch that seems to be incompatible with my sangoma card :-( I back-ported the 1.85 patch to a fresh 1.0.7, only to realize that it only affects the OriginateSuccess event or the OriginateFailure event, and does nothing for the response. This would still be somewhat useful as the OriginateSuccess/Failure events have the ActionID in it and that could be used to track the call progress and get the UniqueId. I checked out the latest manager.c (CVS 1.97) and there is still nothing for uniqueid in the response. I'm working on a method to do an originate and listen for the events. This should be compatible with future versions of asterisk that at least have the UniqueId in the Originate related events. I'll post some code and interim * patches when I have it working. Thanks again for the help and thanks for asterisk-java :-) - Ben On 5/16/05, Ben Hencke <bra...@gm...> wrote: > I was running CVS-v1-0-04/07/05 > I will get 1.0.7 and use the bristuff patches and save some time :-) > Thanks for the info! > - Ben >=20 >=20 > On 5/16/05, Stefan Reuter <sr...@re...> wrote: > > Hi Ben, > > > > sorry for the late response. > > > > > There is no UniqueId in the manager response. I did some digging, and > > > I don't think it is in any released version of asterisk. Googling the > > > lists, it looks like it was added in manager.c CVS version 1.85, but > > > Asterisk 1.0.7 only has 1.74.2.1 > > Yes thats what I found too. > > I am using the bristuff patches from junghanns.net. These include the > > UniqueId for the Response to OriginateAction. > > > > What version of Asterisk are you using? 1.0.7? > > > > =3DStefan > > > > > > BodyID:212166270.2.n.logpart (stored separately) > > > > > |
From: Ben H. <bra...@gm...> - 2005-05-16 23:51:05
|
I was running CVS-v1-0-04/07/05 I will get 1.0.7 and use the bristuff patches and save some time :-) Thanks for the info! - Ben On 5/16/05, Stefan Reuter <sr...@re...> wrote: > Hi Ben, >=20 > sorry for the late response. >=20 > > There is no UniqueId in the manager response. I did some digging, and > > I don't think it is in any released version of asterisk. Googling the > > lists, it looks like it was added in manager.c CVS version 1.85, but > > Asterisk 1.0.7 only has 1.74.2.1 > Yes thats what I found too. > I am using the bristuff patches from junghanns.net. These include the > UniqueId for the Response to OriginateAction. >=20 > What version of Asterisk are you using? 1.0.7? >=20 > =3DStefan >=20 >=20 > BodyID:212166270.2.n.logpart (stored separately) >=20 > |
From: Stefan R. <sr...@re...> - 2005-05-16 23:21:55
|
Hi Ben, sorry for the late response. > There is no UniqueId in the manager response. I did some digging, and > I don't think it is in any released version of asterisk. Googling the > lists, it looks like it was added in manager.c CVS version 1.85, but > Asterisk 1.0.7 only has 1.74.2.1 Yes thats what I found too. I am using the bristuff patches from junghanns.net. These include the UniqueId for the Response to OriginateAction. What version of Asterisk are you using? 1.0.7? =3DStefan |
From: Ben H. <bra...@gm...> - 2005-05-16 23:08:52
|
I think I found the problem.=20 I recreated an originate command and sent it manually to * (using telnet). There is no UniqueId in the manager response. I did some digging, and I don't think it is in any released version of asterisk. Googling the lists, it looks like it was added in manager.c CVS version 1.85, but Asterisk 1.0.7 only has 1.74.2.1 I will try to port the changes back in to my version. - Ben |
From: Ben H. <bra...@gm...> - 2005-05-16 00:57:05
|
A little more info... I have tried several times since, and am still unable to get the UniqueId from the response. All of the events have UniqueId, but the response does not. The following is the output of dumping every event and the response on an originate from a Zap channel and answering as soon as possible: net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=3DSun May 15 17= :49:03 PDT 2005; systemHashcode=3D3853415 Channel =3D Zap/1-1 State =3D Rsrvd UniqueId =3D 1116200804.74 CallerId =3D <unknown> CallerIdName =3D null DateReceived =3D Sun May 15 17:49:03 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewChannelEvent net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=3DSun May 15 1= 7:49:03 PDT 2005; systemHashcode=3D4301103 Channel =3D Zap/1-1 UniqueId =3D 1116200804.74 CallerId =3D xxxxxxxxxx CallerIdName =3D null DateReceived =3D Sun May 15 17:49:03 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewCallerIdEvent net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=3DSun May 15 1= 7:49:03 PDT 2005; systemHashcode=3D12406332 Channel =3D Zap/1-1 UniqueId =3D 1116200804.74 CallerId =3D xxxxxxxxxx CallerIdName =3D null DateReceived =3D Sun May 15 17:49:03 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewCallerIdEvent net.sf.asterisk.manager.event.NewStateEvent: dateReceived=3DSun May 15 17:4= 9:03 PD T 2005; systemHashcode=3D5994703 Channel =3D Zap/1-1 State =3D Dialing UniqueId =3D 1116200804.74 CallerId =3D xxxxxxxxxx CallerIdName =3D null DateReceived =3D Sun May 15 17:49:03 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewStateEvent net.sf.asterisk.manager.event.NewStateEvent: dateReceived=3DSun May 15 17:4= 9:04 PD T 2005; systemHashcode=3D22577957 Channel =3D Zap/1-1 State =3D Ringing UniqueId =3D 1116200804.74 CallerId =3D xxxxxxxxxx CallerIdName =3D null DateReceived =3D Sun May 15 17:49:04 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewStateEvent net.sf.asterisk.manager.event.NewStateEvent: dateReceived=3DSun May 15 17:4= 9:06 PD T 2005; systemHashcode=3D666168 Channel =3D Zap/1-1 State =3D Up UniqueId =3D 1116200804.74 CallerId =3D xxxxxxxxxx CallerIdName =3D null DateReceived =3D Sun May 15 17:49:06 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewStateEvent net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=3DSun May 15 17:4= 9:06 PD T 2005; systemHashcode=3D3559661 Context =3D astagi Priority =3D 1 Channel =3D Zap/1-1 UniqueId =3D 1116200804.74 Extension =3D s Application =3D AGI AppData =3D agi://10.25.25.100/outbound.agi DateReceived =3D Sun May 15 17:49:06 PDT 2005 Source =3D AsteriskServer[hostname=3D'10.25.25.12',port=3D5038] Class =3D class net.sf.asterisk.manager.event.NewExtenEvent net.sf.asterisk.manager.response.ManagerResponse: actionId=3D'null'; messag= e=3D'Orig inate successfully queued'; response=3D'Success'; uniqueId=3D'null'; system= Hashcode=3D 22669966 Message =3D Originate successfully queued Attributes =3D {actionid=3D4059123_4#, message=3DOriginate successf= ully queued , response=3DSuccess} Response =3D Success UniqueId =3D null ActionId =3D null DateReceived =3D Sun May 15 17:49:06 PDT 2005 Class =3D class net.sf.asterisk.manager.response.ManagerResponse [snip remainder of call] The call went through just. All of the following events have the UniqueId. Is there another way to track the events to the originate?=20 Thanks again, Ben |
From: Ben H. <bra...@gm...> - 2005-05-12 21:01:53
|
On 5/12/05, Stefan Reuter <ste...@po...> wrote: > Hi Ben, >=20 > what interface do you use to send the originate action? AsteriskManager o= r AsteriskConnection? I got a ManagerConnection, then created an originate action, then did: originateResponse =3D managerConnection.sendAction(originateAction, 65000); I'm not sure which that counts as... :-) >=20 > The response to the OriginateAction is not sent until the first channel h= as been answered. So if the timeout Asterisk-Java uses to wait for the resp= onse is smaller than the time you need to pick up the phone, no response ha= s yet been received and your uniqueId will be null. Is that the 2nd param to sendAction or some * config? 65000 is the actual value I used, and the phone picks up after 2 rings. >=20 > Please verify this by picking up the phone immediately (I think the defau= lt timeout is 3 seconds, so within at least 3 seconds after sending the Ori= ginateAction). > If this works we have to adjust the timeout to a more sensible value. Where can I find the 3 second setting? I should also mention that this is going out on a VoIP channel, so there is a small added delay between the originate command and the time * actually gets the channel, perhaps at most a second. Thanks! Ben |
From: Stefan R. <ste...@po...> - 2005-05-12 07:39:24
|
Hi Ben, what interface do you use to send the originate action? AsteriskManager or AsteriskConnection? The response to the OriginateAction is not sent until the first channel has been answered. So if the timeout Asterisk-Java uses to wait for the response is smaller than the time you need to pick up the phone, no response has yet been received and your uniqueId will be null. Please verify this by picking up the phone immediately (I think the default timeout is 3 seconds, so within at least 3 seconds after sending the OriginateAction). If this works we have to adjust the timeout to a more sensible value. Regards =Stefan |
From: Ben H. <bra...@gm...> - 2005-05-11 18:12:43
|
Hi, I am trying to send out a call and track the call progress to know if it went through and if not what the cause was. When I get the response from the originate, the uniqueid is null making it very hard to tell what events belong to the originate. All of the events have the uniqueid, but without it set in the response, is there a way to tell what belongs to what? I am using the 0.1 release. Thanks in advance, Ben |
From: Stefan R. <sr...@re...> - 2005-05-08 12:42:36
|
> Um, just change return "GET DATA " + escapeAndQuote(file) + " " + > timeout + ... > to "GET DATA " + escapeAndQuote(file) + " " + (timeout != 0 ? > timeout : "") > and likewise for maxDigits. ok I changed it so that timeout and maxDigits are only included when needed. It seems kinda inconstent as timeout must be send if maxDigits is sent. so if timeout is not set setting maxDigits decides whether to sent a 0 for timeout or not. Thats where I adopted "Consistency is the hobgoblin of small minds" *g* =Stefan |
From: Stefan R. <sr...@re...> - 2005-05-08 12:20:18
|
On Sun, 2005-05-08 at 01:08 -0500, Chad Kitching wrote: > I've posted my port of Asterisk-Java to the web. It's available under > the Apache License 2.0. Thanks for providing the code, I will have a look at it as time permits. I am really interested in how different the C# implementation is compared to the Java one. I added a link to your site from Asterisk-Java's homepage. If you are interested in the changes since you downloaded Asterisk-Java and say the 0.1 release you can have a look at the fisheye instance I set up for Asterisk-Java that is available at http://maven.reucon.com/fisheye/viewrep/asterisk-java/ =Stefan |
From: Chad K. <ch...@cm...> - 2005-05-08 06:07:12
|
I've posted my port of Asterisk-Java to the web. It's available under the Apache License 2.0. The FastAGI bits don't compile at this time, and therefore do not work, but the Manager API stuff appears to work, although there may yet be some badly translated code in there. Most of the code is from an automatic conversion tool, and it's still filled with warning comments about certain structures having different behaviours. When I get the time, I'm working on investigating and removing those comments as needed. The hardest part of converting it so far has been rewriting the parts that used reflection, and those weren't even difficult when I figured out what the original java code was trying to accomplish. Anyone who wants it can download it from: http://www3.mb.sympatico.ca/~chadk/ Thanks to Stefan for creating one of the best interfaces to the Asterisk Manager API I've seen (in any language). Chad Kitching |
From: Steve D. <Ste...@Su...> - 2005-05-03 23:44:02
|
On Apr 29, 2005, at 4:56 PM, Stefan Reuter wrote: >>> It seems to me that "GET DATA foo" is translated to "GET DATA foo 0 >>> 1024" and thats exactly what asterisk-java sends. right? >>> >> >> Yes, that is what it sends. I think it should send "GET DATA foo". >> > > hmm we could do this, though it would imply to use nullable Integers > instead of the easier to use ints for timeout and maxDigits. Um, just change return "GET DATA " + escapeAndQuote(file) + " " + timeout + ... to "GET DATA " + escapeAndQuote(file) + " " + (timeout != 0 ? timeout : "") and likewise for maxDigits. > That would > make GetDataCommand quite different from the other Commands that use > primitive attributes. "Consistency is the hobgoblin of small minds" ;-) > Nevertheless asterisk uses a default timeout of 0 and a default > maxDigits of 1024, so there is really no semantic difference > between the > two. In fact there is. If you send "GET FILE foo", then ast_readstring_full gets timeout=2000 and ftimeout=6000. But if you send "GET FILE foo 0 1024, then timeout=ftimeout=6000. > You might consider this knowledge of asterisk internals a violation > of encapsulation practices but some knowledge is needed anyway > (i.e. to > enforce the maximum maxDigits of 1024 to prevent buffer overflows, see > below). Not at all. Asterisk enforces the max length of 1024 as it should, since it owns the buffer. Asterisk-java has no business knowing this. Nor should it care as long as it sends the syntactically correct GET DATA command, which is documented in res_agi.c as: GET DATA <file to be streamed> [timeout] [max digits] Which actually is wrong. It should be: GET DATA <file to be streamed> [timeout [max digits]] > Using 1024 as maxDigits is the maximum number of digits GET DATA can > handle anyway as the buffer that is used by asterisk is defined as > char data[1024]. Although asterisk does not enforce a maximum of 1024 > reading more digits would result in a buffer overflow. Actually, Asterisk does enforce the 1024 limit. |
From: Stefan R. <sr...@re...> - 2005-05-03 21:08:37
|
On Tue, 2005-05-03 at 12:17 -0700, Steve Drach wrote: > So, it seems where the patterns are "^200 result=3D//S+ ", they should > be > "^200 result=3D//S* +" (just in case there is more than 1 blank) Thanks, I fixed it in CVS. =3DStefan |
From: Steve D. <Ste...@Su...> - 2005-05-03 19:19:12
|
Apparently it's legal to get this reply from Asterisk: 200 result= (timeout) I got that from a GetData command So, it seems where the patterns are "^200 result=//S+ ", they should be "^200 result=//S* +" (just in case there is more than 1 blank) |
From: Stefan R. <sr...@re...> - 2005-04-30 18:33:15
|
Asterisk-java 0.1 a Java control for the Asterisk PBX has been released. The Asterisk-java package consists of a set of Java classes that allow you to easily build Java applications that interact with an Asterisk PBX Server. Asterisk-java supports both interfaces that Asterisk provides for this scenario: The FastAGI protocol and the Manager API. The FastAGI implementation supports all commands currently available from Asterisk. The Manager API implementation supports receiving events from the Asterisk server (e.g. call progess, registered peers, channel state) and sending actions to Asterisk (e.g. originate call, agent login/logoff, start/stop voice recording). Asterisk-java is available under Apache 2.0 license at http://asterisk-java.sourceforge.net |
From: Stefan R. <sr...@re...> - 2005-04-29 23:57:01
|
> > It seems to me that "GET DATA foo" is translated to "GET DATA foo 0 > > 1024" and thats exactly what asterisk-java sends. right? >=20 > Yes, that is what it sends. I think it should send "GET DATA foo". hmm we could do this, though it would imply to use nullable Integers instead of the easier to use ints for timeout and maxDigits. That would make GetDataCommand quite different from the other Commands that use primitive attributes. Nevertheless asterisk uses a default timeout of 0 and a default maxDigits of 1024, so there is really no semantic difference between the two. You might consider this knowledge of asterisk internals a violation of encapsulation practices but some knowledge is needed anyway (i.e. to enforce the maximum maxDigits of 1024 to prevent buffer overflows, see below). Using 0 as timeout indicates "default timeout" and thats defined as 6000 in app.c ast_app_getdata_full(..). Using 1024 as maxDigits is the maximum number of digits GET DATA can handle anyway as the buffer that is used by asterisk is defined as char data[1024]. Although asterisk does not enforce a maximum of 1024 reading more digits would result in a buffer overflow. =3DStefan |
From: Steve D. <Ste...@Su...> - 2005-04-29 23:40:36
|
> On Fri, 2005-04-29 at 16:17 -0700, Steve Drach wrote: >> It is legal to send this command to asterisk "GET DATA foo". This >> implies a six second timeout and unlimited digits. But new >> GetDataCommand("foo") translates to "GET DATA foo 0 1024", >> which really isn't the same thing. ... > It seems to me that "GET DATA foo" is translated to "GET DATA foo 0 > 1024" and thats exactly what asterisk-java sends. right? Yes, that is what it sends. I think it should send "GET DATA foo". |
From: Stefan R. <sr...@re...> - 2005-04-29 23:33:05
|
On Fri, 2005-04-29 at 16:17 -0700, Steve Drach wrote: > It is legal to send this command to asterisk "GET DATA foo". This=20 > implies a six second timeout and unlimited digits. But new=20 > GetDataCommand("foo") translates to "GET DATA foo 0 1024", > which really isn't the same thing. >=20 when having a look at asterisk's res/res_agi.c the corresponding function is: static int handle_getdata(struct ast_channel *chan, AGI *agi, int argc, char *argv[]) { int res; char data[1024]; int max; int timeout; if (argc < 3) return RESULT_SHOWUSAGE; if (argc >=3D 4) timeout =3D atoi(argv[3]); else timeout =3D 0; if (argc >=3D 5) max =3D atoi(argv[4]); else max =3D 1024; [...] } It seems to me that "GET DATA foo" is translated to "GET DATA foo 0 1024" and thats exactly what asterisk-java sends. right? =3DStefan |
From: Steve D. <Ste...@Su...> - 2005-04-29 23:17:36
|
It is legal to send this command to asterisk "GET DATA foo". This implies a six second timeout and unlimited digits. But new GetDataCommand("foo") translates to "GET DATA foo 0 1024", which really isn't the same thing. |
From: Stefan R. <sr...@re...> - 2005-04-25 22:03:05
|
On Mon, 2005-04-25 at 08:57 -0300, Camila Franco wrote: > I want to logoff an agent, but I=B4m not the agent.I think it is > possible with AGI but I would like to know if there is any other way, > without using the AGIs classes. You can also do this via the Manager API, an OriginateAction and a special dialplan. It's kinda tricky but it's explained here: http://www.voip-info.org/wiki-Asterisk+cmd+AgentCallbackLogin =3DStefan >=20 |