asterisk-java-users Mailing List for Asterisk-Java Library (Page 162)
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: Forte, G. \(GFORTE\) <gf...@ar...> - 2006-01-18 16:15:25
|
Nevermind, I had the context set as default instead of as ext-meetme. Thanks!! Im sure I will have other questions! ;-) =20 for(int i=3D0;i<arr.length;i++) { =20 originateAction =3D new OriginateAction(); originateAction.setChannel(arr[i]); originateAction.setContext("ext-meetme"); originateAction.setExten("8200"); originateAction.setCallerId(arr[i]); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(30000)); originateAction.setAsync(Boolean.TRUE); =20 =20 if(!managerConnection.isConnected()){ = managerConnection.login();} =20 managerResponse =3D = managerConnection.sendAction(originateAction,30000); System.out.println("response=3D"+managerResponse.getResponse()); } =20 =20 =20 =20 Let me rephrase, I am able to get the conf to work with 2 users but I was wondering if I = was going about it in the wrong way: =20 <code snip> OriginateAction originateAction; OriginateAction originateAction2; =20 ManagerResponse originateResponse; originateAction =3D new OriginateAction(); originateAction.setChannel("SIP/201"); originateAction.setContext("default"); originateAction.setExten("8200"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(30000)); =20 originateAction2 =3D new OriginateAction(); originateAction2.setChannel("SIP/202"); originateAction2.setContext("default"); originateAction2.setExten("8200"); originateAction2.setPriority(new Integer(1)); originateAction2.setTimeout(new Long(30000)); =20 // connect to Asterisk and log in managerConnection.login(); =20 // send the originate action and wait for a maximum of 30 = seconds for Asterisk // to send a reply originateResponse =3D = managerConnection.sendAction(originateAction, 30000); originateResponse =3D = managerConnection.sendAction(originateAction2, 30000); This works but after @15seconds the sips hang up. Is this due to the = setTimeout()? =20 Thanks again ________________________________ From: ast...@li... on behalf of = Forte, Graham (GFORTE) Sent: Wed 1/18/2006 9:39 AM To: ast...@li... Subject: [Asterisk-java-users] having multiple users call a conference How, I have tried the following and am having trouble even joining 1 person = to the conference call: =20 originateAction =3D new OriginateAction(); originateAction.setChannel("SIP/201"); originateAction.setApplication("dial"); originateAction.setData("8200"); //originateAction.setContext("default"); //originateAction.setExten("SIP/200"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Integer(60000)); =20 I am able to dial manually from a sip into 8200 and all works fine. =20 Thanks Stefan! ________________________________ From: ast...@li... on behalf of = Stefan Reuter Sent: Wed 1/18/2006 8:25 AM To: ast...@li... Subject: Re: [Asterisk-java-users] having multiple users call a = conference g f schrieb: > Hello all, > how can I have multiple users(>2) call into a conference room? > Is this something I can do with OriginateAction? If you want those users to be called by Asterisk and then joined into a conference OriginateAction is the way to go. =3DStefan |
From: Forte, G. \(GFORTE\) <gf...@ar...> - 2006-01-18 15:07:53
|
Let me rephrase, I am able to get the conf to work with 2 users but I was wondering if I = was going about it in the wrong way: =20 <code snip> OriginateAction originateAction; OriginateAction originateAction2; =20 ManagerResponse originateResponse; originateAction =3D new OriginateAction(); originateAction.setChannel("SIP/201"); originateAction.setContext("default"); originateAction.setExten("8200"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(30000)); =20 originateAction2 =3D new OriginateAction(); originateAction2.setChannel("SIP/202"); originateAction2.setContext("default"); originateAction2.setExten("8200"); originateAction2.setPriority(new Integer(1)); originateAction2.setTimeout(new Long(30000)); =20 // connect to Asterisk and log in managerConnection.login(); =20 // send the originate action and wait for a maximum of 30 = seconds for Asterisk // to send a reply originateResponse =3D = managerConnection.sendAction(originateAction, 30000); originateResponse =3D = managerConnection.sendAction(originateAction2, 30000); This works but after @15seconds the sips hang up. Is this due to the = setTimeout()? =20 Thanks again ________________________________ From: ast...@li... on behalf of = Forte, Graham (GFORTE) Sent: Wed 1/18/2006 9:39 AM To: ast...@li... Subject: [Asterisk-java-users] having multiple users call a conference How, I have tried the following and am having trouble even joining 1 person = to the conference call: =20 originateAction =3D new OriginateAction(); originateAction.setChannel("SIP/201"); originateAction.setApplication("dial"); originateAction.setData("8200"); //originateAction.setContext("default"); //originateAction.setExten("SIP/200"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Integer(60000)); =20 I am able to dial manually from a sip into 8200 and all works fine. =20 Thanks Stefan! ________________________________ From: ast...@li... on behalf of = Stefan Reuter Sent: Wed 1/18/2006 8:25 AM To: ast...@li... Subject: Re: [Asterisk-java-users] having multiple users call a = conference g f schrieb: > Hello all, > how can I have multiple users(>2) call into a conference room? > Is this something I can do with OriginateAction? If you want those users to be called by Asterisk and then joined into a conference OriginateAction is the way to go. =3DStefan |
From: Forte, G. \(GFORTE\) <gf...@ar...> - 2006-01-18 14:40:32
|
How, I have tried the following and am having trouble even joining 1 person = to the conference call: =20 originateAction =3D new OriginateAction(); originateAction.setChannel("SIP/201"); originateAction.setApplication("dial"); originateAction.setData("8200"); //originateAction.setContext("default"); //originateAction.setExten("SIP/200"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Integer(60000)); =20 I am able to dial manually from a sip into 8200 and all works fine. =20 Thanks Stefan! ________________________________ From: ast...@li... on behalf of = Stefan Reuter Sent: Wed 1/18/2006 8:25 AM To: ast...@li... Subject: Re: [Asterisk-java-users] having multiple users call a = conference g f schrieb: > Hello all, > how can I have multiple users(>2) call into a conference room? > Is this something I can do with OriginateAction? If you want those users to be called by Asterisk and then joined into a conference OriginateAction is the way to go. =3DStefan |
From: <be...@mo...> - 2006-01-18 13:48:47
|
Użytkownik Stefan Reuter napisał: > Robert, > > thanks for your clarification. It seems it only works if the phone is > local to Asterisk, i.e. directly connected. Is this correct? Hey! That's a bright conclusion! > I am not sure if it is a bug that Asterisk does not generate "Ringing" > events for those channels or if its the desired behaviour. In any case i > doubt its an Asterisk-Java specific problem so its probably best to > either post it to the asterisk-useres list or report it as a bug on > Asterisk's bug tracker. OK! I'll do just that then. > > =Stefan Thanks -- Robert Krzyminski Mobiteam Sp. z o.o. ul. Rynek Glowny 6, 31-042 Krakow, Poland tel: +48 22 372 63 42 ICQ #: 25467968 e-mail: rob...@mo... |
From: Stefan R. <sr...@re...> - 2006-01-18 13:26:40
|
g f schrieb: > Hello all, > how can I have multiple users(>2) call into a conference room? > Is this something I can do with OriginateAction? If you want those users to be called by Asterisk and then joined into a conference OriginateAction is the way to go. =Stefan |
From: Stefan R. <sr...@re...> - 2006-01-18 13:25:02
|
Robert, thanks for your clarification. It seems it only works if the phone is local to Asterisk, i.e. directly connected. Is this correct? I am not sure if it is a bug that Asterisk does not generate "Ringing" events for those channels or if its the desired behaviour. In any case i doubt its an Asterisk-Java specific problem so its probably best to either post it to the asterisk-useres list or report it as a bug on Asterisk's bug tracker. =Stefan |
From: g f <gf...@gm...> - 2006-01-17 17:17:13
|
Hello all, how can I have multiple users(>2) call into a conference room? Is this something I can do with OriginateAction? Thanks! |
From: Dov B. <do...@te...> - 2006-01-16 16:39:52
|
Thank you!!!! ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Monday, January 16, 2006 1:26 PM Subject: Re: [Asterisk-java-users] off-topic: queue_log |
From: Stefan R. <sr...@re...> - 2006-01-16 15:27:09
|
Dov Bigio schrieb: > > Is anybody able to convert the timestamp that appears on file queue_log > to a Date object? > > Is uses a Unix timestamp format (1137376980) new Date(1137376980L * 1000); =Stefan |
From: Dov B. <do...@te...> - 2006-01-16 15:21:02
|
Is anybody able to convert the timestamp that appears on file queue_log = to a Date object? Is uses a Unix timestamp format (1137376980) Thank you Dov |
From: Eduard M. <ed...@ba...> - 2006-01-16 12:33:05
|
Thank you Stefan, I will use String.split() at the moment, I want to try your patch, but I can't because I'm working with the Bussines= =20 Edition in a production machine :( But when I have time, I want to build another machine for testing purposes. I'm developing a little app to use the asterisk as a switch and I will to m= ake=20 the code public soon, when I finish it. El Domingo, 15 de Enero de 2006 03:17, Stefan Reuter escribi=F3: > Edu, > > it seems that Asterisk doesnt support multiple properties for the > userevent. A workaround would be to somehow pass \r\n to app_userevent > as delimiter - but I don't know of any way to do this from the dialplan. > I prepared a patch for Asterisk that fixes that behavior so that your > code would work as expected. Please have a look at > http://bugs.digium.com/view.php?id=3D6241 and try the patch. Report your > (hopefully positive) test results back to the Asterisk bug tracker as > that helps to get the patch accepted. > > In the meantime you should use only a single property with the user > event and parse it in your java app. > > example: > exten =3D> s,1,UserEvent(NewCall|callData: ${DNID},${CALLERID}) > > thats ugly but it works. Be sure not to use | as delimiter as that > breaks as soon as the patch is accepted. > > =3DStefan |
From: <be...@mo...> - 2006-01-16 10:05:51
|
Hello! > On Thu, 2006-01-12 at 14:13 +0100, Robert Krzymiński wrote: > >>When I use SIP, everything is fine, the event shows up just like it >>should, but when I'm using a SIP VOIP provider or a Zap (aculab) card, >>the event is not comming to the call manager. > > > what do you mean by "when i use sip its fine but when i am using a sip > voip provider it is not"? isnt a sip voip provider sip, too? > > could it be that the difference between the cases when it works and when > not is that you are sometimes looking at incoming channels and sometimes > at outgoing? OK here's what I'm doing: The idea is to check the regular phones, by calling them and hanging up as they start ringing, so we're talking about outgoing calls. Now, there are 3 cases: - SIP to SIP (a software phone), - calling regular phones using a VoIP provider over SIP, - calling regular phones using Aculab card (based on Zaptel), over E1 line using Q.931 protocol. Cases 1 and 2 are just for testing. So far, the only case that works is the first one (the NewChannelEvent reaches the call manager). In the other cases, the event does not reach the call manager. As for the case 3 I can see that the card sends the event to the asterisk. The card driver uses the ast_queue_control function to send the event to the asterisk event queue, so I guess that's fine. Here's the code that I'm using in lava: import java.io.IOException; import java.util.Date; import net.sf.asterisk.fastagi.command.AnswerCommand; import net.sf.asterisk.fastagi.command.ChannelStatusCommand; import net.sf.asterisk.fastagi.command.ExecCommand; import net.sf.asterisk.fastagi.command.GetVariableCommand; import net.sf.asterisk.manager.AuthenticationFailedException; import net.sf.asterisk.manager.Call; import net.sf.asterisk.manager.Channel; import net.sf.asterisk.manager.DefaultAsteriskManager; import net.sf.asterisk.manager.ManagerConnection; import net.sf.asterisk.manager.ManagerConnectionFactory; import net.sf.asterisk.manager.ManagerEventHandler; import net.sf.asterisk.manager.ManagerResponseHandler; import net.sf.asterisk.manager.Originate; import net.sf.asterisk.manager.TimeoutException; import net.sf.asterisk.manager.action.EventsAction; import net.sf.asterisk.manager.action.HangupAction; import net.sf.asterisk.manager.action.OriginateAction; import net.sf.asterisk.manager.action.StatusAction; import net.sf.asterisk.manager.event.ChannelEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewStateEvent; import net.sf.asterisk.manager.response.ManagerResponse; public class HelloEvents implements ManagerEventHandler { private ManagerConnection managerConnection; public HelloEvents() throws IOException { ManagerConnectionFactory factory = new ManagerConnectionFactory(); //217.114.117.249 this.managerConnection = "host", "manager", "pa55w0rd"); } public void run() throws IOException, AuthenticationFailedException, TimeoutException, InterruptedException { managerConnection.login(); // register for events managerConnection.addEventHandler(this); OriginateAction originateAction; ManagerResponse originateResponse; String phoneNumber = "124332432"; originateAction = new OriginateAction(); originateAction.setCallerId("\"bercik\" <123143255>"); originateAction.setApplication("Wait"); originateAction.setData("1"); originateAction.setTimeout((Long.valueOf("30300"))); originateAction.setAsync(new Boolean(true)); try { //Using sip works fine //originateAction.setChannel("SIP/bercik"); originateAction.setChannel("Aculab/1/"+phoneNumber); // send the originate action and wait for a maximum of // 30 seconds for Asterisk to send a reply originateResponse = managerConnection.sendAction(originateAction,30000); } catch (TimeoutException e) { e.printStackTrace(); } // wait 10 seconds for events to come in Thread.sleep(30000); // and finally log off and disconnect managerConnection.logoff(); } public void handleEvent(ManagerEvent event) { // just print received events System.out.println(event.toString()); if (event instanceof NewChannelEvent) { NewChannelEvent cevent = (NewChannelEvent) event; System.out.println(cevent.getState()); if (cevent.getState().compareToIgnoreCase("Ringing") == 0) { System.out.println("Got ringing, hanging up"); HangupAction hangup = new HangupAction(); hangup.setChannel(cevent.getChannel()); try { managerConnection.sendAction(hangup, null); } catch (Exception e) { e.printStackTrace(); } } } } public static void main(String[] args) throws Exception { HelloEvents helloEvents; helloEvents = new HelloEvents(); helloEvents.run(); } } Now, what happens is, the phone is just ringing and I can answer, but no NewChannelEvent is comming, when the phone is ringing. Any ideas, on why is this happening? Thanks. -- Robert Krzyminski Mobiteam Sp. z o.o. ul. Rynek Glowny 6, 31-042 Krakow, Poland tel: +48 22 372 63 42 ICQ #: 25467968 e-mail: rob...@mo... |
From: Stefan R. <sr...@re...> - 2006-01-15 03:06:21
|
On Thu, 2006-01-12 at 14:13 +0100, Robert Krzymi=F1ski wrote: > When I use SIP, everything is fine, the event shows up just like it=20 > should, but when I'm using a SIP VOIP provider or a Zap (aculab) card,=20 > the event is not comming to the call manager. what do you mean by "when i use sip its fine but when i am using a sip voip provider it is not"? isnt a sip voip provider sip, too? could it be that the difference between the cases when it works and when not is that you are sometimes looking at incoming channels and sometimes at outgoing? =3DStefan |
From: Stefan R. <sr...@re...> - 2006-01-15 03:01:57
|
I submitted a patch to add DBDel and DBDeltree to the Manager API. see http://bugs.digium.com/view.php?id=3D6242 Until this patch gets into Asterisk you can use the CLI application "database del" with a CommandAction. =3DStefan On Thu, 2006-01-12 at 16:39 +0100, max wrote: > Hi, >=20 > I do not seem to be able to figure out what the equivalent class is for > the database del CLI command in asterisk.manager in *-J.=20 >=20 > Would some one like to give me a hint (or two) how to delete a > family/key via manager. I though about a hint some one else gave to use > ManagerConnection:sendAction(ManagerAction) but I assume there must be > better way to do this. >=20 > Regards, >=20 > Max. >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > 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=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Stefan R. <sr...@re...> - 2006-01-15 02:20:18
|
sure you could put all the stuff in a static method and call that from your jsp. But I would rather suggest to not include any java stuff into a jsp at all. Any well architectured webapp separates view (jsp) and control and talking to Asterisk is certainly not part of the view... =3DStefan On Thu, 2006-01-12 at 16:30 -0600, g f wrote: > Hello all, > I am trying to run the following by calling it from a jsp. > The code below worksfine if I include a main and run it as an > executable. Is this doable or do I need to rethink my code. > Is it possible to create on method from the code below and call that > method only(include the connection in the run method)? > =20 > Thanks. > =20 > =20 > public class Test > { > private ManagerConnection managerConnection; > private String CHANNEL =3D "SIP/201"; //channel that will initiate > private String DATA =3D "SIP/202"; //channel that the initiater > will call=20 > private String CALLERID =3D "22222"; //set the caller id=20 > =20 > =20 > public Test() throws IOException > { > ManagerConnectionFactory factory =3D new > ManagerConnectionFactory(); > =20 > this.managerConnection =3D > factory.getManagerConnection("135.119.11.1", > "manager", "pa55w0rd"); > } > =20 > =20 > public void run(String channel, String data) throws IOException, > AuthenticationFailedException,=20 > TimeoutException > { > =20 > OriginateAction originateAction; > ManagerResponse originateResponse; > //set vars for dialing from one sip to another > originateAction =3D new OriginateAction(); > originateAction.setChannel(channel); > originateAction.setApplication("dial");=20 > originateAction.setActionId("dufus"); > originateAction.setData(data); > originateAction.setCallerId(CALLERID); > originateAction.setPriority(new Integer(1)); > originateAction.setTimeout(new Integer(30000)); > =20 > // connect to Asterisk and log in > managerConnection.login(); > =20 > // send the originate action and wait for a maximum of 30 > seconds for=20 > // Asterisk > // to send a reply > originateResponse =3D > managerConnection.sendAction(originateAction, 30000); >=20 > =20 > // and finally log off and disconnect > managerConnection.logoff (); > } >=20 |
From: Stefan R. <sr...@re...> - 2006-01-15 02:17:15
|
Edu, it seems that Asterisk doesnt support multiple properties for the userevent. A workaround would be to somehow pass \r\n to app_userevent as delimiter - but I don't know of any way to do this from the dialplan. I prepared a patch for Asterisk that fixes that behavior so that your code would work as expected. Please have a look at http://bugs.digium.com/view.php?id=3D6241 and try the patch. Report your (hopefully positive) test results back to the Asterisk bug tracker as that helps to get the patch accepted. In the meantime you should use only a single property with the user event and parse it in your java app. example: exten =3D> s,1,UserEvent(NewCall|callData: ${DNID},${CALLERID}) thats ugly but it works. Be sure not to use | as delimiter as that breaks as soon as the patch is accepted. =3DStefan |
From: Edu <jav...@ba...> - 2006-01-14 12:04:07
|
Hi again! I'm trying to pass two variables in a UserEvent, but Astersiks sends them incorrectly: exten => s,1,UserEvent(NewCall|dialedNumberIdentifier: ${DNID}|callerId: ${CALLERID}) gives in a telnet something like: Event: UserEventNewCall Channel: Zap/59-1 Uniqueid: 1137239857.139 dialedNumberIdentifier: 936010501|callerId: 680232210 And then, I can't get the different values with the corresponding getters and setters. I will use String.split(), but is the best way? Edu |
From: g f <gf...@gm...> - 2006-01-12 22:30:23
|
Hello all, I am trying to run the following by calling it from a jsp. The code below worksfine if I include a main and run it as an executable. I= s this doable or do I need to rethink my code. Is it possible to create on method from the code below and call that method only(include the connection in the run method)? Thanks. public class Test { private ManagerConnection managerConnection; private String CHANNEL =3D "SIP/201"; //channel that will initiate private String DATA =3D "SIP/202"; //channel that the initiater wil= l call private String CALLERID =3D "22222"; //set the caller id public Test() throws IOException { ManagerConnectionFactory factory =3D new ManagerConnectionFactory(= ); this.managerConnection =3D factory.getManagerConnection("135.119.1= 1.1 ", "manager", "pa55w0rd"); } public void run(String channel, String data) throws IOException, AuthenticationFailedException, TimeoutException { OriginateAction originateAction; ManagerResponse originateResponse; //set vars for dialing from one sip to another originateAction =3D new OriginateAction(); originateAction.setChannel(channel); originateAction.setApplication("dial"); originateAction.setActionId("dufus"); originateAction.setData(data); originateAction.setCallerId(CALLERID); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Integer(30000)); // connect to Asterisk and log in managerConnection.login(); // send the originate action and wait for a maximum of 30 seconds for // Asterisk // to send a reply originateResponse =3D managerConnection.sendAction(originateAction= , 30000); // and finally log off and disconnect managerConnection.logoff(); } |
From: max <ma...@mv...> - 2006-01-12 15:39:59
|
Hi, I do not seem to be able to figure out what the equivalent class is for the database del CLI command in asterisk.manager in *-J. Would some one like to give me a hint (or two) how to delete a family/key via manager. I though about a hint some one else gave to use ManagerConnection:sendAction(ManagerAction) but I assume there must be better way to do this. Regards, Max. |
From: <be...@mo...> - 2006-01-12 13:17:41
|
Hello! I'm trying to do exactly the same thing as in the Timeout when hanging up topic. The difference is that instead of SIP, I want to use Zap channels (well zap compatible aculab card). I have a problem with receiving events to the call manager. What I'm trying to do is to call a phone, and as soon as I get a ringing tone, I want to hangup. Therefore I'm trying to get the NewChannelEvent with state ringing. When I use SIP, everything is fine, the event shows up just like it should, but when I'm using a SIP VOIP provider or a Zap (aculab) card, the event is not comming to the call manager. I can see in the asterisk console that the card event is occuring, and the card driver then sends AST_CONTROL_RINGING to the asterisk queue. Ufortulately the event is not passed by the call manager. The only events that are sent are: net.sf.asterisk.manager.event.NewChannelEvent, State:Down net.sf.asterisk.manager.event.NewCallerIdEvent net.sf.asterisk.manager.event.HangupEvent net.sf.asterisk.manager.event.OriginateFailureEvent net.sf.asterisk.manager.event.DisconnectEvent When I'm calling using local SIP phone, the events go through: net.sf.asterisk.manager.event.NewChannelEvent: State: Down net.sf.asterisk.manager.event.NewCallerIdEvent: net.sf.asterisk.manager.event.NewChannelEvent: State: Ringing net.sf.asterisk.manager.event.HangupEvent: net.sf.asterisk.manager.event.PeerStatusEvent: Is there some configuration file in asterisk that needs to be changed in order for zap channels to report the NewChannelEvent every time? -- Robert Krzyminski Mobiteam Sp. z o.o. ul. Rynek Glowny 6, 31-042 Krakow, Poland tel: +48 22 372 63 42 ICQ #: 25467968 e-mail: rob...@mo... |
From: Jan du T. <jan...@de...> - 2006-01-12 12:44:38
|
Sorry, my bad. I was looking at Originate and not OriginateAction. Stefan Reuter wrote: >Jan du Toit schrieb: > > >>Hi. >> >> >> >>> originateAction.setAsync(Boolean.TRUE); >>> >>> >>> >>> >>I'm using version 0.2. The above method setAsync is not there in this >>version. Is this a new feature? Or is it a fault that it is not there. >> >> > >sure it is there: > >http://www.asteriskjava.org/0.2/apidocs/net/sf/asterisk/manager/action/OriginateAction.html#getAsync() > >=Stefan > > > |
From: Stefan R. <sr...@re...> - 2006-01-12 12:31:06
|
Jan du Toit schrieb: > Hi. > >> originateAction.setAsync(Boolean.TRUE); >> >> > > I'm using version 0.2. The above method setAsync is not there in this > version. Is this a new feature? Or is it a fault that it is not there. sure it is there: http://www.asteriskjava.org/0.2/apidocs/net/sf/asterisk/manager/action/OriginateAction.html#getAsync() =Stefan |
From: Jan du T. <jan...@de...> - 2006-01-12 10:27:01
|
Hi. > originateAction.setAsync(Boolean.TRUE); > > I'm using version 0.2. The above method setAsync is not there in this version. Is this a new feature? Or is it a fault that it is not there. |
From: Stefan R. <sr...@re...> - 2006-01-12 10:14:21
|
Hi Jan, > So in my agi script I have: this.exec("MeetMeAdmin","8000,K"). > But it doesn't work. Asterisk gives me the following warning: > app_meetme.c:1970 admin_exec: MeetmeAdmin requires a command! > > What is the correct syntax for the options string when you have multiple > options? Multiple options for exec() are separated by the pipe character ('|'). So in your case you should use: exec("MeetMeAdmin", "8000|K"); =Stefan |
From: Jan du T. <jan...@de...> - 2006-01-12 06:53:58
|
Hi. I know if you want to invoke an asterisk application, like the "Wait" application, you must do it with the AGI stuff. Write a sript that extends from BaseAGIScript and then in the service method call this.exec("Wait","1"). My question is with applications that have more than one option, how must the option string that is passed to exec look like? For example the MeetMeAdmin application. Running the "show application MeetMeAdmin" CLI command provides us with this: MeetMeAdmin(confno,command[,user]): 'e' -- Eject last user that joined 'k' -- Kick one user out of conference 'K' -- Kick all users out of conference 'l' -- Unlock conference 'L' -- Lock conference 'm' -- Unmute conference 'M' -- Mute conference 'n' -- Unmute entire conference (except admin) 'N' -- Mute entire conference (except admin) So in my agi script I have: this.exec("MeetMeAdmin","8000,K"). But it doesn't work. Asterisk gives me the following warning: app_meetme.c:1970 admin_exec: MeetmeAdmin requires a command! What is the correct syntax for the options string when you have multiple options? Thanks in advance. Bye. |