asterisk-java-users Mailing List for Asterisk-Java Library (Page 124)
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: Noel R. M. <noe...@gm...> - 2007-11-22 22:59:12
|
Hi Stefan, I agree with you. I hadn't thought about the char :( Well, I have some ideas but all of them breaks the compatibility with the stable version :(. They are: - throwing a exception, as you said, is a good idea. - Changing the method return from char to String, or even to int. - Returning the AgiReply or creating a method that return the last result command (getLastResult) wouldn't break the compatibility with the stable version. What you think? Noel On Nov 22, 2007 8:14 PM, Stefan Reuter <ste...@re...> wrote: > Hi Noel, > > thanks for your feedback - and your english is not worse than mine *g* > You can find our mailing lists at > http://asterisk-java.org/development/mail-lists.html > I cc'ed this reply to the -users list. > > I can understand that you want to handle the situation where the file is > not available on the PBX but I have reservations regarding the solution > you've proposed. The streamFile methods return a char and a char is > defined as: > "The char data type is a single 16-bit Unicode character. It has a > minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or > 65,535 inclusive)." > so negative values are not allowed by the specification. > What I could think of would be to throw an exception (but that would > change the contract significantly). > Any ideas? > > =Stefan > > > > Noel R. Morais wrote: > > Stefan, > > > > I'm from Brazil and I use your library for integration with Asterisk AGI. > > > > Your library works gracefully and it attend all my requirements. > > Thanks for the great job on it. > > > > Well, there is a issue regarding the "streamFile(file, digits)" > > command. I solved it and I want to share. > > > > The AGI command "STREAM FILE <filename> <escape digits> [sample > > offset]" returns: > > failure: 200 result=-1 endpos=<sample offset> > > failure on open: 200 result=0 endpos=0 > > success: 200 result=0 endpos=<offset> > > digit pressed: 200 result=<digit> endpos=<offset> > > > > The library just return the result code, but in case of a stream file > > of a file that doesn't exists it is going to return the wrong result > > success. It should return a "failure on open" result. > > > > So, I have changed the code of AgiChannelImp from: > > > > public char streamFile(String file, String escapeDigits) > > throws AgiException > > { > > AgiReply reply; > > > > reply = sendCommand(new StreamFileCommand(file, escapeDigits)); > > return reply.getResultCodeAsChar(); > > } > > > > To: > > > > public char streamFile(String file, String escapeDigits) > > throws AgiException > > { > > AgiReply reply; > > int result; > > reply = sendCommand(new StreamFileCommand(file, escapeDigits)); > > result = (reply.getResultCode() == 0 && reply.getAttribute("endpos") > > == "0")? -2 : reply.getResultCodeAsChar() ; > > return (char)result ; > > } > > > > > > Sorry about the really poor English and sorry about sending it to your > > email but I didn't find any email-list or forum :( > > > > > > Thanks in advance, > > > > Noel > > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > |
From: Stefan R. <ste...@re...> - 2007-11-22 22:15:00
|
Hi Noel, thanks for your feedback - and your english is not worse than mine *g* You can find our mailing lists at http://asterisk-java.org/development/mail-lists.html I cc'ed this reply to the -users list. I can understand that you want to handle the situation where the file is not available on the PBX but I have reservations regarding the solution you've proposed. The streamFile methods return a char and a char is defined as: "The char data type is a single 16-bit Unicode character. It has a minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or 65,535 inclusive)." so negative values are not allowed by the specification. What I could think of would be to throw an exception (but that would change the contract significantly). Any ideas? =3DStefan Noel R. Morais wrote: > Stefan, >=20 > I'm from Brazil and I use your library for integration with Asterisk AG= I. >=20 > Your library works gracefully and it attend all my requirements. > Thanks for the great job on it. >=20 > Well, there is a issue regarding the "streamFile(file, digits)" > command. I solved it and I want to share. >=20 > The AGI command "STREAM FILE <filename> <escape digits> [sample > offset]" returns: > failure: 200 result=3D-1 endpos=3D<sample offset> > failure on open: 200 result=3D0 endpos=3D0 > success: 200 result=3D0 endpos=3D<offset> > digit pressed: 200 result=3D<digit> endpos=3D<offset> >=20 > The library just return the result code, but in case of a stream file > of a file that doesn't exists it is going to return the wrong result > success. It should return a "failure on open" result. >=20 > So, I have changed the code of AgiChannelImp from: >=20 > public char streamFile(String file, String escapeDigits) > throws AgiException > { > AgiReply reply; >=20 > reply =3D sendCommand(new StreamFileCommand(file, escapeDigits)= ); > return reply.getResultCodeAsChar(); > } >=20 > To: >=20 > public char streamFile(String file, String escapeDigits) > throws AgiException > { > AgiReply reply; > int result; > reply =3D sendCommand(new StreamFileCommand(file, escapeDigits)= ); > result =3D (reply.getResultCode() =3D=3D 0 && reply.getAttribute("endp= os") > =3D=3D "0")? -2 : reply.getResultCodeAsChar() ; > return (char)result ; > } >=20 >=20 > Sorry about the really poor English and sorry about sending it to your > email but I didn't find any email-list or forum :( >=20 >=20 > Thanks in advance, >=20 > Noel --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Stefan R. <ste...@re...> - 2007-11-16 16:54:20
|
java -cp .:asterisk-java-0.3.1.jar HelloAgiScript =3DStefan dwi...@aa... wrote: > Hello everyone.. >=20 > I think I've made some progress. >=20 > Here is the code currently.. >=20 > import java.io.*; > import java.util.*; > import org.asteriskjava.fastagi.AgiChannel; > import org.asteriskjava.fastagi.AgiException; > import org.asteriskjava.fastagi.AgiRequest; > import org.asteriskjava.fastagi.BaseAgiScript; >=20 > public class HelloAgiScript extends BaseAgiScript > { > public void service(AgiRequest request, AgiChannel channel) > throws AgiException > { > } > public void main(String[] args) throws Exception > { > if(args.length =3D=3D 0) { > & nbsp; System.out.println("java -cp . file > argument"); > } else if(args[0].equals("1")) { > streamFile("ext-list"); > } else if(args[0].equals("2")) { > streamFile("credit"); > } else { > System.out.println("bad input argument"); > & nbsp; } > } > } >=20 >=20 > And it compiles cleanly! >=20 > root@asterisk-box:~/asterisk-related/agi# javac -cp > asterisk-java-0.3.1.jar HelloAgiScript.java > root@asterisk-box:~/asterisk-related/agi# >=20 > However.. >=20 > root@asterisk-box:~/asterisk-related/agi# java -cp . HelloAgiScript > Exception in thread "main" java.lang.NoClassDefFoundError: > org/asteriskjava/fastagi/BaseAgiScript >=20 > root@asterisk-box:~/asterisk-related/agi# java -cp . HelloAgiScript 1 > Exception in thread "main" java.lang.NoClassDefFoundError: > org/asteriskjava/fastagi/BaseAgiScript >=20 > Anyone got an idea? >=20 > Thanks! >=20 > Best Regards, > Danny Williams JR >=20 >=20 > -----------------------------------------------------------------------= - >=20 > -----------------------------------------------------------------------= -- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >=20 >=20 > -----------------------------------------------------------------------= - >=20 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: <dwi...@aa...> - 2007-11-16 15:20:56
|
<html><body>Hello everyone..<br><br>I think I've made some progress.<br><br>Here is the code currently..<br><br>import java.io.*;<br>import java.util.*;<br>import org.asteriskjava.fastagi.AgiChannel;<br>import org.asteriskjava.fastagi.AgiException;<br>import org.asteriskjava.fastagi.AgiRequest;<br>import org.asteriskjava.fastagi.BaseAgiScript;<br><br>public class HelloAgiScript extends BaseAgiScript<br>{<br> public void service(AgiRequest request, AgiChannel channel) throws AgiException<br> {<br> }<br> public void main(String[] args) throws Exception<br> {<br> if(args.length == 0) {<br> System.out.println("java -cp . file argument");<br> } else if(args[0].equals("1")) {<br> streamFile("ext-list");<br> } else if(args[0].equals("2")) {<br> streamFile("credit");<br> } else {<br> System.out.println("bad input argument");<br> }<br> }<br>}<br><br><br>And it compiles cleanly!<br><br>root@asterisk-box:~/asterisk-related/agi# javac -cp asterisk-java-0.3.1.jar HelloAgiScript.java<br>root@asterisk-box:~/asterisk-related/agi# <br><br>However..<br><br>root@asterisk-box:~/asterisk-related/agi# java -cp . HelloAgiScript<br>Exception in thread "main" java.lang.NoClassDefFoundError: org/asteriskjava/fastagi/BaseAgiScript<br><br>root@asterisk-box:~/asterisk-related/agi# java -cp . HelloAgiScript 1<br>Exception in thread "main" java.lang.NoClassDefFoundError: org/asteriskjava/fastagi/BaseAgiScript<br><br>Anyone got an idea?<br><br>Thanks!<br><br>Best Regards,<br>Danny Williams JR<br><br></body></html> |
From: Aby A. A. B. <aby...@ya...> - 2007-11-13 03:34:39
|
Hie, Can anyone help..just started using asterisk-java. I already downloaded asterisk-java-0.3.jar files..based on the tutorial, how do i get the fastagi-mapping.properties. Thanks Azid --------------------------------- Never miss a thing. Make Yahoo your homepage. |
From: Martin S. <ma...@be...> - 2007-11-07 21:56:31
|
I suggest you use telnet or sniff the traffic or turn debugging on, and see what data is passed when Asterisk-Java finds out. I'm sure there's an explanation which is along the lines of some event delivering the information. If you're not familiar with log4j, set the 'log4j.debug' property to 'true'. You may have to give some root categories or something too -- I don't fiddle much with it in AJ and couldn't tell you off the top of my head. Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of Michael Yara > Sent: Wednesday, November 07, 2007 4:48 PM > To: ast...@li... > Subject: Re: [Asterisk-java-users] getMeetMeRooms() Problem >=20 > To my knowledge there is no action that you can send to the=20 > Manger that=20 > will give me this information. Asterisk-Java must be using some other=20 > means to get the information on the other users. The question is what=20 > and how can I take advantage of this on connect. >=20 > Mike >=20 > Martin Smith wrote: > >> What I really don't understand is in my original example how does=20 > >> Asterisk-Java know instantly about the other MeetMe users=20 > >> when only one=20 > >> is firing a manager MeetMeLeaveEvent? > >> Is it parsing the MeetMe command? If so why cant it do this=20 > >> on connection? > >> =20 > > > > It probably could, if there's a manager event that gives this > > information (I don't use MeetMe much). If you can figure=20 > out that event, > > send it upon connection :). > > > > Also, note that if you mix the APIs without using different threads > > you'll get a deadlock when you try to execute an action=20 > during an event > > handler. See the list archives for at least 3 recent=20 > examples of this > > and solutions (ManagerProxyEventListener, I think?). > > > > Cheers, > > > > Martin Smith, Systems Developer > > ma...@be... > > Bureau of Economic and Business Research > > University of Florida > > (352) 392-0171 Ext. 221=20 > > > >=20 > -------------------------------------------------------------- > ----------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX=20 > and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > =20 >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and=20 > a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Michael Y. <mic...@i9...> - 2007-11-07 21:47:36
|
To my knowledge there is no action that you can send to the Manger that will give me this information. Asterisk-Java must be using some other means to get the information on the other users. The question is what and how can I take advantage of this on connect. Mike Martin Smith wrote: >> What I really don't understand is in my original example how does >> Asterisk-Java know instantly about the other MeetMe users >> when only one >> is firing a manager MeetMeLeaveEvent? >> Is it parsing the MeetMe command? If so why cant it do this >> on connection? >> > > It probably could, if there's a manager event that gives this > information (I don't use MeetMe much). If you can figure out that event, > send it upon connection :). > > Also, note that if you mix the APIs without using different threads > you'll get a deadlock when you try to execute an action during an event > handler. See the list archives for at least 3 recent examples of this > and solutions (ManagerProxyEventListener, I think?). > > Cheers, > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Martin S. <ma...@be...> - 2007-11-07 21:25:46
|
> What I really don't understand is in my original example how does=20 > Asterisk-Java know instantly about the other MeetMe users=20 > when only one=20 > is firing a manager MeetMeLeaveEvent? > Is it parsing the MeetMe command? If so why cant it do this=20 > on connection? It probably could, if there's a manager event that gives this information (I don't use MeetMe much). If you can figure out that event, send it upon connection :). Also, note that if you mix the APIs without using different threads you'll get a deadlock when you try to execute an action during an event handler. See the list archives for at least 3 recent examples of this and solutions (ManagerProxyEventListener, I think?). Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 |
From: Michael Y. <mic...@i9...> - 2007-11-07 21:17:04
|
Martin, I just realized what you meant by "Are you mixing the Live API and the Manager API?" and yes I am catching events from both. Mike Michael Yara wrote: > Martin, > > In this case I am utilizing the Live API only. I am not catching raw > manager events. If I do what you suggested getMeetMeRooms() works as it > should. > What I really don't understand is in my original example how does > Asterisk-Java know instantly about the other MeetMe users when only one > is firing a manager MeetMeLeaveEvent? > Is it parsing the MeetMe command? If so why cant it do this on connection? > > Mike > > Martin Smith wrote: > >> Hello, >> >> Are you mixing the Live API and the Manager API? Also, can you try >> having the 3 extensions call into the meetme room AFTER you connect to >> the server but BEFORE you use getMeetMeRooms()? >> >> I think the reason you're not seeing anything is that Asterisk-Java >> internally tracks MeetMe rooms as it sees events, and it hasn't seen an >> event yet about your MeetMe room. I know for things like channels that >> exist, fetching a list of channels will take care of this -- I don't >> know if there's a way to trigger the creation of some MeetMe events so >> that AJ knows about the rooms. >> >> Martin Smith, Systems Developer >> ma...@be... >> Bureau of Economic and Business Research >> University of Florida >> (352) 392-0171 Ext. 221 >> >> >> >> >> >>> -----Original Message----- >>> From: ast...@li... >>> [mailto:ast...@li...] On >>> Behalf Of Michael Yara >>> Sent: Wednesday, November 07, 2007 1:12 PM >>> To: ast...@li... >>> Subject: [Asterisk-java-users] getMeetMeRooms() Problem >>> >>> Hello, >>> >>> Ive been having a strange problem with using getMeetMeRooms() >>> from the >>> Live implementation of AsteriskServer. I am attempting to get >>> the state >>> of the conference rooms after I have connected to the manager, but I >>> always get an empty collection. >>> I have tried both 0.3.0 and 0.3.1 and they both have the same >>> behavior. >>> Here is an example: >>> >>> -3 extensions(100,101,102) Call into the static MeetMe room 1234 >>> -I start my application which connects to the manager and queries the >>> MeetMe rooms via getMeetMeRooms() which returns an empty collection. >>> -I then hang up extension 100 when I do this 3 onNewMeetMeUser events >>> fire for all 3 extensions and then a Leave state event fires for the >>> extension that was hung up. >>> >>> I have tried restarting my asterisk server with no effect. Is >>> Asterisk-Java unable to query MeetMe state on connect? If so >>> is there a >>> way I can modify Asterisk-Java to do this? >>> >>> Thank You, >>> Mike >>> >>> >>> -------------------------------------------------------------- >>> ----------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and >>> a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Michael Y. <mic...@i9...> - 2007-11-07 21:14:50
|
Martin, In this case I am utilizing the Live API only. I am not catching raw manager events. If I do what you suggested getMeetMeRooms() works as it should. What I really don't understand is in my original example how does Asterisk-Java know instantly about the other MeetMe users when only one is firing a manager MeetMeLeaveEvent? Is it parsing the MeetMe command? If so why cant it do this on connection? Mike Martin Smith wrote: > Hello, > > Are you mixing the Live API and the Manager API? Also, can you try > having the 3 extensions call into the meetme room AFTER you connect to > the server but BEFORE you use getMeetMeRooms()? > > I think the reason you're not seeing anything is that Asterisk-Java > internally tracks MeetMe rooms as it sees events, and it hasn't seen an > event yet about your MeetMe room. I know for things like channels that > exist, fetching a list of channels will take care of this -- I don't > know if there's a way to trigger the creation of some MeetMe events so > that AJ knows about the rooms. > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > > > > >> -----Original Message----- >> From: ast...@li... >> [mailto:ast...@li...] On >> Behalf Of Michael Yara >> Sent: Wednesday, November 07, 2007 1:12 PM >> To: ast...@li... >> Subject: [Asterisk-java-users] getMeetMeRooms() Problem >> >> Hello, >> >> Ive been having a strange problem with using getMeetMeRooms() >> from the >> Live implementation of AsteriskServer. I am attempting to get >> the state >> of the conference rooms after I have connected to the manager, but I >> always get an empty collection. >> I have tried both 0.3.0 and 0.3.1 and they both have the same >> behavior. >> Here is an example: >> >> -3 extensions(100,101,102) Call into the static MeetMe room 1234 >> -I start my application which connects to the manager and queries the >> MeetMe rooms via getMeetMeRooms() which returns an empty collection. >> -I then hang up extension 100 when I do this 3 onNewMeetMeUser events >> fire for all 3 extensions and then a Leave state event fires for the >> extension that was hung up. >> >> I have tried restarting my asterisk server with no effect. Is >> Asterisk-Java unable to query MeetMe state on connect? If so >> is there a >> way I can modify Asterisk-Java to do this? >> >> Thank You, >> Mike >> >> >> -------------------------------------------------------------- >> ----------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and >> a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Martin S. <ma...@be...> - 2007-11-07 20:58:33
|
Hello, Are you mixing the Live API and the Manager API? Also, can you try having the 3 extensions call into the meetme room AFTER you connect to the server but BEFORE you use getMeetMeRooms()? I think the reason you're not seeing anything is that Asterisk-Java internally tracks MeetMe rooms as it sees events, and it hasn't seen an event yet about your MeetMe room. I know for things like channels that exist, fetching a list of channels will take care of this -- I don't know if there's a way to trigger the creation of some MeetMe events so that AJ knows about the rooms. Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of Michael Yara > Sent: Wednesday, November 07, 2007 1:12 PM > To: ast...@li... > Subject: [Asterisk-java-users] getMeetMeRooms() Problem >=20 > Hello, >=20 > Ive been having a strange problem with using getMeetMeRooms()=20 > from the=20 > Live implementation of AsteriskServer. I am attempting to get=20 > the state=20 > of the conference rooms after I have connected to the manager, but I=20 > always get an empty collection. > I have tried both 0.3.0 and 0.3.1 and they both have the same=20 > behavior.=20 > Here is an example: >=20 > -3 extensions(100,101,102) Call into the static MeetMe room 1234 > -I start my application which connects to the manager and queries the=20 > MeetMe rooms via getMeetMeRooms() which returns an empty collection. > -I then hang up extension 100 when I do this 3 onNewMeetMeUser events=20 > fire for all 3 extensions and then a Leave state event fires for the=20 > extension that was hung up. >=20 > I have tried restarting my asterisk server with no effect. Is=20 > Asterisk-Java unable to query MeetMe state on connect? If so=20 > is there a=20 > way I can modify Asterisk-Java to do this? >=20 > Thank You, > Mike >=20 >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and=20 > a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Michael Y. <mic...@i9...> - 2007-11-07 18:12:32
|
Hello, Ive been having a strange problem with using getMeetMeRooms() from the Live implementation of AsteriskServer. I am attempting to get the state of the conference rooms after I have connected to the manager, but I always get an empty collection. I have tried both 0.3.0 and 0.3.1 and they both have the same behavior. Here is an example: -3 extensions(100,101,102) Call into the static MeetMe room 1234 -I start my application which connects to the manager and queries the MeetMe rooms via getMeetMeRooms() which returns an empty collection. -I then hang up extension 100 when I do this 3 onNewMeetMeUser events fire for all 3 extensions and then a Leave state event fires for the extension that was hung up. I have tried restarting my asterisk server with no effect. Is Asterisk-Java unable to query MeetMe state on connect? If so is there a way I can modify Asterisk-Java to do this? Thank You, Mike |
From: <gm...@ea...> - 2007-11-02 23:23:15
|
Hi Patrick It's ok for me; Kind regards, Gaetan On 02-nov.-07, at 14:21, Breucking Patrick wrote: > Hi > > sorry, but I am currently involved in another project for next two > weeks. I will check your patch than- Is this OK for you? > > Best regards, > Patrick > > Am 30.10.2007 um 23:14 schrieb Stefan Reuter: > >> Sorry, not yet. >> Patrick is currently working on the Queues in the live API. >> >> Patrick, can you have a look at Gaetan's patch? >> >> =3DStefan >> >> Ga=EBtan Minet wrote: >>> Hi Stefan >>> >>> Have you had some time to look into this ? Does it seem of >>> general interest for the library ? >>> >>> Regards, >>> Gaetan >>> >>> Begin forwarded message: >>> >>>> *From: *Ga=EBtan Minet <gm...@ea... = <mailto:gm...@ea...>> >>>> *Date: *22 octobre 2007 18:35:35 GMT+02:00 >>>> *To: *ast...@li... >>>> <mailto:ast...@li...> >>>> *Subject: **[Asterisk-java-users] Queues in live api* >>>> *Reply-To: *ast...@li... >>>> <mailto:ast...@li...> >>>> >>>> Hi Stefan >>>> >>>> Here is another bit of code I use for some time now and that maybe >>>> you >>>> might consider including ? >>>> It provides a more complete queue implementation in the live api, >>>> with >>>> listeners interfaces on server, queues, queue entries and channels >>>> property changes. It is somehow similar to your MeetMeRoom >>>> implementation. >>>> >>>> I just merged it against head (... for the third time... I wish I >>>> had >>>> sent this earlier) and performed some tests to confirm it's still >>>> working. >>>> Anyway, I hope I have not broken anything else during the merge >>>> (QueueMembers and recently timers have arrived in the interim, but >>>> most of the work was only due to a heavy coding style change ?) >>>> >>>> The patch is not too intrusive I think. For old code, the only >>>> modification should be that the queue entries are now wrapped in a >>>> QueueEntry object. >>>> >>>> >>>> Kind regards >>>> >>>> Gaetan >>> >>> >>> = ------------------------------------------------------------------------ >>> >>> = ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a >>> browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> >>> >>> = ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> -- =20 >> reuter network consulting >> Neusser Str. 110 >> 50760 Koeln >> Germany >> Telefon: +49 221 1305699-0 >> Telefax: +49 221 1305699-90 >> E-Mail: ste...@re... >> Jabber: ste...@re... >> >> Steuernummern 215/5140/1791 USt-IdNr. DE220701760 >> >> = ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> browser. >> Download your FREE copy of Splunk now >> = http://get.splunk.com/_______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > = ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a =20 > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Breucking P. <bre...@go...> - 2007-11-02 13:21:33
|
Hi sorry, but I am currently involved in another project for next two =20 weeks. I will check your patch than- Is this OK for you? Best regards, Patrick Am 30.10.2007 um 23:14 schrieb Stefan Reuter: > Sorry, not yet. > Patrick is currently working on the Queues in the live API. > > Patrick, can you have a look at Gaetan's patch? > > =3DStefan > > Ga=EBtan Minet wrote: >> Hi Stefan >> >> Have you had some time to look into this ? Does it seem of >> general interest for the library ? >> >> Regards, >> Gaetan >> >> Begin forwarded message: >> >>> *From: *Ga=EBtan Minet <gm...@ea... = <mailto:gm...@ea...>> >>> *Date: *22 octobre 2007 18:35:35 GMT+02:00 >>> *To: *ast...@li... >>> <mailto:ast...@li...> >>> *Subject: **[Asterisk-java-users] Queues in live api* >>> *Reply-To: *ast...@li... >>> <mailto:ast...@li...> >>> >>> Hi Stefan >>> >>> Here is another bit of code I use for some time now and that maybe =20= >>> you >>> might consider including ? >>> It provides a more complete queue implementation in the live api, =20= >>> with >>> listeners interfaces on server, queues, queue entries and channels >>> property changes. It is somehow similar to your MeetMeRoom =20 >>> implementation. >>> >>> I just merged it against head (... for the third time... I wish I =20= >>> had >>> sent this earlier) and performed some tests to confirm it's still =20= >>> working. >>> Anyway, I hope I have not broken anything else during the merge >>> (QueueMembers and recently timers have arrived in the interim, but >>> most of the work was only due to a heavy coding style change ?) >>> >>> The patch is not too intrusive I think. For old code, the only >>> modification should be that the queue entries are now wrapped in a >>> QueueEntry object. >>> >>> >>> Kind regards >>> >>> Gaetan >> >> >> = ------------------------------------------------------------------------ >> >> = ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a =20 >> browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> >> >> = ------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > --=20 > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > = ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a =20 > browser. > Download your FREE copy of Splunk now >> = http://get.splunk.com/_______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Stefan R. <ste...@re...> - 2007-10-30 22:14:35
|
Sorry, not yet. Patrick is currently working on the Queues in the live API. Patrick, can you have a look at Gaetan's patch? =3DStefan Ga=EBtan Minet wrote: > Hi Stefan >=20 > Have you had some time to look into this ? Does it seem of > general interest for the library ? >=20 > Regards, > Gaetan >=20 > Begin forwarded message: >=20 >> *From: *Ga=EBtan Minet <gm...@ea... <mailto:gm...@ea...>> >> *Date: *22 octobre 2007 18:35:35 GMT+02:00 >> *To: *ast...@li... >> <mailto:ast...@li...> >> *Subject: **[Asterisk-java-users] Queues in live api* >> *Reply-To: *ast...@li... >> <mailto:ast...@li...> >> >> Hi Stefan >> >> Here is another bit of code I use for some time now and that maybe you= >> might consider including ? >> It provides a more complete queue implementation in the live api, with= >> listeners interfaces on server, queues, queue entries and channels >> property changes. It is somehow similar to your MeetMeRoom implementat= ion. >> >> I just merged it against head (... for the third time... I wish I had= >> sent this earlier) and performed some tests to confirm it's still work= ing. >> Anyway, I hope I have not broken anything else during the merge >> (QueueMembers and recently timers have arrived in the interim, but >> most of the work was only due to a heavy coding style change ?) >> >> The patch is not too intrusive I think. For old code, the only >> modification should be that the queue entries are now wrapped in a >> QueueEntry object. >> >> >> Kind regards >> >> Gaetan >=20 >=20 > -----------------------------------------------------------------------= - >=20 > -----------------------------------------------------------------------= -- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser.= > Download your FREE copy of Splunk now >> http://get.splunk.com/ >=20 >=20 > -----------------------------------------------------------------------= - >=20 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: <gm...@ea...> - 2007-10-30 22:11:45
|
Hi Stefan Have you had some time to look into this ? Does it seem of general =20 interest for the library ? Regards, Gaetan Begin forwarded message: > From: Ga=EBtan Minet <gm...@ea...> > Date: 22 octobre 2007 18:35:35 GMT+02:00 > To: ast...@li... > Subject: [Asterisk-java-users] Queues in live api > Reply-To: ast...@li... > > Hi Stefan > > Here is another bit of code I use for some time now and that maybe =20 > you might consider including ? > It provides a more complete queue implementation in the live api, =20 > with listeners interfaces on server, queues, queue entries and =20 > channels property changes. It is somehow similar to your MeetMeRoom =20= > implementation. > > I just merged it against head (... for the third time... I wish I =20 > had sent this earlier) and performed some tests to confirm it's =20 > still working. > Anyway, I hope I have not broken anything else during the merge =20 > (QueueMembers and recently timers have arrived in the interim, but =20 > most of the work was only due to a heavy coding style change ?) > > The patch is not too intrusive I think. For old code, the only =20 > modification should be that the queue entries are now wrapped in a =20 > QueueEntry object. > > > Kind regards > > Gaetan |
From: <gm...@ea...> - 2007-10-22 16:35:46
|
Hi Stefan Here is another bit of code I use for some time now and that maybe you might consider including ? It provides a more complete queue implementation in the live api, with listeners interfaces on server, queues, queue entries and channels property changes. It is somehow similar to your MeetMeRoom implementation. I just merged it against head (... for the third time... I wish I had sent this earlier) and performed some tests to confirm it's still working. Anyway, I hope I have not broken anything else during the merge (QueueMembers and recently timers have arrived in the interim, but most of the work was only due to a heavy coding style change ?) The patch is not too intrusive I think. For old code, the only modification should be that the queue entries are now wrapped in a QueueEntry object. Kind regards Gaetan |
From: Gabriel A. <gab...@gl...> - 2007-10-18 18:08:24
|
Thanks Martin ! Stefan's answer was very useful, it confirmed my assumption. Effectivly I am sending a ManagerAction when an event is dispatched. I tried using ManagerEventListenerProxy, but it didn't work. I think the last chance it would be to start a new Thread. Gabriel. -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Martin Smith Sent: jueves, 18 de octubre de 2007 10:50 a.m. To: ast...@li... Subject: Re: [Asterisk-java-users] Manager Events blocked Hello Gabriel, Stefan's answer reproduced below might help you. It sounds like you are mixing the Live API (AsteriskServer) and the manager API (ManagerEventListener). You may also want to double check you are using OriginateAction.setAsync(true). > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On Behalf > Of Stefan Reuter > Sent: Wednesday, September 05, 2007 4:34 PM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Execute Action after connect or > reconnect > > Hi, > > you seem to be mixing the live API and the manager API. While this is > generally possible I think it would be better to just stick with the > live API. You are adding a callback to the ConnectEvent, so maybe the > best solution would be to provide a way to register a few more > callbacks like for connect and disconnect in the live API. > > The problem in this case is that a ManagerAction is send from the > event dispatching thread which is not allowed. Generally the live API > handles this problem by using a ManagerEventListenerProxy but by > registering your own listener with the underlying connection you > prevent this from working correctly. > So what you have to do is to decouple receiving the event and sending > the action on your own. One solution is starting a new Thread as > proposed by Martin. Another solution is to use > ManagerEventListenerProxy for your own listener, too. > This might look like this: > > Instead of > > managerConnection.addEventListener( > new ConnectEventListener(asteriskserver)); > > use > > managerConnection.addEventListener(new ManagerEventListenerProxy( > new ConnectEventListener(asteriskserver))); > > =Stefan Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of Gabriel Allasia Sent: Wednesday, October 17, 2007 9:42 PM To: ast...@li... Subject: [Asterisk-java-users] Manager Events blocked Hi, When we use AsteriskServer.originateToExtensionAsync to generate async calls to an extension and context, we have problems to listen events in a class that implements ManagerEventListener. It seems like the events are blocked until the call is finished. However if we use other extensions and contexts, everything goes ok. Any suggestions? Thanks in advance, Gabriel. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users _____________________________________________________________________ This information is private and confidential and intended for the recipient only. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and shall not be regarded neither as a proposal, acceptance nor as a statement of will or official statement from Globant. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. |
From: Martin S. <ma...@be...> - 2007-10-18 14:12:29
|
Hello Gabriel, =20 Stefan's answer reproduced below might help you. It sounds like you are mixing the Live API (AsteriskServer) and the manager API (ManagerEventListener). You may also want to double check you are using OriginateAction.setAsync(true). =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of Stefan Reuter > Sent: Wednesday, September 05, 2007 4:34 PM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Execute Action after=20 > connect or reconnect >=20 > Hi, >=20 > you seem to be mixing the live API and the manager API. While this is > generally possible I think it would be better to just stick with the > live API. You are adding a callback to the ConnectEvent, so maybe the > best solution would be to provide a way to register a few=20 > more callbacks > like for connect and disconnect in the live API. >=20 > The problem in this case is that a ManagerAction is send from=20 > the event > dispatching thread which is not allowed. Generally the live=20 > API handles > this problem by using a ManagerEventListenerProxy but by registering > your own listener with the underlying connection you prevent this from > working correctly. > So what you have to do is to decouple receiving the event and sending > the action on your own. One solution is starting a new Thread as > proposed by Martin. Another solution is to use=20 > ManagerEventListenerProxy > for your own listener, too. > This might look like this: >=20 > Instead of >=20 > managerConnection.addEventListener( > new ConnectEventListener(asteriskserver)); >=20 > use >=20 > managerConnection.addEventListener(new ManagerEventListenerProxy( > new ConnectEventListener(asteriskserver))); >=20 > =3DStefan =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of Gabriel Allasia Sent: Wednesday, October 17, 2007 9:42 PM To: ast...@li... Subject: [Asterisk-java-users] Manager Events blocked =09 =09 Hi, When we use AsteriskServer.originateToExtensionAsync to generate async calls to an extension and context, we have problems to listen events in a class that implements ManagerEventListener. It seems like the events are blocked until the call is finished. However if we use other extensions and contexts, everything goes ok. =20 Any suggestions? Thanks in advance, Gabriel. =09 |
From: Gabriel A. <gab...@gl...> - 2007-10-18 01:38:28
|
Hi, When we use AsteriskServer.originateToExtensionAsync to generate async calls to an extension and context, we have problems to listen events in a class that implements ManagerEventListener. It seems like the events are blocked until the call is finished. However if we use other extensions and contexts, everything goes ok. Any suggestions? Thanks in advance, Gabriel. _____________________________________________________________________ This information is private and confidential and intended for the recipient only. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and shall not be regarded neither as a proposal, acceptance nor as a statement of will or official statement from Globant. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. |
From: lumen <lu...@bu...> - 2007-10-15 16:52:27
|
On Mon, Oct 15, 2007 at 12:02:22PM +0200, m....@ad... send: > > > Hi all, > I'm new to asterisk and I'm trying to control my pbx server using AGI > i can easily play sounds, ask for user input and so on, but I could'n find > how to put on hold and redirect a the call to another number (i.e. "press 1 > if you want to speak to CEO" -> put the call on hold, let the CEO phone > ring, play a welcome message ("hi, CEO, there is an incoming call for you") > and then let the parties speak together. You are working from FAGI or AMI ? On solution is to use meetme conferences: 1. Send the current call to context that ends on meetme conference. 2. Call the second party and do stuff with him. 3. Send the second party to the same conference. The above has the inconvenience that the call is in coference. It complicates thigs like fetures or billing. See Redirect Action of AMI. I _think_ that to OriginateAction of AMI you can specify an existing channel. This way you can (repeat that I not test it) : 1. Do stuff with the current call and put on hold. 2. Generate an Originate Action and set as destination a macro that do suff with him. As the other destination, put the existing channel that is on hold. 3. At the end of the macro, I _think_ both channels get bridget. > I guess I would use the Dial command, but could not find any examples on > how to do this step by step...probabily I'm too newbie to implement such an > advanced functionality and I need to study asteriks deeper.... yes, probably. But you can study with targets like this. |
From: <m....@ad...> - 2007-10-15 10:02:24
|
Hi all, I'm new to asterisk and I'm trying to control my pbx server using AGI i can easily play sounds, ask for user input and so on, but I could'n f= ind how to put on hold and redirect a the call to another number (i.e. "pre= ss 1 if you want to speak to CEO" -> put the call on hold, let the CEO phone= ring, play a welcome message ("hi, CEO, there is an incoming call for y= ou") and then let the parties speak together. I guess I would use the Dial command, but could not find any examples o= n how to do this step by step...probabily I'm too newbie to implement suc= h an advanced functionality and I need to study asteriks deeper.... anyway, thanks to all Maurizio= |
From: Martin S. <ma...@be...> - 2007-10-12 14:50:48
|
Very cool -- thanks for sharing! Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of S. Brett Sutton > Sent: Friday, October 12, 2007 2:40 AM > To: ast...@li... > Subject: [Asterisk-java-users] FastAgi Simulate >=20 > Stefan, > I don't know if anyone will find this useful, but I've created a=20 > little simulator for Fast AGI. >=20 > The idea is that you can use it in a test enviroment to simulate fast=20 > agi calls FROM an asterisk server. >=20 > Its by no means complete and has had only basic testing, but=20 > I found it=20 > useful and thought the community might get some benefit from it. >=20 > On word of warning, it tampers with the URL protocol=20 > factories so don't=20 > use this inside any application which intends to use the URL=20 > class. It=20 > is only intended for use as a test driver in something like junit. >=20 > If you want it, I'm happy to put it into the public domain. >=20 > To use the script do the following: >=20 > FastAgiSimulator fast =3D new FastAgiSimulator(); > =20 > fast.setVariable("somekey", "somevalue"); > = fast.execute("agi://localhost/Auth?Amount=3D10.00&CC=3D1234"); >=20 >=20 > Regards, > S. Brett Sutton >=20 >=20 > /* > * This class is designed to simulate a fast agi call originating > * from an asterisk server. > * > * The idea is that when developing a fast agi server you can use > * this class to simulate the AGI() command for testing purposes. > * > */ > package au.com.asteriskit.fastagi.paymentgateway.test; >=20 > import java.io.BufferedReader; > import java.io.BufferedWriter; > import java.io.IOException; > import java.io.InputStream; > import java.io.InputStreamReader; > import java.io.OutputStream; > import java.io.OutputStreamWriter; > import java.net.Socket; > import java.net.URL; > import java.net.URLConnection; > import java.net.URLStreamHandler; > import java.net.URLStreamHandlerFactory; > import java.util.HashMap; >=20 > import org.apache.log4j.Logger; >=20 > public class FastAgiSimulator > { > static final Logger s_logger =3D=20 > Logger.getLogger(FastAgiSimulator.class); > static final int FASTAGI_PORT =3D 4573; > =20 > HashMap<String, String> vars =3D new HashMap<String, String>(); > private boolean initialized =3D false;; > =20 > /** > * Allows you to simulating setting an asterisk variable. > * Set all variables before calling execute. > * @param key > * @param value > */ > void setVariable(String key, String value) > { > vars.put(key, value); > } > =20 > void execute(String urlString) throws IOException > { > init(); > URL url =3D new URL(urlString); > =20 > =20 > Socket client =3D new Socket(url.getHost(),=20 > (url.getPort() =3D=3D -1 ?=20 > FASTAGI_PORT > : url.getPort())); >=20 > OutputStream os =3D client.getOutputStream(); > =20 > writeAgiVar(os, "network", "yes"); > writeAgiVar(os, "network_script", > url.getPath() + (url.getQuery() =3D=3D null ? "" : ("?" +=20 > url.getQuery()))); > =20 > for (String key : vars.keySet()) > { > String value =3D vars.get(key); > writeAgiVar(os, key, value); > } > =20 > os.write("\n".getBytes()); > os.flush(); >=20 > // Wait for responses and just Ack > BufferedWriter br =3D new BufferedWriter(new=20 > OutputStreamWriter(client.getOutputStream())); > InputStream is =3D client.getInputStream(); > BufferedReader lr =3D new BufferedReader(new=20 > InputStreamReader(is)); > String line =3D null; > while ((line =3D lr.readLine()) !=3D null) > { > s_logger.debug(line); > // Just reply back with a 'status ok'. > br.write("200 result=3DOK\n"); > br.flush(); > } >=20 > } > =20 > =20 > private void init() > { > if (!initialized ) > URL.setURLStreamHandlerFactory(new=20 > AgiStreamHandlerFactory()); > initialized =3D true; > =20 > } >=20 > private void writeAgiVar(OutputStream os, > String argName, String argValue) throws IOException > { > if (s_logger.isDebugEnabled()) > s_logger.debug("Writing agi var: " + argName + ":=20 > " + argValue); > =20 > os.write(("agi_" + argName + ": " + argValue +=20 > "\n").getBytes()); > } > =20 > =20 > // Add a fake stream handler so that the agi: protocol is=20 > handled by > // the URL class > class AgiStreamHandlerFactory implements URLStreamHandlerFactory > { >=20 > AgiStreamHandlerFactory() > { > =20 > } > =20 > public URLStreamHandler createURLStreamHandler(String=20 > protocol) > { > // TODO Auto-generated method stub > return new AgiURLStreamHandler(); > } > =20 > } > =20 > class AgiURLStreamHandler extends URLStreamHandler > { >=20 > @Override > protected URLConnection openConnection(URL u) throws=20 > IOException > { > // Not used > return null; > } > =20 > } >=20 > } >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and=20 > a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: S. B. S. <bs...@no...> - 2007-10-12 06:39:37
|
Stefan, I don't know if anyone will find this useful, but I've created a little simulator for Fast AGI. The idea is that you can use it in a test enviroment to simulate fast agi calls FROM an asterisk server. Its by no means complete and has had only basic testing, but I found it useful and thought the community might get some benefit from it. On word of warning, it tampers with the URL protocol factories so don't use this inside any application which intends to use the URL class. It is only intended for use as a test driver in something like junit. If you want it, I'm happy to put it into the public domain. To use the script do the following: FastAgiSimulator fast = new FastAgiSimulator(); fast.setVariable("somekey", "somevalue"); fast.execute("agi://localhost/Auth?Amount=10.00&CC=1234"); Regards, S. Brett Sutton /* * This class is designed to simulate a fast agi call originating * from an asterisk server. * * The idea is that when developing a fast agi server you can use * this class to simulate the AGI() command for testing purposes. * */ package au.com.asteriskit.fastagi.paymentgateway.test; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.net.Socket; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; import java.net.URLStreamHandlerFactory; import java.util.HashMap; import org.apache.log4j.Logger; public class FastAgiSimulator { static final Logger s_logger = Logger.getLogger(FastAgiSimulator.class); static final int FASTAGI_PORT = 4573; HashMap<String, String> vars = new HashMap<String, String>(); private boolean initialized = false;; /** * Allows you to simulating setting an asterisk variable. * Set all variables before calling execute. * @param key * @param value */ void setVariable(String key, String value) { vars.put(key, value); } void execute(String urlString) throws IOException { init(); URL url = new URL(urlString); Socket client = new Socket(url.getHost(), (url.getPort() == -1 ? FASTAGI_PORT : url.getPort())); OutputStream os = client.getOutputStream(); writeAgiVar(os, "network", "yes"); writeAgiVar(os, "network_script", url.getPath() + (url.getQuery() == null ? "" : ("?" + url.getQuery()))); for (String key : vars.keySet()) { String value = vars.get(key); writeAgiVar(os, key, value); } os.write("\n".getBytes()); os.flush(); // Wait for responses and just Ack BufferedWriter br = new BufferedWriter(new OutputStreamWriter(client.getOutputStream())); InputStream is = client.getInputStream(); BufferedReader lr = new BufferedReader(new InputStreamReader(is)); String line = null; while ((line = lr.readLine()) != null) { s_logger.debug(line); // Just reply back with a 'status ok'. br.write("200 result=OK\n"); br.flush(); } } private void init() { if (!initialized ) URL.setURLStreamHandlerFactory(new AgiStreamHandlerFactory()); initialized = true; } private void writeAgiVar(OutputStream os, String argName, String argValue) throws IOException { if (s_logger.isDebugEnabled()) s_logger.debug("Writing agi var: " + argName + ": " + argValue); os.write(("agi_" + argName + ": " + argValue + "\n").getBytes()); } // Add a fake stream handler so that the agi: protocol is handled by // the URL class class AgiStreamHandlerFactory implements URLStreamHandlerFactory { AgiStreamHandlerFactory() { } public URLStreamHandler createURLStreamHandler(String protocol) { // TODO Auto-generated method stub return new AgiURLStreamHandler(); } } class AgiURLStreamHandler extends URLStreamHandler { @Override protected URLConnection openConnection(URL u) throws IOException { // Not used return null; } } } |
From: Patrick B. <bre...@go...> - 2007-10-08 10:35:15
|
Hi Daniel, these two events will not be recognized yet. I will add this (Task [AJ-94]). Regards Patrick Am Dienstag, 25. September 2007 01:26 schrieb Daniel Gradecak: > I do not see that those events are handled correctly in real time. The > queue members are set once the connection is started with asterisk but > later on it seems that > the live api is not really taking care of those two events. > > Are there several events that are not handled buy the live api ? Is > there a plan to add it to the live api? > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- Patrick Breucking <bre...@GO...> (System Engineer) * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 * http://www.GONICUS.de *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder *Vorsitzender des Beirats: Juergen Michels *Amtsgericht Arnsberg * HRB 1968 |