asterisk-java-users Mailing List for Asterisk-Java Library (Page 166)
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: Jan G. du T. <s22...@tu...> - 2005-12-13 10:09:37
|
Hi. The constructor of StopMonitor which receives a String as a channel ID is empty: public StopMonitorAction(String channel) { } should be: public StopMonitorAction(String channel) { this.channel = channel; } I don't now if this is the correct mailing list to send to for a bug/fix report. Sorry if it isn't -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan G. du T. <s22...@tu...> - 2005-12-13 08:24:37
|
Hi. Can *-J handle muting? Their doesn't seem to be a MutingAction for the Manager. AGI maybe? Thx. -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan G. du T. <s22...@tu...> - 2005-12-13 06:24:58
|
Problem solved:) I'm seeing the unique channel names now. Thank you very much Stefan. Cheers. Stefan Reuter wrote: >On Tue, 2005-12-13 at 08:04 +0200, Jan Gerryt du Toit wrote: > > >>And then I have a "dial" method with the code as before, containing the login, >>action, logoff.. >> >> > >initialize() already contains the login so you to log in two times >which causes an error. remove the second login. > >=Stefan > > |
From: Stefan R. <sr...@re...> - 2005-12-13 06:15:21
|
On Tue, 2005-12-13 at 08:04 +0200, Jan Gerryt du Toit wrote: > And then I have a "dial" method with the code as before, containing the l= ogin, > action, logoff.. initialize() already contains the login so you to log in two times which causes an error. remove the second login. =3DStefan=20 |
From: Jan G. du T. <s22...@tu...> - 2005-12-13 06:04:50
|
Hi it is Jan (Channel Extraction). Im emailing from a different email account, because SpamCOP blacklisted our companies SMTP server, because of all the mail I send to this mailinglist yesterday. No I did not call initialize(). But now that I do, when it gets to a managerConnection.login() statement the program bombs out with a classcastexception: Exception in thread "main" 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) The class constructor contains the code that you stated previously: managerConnection = new DefaultManagerConnection(); managerConnection.setHostname("10.13.0.55"); managerConnection.setUsername("manager"); managerConnection.setPassword("pa55w0rd"); manager = new DefaultAsteriskManager(); manager.setManagerConnection(managerConnection); manager.initialize(); And then I have a "dial" method with the code as before, containing the login, action, logoff.. When I make use of the ManagerConnectionFactory I get the same problem. Cheers. Stefan Reuter wrote: > hmm here this stuff works. > did you call initialize() in AsteriskManager? > > what i do is sth like: > > managerConnection = new DefaultManagerConnection(); > managerConnection.setHostname("10.13.0.55"); > managerConnection.setUsername("manager"); > managerConnection.setPassword("pa55w0rd"); > > manager = new DefaultAsteriskManager(); > manager.setManagerConnection(managerConnection); > manager.initialize(); > ... > > =Stefan > |
From: Stefan R. <sr...@re...> - 2005-12-13 00:01:33
|
the monitor files usually end up in /var/spool/asterisk/monitor on the asterisk box =3DStefan On Mon, 2005-12-12 at 16:36 +0200, Jan du Toit wrote: > Hi. >=20 > (Sorry for bombing the mailing list today). >=20 > For the MonitorAction. Lets say we construct it as follows: > =3D new MonitorAction("SIP\Jan-05gd","test"); >=20 > Were exactly is the file test.wav saved? Is it on the server or on the=20 > machine were the java code is executed? > I can't seem to find it:( >=20 > Their is something in the JavaDocs that says the default is as the=20 > channel name in the CLI only with "-" replaced by "\" is the recorded=20 > file then > in a directory structure as follows: SIP\Jan\05gd\test.wav? >=20 > Can someone please tell me. >=20 > Thank you. >=20 |
From: Stefan R. <sr...@re...> - 2005-12-12 22:30:26
|
hmm here this stuff works. did you call initialize() in AsteriskManager? what i do is sth like: managerConnection =3D new DefaultManagerConnection(); managerConnection.setHostname("10.13.0.55"); managerConnection.setUsername("manager"); managerConnection.setPassword("pa55w0rd"); manager =3D new DefaultAsteriskManager(); manager.setManagerConnection(managerConnection); manager.initialize(); ... =3DStefan On Mon, 2005-12-12 at 15:27 +0200, Jan du Toit wrote: > To reproduce the problem, here is the relevant code snippet: > Originate org; > Call call; > //login... > managerConnection.login(); >=20 > org =3D new Originate(); > org.setCallerId("JanDT"); > org.setChannel("SIP/Jan"); > org.setContext("sgs"); > org.setExten(getExtensionNumber()); //this is just the > number which we want to dial. > org.setPriority(new Integer(1)); > org.setTimeout(new Long(30000)); =20 > =20 > call =3D this.asteriskManager.originateCall(org); > str +=3D "CALL:"+call.getChannel()+"\n"; //this returns null > str +=3D "ID:"+call.getUniqueId()+"\n"; //this seems to return > the ID correctly. > =20 > Channel ch =3D > (this.asteriskManager).getChannelById(call.getUniqueId()); > if(ch !=3D null) > str +=3D ch.toString(); > else > str +=3D "Channel is NULL"; //it is null > =20 > //try to see all the active channels... > str +=3D "Channels mappings\n"; > Map c =3D this.asteriskManager.getChannels(); > Collection channels =3D c.values(); > str +=3D "# of active channels:"+channels.size()+"\n"; > //this is always 0, showing it is empty. > for(Object cc : channels) { > str +=3D "channel:"+cc.toString()+"\n"; > } =20 >=20 > //logoff =20 > managerConnection.logoff(); > ... >=20 > It is a 1.2 version. I have now quick way to check if this problem > occurs on 1.0x vesrions either than by installing one:( >=20 > Too give you some good news if you inject the HangupAction with a > correct channel id (eg SIP\Jan-random#), which I got from the asterisk > show channels command, it works correctly. >=20 >=20 > Stefan Reuter wrote:=20 > > Jan du Toit schrieb: > > =20 > > > The asteriskManager.getChannels(), is it suppose to show all the acti= ve > > > channels on the asterisk server or just those that we originated usin= g > > > Asterisk-Java? > > > =20 > >=20 > > it is supposed to return all active calls regardless who created them. > > i must try to reproduce this problem... does it happen with other > > versions of asterisk, too? (i.e. 1.0.x or 1.2.0) > >=20 > > =20 > > > asteriskManager.getChannels() is empty even if their is active channe= ls > > > open on the relevant asterisk server at the time of qeuring. > > > =20 > >=20 > > this is certainly not correct. > > =20 >=20 >=20 > --=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > Jan Gerryt du Toit > Software Developer > DecisionWorx > Cell : +27721769536 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D |
From: Jan du T. <jan...@de...> - 2005-12-12 14:38:46
|
Hi. (Sorry for bombing the mailing list today). For the MonitorAction. Lets say we construct it as follows: = new MonitorAction("SIP\Jan-05gd","test"); Were exactly is the file test.wav saved? Is it on the server or on the machine were the java code is executed? I can't seem to find it:( Their is something in the JavaDocs that says the default is as the channel name in the CLI only with "-" replaced by "\" is the recorded file then in a directory structure as follows: SIP\Jan\05gd\test.wav? Can someone please tell me. Thank you. -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan du T. <jan...@de...> - 2005-12-12 13:29:01
|
To reproduce the problem, here is the relevant code snippet: Originate org; Call call; //login... managerConnection.login(); org = new Originate(); org.setCallerId("JanDT"); org.setChannel("SIP/Jan"); org.setContext("sgs"); org.setExten(getExtensionNumber()); //this is just the number which we want to dial. org.setPriority(new Integer(1)); org.setTimeout(new Long(30000)); call = this.asteriskManager.originateCall(org); str += "CALL:"+call.getChannel()+"\n"; //this returns null str += "ID:"+call.getUniqueId()+"\n"; //this seems to return the ID correctly. Channel ch = (this.asteriskManager).getChannelById(call.getUniqueId()); if(ch != null) str += ch.toString(); else str += "Channel is NULL"; //it is null //try to see all the active channels... str += "Channels mappings\n"; Map c = this.asteriskManager.getChannels(); Collection channels = c.values(); str += "# of active channels:"+channels.size()+"\n"; //this is always 0, showing it is empty. for(Object cc : channels) { str += "channel:"+cc.toString()+"\n"; } //logoff managerConnection.logoff(); ... It is a 1.2 version. I have now quick way to check if this problem occurs on 1.0x vesrions either than by installing one:( Too give you some good news if you inject the HangupAction with a correct channel id (eg SIP\Jan-random#), which I got from the asterisk show channels command, it works correctly. Stefan Reuter wrote: >Jan du Toit schrieb: > > >>The asteriskManager.getChannels(), is it suppose to show all the active >>channels on the asterisk server or just those that we originated using >>Asterisk-Java? >> >> > >it is supposed to return all active calls regardless who created them. >i must try to reproduce this problem... does it happen with other >versions of asterisk, too? (i.e. 1.0.x or 1.2.0) > > > >>asteriskManager.getChannels() is empty even if their is active channels >>open on the relevant asterisk server at the time of qeuring. >> >> > >this is certainly not correct. > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Stefan R. <sr...@re...> - 2005-12-12 13:14:58
|
Jan du Toit schrieb: > The asteriskManager.getChannels(), is it suppose to show all the active > channels on the asterisk server or just those that we originated using > Asterisk-Java? it is supposed to return all active calls regardless who created them. i must try to reproduce this problem... does it happen with other versions of asterisk, too? (i.e. 1.0.x or 1.2.0) > asteriskManager.getChannels() is empty even if their is active channels > open on the relevant asterisk server at the time of qeuring. this is certainly not correct. |
From: Jan du T. <jan...@de...> - 2005-12-12 12:43:00
|
The asteriskManager.getChannels(), is it suppose to show all the active channels on the asterisk server or just those that we originated using Asterisk-Java? asteriskManager.getChannels() is empty even if their is active channels open on the relevant asterisk server at the time of qeuring. Jan du Toit wrote: > Sorry the previous trace is incorrect (it was generated running old > code): > > Look at this one: > > net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=Mon Dec 12 > 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=25872184 > net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=Mon Dec > 12 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=1925270 > net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=Mon Dec > 12 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=11546234 > net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=Mon Dec 12 > 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=12282550 > net.sf.asterisk.manager.event.NewStateEvent: dateReceived=Mon Dec 12 > 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=5963049 > net.sf.asterisk.manager.event.OriginateSuccessEvent: dateReceived=Mon > Dec 12 14:16:39 GMT+02:00 2005; privilege=call,all; > systemHashcode=27432475 > net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 > 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=22936951 > net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 > 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=28035001 > net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 > 14:16:51 GMT+02:00 2005; privilege=call,all; systemHashcode=12934710 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan du T. <jan...@de...> - 2005-12-12 12:19:22
|
Sorry the previous trace is incorrect (it was generated running old code): Look at this one: net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=Mon Dec 12 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=25872184 net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=Mon Dec 12 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=1925270 net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=Mon Dec 12 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=11546234 net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=Mon Dec 12 14:16:34 GMT+02:00 2005; privilege=call,all; systemHashcode=12282550 net.sf.asterisk.manager.event.NewStateEvent: dateReceived=Mon Dec 12 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=5963049 net.sf.asterisk.manager.event.OriginateSuccessEvent: dateReceived=Mon Dec 12 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=27432475 net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=22936951 net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 14:16:39 GMT+02:00 2005; privilege=call,all; systemHashcode=28035001 net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 14:16:51 GMT+02:00 2005; privilege=call,all; systemHashcode=12934710 |
From: Jan du T. <jan...@de...> - 2005-12-12 12:14:53
|
>Is the channel available if you callgetChannels() on the DefaultAsteriskManager? > > No the channel is not available. Trace of events: Dec 12, 2005 2:10:35 PM net.sf.asterisk.util.impl.JavaLoggingLog info INFO: Connecting to 196.0.0.195 port 5038 net.sf.asterisk.manager.event.ConnectEvent: dateReceived=Mon Dec 12 14:10:40 GMT+02:00 2005; systemHashcode=9042915 Dec 12, 2005 2:10:40 PM net.sf.asterisk.util.impl.JavaLoggingLog info INFO: Connected via Asterisk Call Manager/1.0 Dec 12, 2005 2:10:40 PM net.sf.asterisk.util.impl.JavaLoggingLog info INFO: Successfully logged in Dec 12, 2005 2:10:40 PM net.sf.asterisk.util.impl.JavaLoggingLog info INFO: Determined Asterisk version: Asterisk 1.2 net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=Mon Dec 12 14:10:42 GMT+02:00 2005; privilege=call,all; systemHashcode=24212267 net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=Mon Dec 12 14:10:42 GMT+02:00 2005; privilege=call,all; systemHashcode=20989238 net.sf.asterisk.manager.event.NewChannelEvent: dateReceived=Mon Dec 12 14:10:42 GMT+02:00 2005; privilege=call,all; systemHashcode=8379614 net.sf.asterisk.manager.event.NewStateEvent: dateReceived=Mon Dec 12 14:10:42 GMT+02:00 2005; privilege=call,all; systemHashcode=8225923 net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 14:10:42 GMT+02:00 2005; privilege=call,all; systemHashcode=8843841 net.sf.asterisk.manager.event.NewExtenEvent: dateReceived=Mon Dec 12 14:10:42 GMT+02:00 2005; privilege=call,all; systemHashcode=25872184 Is this the sort of trace you are looking for? >if not can you send me a trace (using ngrep or sth. similar) of the >events that your asterisk server sends? > >=Stefan > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Stefan R. <sr...@re...> - 2005-12-12 12:00:31
|
Jan du Toit schrieb: > The asteriskManger must be cast to the DefaultAsteriskManager. This too returns null:( > This is so weird because the call is being made. yes thats really strange... is the channel available if you call getChannels() on the DefaultAsteriskManager? if not can you send me a trace (using ngrep or sth. similar) of the events that your asterisk server sends? =Stefan |
From: Jan du T. <jan...@de...> - 2005-12-12 11:59:34
|
The Map collection result from asteriskManager.getChannels() is empty! But if I go through Asterik's command line and type show channels it is their. Stefan Reuter wrote: >ok, at least the unique id seems to be set. >you can try to retrieve the channel like this: > >asteriskManager.getChannelById(call.getUniqueId()); >and then extract the name there. > >plz tell me if that works for you > >=Stefan > >Jan du Toit schrieb: > > >> The call.toString() yields: >> >>net.sf.asterisk.manager.Call: uniqueId=1134386044.15; reason=4; >>startTime=Mon Dec 12 13:07:58 GMT+02:00 2005; endTime=null; >>systemHashcode=8546123 >> >>Asterisk version: >>It is a CVS build, the show version command yields this: "Asterisk CVS >>HEAD built by root @ localhost.localdomain on a i686 running Linux on >>2005-11-09 07:26:18 UTC" >> >>Stefan Reuter wrote: >> >> >> >>>please show me what call.toString() returns and which version of >>>asterisk you use. >>> >>>thx >>>stefan >>> >>> >>>Jan du Toit schrieb: >>> >>> >>> >>> >>>>Stefan Reuter wrote: >>>> >>>> >>>> >>>> >>>> >>>>>>My question is how do you extract this generated random number, so that >>>>>>one can succesfully hangup a channel using HangupAction? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>The easy solution is to use DefaultAsteriskManager to originate the >>>>>call. Its originateCall method returns a Call object that contains the >>>>>channel name. >>>>>An other option is to listen for OriginateSuccess events (see the >>>>>HelloEvents example on how to do that) and extract the channel name from >>>>>that event. >>>>> >>>>>=Stefan >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>I have the following piece of code: >>>> .... >>>> Originate org; >>>> Call call; >>>> managerConnection.login(); >>>> >>>> org = new Originate(); >>>> org.setChannel("SIP/Jan"); >>>> org.setContext("sgs"); >>>> org.setExten(getExtensionNumber()); >>>> org.setPriority(new Integer(1)); >>>> //set time before call must be picked up. >>>> org.setTimeout(new Long(30000)); >>>> >>>> call = this.asteriskManager.originateCall(org); >>>> str += "CALL:"+call.getChannel()+"\n"; //this method returns >>>>null. >>>> >>>> managerConnection.logoff(); >>>> .... >>>> >>>>The originateCall method is passed an Originate object configured with >>>>all the needed info. The DefaultAsteriskManager's originateCall method >>>>returns a Call object from which you can extract the channel name from >>>>the call, but this method when executed returns null. >>>> >>>>The call is succesfully made and answered. >>>> >>>>I'm still not getting to the channel name of the form >>>>"SIP/Jan-uniquerandom#" in order to sucesfully hangup. >>>> >>>> >>>> >>>>-- >>>>============================ >>>>Jan Gerryt du Toit >>>>Software Developer >>>>DecisionWorx >>>>Cell : +27721769536 >>>>============================ >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> >>-- >>============================ >>Jan Gerryt du Toit >>Software Developer >>DecisionWorx >>Cell : +27721769536 >>============================ >> >> >> > > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan du T. <jan...@de...> - 2005-12-12 11:54:43
|
asteriskManager.getChannelById(call.getUniqueId()); The asteriskManger must be cast to the DefaultAsteriskManager. This too returns null:( This is so weird because the call is being made. Stefan Reuter wrote: >ok, at least the unique id seems to be set. >you can try to retrieve the channel like this: > >asteriskManager.getChannelById(call.getUniqueId()); >and then extract the name there. > >plz tell me if that works for you > >=Stefan > >Jan du Toit schrieb: > > >> The call.toString() yields: >> >>net.sf.asterisk.manager.Call: uniqueId=1134386044.15; reason=4; >>startTime=Mon Dec 12 13:07:58 GMT+02:00 2005; endTime=null; >>systemHashcode=8546123 >> >>Asterisk version: >>It is a CVS build, the show version command yields this: "Asterisk CVS >>HEAD built by root @ localhost.localdomain on a i686 running Linux on >>2005-11-09 07:26:18 UTC" >> >>Stefan Reuter wrote: >> >> >> >>>please show me what call.toString() returns and which version of >>>asterisk you use. >>> >>>thx >>>stefan >>> >>> >>>Jan du Toit schrieb: >>> >>> >>> >>> >>>>Stefan Reuter wrote: >>>> >>>> >>>> >>>> >>>> >>>>>>My question is how do you extract this generated random number, so that >>>>>>one can succesfully hangup a channel using HangupAction? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>The easy solution is to use DefaultAsteriskManager to originate the >>>>>call. Its originateCall method returns a Call object that contains the >>>>>channel name. >>>>>An other option is to listen for OriginateSuccess events (see the >>>>>HelloEvents example on how to do that) and extract the channel name from >>>>>that event. >>>>> >>>>>=Stefan >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>I have the following piece of code: >>>> .... >>>> Originate org; >>>> Call call; >>>> managerConnection.login(); >>>> >>>> org = new Originate(); >>>> org.setChannel("SIP/Jan"); >>>> org.setContext("sgs"); >>>> org.setExten(getExtensionNumber()); >>>> org.setPriority(new Integer(1)); >>>> //set time before call must be picked up. >>>> org.setTimeout(new Long(30000)); >>>> >>>> call = this.asteriskManager.originateCall(org); >>>> str += "CALL:"+call.getChannel()+"\n"; //this method returns >>>>null. >>>> >>>> managerConnection.logoff(); >>>> .... >>>> >>>>The originateCall method is passed an Originate object configured with >>>>all the needed info. The DefaultAsteriskManager's originateCall method >>>>returns a Call object from which you can extract the channel name from >>>>the call, but this method when executed returns null. >>>> >>>>The call is succesfully made and answered. >>>> >>>>I'm still not getting to the channel name of the form >>>>"SIP/Jan-uniquerandom#" in order to sucesfully hangup. >>>> >>>> >>>> >>>>-- >>>>============================ >>>>Jan Gerryt du Toit >>>>Software Developer >>>>DecisionWorx >>>>Cell : +27721769536 >>>>============================ >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> >>-- >>============================ >>Jan Gerryt du Toit >>Software Developer >>DecisionWorx >>Cell : +27721769536 >>============================ >> >> >> > > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Stefan R. <sr...@re...> - 2005-12-12 11:28:23
|
ok, at least the unique id seems to be set. you can try to retrieve the channel like this: asteriskManager.getChannelById(call.getUniqueId()); and then extract the name there. plz tell me if that works for you =Stefan Jan du Toit schrieb: > The call.toString() yields: > > net.sf.asterisk.manager.Call: uniqueId=1134386044.15; reason=4; > startTime=Mon Dec 12 13:07:58 GMT+02:00 2005; endTime=null; > systemHashcode=8546123 > > Asterisk version: > It is a CVS build, the show version command yields this: "Asterisk CVS > HEAD built by root @ localhost.localdomain on a i686 running Linux on > 2005-11-09 07:26:18 UTC" > > Stefan Reuter wrote: > >>please show me what call.toString() returns and which version of >>asterisk you use. >> >>thx >>stefan >> >> >>Jan du Toit schrieb: >> >> >>> Stefan Reuter wrote: >>> >>> >>> >>>>>My question is how do you extract this generated random number, so that >>>>>one can succesfully hangup a channel using HangupAction? >>>>> >>>>> >>>>> >>>>> >>>>The easy solution is to use DefaultAsteriskManager to originate the >>>>call. Its originateCall method returns a Call object that contains the >>>>channel name. >>>>An other option is to listen for OriginateSuccess events (see the >>>>HelloEvents example on how to do that) and extract the channel name from >>>>that event. >>>> >>>>=Stefan >>>> >>>> >>>> >>>> >>>I have the following piece of code: >>> .... >>> Originate org; >>> Call call; >>> managerConnection.login(); >>> >>> org = new Originate(); >>> org.setChannel("SIP/Jan"); >>> org.setContext("sgs"); >>> org.setExten(getExtensionNumber()); >>> org.setPriority(new Integer(1)); >>> //set time before call must be picked up. >>> org.setTimeout(new Long(30000)); >>> >>> call = this.asteriskManager.originateCall(org); >>> str += "CALL:"+call.getChannel()+"\n"; //this method returns >>>null. >>> >>> managerConnection.logoff(); >>> .... >>> >>>The originateCall method is passed an Originate object configured with >>>all the needed info. The DefaultAsteriskManager's originateCall method >>>returns a Call object from which you can extract the channel name from >>>the call, but this method when executed returns null. >>> >>>The call is succesfully made and answered. >>> >>>I'm still not getting to the channel name of the form >>>"SIP/Jan-uniquerandom#" in order to sucesfully hangup. >>> >>> >>> >>>-- >>>============================ >>>Jan Gerryt du Toit >>>Software Developer >>>DecisionWorx >>>Cell : +27721769536 >>>============================ >>> >>> >>> >> >> > > > -- > ============================ > Jan Gerryt du Toit > Software Developer > DecisionWorx > Cell : +27721769536 > ============================ > |
From: Jan du T. <jan...@de...> - 2005-12-12 11:15:16
|
The call.toString() yields: net.sf.asterisk.manager.Call: uniqueId=1134386044.15; reason=4; startTime=Mon Dec 12 13:07:58 GMT+02:00 2005; endTime=null; systemHashcode=8546123 Asterisk version: It is a CVS build, the show version command yields this: "Asterisk CVS HEAD built by root @ localhost.localdomain on a i686 running Linux on 2005-11-09 07:26:18 UTC" Stefan Reuter wrote: >please show me what call.toString() returns and which version of >asterisk you use. > >thx >stefan > > >Jan du Toit schrieb: > > >> Stefan Reuter wrote: >> >> >> >>>>My question is how do you extract this generated random number, so that >>>>one can succesfully hangup a channel using HangupAction? >>>> >>>> >>>> >>>> >>>The easy solution is to use DefaultAsteriskManager to originate the >>>call. Its originateCall method returns a Call object that contains the >>>channel name. >>>An other option is to listen for OriginateSuccess events (see the >>>HelloEvents example on how to do that) and extract the channel name from >>>that event. >>> >>>=Stefan >>> >>> >>> >>> >>I have the following piece of code: >> .... >> Originate org; >> Call call; >> managerConnection.login(); >> >> org = new Originate(); >> org.setChannel("SIP/Jan"); >> org.setContext("sgs"); >> org.setExten(getExtensionNumber()); >> org.setPriority(new Integer(1)); >> //set time before call must be picked up. >> org.setTimeout(new Long(30000)); >> >> call = this.asteriskManager.originateCall(org); >> str += "CALL:"+call.getChannel()+"\n"; //this method returns >>null. >> >> managerConnection.logoff(); >> .... >> >>The originateCall method is passed an Originate object configured with >>all the needed info. The DefaultAsteriskManager's originateCall method >>returns a Call object from which you can extract the channel name from >>the call, but this method when executed returns null. >> >>The call is succesfully made and answered. >> >>I'm still not getting to the channel name of the form >>"SIP/Jan-uniquerandom#" in order to sucesfully hangup. >> >> >> >>-- >>============================ >>Jan Gerryt du Toit >>Software Developer >>DecisionWorx >>Cell : +27721769536 >>============================ >> >> >> > > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Stefan R. <sr...@re...> - 2005-12-12 10:43:46
|
Jan du Toit schrieb: > This is probably a stupid question., but is their functionality in the > FastAGI to make a call. you cant make a call via FastAGI. Its only possible via the Manager API or call files placed into Asterisk's spool directory. > If their is sufficient func is it better to use the Manager API instead? > > Thanks. > |
From: Stefan R. <sr...@re...> - 2005-12-12 10:42:51
|
please show me what call.toString() returns and which version of asterisk you use. thx stefan Jan du Toit schrieb: > Stefan Reuter wrote: > >>>My question is how do you extract this generated random number, so that >>>one can succesfully hangup a channel using HangupAction? >>> >>> >>The easy solution is to use DefaultAsteriskManager to originate the >>call. Its originateCall method returns a Call object that contains the >>channel name. >>An other option is to listen for OriginateSuccess events (see the >>HelloEvents example on how to do that) and extract the channel name from >>that event. >> >>=Stefan >> >> > I have the following piece of code: > .... > Originate org; > Call call; > managerConnection.login(); > > org = new Originate(); > org.setChannel("SIP/Jan"); > org.setContext("sgs"); > org.setExten(getExtensionNumber()); > org.setPriority(new Integer(1)); > //set time before call must be picked up. > org.setTimeout(new Long(30000)); > > call = this.asteriskManager.originateCall(org); > str += "CALL:"+call.getChannel()+"\n"; //this method returns > null. > > managerConnection.logoff(); > .... > > The originateCall method is passed an Originate object configured with > all the needed info. The DefaultAsteriskManager's originateCall method > returns a Call object from which you can extract the channel name from > the call, but this method when executed returns null. > > The call is succesfully made and answered. > > I'm still not getting to the channel name of the form > "SIP/Jan-uniquerandom#" in order to sucesfully hangup. > > > > -- > ============================ > Jan Gerryt du Toit > Software Developer > DecisionWorx > Cell : +27721769536 > ============================ > |
From: Jan du T. <jan...@de...> - 2005-12-12 09:53:04
|
Stefan Reuter wrote: >>My question is how do you extract this generated random number, so that >>one can succesfully hangup a channel using HangupAction? >> >> > >The easy solution is to use DefaultAsteriskManager to originate the >call. Its originateCall method returns a Call object that contains the >channel name. >An other option is to listen for OriginateSuccess events (see the >HelloEvents example on how to do that) and extract the channel name from >that event. > >=Stefan > > I have the following piece of code: .... Originate org; Call call; managerConnection.login(); org = new Originate(); org.setChannel("SIP/Jan"); org.setContext("sgs"); org.setExten(getExtensionNumber()); org.setPriority(new Integer(1)); //set time before call must be picked up. org.setTimeout(new Long(30000)); call = this.asteriskManager.originateCall(org); str += "CALL:"+call.getChannel()+"\n"; //this method returns null. managerConnection.logoff(); .... The originateCall method is passed an Originate object configured with all the needed info. The DefaultAsteriskManager's originateCall method returns a Call object from which you can extract the channel name from the call, but this method when executed returns null. The call is succesfully made and answered. I'm still not getting to the channel name of the form "SIP/Jan-uniquerandom#" in order to sucesfully hangup. -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan du T. <jan...@de...> - 2005-12-12 09:09:51
|
Hi all. This is probably a stupid question., but is their functionality in the FastAGI to make a call. If their is sufficient func is it better to use the Manager API instead? Thanks. -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan du T. <jan...@de...> - 2005-12-12 08:22:59
|
Thanks that worked:) King Ho wrote: >I had the same problem after upgrading to version 0.2. To solve the problem just use > >port = 1234 >poolSize = 20 > >Best Regards, > >King > >-----Original Message----- >From: ast...@li... [mailto:ast...@li...] On Behalf Of Stefan Reuter >Sent: Monday, December 12, 2005 3:59 PM >To: ast...@li... >Subject: Re: [Asterisk-java-users] Binding asterisks-java to a new port. > >Hi Jan, > > > >>According to the asterisk java webpage you just need to supply a >>fastagi.properties file on the classpath that looks like this: >> >>bindPort = 1234 >>poolSize = 20 >> >>Everytime I start up *-J it still listens on the default port (4573). >> >> > >where did you put the fastagi.properties? Can you show us how you invoke >Asterisk-Java? >fastagi.properties must be in the "default package", i.e. the root >package and not in any subdirectory. > >=Stefan > > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_idv37&alloc_id865&op=click >_______________________________________________ >Asterisk-java-users mailing list >Ast...@li... >https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: Jan du T. <jan...@de...> - 2005-12-12 08:14:20
|
The directory structure is as follows: +dev - asterisk-java-0.2.jar - fastagi.properties - fastagi-mapping.properties - my scripts... Invocation is as follows: java -cp asterisk-java-0.2.jar:. net.sf.asterisk.fastagi.DefaultAGIServer Stefan Reuter wrote: >Hi Jan, > > > >>According to the asterisk java webpage you just need to supply a >>fastagi.properties file on the classpath that looks like this: >> >>bindPort = 1234 >>poolSize = 20 >> >>Everytime I start up *-J it still listens on the default port (4573). >> >> > >where did you put the fastagi.properties? Can you show us how you invoke >Asterisk-Java? >fastagi.properties must be in the "default package", i.e. the root >package and not in any subdirectory. > >=Stefan > > -- ============================ Jan Gerryt du Toit Software Developer DecisionWorx Cell : +27721769536 ============================ |
From: King H. <ki...@gl...> - 2005-12-12 08:14:06
|
I had the same problem after upgrading to version 0.2. To solve the = problem just use=20 port =3D 1234 poolSize =3D 20 Best Regards, King -----Original Message----- From: ast...@li... = [mailto:ast...@li...] On Behalf Of = Stefan Reuter Sent: Monday, December 12, 2005 3:59 PM To: ast...@li... Subject: Re: [Asterisk-java-users] Binding asterisks-java to a new port. Hi Jan, > According to the asterisk java webpage you just need to supply a=20 > fastagi.properties file on the classpath that looks like this: >=20 > bindPort =3D 1234 > poolSize =3D 20 >=20 > Everytime I start up *-J it still listens on the default port (4573). where did you put the fastagi.properties? Can you show us how you invoke Asterisk-Java? fastagi.properties must be in the "default package", i.e. the root package and not in any subdirectory. =3DStefan |