asterisk-java-cvs Mailing List for Asterisk-Java Library (Page 76)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
(4) |
Feb
(75) |
Mar
(211) |
Apr
(70) |
May
(12) |
Jun
(7) |
Jul
(96) |
Aug
(90) |
Sep
(11) |
Oct
(42) |
Nov
(45) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(10) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(3) |
Aug
(73) |
Sep
(13) |
Oct
(4) |
Nov
(1) |
Dec
(7) |
2009 |
Jan
(1) |
Feb
(2) |
Mar
(48) |
Apr
(21) |
May
(14) |
Jun
(11) |
Jul
(9) |
Aug
(2) |
Sep
(11) |
Oct
(14) |
Nov
(6) |
Dec
(4) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(12) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
2012 |
Jan
(3) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(25) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2016 |
Jan
|
Feb
(42) |
Mar
(6) |
Apr
(15) |
May
(3) |
Jun
(1) |
Jul
(11) |
Aug
|
Sep
|
Oct
(17) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
(3) |
Jul
(7) |
Aug
(11) |
Sep
(5) |
Oct
(7) |
Nov
(4) |
Dec
(4) |
2018 |
Jan
(11) |
Feb
(11) |
Mar
(3) |
Apr
|
May
(9) |
Jun
(6) |
Jul
(17) |
Aug
(9) |
Sep
(2) |
Oct
(4) |
Nov
(3) |
Dec
(3) |
2019 |
Jan
(13) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2020 |
Jan
(2) |
Feb
(72) |
Mar
(8) |
Apr
(11) |
May
(12) |
Jun
(3) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(4) |
Nov
|
Dec
(9) |
2021 |
Jan
|
Feb
(31) |
Mar
(6) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
(9) |
Nov
|
Dec
(32) |
2022 |
Jan
(5) |
Feb
(7) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(2) |
Oct
(111) |
Nov
(105) |
Dec
(26) |
2023 |
Jan
(25) |
Feb
(6) |
Mar
(10) |
Apr
(54) |
May
(41) |
Jun
(24) |
Jul
(6) |
Aug
(11) |
Sep
(9) |
Oct
(8) |
Nov
(55) |
Dec
(34) |
2024 |
Jan
(6) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(89) |
Sep
(48) |
Oct
(31) |
Nov
(9) |
Dec
(19) |
2025 |
Jan
(12) |
Feb
(18) |
Mar
(9) |
Apr
(7) |
May
|
Jun
(7) |
Jul
(7) |
Aug
(3) |
Sep
(22) |
Oct
(2) |
Nov
|
Dec
|
From: Stefan R. <sr...@us...> - 2005-10-14 22:59:23
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9036/src/java/net/sf/asterisk/fastagi Modified Files: SimpleMappingStrategy.java Log Message: changed type of mappings from Properties to Map Index: SimpleMappingStrategy.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/SimpleMappingStrategy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- SimpleMappingStrategy.java 14 Oct 2005 21:42:33 -0000 1.1 +++ SimpleMappingStrategy.java 14 Oct 2005 22:59:13 -0000 1.2 @@ -16,7 +16,7 @@ */ package net.sf.asterisk.fastagi; -import java.util.Properties; +import java.util.Map; /** * A MappingStrategy that is configured via a fixed set of properties.<br> @@ -28,10 +28,16 @@ import java.util.Properties; * <bean id="mapping" * class="net.sf.asterisk.fastagi.SimpleMappingStrategy"> * <property name="mappings"> - * <props> - * <prop key="leastcostdial.agi">leastCostDial</prop> - * <prop key="hello.agi">hello</prop> - * </props> + * <map> + * <entry> + * <key><value>hello.agi</value></key> + * <ref local="hello"/> + * </entry> + * <entry> + * <key><value>leastcostdial.agi</value></key> + * <ref local="leastCostDial"/> + * </entry> + * </map> * </property> * </bean> * @@ -52,9 +58,9 @@ import java.util.Properties; */ public class SimpleMappingStrategy implements MappingStrategy { - private Properties mappings; + private Map mappings; - public void setMappings(Properties mappings) + public void setMappings(Map mappings) { this.mappings = mappings; } |
From: Stefan R. <sr...@us...> - 2005-10-14 21:49:02
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26164/src/test/net/sf/asterisk/manager Modified Files: DefaultManagerConnectionTest.java Log Message: Adjusted timing Index: DefaultManagerConnectionTest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/DefaultManagerConnectionTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -p -r1.11 -r1.12 --- DefaultManagerConnectionTest.java 16 Jul 2005 21:48:16 -0000 1.11 +++ DefaultManagerConnectionTest.java 14 Oct 2005 21:48:54 -0000 1.12 @@ -204,14 +204,14 @@ public class DefaultManagerConnectionTes // called. try { - Thread.sleep(10); + Thread.sleep(100); } catch (InterruptedException e) { // ugly hack to make this work when the thread is interrupted coz a // response has been received but the ManagerConnection was not yet // sleeping - Thread.sleep(10); + Thread.sleep(100); } assertEquals("run() not called 1 time", 1, mockReader.runCalls); assertEquals("unexpected call to die()", 0, mockReader.dieCalls); |
From: Stefan R. <sr...@us...> - 2005-10-14 21:42:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24994/src/java/net/sf/asterisk/fastagi Modified Files: ResourceBundleMappingStrategy.java Added Files: SimpleMappingStrategy.java Log Message: Added SimpleMappingStrategy --- NEW FILE: SimpleMappingStrategy.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.fastagi; import java.util.Properties; /** * A MappingStrategy that is configured via a fixed set of properties.<br> * This mapping strategy is most useful when used with the Spring framework.<br> * Example (using Spring): * * <pre> * <beans> * <bean id="mapping" * class="net.sf.asterisk.fastagi.SimpleMappingStrategy"> * <property name="mappings"> * <props> * <prop key="leastcostdial.agi">leastCostDial</prop> * <prop key="hello.agi">hello</prop> * </props> * </property> * </bean> * * <bean id="hello" * class="com.example.fastagi.HelloAGIScript"/> * * <bean id="leastCostDial" * class="com.example.fastagi.LeastCostDialAGIScript"> * <property name="rates"><value>rates.txt</value></property> * </bean> * <beans> * </pre> * * LeastCostDialAGIScript and HelloAGIScript must both implement the AGIScript.<br> * * @author srt * @version $Id: SimpleMappingStrategy.java,v 1.1 2005/10/14 21:42:33 srt Exp $ */ public class SimpleMappingStrategy implements MappingStrategy { private Properties mappings; public void setMappings(Properties mappings) { this.mappings = mappings; } public AGIScript determineScript(AGIRequest request) { if (mappings == null) { return null; } return (AGIScript) mappings.get(request.getScript()); } } Index: ResourceBundleMappingStrategy.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/ResourceBundleMappingStrategy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- ResourceBundleMappingStrategy.java 31 Mar 2005 22:29:52 -0000 1.2 +++ ResourceBundleMappingStrategy.java 14 Oct 2005 21:42:33 -0000 1.3 @@ -50,12 +50,12 @@ public class ResourceBundleMappingStrate private static final String DEFAULT_RESOURCE_BUNDLE_NAME = "fastagi-mapping"; private final Log logger = LogFactory.getLog(getClass()); private String resourceBundleName; - private Map mapping; + private Map mappings; public ResourceBundleMappingStrategy() { this.resourceBundleName = DEFAULT_RESOURCE_BUNDLE_NAME; - this.mapping = null; + this.mappings = null; } public void setResourceBundleName(String propertiesName) @@ -68,7 +68,7 @@ public class ResourceBundleMappingStrate ResourceBundle resourceBundle; Enumeration keys; - mapping = new HashMap(); + mappings = new HashMap(); try { @@ -97,7 +97,7 @@ public class ResourceBundleMappingStrate continue; } - mapping.put(scriptName, agiScript); + mappings.put(scriptName, agiScript); } } @@ -125,11 +125,11 @@ public class ResourceBundleMappingStrate public AGIScript determineScript(AGIRequest request) { - if (mapping == null) + if (mappings == null) { loadResourceBundle(); } - return (AGIScript) mapping.get(request.getScript()); + return (AGIScript) mappings.get(request.getScript()); } } |
From: Stefan R. <sr...@us...> - 2005-10-10 20:34:26
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11813/src/java/net/sf/asterisk/manager Modified Files: DefaultManagerConnection.java ManagerConnection.java Log Message: Added setSocketTimeout() to ManagerConnection interface (AJ-16) Index: DefaultManagerConnection.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultManagerConnection.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -p -r1.26 -r1.27 --- DefaultManagerConnection.java 6 Oct 2005 11:06:10 -0000 1.26 +++ DefaultManagerConnection.java 10 Oct 2005 20:33:55 -0000 1.27 @@ -298,19 +298,6 @@ public class DefaultManagerConnection im } /** - * The timeout to use when connecting the the Asterisk server.<br> - * Default is 0, that is using Java's built-in default. - * - * @param socketTimeout the timeout value to be used in milliseconds. - * @see java.net.Socket#connect(java.net.SocketAddress, int) - * @since 0.2 - */ - public void setSocketTimeout(int socketTimeout) - { - this.socketTimeout = socketTimeout; - } - - /** * Sets the time in milliseconds the synchronous methods * {@link #sendAction(ManagerAction)} and * {@link #sendAction(ManagerAction, long)} will sleep between two checks @@ -352,6 +339,11 @@ public class DefaultManagerConnection im reader.registerEventClass(userEventClass); } + public void setSocketTimeout(int socketTimeout) + { + this.socketTimeout = socketTimeout; + } + /** * Logs in to the asterisk manager using asterisk's MD5 based * challenge/response protocol. The login is delayed until the protocol Index: ManagerConnection.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerConnection.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -p -r1.11 -r1.12 --- ManagerConnection.java 16 Jul 2005 22:04:55 -0000 1.11 +++ ManagerConnection.java 10 Oct 2005 20:33:55 -0000 1.12 @@ -61,6 +61,16 @@ public interface ManagerConnection void registerUserEventClass(Class userEventClass); /** + * The timeout to use when connecting the the Asterisk server.<br> + * Default is 0, that is using Java's built-in default. + * + * @param socketTimeout the timeout value to be used in milliseconds. + * @see java.net.Socket#connect(java.net.SocketAddress, int) + * @since 0.2 + */ + public void setSocketTimeout(int socketTimeout); + + /** * Logs in to the Asterisk server with the username and password specified * when this connection was created. * |
From: Stefan R. <sr...@us...> - 2005-10-06 19:20:06
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/xdocs Modified Files: index.xml Log Message: Updated version number to 0.2-SNAPSHOT Changed distribution site Changed maven groupId to org.asteriskjava Index: index.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/index.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -p -r1.28 -r1.29 --- index.xml 31 Aug 2005 04:38:39 -0000 1.28 +++ index.xml 6 Oct 2005 19:19:56 -0000 1.29 @@ -80,7 +80,7 @@ href="http://sourceforge.net/projects/asterisk-java/">sourceforge project page</a>.</p> <p>You can also download a - <a href="http://maven.reucon.com/maven/asterisk-java/distributions/">snapshot</a>.</p> + <a href="http://maven.reucon.com/maven/org.asteriskjava/distributions/">snapshot</a>.</p> <p>Please feel free to provide any feedback or ask for support via the <a href="mail-lists.html">Asterisk-Java user's mailing list</a>.</p> <p>Asterisk-Java is also available via cvs from sourcforge:</p> |
From: Stefan R. <sr...@us...> - 2005-10-06 19:20:05
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684 Modified Files: project.xml Log Message: Updated version number to 0.2-SNAPSHOT Changed distribution site Changed maven groupId to org.asteriskjava Index: project.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -p -r1.18 -r1.19 --- project.xml 31 Aug 2005 04:40:48 -0000 1.18 +++ project.xml 6 Oct 2005 19:19:56 -0000 1.19 @@ -1,161 +1,159 @@ <?xml version="1.0" encoding="UTF-8"?> - <project> - <pomVersion>3</pomVersion> - <artifactId>asterisk-java</artifactId> - <groupId>asterisk-java</groupId> - <licenses> - <license> - <name>Apache License, Version 2.0</name> - <url>http://www.apache.org/licenses/LICENSE-2.0</url> - </license> - </licenses> - <reports> - <report>maven-clover-plugin</report> - <report>maven-jdepend-plugin</report> - <report>maven-junit-report-plugin</report> - <report>maven-license-plugin</report> - <report>maven-linkcheck-plugin</report> - <report>maven-statcvs-plugin</report> - <report>maven-jxr-plugin</report> - <report>maven-changelog-plugin</report> - <report>maven-changes-plugin</report> - <report>maven-developer-activity-plugin</report> - <report>maven-file-activity-plugin</report> - <report>maven-javadoc-plugin</report> - <report>maven-checkstyle-plugin</report> - <report>maven-pmd-plugin</report> - </reports> - <id>asterisk-java</id> - <name>Asterisk-Java</name> - <currentVersion>0.2-rc1</currentVersion> - <organization> - <name>Stefan Reuter</name> - <url>http://sourceforge.net/projects/asterisk-java/</url> - <logo>http://sourceforge.net/sflogo.php?group_id=118998&type=5</logo> - </organization> - <inceptionYear>2004</inceptionYear> - <package>net.sf.asterisk</package> - <!-- Gump integration --> - - <gumpRepositoryId>asterisk-java</gumpRepositoryId> - <description>Asterisk-java consists of a set of Java classes that allow you to control an Asterisk PBX via Asterisk's Manager API from Java applications.</description> - <shortDescription>Java Connector for Asterisk PBX</shortDescription> - <url>http://asterisk-java.sourceforge.net/</url> - <siteAddress>shell.sourceforge.net</siteAddress> - <siteDirectory>/home/groups/a/as/asterisk-java/htdocs</siteDirectory> - <distributionSite>shell.sourceforge.net</distributionSite> - <distributionDirectory>/home/groups/a/as/asterisk-java/htdocs/maven</distributionDirectory> - <repository> - <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java</connection> - <developerConnection>scm:cvs:ext:${maven.username}@cvs1.sourceforge.net:/cvsroot/asterisk-java:asterisk-java</developerConnection> - <url>http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/</url> - </repository> - <versions> - <version> - <id>0.2-SNAPSHOT</id> - <name>0.2-SNAPSHOT</name> - <tag>HEAD</tag> - </version> - <version> - <id>0.1-rc1</id> - <name>0.1-rc1</name> - <tag>RC_0_1_1</tag> - </version> - <version> - <id>0.1</id> - <name>0.1</name> - <tag>REL_0_1</tag> - </version> - <version> - <id>0.2-rc1</id> - <name>0.2-rc1</name> - <tag>RC_0_2_1</tag> - </version> - </versions> - <mailingLists> - <mailingList> - <name>Asterisk-java User List</name> - <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</subscribe> - <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</unsubscribe> - <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-users</archive> - </mailingList> - <mailingList> - <name>Asterisk-java Developer List</name> - <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</subscribe> - <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</unsubscribe> - <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-devel</archive> - </mailingList> - <mailingList> - <name>Asterisk-java CVS Commit List</name> - <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</subscribe> - <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</unsubscribe> - <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-cvs</archive> - </mailingList> - </mailingLists> - <developers> - <developer> - <name>Stefan Reuter</name> - <id>srt</id> - <email>srt at users.sourceforge.net</email> - <timezone>+1</timezone> - </developer> - <developer> - <name>Pierre-Yves Roger</name> - <id>partoutatis</id> - <email>partoutatis at users.sourceforge.net</email> - <timezone>+1</timezone> - </developer> - <developer> - <name>John Hood</name> - <id>squinky86</id> - <email>john at asteriasgi.com</email> - <organization>Asteria Soulutions Group, Inc.</organization> - <timezone>-6</timezone> - </developer> - </developers> - <dependencies> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.8</version> - <type>jar</type> - <url>http://logging.apache.org/log4j/</url> - </dependency> - <dependency> - <groupId>easymock</groupId> - <artifactId>easymock</artifactId> - <version>1.1</version> - <type>jar</type> - <url>http://www.easymock.org/</url> - </dependency> - </dependencies> - <build> - <nagEmailAddress>sr...@re...</nagEmailAddress> - <sourceDirectory>src/java</sourceDirectory> - <unitTestSourceDirectory>src/test</unitTestSourceDirectory> - <!-- Unit test cases --> - - <unitTest> - <includes> - <include>**/*Test.java</include> - </includes> - <resources> - <resource> - <directory>${basedir}/src/resources/fastagi</directory> - <includes> - <include>test-mapping.properties</include> - </includes> - <filtering>false</filtering> - </resource> - <resource> - <directory>${basedir}/src/resources/log4j</directory> - <includes> - <include>log4j.properties</include> - </includes> - <filtering>false</filtering> - </resource> - </resources> - </unitTest> - </build> + <pomVersion>3</pomVersion> + <artifactId>asterisk-java</artifactId> + <groupId>org.asteriskjava</groupId> + <licenses> + <license> + <name>Apache License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0</url> + </license> + </licenses> + <reports> + <report>maven-clover-plugin</report> + <report>maven-jdepend-plugin</report> + <report>maven-junit-report-plugin</report> + <report>maven-license-plugin</report> + <report>maven-linkcheck-plugin</report> + <report>maven-statcvs-plugin</report> + <report>maven-jxr-plugin</report> + <report>maven-changelog-plugin</report> + <report>maven-changes-plugin</report> + <report>maven-developer-activity-plugin</report> + <report>maven-file-activity-plugin</report> + <report>maven-javadoc-plugin</report> + <report>maven-checkstyle-plugin</report> + <report>maven-pmd-plugin</report> + </reports> + <id>asterisk-java</id> + <name>Asterisk-Java</name> + <currentVersion>0.2-SNAPSHOT</currentVersion> + <organization> + <name>Stefan Reuter</name> + <url>http://sourceforge.net/projects/asterisk-java/</url> + <logo>http://sourceforge.net/sflogo.php?group_id=118998&type=5</logo> + </organization> + <inceptionYear>2004</inceptionYear> + <package>net.sf.asterisk</package> + <!-- Gump integration --> + <gumpRepositoryId>asterisk-java</gumpRepositoryId> + <description>Asterisk-java consists of a set of Java classes that allow you to control an Asterisk PBX via Asterisk's Manager API from Java applications.</description> + <shortDescription>Java Connector for Asterisk PBX</shortDescription> + <url>http://asterisk-java.sourceforge.net/</url> + <siteAddress>maven.reucon.com</siteAddress> + <siteDirectory>/var/www/www.asterisk-java.org/htdocs/0.2-SNAPSHOT</siteDirectory> + <distributionSite>maven.reucon.com</distributionSite> + <distributionDirectory>/var/www/maven.reucon.com/htdocs/maven</distributionDirectory> + <repository> + <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java</connection> + <developerConnection>scm:cvs:ext:${maven.username}@cvs1.sourceforge.net:/cvsroot/asterisk-java:asterisk-java</developerConnection> + <url>http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/</url> + </repository> + <versions> + <version> + <id>0.2-SNAPSHOT</id> + <name>0.2-SNAPSHOT</name> + <tag>HEAD</tag> + </version> + <version> + <id>0.1-rc1</id> + <name>0.1-rc1</name> + <tag>RC_0_1_1</tag> + </version> + <version> + <id>0.1</id> + <name>0.1</name> + <tag>REL_0_1</tag> + </version> + <version> + <id>0.2-rc1</id> + <name>0.2-rc1</name> + <tag>RC_0_2_1</tag> + </version> + </versions> + <mailingLists> + <mailingList> + <name>Asterisk-java User List</name> + <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</subscribe> + <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-users</archive> + </mailingList> + <mailingList> + <name>Asterisk-java Developer List</name> + <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</subscribe> + <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-devel</archive> + </mailingList> + <mailingList> + <name>Asterisk-java CVS Commit List</name> + <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</subscribe> + <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-cvs</archive> + </mailingList> + </mailingLists> + <developers> + <developer> + <name>Stefan Reuter</name> + <id>srt</id> + <email>srt at users.sourceforge.net</email> + <timezone>+1</timezone> + </developer> + <developer> + <name>Pierre-Yves Roger</name> + <id>partoutatis</id> + <email>partoutatis at users.sourceforge.net</email> + <timezone>+1</timezone> + </developer> + <developer> + <name>John Hood</name> + <id>squinky86</id> + <email>john at asteriasgi.com</email> + <organization>Asteria Soulutions Group, Inc.</organization> + <timezone>-6</timezone> + </developer> + </developers> + <dependencies> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.8</version> + <type>jar</type> + <url>http://logging.apache.org/log4j/</url> + </dependency> + <dependency> + <groupId>easymock</groupId> + <artifactId>easymock</artifactId> + <version>1.1</version> + <type>jar</type> + <url>http://www.easymock.org/</url> + </dependency> + </dependencies> + <build> + <nagEmailAddress>sr...@re...</nagEmailAddress> + <sourceDirectory>src/java</sourceDirectory> + <unitTestSourceDirectory>src/test</unitTestSourceDirectory> + <!-- Unit test cases --> + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <resources> + <resource> + <directory>${basedir}/src/resources/fastagi</directory> + <includes> + <include>test-mapping.properties</include> + </includes> + <filtering>false</filtering> + </resource> + <resource> + <directory>${basedir}/src/resources/log4j</directory> + <includes> + <include>log4j.properties</include> + </includes> + <filtering>false</filtering> + </resource> + </resources> + </unitTest> + </build> </project> + |
From: Stefan R. <sr...@us...> - 2005-10-06 11:06:19
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21382/src/java/net/sf/asterisk/manager Modified Files: DefaultManagerConnection.java Log Message: Added socketTimeout property to DefaultManagerConnection Changed SocketFacadeImpl to support explicit connection timeouts [#AJ-16] Index: DefaultManagerConnection.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultManagerConnection.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -p -r1.25 -r1.26 --- DefaultManagerConnection.java 7 Aug 2005 00:09:42 -0000 1.25 +++ DefaultManagerConnection.java 6 Oct 2005 11:06:10 -0000 1.26 @@ -95,6 +95,11 @@ public class DefaultManagerConnection im * EventGeneratingAction. */ private long defaultEventTimeout = 5000; + + /** + * The timeout to use when connecting the the Asterisk server. + */ + private int socketTimeout = 0; /** * The time the calling thread is sleeping between checking if a reponse or @@ -293,6 +298,19 @@ public class DefaultManagerConnection im } /** + * The timeout to use when connecting the the Asterisk server.<br> + * Default is 0, that is using Java's built-in default. + * + * @param socketTimeout the timeout value to be used in milliseconds. + * @see java.net.Socket#connect(java.net.SocketAddress, int) + * @since 0.2 + */ + public void setSocketTimeout(int socketTimeout) + { + this.socketTimeout = socketTimeout; + } + + /** * Sets the time in milliseconds the synchronous methods * {@link #sendAction(ManagerAction)} and * {@link #sendAction(ManagerAction, long)} will sleep between two checks @@ -482,7 +500,7 @@ public class DefaultManagerConnection im protected SocketConnectionFacade createSocket() throws IOException { return new SocketConnectionFacadeImpl(asteriskServer.getHostname(), - asteriskServer.getPort()); + asteriskServer.getPort(), socketTimeout); } /** |
From: Stefan R. <sr...@us...> - 2005-10-06 11:06:19
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21382/src/java/net/sf/asterisk/io Modified Files: SocketConnectionFacadeImpl.java Log Message: Added socketTimeout property to DefaultManagerConnection Changed SocketFacadeImpl to support explicit connection timeouts [#AJ-16] Index: SocketConnectionFacadeImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/io/SocketConnectionFacadeImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- SocketConnectionFacadeImpl.java 27 Sep 2005 21:07:26 -0000 1.3 +++ SocketConnectionFacadeImpl.java 6 Oct 2005 11:06:10 -0000 1.4 @@ -24,6 +24,7 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.Socket; /** @@ -40,19 +41,28 @@ public class SocketConnectionFacadeImpl public SocketConnectionFacadeImpl(String host, int port) throws IOException { - this(new Socket(host, port)); + this(host, port, 0); + } + + public SocketConnectionFacadeImpl(String host, int port, int timeout) throws IOException + { + this.socket = new Socket(); + this.socket.connect(new InetSocketAddress(host, port), timeout); + + InputStream inputStream = socket.getInputStream(); + OutputStream outputStream = socket.getOutputStream(); + + this.reader = new BufferedReader(new InputStreamReader(inputStream)); + this.writer = new BufferedWriter(new OutputStreamWriter(outputStream)); } SocketConnectionFacadeImpl(Socket socket) throws IOException { - InputStream inputStream; - OutputStream outputStream; - - inputStream = socket.getInputStream(); - outputStream = socket.getOutputStream(); - this.socket = socket; + InputStream inputStream = socket.getInputStream(); + OutputStream outputStream = socket.getOutputStream(); + this.reader = new BufferedReader(new InputStreamReader(inputStream)); this.writer = new BufferedWriter(new OutputStreamWriter(outputStream)); } |
From: Stefan R. <sr...@us...> - 2005-09-27 21:07:42
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22035/src/test/net/sf/asterisk/fastagi Modified Files: ResourceBundleMappingStrategyTest.java Log Message: Added getLocalAddress(), getLocalPort(), getRemoteAddress() and getRemotePort() to AGIRequest (AJ-14) Index: ResourceBundleMappingStrategyTest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/fastagi/ResourceBundleMappingStrategyTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- ResourceBundleMappingStrategyTest.java 15 Apr 2005 04:47:02 -0000 1.5 +++ ResourceBundleMappingStrategyTest.java 27 Sep 2005 21:07:26 -0000 1.6 @@ -16,6 +16,7 @@ */ package net.sf.asterisk.fastagi; +import java.net.InetAddress; import java.util.Map; import junit.framework.TestCase; @@ -62,6 +63,10 @@ public class ResourceBundleMappingStrate public class SimpleAGIRequest implements AGIRequest { + private InetAddress localAddress; + private int localPort; + private InetAddress remoteAddress; + private int remotePort; public Map getRequest() { @@ -156,6 +161,46 @@ public class ResourceBundleMappingStrate public Map getParameterMap() { throw new UnsupportedOperationException(); - } + } + + public InetAddress getLocalAddress() + { + return localAddress; + } + + public void setLocalAddress(InetAddress localAddress) + { + this.localAddress = localAddress; + } + + public int getLocalPort() + { + return localPort; + } + + public void setLocalPort(int localPort) + { + this.localPort = localPort; + } + + public InetAddress getRemoteAddress() + { + return remoteAddress; + } + + public void setRemoteAddress(InetAddress remoteAddress) + { + this.remoteAddress = remoteAddress; + } + + public int getRemotePort() + { + return remotePort; + } + + public void setRemotePort(int remotePort) + { + this.remotePort = remotePort; + } } } |
From: Stefan R. <sr...@us...> - 2005-09-27 21:07:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/fastagi/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22035/src/test/net/sf/asterisk/fastagi/impl Modified Files: AGIReaderImplTest.java Log Message: Added getLocalAddress(), getLocalPort(), getRemoteAddress() and getRemotePort() to AGIRequest (AJ-14) Index: AGIReaderImplTest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/fastagi/impl/AGIReaderImplTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AGIReaderImplTest.java 11 Mar 2005 15:20:39 -0000 1.1 +++ AGIReaderImplTest.java 27 Sep 2005 21:07:26 -0000 1.2 @@ -16,6 +16,8 @@ */ package net.sf.asterisk.fastagi.impl; +import java.net.InetAddress; + import junit.framework.TestCase; import net.sf.asterisk.fastagi.AGIHangupException; import net.sf.asterisk.fastagi.AGIReader; @@ -54,6 +56,26 @@ public class AGIReaderImplTest extends T socket.readLine(); socketMC.setReturnValue(""); + byte[] ipLocal = new byte[4]; + ipLocal[0] = new Integer(192).byteValue(); + ipLocal[1] = new Integer(168).byteValue(); + ipLocal[2] = new Integer(0).byteValue(); + ipLocal[3] = new Integer(1).byteValue(); + socket.getLocalAddress(); + socketMC.setReturnValue(InetAddress.getByAddress(ipLocal)); + socket.getLocalPort(); + socketMC.setReturnValue(1234); + + byte[] ipRemote = new byte[4]; + ipRemote[0] = new Integer(192).byteValue(); + ipRemote[1] = new Integer(168).byteValue(); + ipRemote[2] = new Integer(0).byteValue(); + ipRemote[3] = new Integer(2).byteValue(); + socket.getRemoteAddress(); + socketMC.setReturnValue(InetAddress.getByAddress(ipRemote)); + socket.getRemotePort(); + socketMC.setReturnValue(1235); + socketMC.replay(); request = agiReader.readRequest(); @@ -62,6 +84,16 @@ public class AGIReaderImplTest extends T assertEquals("incorrect requestURL", "agi://host/myscript.agi", request .getRequestURL()); assertEquals("incorrect channel", "SIP/1234-d715", request.getChannel()); + assertEquals("incorrect local address", ipLocal[0], request.getLocalAddress().getAddress()[0]); + assertEquals("incorrect local address", ipLocal[1], request.getLocalAddress().getAddress()[1]); + assertEquals("incorrect local address", ipLocal[2], request.getLocalAddress().getAddress()[2]); + assertEquals("incorrect local address", ipLocal[3], request.getLocalAddress().getAddress()[3]); + assertEquals("incorrect local port", 1234, request.getLocalPort()); + assertEquals("incorrect remote address", ipRemote[0], request.getRemoteAddress().getAddress()[0]); + assertEquals("incorrect remote address", ipRemote[1], request.getRemoteAddress().getAddress()[1]); + assertEquals("incorrect remote address", ipRemote[2], request.getRemoteAddress().getAddress()[2]); + assertEquals("incorrect remote address", ipRemote[3], request.getRemoteAddress().getAddress()[3]); + assertEquals("incorrect remote port", 1235, request.getRemotePort()); socketMC.verify(); } |
From: Stefan R. <sr...@us...> - 2005-09-27 21:07:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22035/src/java/net/sf/asterisk/io Modified Files: SocketConnectionFacade.java SocketConnectionFacadeImpl.java Log Message: Added getLocalAddress(), getLocalPort(), getRemoteAddress() and getRemotePort() to AGIRequest (AJ-14) Index: SocketConnectionFacade.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/io/SocketConnectionFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- SocketConnectionFacade.java 23 Jun 2005 22:06:10 -0000 1.2 +++ SocketConnectionFacade.java 27 Sep 2005 21:07:26 -0000 1.3 @@ -17,6 +17,7 @@ package net.sf.asterisk.io; import java.io.IOException; +import java.net.InetAddress; /** * The SocketConnectionFacade provides read and write operation for @@ -73,4 +74,36 @@ public interface SocketConnectionFacade * server */ boolean isConnected(); + + /** + * Returns the local address this socket connection. + * + * @return the local address this socket connection. + * @since 0.2 + */ + InetAddress getLocalAddress(); + + /** + * Returns the local port of this socket connection. + * + * @return the local port of this socket connection. + * @since 0.2 + */ + int getLocalPort(); + + /** + * Returns the remote address of this socket connection. + * + * @return the remote address of this socket connection. + * @since 0.2 + */ + InetAddress getRemoteAddress(); + + /** + * Returns the remote port of this socket connection. + * + * @return the remote port of this socket connection. + * @since 0.2 + */ + int getRemotePort(); } Index: SocketConnectionFacadeImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/io/SocketConnectionFacadeImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- SocketConnectionFacadeImpl.java 23 Jun 2005 22:06:10 -0000 1.2 +++ SocketConnectionFacadeImpl.java 27 Sep 2005 21:07:26 -0000 1.3 @@ -19,30 +19,44 @@ package net.sf.asterisk.io; 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.InetAddress; import java.net.Socket; +/** + * Default implementation of the SocketConnectionFacade interface using java.io. + * + * @author srt + * @version $Id$ + */ public class SocketConnectionFacadeImpl implements SocketConnectionFacade { private final Socket socket; private final BufferedReader reader; private final BufferedWriter writer; - + public SocketConnectionFacadeImpl(String host, int port) throws IOException { - this.socket = new Socket(host, port); - this.reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); - this.writer = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream())); + this(new Socket(host, port)); } - + SocketConnectionFacadeImpl(Socket socket) throws IOException { + InputStream inputStream; + OutputStream outputStream; + + inputStream = socket.getInputStream(); + outputStream = socket.getOutputStream(); + this.socket = socket; - this.reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); - this.writer = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream())); + + this.reader = new BufferedReader(new InputStreamReader(inputStream)); + this.writer = new BufferedWriter(new OutputStreamWriter(outputStream)); } - + public String readLine() throws IOException { return reader.readLine(); @@ -67,4 +81,24 @@ public class SocketConnectionFacadeImpl { return socket.isConnected(); } + + public InetAddress getLocalAddress() + { + return socket.getLocalAddress(); + } + + public int getLocalPort() + { + return socket.getLocalPort(); + } + + public InetAddress getRemoteAddress() + { + return socket.getInetAddress(); + } + + public int getRemotePort() + { + return socket.getPort(); + } } |
From: Stefan R. <sr...@us...> - 2005-09-27 21:07:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22035/src/java/net/sf/asterisk/fastagi Modified Files: AGIRequest.java Log Message: Added getLocalAddress(), getLocalPort(), getRemoteAddress() and getRemotePort() to AGIRequest (AJ-14) Index: AGIRequest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/AGIRequest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- AGIRequest.java 15 Apr 2005 04:47:02 -0000 1.5 +++ AGIRequest.java 27 Sep 2005 21:07:26 -0000 1.6 @@ -16,6 +16,7 @@ */ package net.sf.asterisk.fastagi; +import java.net.InetAddress; import java.util.Map; /** @@ -190,4 +191,40 @@ public interface AGIRequest * String. The values in the parameter map are of type String array. */ Map getParameterMap(); + + /** + * Returns the local address this channel, that is the IP address of the AGI + * server. + * + * @return the local address this channel. + * @since 0.2 + */ + InetAddress getLocalAddress(); + + /** + * Returns the local port of this channel, that is the port the AGI server + * is listening on. + * + * @return the local port of this socket channel. + * @since 0.2 + */ + int getLocalPort(); + + /** + * Returns the remote address of this channel, that is the IP address of the + * Asterisk server. + * + * @return the remote address of this channel. + * @since 0.2 + */ + InetAddress getRemoteAddress(); + + /** + * Returns the remote port of this channel, that is the client port the + * Asterisk server is using for the AGI connection. + * + * @return the remote port of this channel. + * @since 0.2 + */ + int getRemotePort(); } |
From: Stefan R. <sr...@us...> - 2005-09-27 21:07:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22035/src/java/net/sf/asterisk/fastagi/impl Modified Files: AGIRequestImpl.java AGIReaderImpl.java Log Message: Added getLocalAddress(), getLocalPort(), getRemoteAddress() and getRemotePort() to AGIRequest (AJ-14) Index: AGIRequestImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/impl/AGIRequestImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- AGIRequestImpl.java 23 Jul 2005 10:13:24 -0000 1.6 +++ AGIRequestImpl.java 27 Sep 2005 21:07:26 -0000 1.7 @@ -18,6 +18,7 @@ package net.sf.asterisk.fastagi.impl; import java.io.Serializable; import java.io.UnsupportedEncodingException; +import java.net.InetAddress; import java.net.URLDecoder; import java.util.ArrayList; import java.util.Collection; @@ -65,6 +66,10 @@ public class AGIRequestImpl implements S private String parameters; private String script; private boolean callerIdCreated; + private InetAddress localAddress; + private int localPort; + private InetAddress remoteAddress; + private int remotePort; /** * Creates a new AGIRequestImpl. @@ -495,6 +500,46 @@ public class AGIRequestImpl implements S return result; } + public InetAddress getLocalAddress() + { + return localAddress; + } + + public void setLocalAddress(InetAddress localAddress) + { + this.localAddress = localAddress; + } + + public int getLocalPort() + { + return localPort; + } + + public void setLocalPort(int localPort) + { + this.localPort = localPort; + } + + public InetAddress getRemoteAddress() + { + return remoteAddress; + } + + public void setRemoteAddress(InetAddress remoteAddress) + { + this.remoteAddress = remoteAddress; + } + + public int getRemotePort() + { + return remotePort; + } + + public void setRemotePort(int remotePort) + { + this.remotePort = remotePort; + } + public String toString() { StringBuffer sb; Index: AGIReaderImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/impl/AGIReaderImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AGIReaderImpl.java 15 Apr 2005 04:47:00 -0000 1.2 +++ AGIReaderImpl.java 27 Sep 2005 21:07:26 -0000 1.3 @@ -46,7 +46,7 @@ public class AGIReaderImpl implements AG public AGIRequest readRequest() throws AGIException { - AGIRequest request; + AGIRequestImpl request; String line; List lines; @@ -72,6 +72,10 @@ public class AGIReaderImpl implements AG } request = new AGIRequestImpl(lines); + request.setLocalAddress(socket.getLocalAddress()); + request.setLocalPort(socket.getLocalPort()); + request.setRemoteAddress(socket.getRemoteAddress()); + request.setRemotePort(socket.getRemotePort()); return request; } |
From: Stefan R. <sr...@us...> - 2005-09-13 20:00:16
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20862/src/java/net/sf/asterisk/manager/impl Modified Files: EventBuilderImpl.java ManagerReaderImpl.java Log Message: Fixed log level for unregistered events (AJ-13) Index: EventBuilderImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/impl/EventBuilderImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -p -r1.15 -r1.16 --- EventBuilderImpl.java 28 Aug 2005 12:28:41 -0000 1.15 +++ EventBuilderImpl.java 13 Sep 2005 19:59:58 -0000 1.16 @@ -258,7 +258,7 @@ public class EventBuilderImpl implements eventClass = (Class) registeredEventClasses.get(eventType); if (eventClass == null) { - logger.warn("No event class registered for event type '" + logger.info("No event class registered for event type '" + eventType + "', attributes: " + attributes); return null; } Index: ManagerReaderImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/impl/ManagerReaderImpl.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -p -r1.8 -r1.9 --- ManagerReaderImpl.java 27 Jul 2005 20:53:28 -0000 1.8 +++ ManagerReaderImpl.java 13 Sep 2005 19:59:58 -0000 1.9 @@ -234,16 +234,17 @@ public class ManagerReaderImpl implement if (event != null) { dispatcher.dispatchEvent(event); - } else + } + else { - logger.warn("buildEvent returned null"); + logger.debug("buildEvent returned null"); } } else { if (buffer.size() > 0) { - logger.warn("buffer contains neither response nor event"); + logger.debug("buffer contains neither response nor event"); } } |
From: Stefan R. <sr...@us...> - 2005-09-13 20:00:15
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20862/src/java/net/sf/asterisk/manager Modified Files: EventBuilder.java Log Message: Fixed log level for unregistered events (AJ-13) Index: EventBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/EventBuilder.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -p -r1.8 -r1.9 --- EventBuilder.java 5 Mar 2005 13:34:23 -0000 1.8 +++ EventBuilder.java 13 Sep 2005 19:59:59 -0000 1.9 @@ -31,14 +31,25 @@ public interface EventBuilder { /** - * Registers a new event class. The event this class is registered for is simply derived from - * the name of the class by stripping any package name (if present) and stripping the sufffix - * "Event". For example <code>net.sf.asterisk.manager.event.JoinEvent</code> is registered for + * Registers a new event class. The event this class is registered for is + * simply derived from the name of the class by stripping any package name + * (if present) and stripping the sufffix "Event". For example + * <code>net.sf.asterisk.manager.event.JoinEvent</code> is registered for * the event "Join". * - * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. + * @param clazz the event class to register, must extend + * net.sf.asterisk.manager.event.ManagerEvent. */ void registerEventClass(Class clazz); + /** + * Builds the event based on the given map of attributes and the registered + * event classes. + * + * @param source source attribute for the event + * @param attributes map containing event attributes + * @return a concrete instance of ManagerEvent or <code>null</code> if no + * event class was registered for the event type. + */ ManagerEvent buildEvent(Object source, Map attributes); } |
From: Stefan R. <sr...@us...> - 2005-09-13 00:56:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3458/src/java/net/sf/asterisk/fastagi/impl Modified Files: AGIChannelImpl.java Log Message: moved agi command methods to AGIChannel Index: AGIChannelImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/impl/AGIChannelImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- AGIChannelImpl.java 12 Jul 2005 08:21:27 -0000 1.4 +++ AGIChannelImpl.java 13 Sep 2005 00:56:25 -0000 1.5 @@ -23,6 +23,28 @@ import net.sf.asterisk.fastagi.AGIWriter import net.sf.asterisk.fastagi.InvalidCommandSyntaxException; import net.sf.asterisk.fastagi.InvalidOrUnknownCommandException; import net.sf.asterisk.fastagi.command.AGICommand; +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.GetDataCommand; +import net.sf.asterisk.fastagi.command.GetOptionCommand; +import net.sf.asterisk.fastagi.command.GetVariableCommand; +import net.sf.asterisk.fastagi.command.HangupCommand; +import net.sf.asterisk.fastagi.command.SayAlphaCommand; +import net.sf.asterisk.fastagi.command.SayDigitsCommand; +import net.sf.asterisk.fastagi.command.SayNumberCommand; +import net.sf.asterisk.fastagi.command.SayPhoneticCommand; +import net.sf.asterisk.fastagi.command.SayTimeCommand; +import net.sf.asterisk.fastagi.command.SetAutoHangupCommand; +import net.sf.asterisk.fastagi.command.SetCallerIdCommand; +import net.sf.asterisk.fastagi.command.SetContextCommand; +import net.sf.asterisk.fastagi.command.SetExtensionCommand; +import net.sf.asterisk.fastagi.command.SetMusicOffCommand; +import net.sf.asterisk.fastagi.command.SetMusicOnCommand; +import net.sf.asterisk.fastagi.command.SetPriorityCommand; +import net.sf.asterisk.fastagi.command.SetVariableCommand; +import net.sf.asterisk.fastagi.command.StreamFileCommand; +import net.sf.asterisk.fastagi.command.WaitForDigitCommand; import net.sf.asterisk.fastagi.reply.AGIReply; import net.sf.asterisk.io.SocketConnectionFacade; @@ -69,4 +91,229 @@ public class AGIChannelImpl implements A return reply; } + + public void answer() throws AGIException + { + sendCommand(new AnswerCommand()); + } + + public void hangup() throws AGIException + { + sendCommand(new HangupCommand()); + } + + public void setAutoHangup(int time) throws AGIException + { + sendCommand(new SetAutoHangupCommand(time)); + } + + public void setCallerId(String callerId) throws AGIException + { + sendCommand(new SetCallerIdCommand(callerId)); + } + + public void playMusicOnHold() throws AGIException + { + sendCommand(new SetMusicOnCommand()); + } + + public void playMusicOnHold(String musicOnHoldClass) throws AGIException + { + sendCommand(new SetMusicOnCommand(musicOnHoldClass)); + } + + public void stopMusicOnHold() throws AGIException + { + sendCommand(new SetMusicOffCommand()); + } + + public int getChannelStatus() throws AGIException + { + AGIReply reply; + + reply = sendCommand(new ChannelStatusCommand()); + return reply.getResultCode(); + } + + public String getData(String file) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new GetDataCommand(file)); + return reply.getResult(); + } + + public String getData(String file, int timeout) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new GetDataCommand(file, timeout)); + return reply.getResult(); + } + + public String getData(String file, int timeout, int maxDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new GetDataCommand(file, timeout, maxDigits)); + return reply.getResult(); + } + + public char getOption(String file, String escapeDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new GetOptionCommand(file, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public char getOption(String file, String escapeDigits, int timeout) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new GetOptionCommand(file, escapeDigits, timeout)); + return reply.getResultCodeAsChar(); + } + + public int exec(String application) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new ExecCommand(application)); + return reply.getResultCode(); + } + + public int exec(String application, String options) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new ExecCommand(application, options)); + return reply.getResultCode(); + } + + public void setContext(String context) throws AGIException + { + sendCommand(new SetContextCommand(context)); + } + + public void setExtension(String extension) throws AGIException + { + sendCommand(new SetExtensionCommand(extension)); + } + + public void setPriority(int priority) throws AGIException + { + sendCommand(new SetPriorityCommand(priority)); + } + + public void streamFile(String file) throws AGIException + { + sendCommand(new StreamFileCommand(file)); + } + + public char streamFile(String file, String escapeDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new StreamFileCommand(file, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public void sayDigits(String digits) throws AGIException + { + sendCommand(new SayDigitsCommand(digits)); + } + + public char sayDigits(String digits, String escapeDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new SayDigitsCommand(digits, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public void sayNumber(String number) throws AGIException + { + sendCommand(new SayNumberCommand(number)); + } + + public char sayNumber(String number, String escapeDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new SayNumberCommand(number, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public void sayPhonetic(String text) throws AGIException + { + sendCommand(new SayPhoneticCommand(text)); + } + + public char sayPhonetic(String text, String escapeDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new SayPhoneticCommand(text, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public void sayAlpha(String text) throws AGIException + { + sendCommand(new SayAlphaCommand(text)); + } + + public char sayAlpha(String text, String escapeDigits) + throws AGIException + { + AGIReply reply; + + reply = sendCommand(new SayAlphaCommand(text, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public void sayTime(long time) throws AGIException + { + sendCommand(new SayTimeCommand(time)); + } + + public char sayTime(long time, String escapeDigits) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new SayTimeCommand(time, escapeDigits)); + return reply.getResultCodeAsChar(); + } + + public String getVariable(String name) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new GetVariableCommand(name)); + if (reply.getResultCode() != 1) + { + return null; + } + return reply.getExtra(); + } + + public void setVariable(String name, String value) throws AGIException + { + sendCommand(new SetVariableCommand(name, value)); + } + + public char waitForDigit(int timeout) throws AGIException + { + AGIReply reply; + + reply = sendCommand(new WaitForDigitCommand(timeout)); + return reply.getResultCodeAsChar(); + } } |
From: Stefan R. <sr...@us...> - 2005-09-13 00:56:14
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3300/src/java/net/sf/asterisk/fastagi Modified Files: BaseAGIScript.java AbstractAGIScript.java AGIChannel.java Log Message: moved agi command methods to AGIChannel Index: BaseAGIScript.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/BaseAGIScript.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- BaseAGIScript.java 27 Aug 2005 02:07:35 -0000 1.3 +++ BaseAGIScript.java 13 Sep 2005 00:56:05 -0000 1.4 @@ -18,27 +18,6 @@ package net.sf.asterisk.fastagi; import net.sf.asterisk.fastagi.command.AGICommand; 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.GetDataCommand; -import net.sf.asterisk.fastagi.command.GetOptionCommand; -import net.sf.asterisk.fastagi.command.GetVariableCommand; -import net.sf.asterisk.fastagi.command.HangupCommand; -import net.sf.asterisk.fastagi.command.SayAlphaCommand; -import net.sf.asterisk.fastagi.command.SayDigitsCommand; -import net.sf.asterisk.fastagi.command.SayNumberCommand; -import net.sf.asterisk.fastagi.command.SayPhoneticCommand; -import net.sf.asterisk.fastagi.command.SayTimeCommand; -import net.sf.asterisk.fastagi.command.SetAutoHangupCommand; -import net.sf.asterisk.fastagi.command.SetCallerIdCommand; -import net.sf.asterisk.fastagi.command.SetContextCommand; -import net.sf.asterisk.fastagi.command.SetExtensionCommand; -import net.sf.asterisk.fastagi.command.SetMusicOffCommand; -import net.sf.asterisk.fastagi.command.SetMusicOnCommand; -import net.sf.asterisk.fastagi.command.SetPriorityCommand; -import net.sf.asterisk.fastagi.command.SetVariableCommand; -import net.sf.asterisk.fastagi.command.StreamFileCommand; -import net.sf.asterisk.fastagi.command.WaitForDigitCommand; import net.sf.asterisk.fastagi.reply.AGIReply; /** @@ -65,7 +44,7 @@ public abstract class BaseAGIScript impl */ protected void hangup() throws AGIException { - sendCommand(new HangupCommand()); + getChannel().hangup(); } /** @@ -78,7 +57,7 @@ public abstract class BaseAGIScript impl */ protected void setAutoHangup(int time) throws AGIException { - sendCommand(new SetAutoHangupCommand(time)); + getChannel().setAutoHangup(time); } /** @@ -88,7 +67,7 @@ public abstract class BaseAGIScript impl */ protected void setCallerId(String callerId) throws AGIException { - sendCommand(new SetCallerIdCommand(callerId)); + getChannel().setCallerId(callerId); } /** @@ -96,7 +75,7 @@ public abstract class BaseAGIScript impl */ protected void playMusicOnHold() throws AGIException { - sendCommand(new SetMusicOnCommand()); + getChannel().playMusicOnHold(); } /** @@ -107,7 +86,7 @@ public abstract class BaseAGIScript impl */ protected void playMusicOnHold(String musicOnHoldClass) throws AGIException { - sendCommand(new SetMusicOnCommand(musicOnHoldClass)); + getChannel().playMusicOnHold(musicOnHoldClass); } /** @@ -115,7 +94,7 @@ public abstract class BaseAGIScript impl */ protected void stopMusicOnHold() throws AGIException { - sendCommand(new SetMusicOffCommand()); + getChannel().stopMusicOnHold(); } /** @@ -136,10 +115,7 @@ public abstract class BaseAGIScript impl */ protected int getChannelStatus() throws AGIException { - AGIReply reply; - - reply = sendCommand(new ChannelStatusCommand()); - return reply.getResultCode(); + return getChannel().getChannelStatus(); } /** @@ -152,10 +128,7 @@ public abstract class BaseAGIScript impl */ protected String getData(String file) throws AGIException { - AGIReply reply; - - reply = sendCommand(new GetDataCommand(file)); - return reply.getResult(); + return getChannel().getData(file); } /** @@ -171,10 +144,7 @@ public abstract class BaseAGIScript impl */ protected String getData(String file, int timeout) throws AGIException { - AGIReply reply; - - reply = sendCommand(new GetDataCommand(file, timeout)); - return reply.getResult(); + return getChannel().getData(file, timeout); } /** @@ -194,10 +164,7 @@ public abstract class BaseAGIScript impl protected String getData(String file, int timeout, int maxDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new GetDataCommand(file, timeout, maxDigits)); - return reply.getResult(); + return getChannel().getData(file, timeout, maxDigits); } /** @@ -214,10 +181,7 @@ public abstract class BaseAGIScript impl protected char getOption(String file, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new GetOptionCommand(file, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().getOption(file, escapeDigits); } /** @@ -236,10 +200,7 @@ public abstract class BaseAGIScript impl protected char getOption(String file, String escapeDigits, int timeout) throws AGIException { - AGIReply reply; - - reply = sendCommand(new GetOptionCommand(file, escapeDigits, timeout)); - return reply.getResultCodeAsChar(); + return getChannel().getOption(file, escapeDigits, timeout); } /** @@ -252,10 +213,7 @@ public abstract class BaseAGIScript impl */ protected int exec(String application) throws AGIException { - AGIReply reply; - - reply = sendCommand(new ExecCommand(application)); - return reply.getResultCode(); + return getChannel().exec(application); } /** @@ -270,10 +228,7 @@ public abstract class BaseAGIScript impl */ protected int exec(String application, String options) throws AGIException { - AGIReply reply; - - reply = sendCommand(new ExecCommand(application, options)); - return reply.getResultCode(); + return getChannel().exec(application, options); } /** @@ -283,7 +238,7 @@ public abstract class BaseAGIScript impl */ protected void setContext(String context) throws AGIException { - sendCommand(new SetContextCommand(context)); + getChannel().setContext(context); } /** @@ -294,7 +249,7 @@ public abstract class BaseAGIScript impl */ protected void setExtension(String extension) throws AGIException { - sendCommand(new SetExtensionCommand(extension)); + getChannel().setExtension(extension); } /** @@ -305,7 +260,7 @@ public abstract class BaseAGIScript impl */ protected void setPriority(int priority) throws AGIException { - sendCommand(new SetPriorityCommand(priority)); + getChannel().setPriority(priority); } /** @@ -315,7 +270,7 @@ public abstract class BaseAGIScript impl */ protected void streamFile(String file) throws AGIException { - sendCommand(new StreamFileCommand(file)); + getChannel().streamFile(file); } /** @@ -330,10 +285,7 @@ public abstract class BaseAGIScript impl protected char streamFile(String file, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new StreamFileCommand(file, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().streamFile(file, escapeDigits); } /** @@ -343,7 +295,7 @@ public abstract class BaseAGIScript impl */ protected void sayDigits(String digits) throws AGIException { - sendCommand(new SayDigitsCommand(digits)); + getChannel().sayDigits(digits); } /** @@ -358,10 +310,7 @@ public abstract class BaseAGIScript impl protected char sayDigits(String digits, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new SayDigitsCommand(digits, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().sayDigits(digits, escapeDigits); } /** @@ -371,7 +320,7 @@ public abstract class BaseAGIScript impl */ protected void sayNumber(String number) throws AGIException { - sendCommand(new SayNumberCommand(number)); + getChannel().sayNumber(number); } /** @@ -386,10 +335,7 @@ public abstract class BaseAGIScript impl protected char sayNumber(String number, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new SayNumberCommand(number, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().sayNumber(number, escapeDigits); } /** @@ -399,7 +345,7 @@ public abstract class BaseAGIScript impl */ protected void sayPhonetic(String text) throws AGIException { - sendCommand(new SayPhoneticCommand(text)); + getChannel().sayPhonetic(text); } /** @@ -414,10 +360,7 @@ public abstract class BaseAGIScript impl protected char sayPhonetic(String text, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new SayPhoneticCommand(text, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().sayPhonetic(text, escapeDigits); } /** @@ -427,7 +370,7 @@ public abstract class BaseAGIScript impl */ protected void sayAlpha(String text) throws AGIException { - sendCommand(new SayAlphaCommand(text)); + getChannel().sayAlpha(text); } /** @@ -442,10 +385,7 @@ public abstract class BaseAGIScript impl protected char sayAlpha(String text, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new SayAlphaCommand(text, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().sayAlpha(text, escapeDigits); } /** @@ -455,7 +395,7 @@ public abstract class BaseAGIScript impl */ protected void sayTime(long time) throws AGIException { - sendCommand(new SayTimeCommand(time)); + getChannel().sayTime(time); } /** @@ -469,10 +409,7 @@ public abstract class BaseAGIScript impl */ protected char sayTime(long time, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = sendCommand(new SayTimeCommand(time, escapeDigits)); - return reply.getResultCodeAsChar(); + return getChannel().sayTime(time, escapeDigits); } /** @@ -484,14 +421,7 @@ public abstract class BaseAGIScript impl */ protected String getVariable(String name) throws AGIException { - AGIReply reply; - - reply = sendCommand(new GetVariableCommand(name)); - if (reply.getResultCode() != 1) - { - return null; - } - return reply.getExtra(); + return getChannel().getVariable(name); } /** @@ -502,7 +432,7 @@ public abstract class BaseAGIScript impl */ protected void setVariable(String name, String value) throws AGIException { - sendCommand(new SetVariableCommand(name, value)); + getChannel().setVariable(name, value); } /** @@ -514,10 +444,7 @@ public abstract class BaseAGIScript impl */ protected char waitForDigit(int timeout) throws AGIException { - AGIReply reply; - - reply = sendCommand(new WaitForDigitCommand(timeout)); - return reply.getResultCodeAsChar(); + return getChannel().waitForDigit(timeout); } /** @@ -529,6 +456,11 @@ public abstract class BaseAGIScript impl */ private AGIReply sendCommand(AGICommand command) throws AGIException { + return getChannel().sendCommand(command); + } + + private AGIChannel getChannel() + { AGIChannel channel; channel = AGIConnectionHandler.getChannel(); @@ -538,6 +470,6 @@ public abstract class BaseAGIScript impl "Trying to send command from an invalid thread"); } - return channel.sendCommand(command); + return channel; } } Index: AbstractAGIScript.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/AbstractAGIScript.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -p -r1.17 -r1.18 --- AbstractAGIScript.java 27 Aug 2005 02:07:35 -0000 1.17 +++ AbstractAGIScript.java 13 Sep 2005 00:56:05 -0000 1.18 @@ -17,28 +17,6 @@ package net.sf.asterisk.fastagi; 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.GetDataCommand; -import net.sf.asterisk.fastagi.command.GetOptionCommand; -import net.sf.asterisk.fastagi.command.GetVariableCommand; -import net.sf.asterisk.fastagi.command.HangupCommand; -import net.sf.asterisk.fastagi.command.SayAlphaCommand; -import net.sf.asterisk.fastagi.command.SayDigitsCommand; -import net.sf.asterisk.fastagi.command.SayNumberCommand; -import net.sf.asterisk.fastagi.command.SayPhoneticCommand; -import net.sf.asterisk.fastagi.command.SayTimeCommand; -import net.sf.asterisk.fastagi.command.SetAutoHangupCommand; -import net.sf.asterisk.fastagi.command.SetCallerIdCommand; -import net.sf.asterisk.fastagi.command.SetContextCommand; -import net.sf.asterisk.fastagi.command.SetExtensionCommand; -import net.sf.asterisk.fastagi.command.SetMusicOffCommand; -import net.sf.asterisk.fastagi.command.SetMusicOnCommand; -import net.sf.asterisk.fastagi.command.SetPriorityCommand; -import net.sf.asterisk.fastagi.command.SetVariableCommand; -import net.sf.asterisk.fastagi.command.StreamFileCommand; -import net.sf.asterisk.fastagi.command.WaitForDigitCommand; -import net.sf.asterisk.fastagi.reply.AGIReply; /** * The AbstractAGIScript provides some convinience methods to make it easier to @@ -64,7 +42,7 @@ public abstract class AbstractAGIScript */ protected void hangup(AGIChannel channel) throws AGIException { - channel.sendCommand(new HangupCommand()); + channel.hangup(); } /** @@ -78,7 +56,7 @@ public abstract class AbstractAGIScript protected void setAutoHangup(AGIChannel channel, int time) throws AGIException { - channel.sendCommand(new SetAutoHangupCommand(time)); + channel.setAutoHangup(time); } /** @@ -89,7 +67,7 @@ public abstract class AbstractAGIScript protected void setCallerId(AGIChannel channel, String callerId) throws AGIException { - channel.sendCommand(new SetCallerIdCommand(callerId)); + channel.setCallerId(callerId); } /** @@ -97,7 +75,7 @@ public abstract class AbstractAGIScript */ protected void playMusicOnHold(AGIChannel channel) throws AGIException { - channel.sendCommand(new SetMusicOnCommand()); + channel.playMusicOnHold(); } /** @@ -109,7 +87,7 @@ public abstract class AbstractAGIScript protected void playMusicOnHold(AGIChannel channel, String musicOnHoldClass) throws AGIException { - channel.sendCommand(new SetMusicOnCommand(musicOnHoldClass)); + channel.playMusicOnHold(musicOnHoldClass); } /** @@ -117,7 +95,7 @@ public abstract class AbstractAGIScript */ protected void stopMusicOnHold(AGIChannel channel) throws AGIException { - channel.sendCommand(new SetMusicOffCommand()); + channel.stopMusicOnHold(); } /** @@ -138,10 +116,7 @@ public abstract class AbstractAGIScript */ protected int getChannelStatus(AGIChannel channel) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new ChannelStatusCommand()); - return reply.getResultCode(); + return channel.getChannelStatus(); } /** @@ -156,10 +131,7 @@ public abstract class AbstractAGIScript protected String getData(AGIChannel channel, String file) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new GetDataCommand(file)); - return reply.getResult(); + return channel.getData(file); } /** @@ -177,10 +149,7 @@ public abstract class AbstractAGIScript protected String getData(AGIChannel channel, String file, int timeout) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new GetDataCommand(file, timeout)); - return reply.getResult(); + return channel.getData(file, timeout); } /** @@ -201,11 +170,7 @@ public abstract class AbstractAGIScript protected String getData(AGIChannel channel, String file, int timeout, int maxDigits) throws AGIException { - AGIReply reply; - - reply = channel - .sendCommand(new GetDataCommand(file, timeout, maxDigits)); - return reply.getResult(); + return channel.getData(file, timeout, maxDigits); } /** @@ -222,10 +187,7 @@ public abstract class AbstractAGIScript protected char getOption(AGIChannel channel, String file, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new GetOptionCommand(file, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.getOption(file, escapeDigits); } /** @@ -244,11 +206,7 @@ public abstract class AbstractAGIScript protected char getOption(AGIChannel channel, String file, String escapeDigits, int timeout) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new GetOptionCommand(file, escapeDigits, - timeout)); - return reply.getResultCodeAsChar(); + return channel.getOption(file, escapeDigits, timeout); } /** @@ -263,10 +221,7 @@ public abstract class AbstractAGIScript protected int exec(AGIChannel channel, String application) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new ExecCommand(application)); - return reply.getResultCode(); + return channel.exec(application); } /** @@ -283,10 +238,7 @@ public abstract class AbstractAGIScript protected int exec(AGIChannel channel, String application, String options) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new ExecCommand(application, options)); - return reply.getResultCode(); + return channel.exec(application, options); } /** @@ -301,10 +253,7 @@ public abstract class AbstractAGIScript protected int execCommand(AGIChannel channel, String application) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new ExecCommand(application)); - return reply.getResultCode(); + return channel.exec(application); } /** @@ -321,10 +270,7 @@ public abstract class AbstractAGIScript protected int execCommand(AGIChannel channel, String application, String options) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new ExecCommand(application, options)); - return reply.getResultCode(); + return channel.exec(application, options); } /** @@ -335,7 +281,7 @@ public abstract class AbstractAGIScript protected void setContext(AGIChannel channel, String context) throws AGIException { - channel.sendCommand(new SetContextCommand(context)); + channel.setContext(context); } /** @@ -347,7 +293,7 @@ public abstract class AbstractAGIScript protected void setExtension(AGIChannel channel, String extension) throws AGIException { - channel.sendCommand(new SetExtensionCommand(extension)); + channel.setExtension(extension); } /** @@ -359,7 +305,7 @@ public abstract class AbstractAGIScript protected void setPriority(AGIChannel channel, int priority) throws AGIException { - channel.sendCommand(new SetPriorityCommand(priority)); + channel.setPriority(priority); } /** @@ -370,7 +316,7 @@ public abstract class AbstractAGIScript protected void streamFile(AGIChannel channel, String file) throws AGIException { - channel.sendCommand(new StreamFileCommand(file)); + channel.streamFile(file); } /** @@ -385,10 +331,7 @@ public abstract class AbstractAGIScript protected char streamFile(AGIChannel channel, String file, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new StreamFileCommand(file, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.streamFile(file, escapeDigits); } /** @@ -399,7 +342,7 @@ public abstract class AbstractAGIScript protected void sayDigits(AGIChannel channel, String digits) throws AGIException { - channel.sendCommand(new SayDigitsCommand(digits)); + channel.sayDigits(digits); } /** @@ -414,10 +357,7 @@ public abstract class AbstractAGIScript protected char sayDigits(AGIChannel channel, String digits, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new SayDigitsCommand(digits, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.sayDigits(digits, escapeDigits); } /** @@ -428,7 +368,7 @@ public abstract class AbstractAGIScript protected void sayNumber(AGIChannel channel, String number) throws AGIException { - channel.sendCommand(new SayNumberCommand(number)); + channel.sayNumber(number); } /** @@ -443,10 +383,7 @@ public abstract class AbstractAGIScript protected char sayNumber(AGIChannel channel, String number, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new SayNumberCommand(number, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.sayNumber(number, escapeDigits); } /** @@ -457,7 +394,7 @@ public abstract class AbstractAGIScript protected void sayPhonetic(AGIChannel channel, String text) throws AGIException { - channel.sendCommand(new SayPhoneticCommand(text)); + channel.sayPhonetic(text); } /** @@ -472,10 +409,7 @@ public abstract class AbstractAGIScript protected char sayPhonetic(AGIChannel channel, String text, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new SayPhoneticCommand(text, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.sayPhonetic(text, escapeDigits); } /** @@ -486,7 +420,7 @@ public abstract class AbstractAGIScript protected void sayAlpha(AGIChannel channel, String text) throws AGIException { - channel.sendCommand(new SayAlphaCommand(text)); + channel.sayAlpha(text); } /** @@ -501,10 +435,7 @@ public abstract class AbstractAGIScript protected char sayAlpha(AGIChannel channel, String text, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new SayAlphaCommand(text, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.sayAlpha(text, escapeDigits); } /** @@ -514,7 +445,7 @@ public abstract class AbstractAGIScript */ protected void sayTime(AGIChannel channel, long time) throws AGIException { - channel.sendCommand(new SayTimeCommand(time)); + channel.sayTime(time); } /** @@ -529,10 +460,7 @@ public abstract class AbstractAGIScript protected char sayTime(AGIChannel channel, long time, String escapeDigits) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new SayTimeCommand(time, escapeDigits)); - return reply.getResultCodeAsChar(); + return channel.sayTime(time, escapeDigits); } /** @@ -545,14 +473,7 @@ public abstract class AbstractAGIScript protected String getVariable(AGIChannel channel, String name) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new GetVariableCommand(name)); - if (reply.getResultCode() != 1) - { - return null; - } - return reply.getExtra(); + return channel.getVariable(name); } /** @@ -564,7 +485,7 @@ public abstract class AbstractAGIScript protected void setVariable(AGIChannel channel, String name, String value) throws AGIException { - channel.sendCommand(new SetVariableCommand(name, value)); + channel.setVariable(name, value); } /** @@ -577,9 +498,6 @@ public abstract class AbstractAGIScript protected char waitForDigit(AGIChannel channel, int timeout) throws AGIException { - AGIReply reply; - - reply = channel.sendCommand(new WaitForDigitCommand(timeout)); - return reply.getResultCodeAsChar(); + return channel.waitForDigit(timeout); } } Index: AGIChannel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/AGIChannel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- AGIChannel.java 11 Mar 2005 09:37:39 -0000 1.3 +++ AGIChannel.java 13 Sep 2005 00:56:05 -0000 1.4 @@ -35,9 +35,355 @@ public interface AGIChannel * * @param command the command to send. * @return the reply of the asterisk server containing the return value. - * * @throws AGIException if the command can't be sent to Asterisk (for * example because the channel has been hung up) */ AGIReply sendCommand(AGICommand command) throws AGIException; + + /** + * Answers the channel. + * + * @since 0.2 + */ + void answer() throws AGIException; + + /** + * Hangs the channel up. + * + * @since 0.2 + */ + void hangup() throws AGIException; + + /** + * Cause the channel to automatically hangup at the given number of seconds + * in the future. + * + * @param time the number of seconds before this channel is automatically + * hung up.<br> + * 0 disables the autohangup feature. + * @since 0.2 + */ + void setAutoHangup(int time) throws AGIException; + + /** + * Sets the caller id on the current channel. + * + * @param callerId the raw caller id to set, for example "John Doe<1234>". + * @since 0.2 + */ + void setCallerId(String callerId) throws AGIException; + + /** + * Plays music on hold from the default music on hold class. + * + * @since 0.2 + */ + void playMusicOnHold() throws AGIException; + + /** + * Plays music on hold from the given music on hold class. + * + * @param musicOnHoldClass the music on hold class to play music from as + * configures in Asterisk's <code><musiconhold.conf/code>. + * @since 0.2 + */ + void playMusicOnHold(String musicOnHoldClass) throws AGIException; + + /** + * Stops playing music on hold. + * + * @since 0.2 + */ + void stopMusicOnHold() throws AGIException; + + /** + * Returns the status of the channel.<br> + * Return values: + * <ul> + * <li>0 Channel is down and available + * <li>1 Channel is down, but reserved + * <li>2 Channel is off hook + * <li>3 Digits (or equivalent) have been dialed + * <li>4 Line is ringing + * <li>5 Remote end is ringing + * <li>6 Line is up + * <li>7 Line is busy + * </ul> + * + * @return the status of the channel. + * @since 0.2 + */ + int getChannelStatus() throws AGIException; + + /** + * Plays the given file and waits for the user to enter DTMF digits until he + * presses '#'. The user may interrupt the streaming by starting to enter + * digits. + * + * @param file the name of the file to play + * @return a String containing the DTMF the user entered + * @since 0.2 + */ + String getData(String file) throws AGIException; + + /** + * Plays the given file and waits for the user to enter DTMF digits until he + * presses '#' or the timeout occurs. The user may interrupt the streaming + * by starting to enter digits. + * + * @param file the name of the file to play + * @param timeout the timeout to wait for user input.<br> + * 0 means standard timeout value, -1 means "ludicrous time" + * (essentially never times out). + * @return a String containing the DTMF the user entered + * @since 0.2 + */ + String getData(String file, int timeout) throws AGIException; + + /** + * Plays the given file and waits for the user to enter DTMF digits until he + * presses '#' or the timeout occurs or the maximum number of digits has + * been entered. The user may interrupt the streaming by starting to enter + * digits. + * + * @param file the name of the file to play + * @param timeout the timeout to wait for user input.<br> + * 0 means standard timeout value, -1 means "ludicrous time" + * (essentially never times out). + * @param maxDigits the maximum number of digits the user is allowed to + * enter + * @return a String containing the DTMF the user entered + * @since 0.2 + */ + String getData(String file, int timeout, int maxDigits) throws AGIException; + + /** + * Plays the given file, and waits for the user to press one of the given + * digits. If none of the esacpe digits is pressed while streaming the file + * it waits for the default timeout of 5 seconds still waiting for the user + * to press a digit. + * + * @param file the name of the file to stream, must not include extension. + * @param escapeDigits contains the digits that the user is expected to + * press. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char getOption(String file, String escapeDigits) throws AGIException; + + /** + * Plays the given file, and waits for the user to press one of the given + * digits. If none of the esacpe digits is pressed while streaming the file + * it waits for the specified timeout still waiting for the user to press a + * digit. + * + * @param file the name of the file to stream, must not include extension. + * @param escapeDigits contains the digits that the user is expected to + * press. + * @param timeout the timeout in seconds to wait if none of the defined + * esacpe digits was presses while streaming. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char getOption(String file, String escapeDigits, int timeout) + throws AGIException; + + /** + * Executes the given command. + * + * @param application the name of the application to execute, for example + * "Dial". + * @return the return code of the application of -2 if the application was + * not found. + * @since 0.2 + */ + int exec(String application) throws AGIException; + + /** + * Executes the given command. + * + * @param application the name of the application to execute, for example + * "Dial". + * @param options the parameters to pass to the application, for example + * "SIP/123". + * @return the return code of the application of -2 if the application was + * not found. + * @since 0.2 + */ + int exec(String application, String options) throws AGIException; + + /** + * Sets the context for continuation upon exiting the application. + * + * @param context the context for continuation upon exiting the application. + * @since 0.2 + */ + void setContext(String context) throws AGIException; + + /** + * Sets the extension for continuation upon exiting the application. + * + * @param extension the extension for continuation upon exiting the + * application. + * @since 0.2 + */ + void setExtension(String extension) throws AGIException; + + /** + * Sets the priority for continuation upon exiting the application. + * + * @param priority the priority for continuation upon exiting the + * application. + * @since 0.2 + */ + void setPriority(int priority) throws AGIException; + + /** + * Plays the given file. + * + * @param file name of the file to play. + * @since 0.2 + */ + void streamFile(String file) throws AGIException; + + /** + * Plays the given file and allows the user to escape by pressing one of the + * given digit. + * + * @param file name of the file to play. + * @param escapeDigits a String containing the DTMF digits that allow the + * user to escape. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char streamFile(String file, String escapeDigits) throws AGIException; + + /** + * Says the given digit string. + * + * @param digits the digit string to say. + * @since 0.2 + */ + void sayDigits(String digits) throws AGIException; + + /** + * Says the given number, returning early if any of the given DTMF number + * are received on the channel. + * + * @param digits the digit string to say. + * @param escapeDigits a String containing the DTMF digits that allow the + * user to escape. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char sayDigits(String digits, String escapeDigits) throws AGIException; + + /** + * Says the given number. + * + * @param number the number to say. + * @since 0.2 + */ + void sayNumber(String number) throws AGIException; + + /** + * Says the given number, returning early if any of the given DTMF number + * are received on the channel. + * + * @param number the number to say. + * @param escapeDigits a String containing the DTMF digits that allow the + * user to escape. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char sayNumber(String number, String escapeDigits) throws AGIException; + + /** + * Says the given character string with phonetics. + * + * @param text the text to say. + * @since 0.2 + */ + void sayPhonetic(String text) throws AGIException; + + /** + * Says the given character string with phonetics, returning early if any of + * the given DTMF number are received on the channel. + * + * @param text the text to say. + * @param escapeDigits a String containing the DTMF digits that allow the + * user to escape. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char sayPhonetic(String text, String escapeDigits) throws AGIException; + + /** + * Says the given character string. + * + * @param text the text to say. + * @since 0.2 + */ + void sayAlpha(String text) throws AGIException; + + /** + * Says the given character string, returning early if any of the given DTMF + * number are received on the channel. + * + * @param text the text to say. + * @param escapeDigits a String containing the DTMF digits that allow the + * user to escape. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char sayAlpha(String text, String escapeDigits) throws AGIException; + + /** + * Says the given time. + * + * @param time the time to say in seconds since 00:00:00 on January 1, 1970. + * @since 0.2 + */ + void sayTime(long time) throws AGIException; + + /** + * Says the given time, returning early if any of the given DTMF number are + * received on the channel. + * + * @param time the time to say in seconds since 00:00:00 on January 1, 1970. + * @param escapeDigits a String containing the DTMF digits that allow the + * user to escape. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char sayTime(long time, String escapeDigits) throws AGIException; + + /** + * Returns the value of the given channel variable. + * + * @param name the name of the variable to retrieve. + * @return the value of the given variable or <code>null</code> if not + * set. + * @since 0.2 + */ + String getVariable(String name) throws AGIException; + + /** + * Sets the value of the given channel variable to a new value. + * + * @param name the name of the variable to retrieve. + * @param value the new value to set. + * @since 0.2 + */ + void setVariable(String name, String value) throws AGIException; + + /** + * Waits up to 'timeout' milliseconds to receive a DTMF digit. + * + * @param timeout timeout the milliseconds to wait for the channel to + * receive a DTMF digit, -1 will wait forever. + * @return the DTMF digit pressed or 0x0 if none was pressed. + * @since 0.2 + */ + char waitForDigit(int timeout) throws AGIException; } |
From: Stefan R. <sr...@us...> - 2005-09-01 20:15:52
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28834/src/java/net/sf/asterisk/manager Modified Files: DefaultAsteriskManager.java Log Message: Added javadoc for setSkipQueues Index: DefaultAsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultAsteriskManager.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -p -r1.21 -r1.22 --- DefaultAsteriskManager.java 21 Aug 2005 22:39:21 -0000 1.21 +++ DefaultAsteriskManager.java 1 Sep 2005 20:15:41 -0000 1.22 @@ -126,6 +126,17 @@ public class DefaultAsteriskManager this.connection = connection; } + /** + * Determines if queue status is retrieved at startup. If you don't need + * queue information and still run Asterisk 1.0.x you can set this to + * <code>true</code> to circumvent the startup delay caused by the missing + * QueueStatusComplete event.<br> + * Default is <code>false</code>. + * + * @param skipQueues <code>true</code> to skip queue initialization, + * <code>false</code> to not skip. + * @since 0.2 + */ public void setSkipQueues(boolean skipQueues) { this.skipQueues = skipQueues; |
From: Stefan R. <sr...@us...> - 2005-09-01 19:13:27
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14489/src/java/net/sf/asterisk/manager Modified Files: Channel.java Log Message: Readded getContext(), getExtension(), getPriority() as convenience methods to Channel (AJ-12) Index: Channel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Channel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -p -r1.12 -r1.13 --- Channel.java 16 Aug 2005 16:23:47 -0000 1.12 +++ Channel.java 1 Sep 2005 19:13:20 -0000 1.13 @@ -289,6 +289,48 @@ public class Channel implements Serializ } /** + * Returns the context of the current extension. This is a shortcut for + * <code>getCurrentExtension().getContext()</code>. + * + * @return the context of the current extension. + */ + public String getContext() + { + Extension currentExtension; + + currentExtension = getCurrentExtension(); + return currentExtension == null ? null : currentExtension.getContext(); + } + + /** + * Returns the extension of the current extension. This is a shortcut for + * <code>getCurrentExtension().getExtension()</code>. + * + * @return the extension of the current extension. + */ + public String getExtension() + { + Extension currentExtension; + + currentExtension = getCurrentExtension(); + return currentExtension == null ? null : currentExtension.getExtension(); + } + + /** + * Returns the priority of the current extension. This is a shortcut for + * <code>getCurrentExtension().getPriority()</code>. + * + * @return the priority of the current extension. + */ + public Integer getPriority() + { + Extension currentExtension; + + currentExtension = getCurrentExtension(); + return currentExtension == null ? null : currentExtension.getPriority(); + } + + /** * Returns a list of all visited dialplan entries. * * @return a list of all visited dialplan entries. |
From: Stefan R. <sr...@us...> - 2005-08-31 07:38:07
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19567 Modified Files: ChangeLog ANNOUNCEMENT Log Message: Updated for 0.2-rc1 Index: ChangeLog =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -p -r1.7 -r1.8 --- ChangeLog 7 Aug 2005 18:59:55 -0000 1.7 +++ ChangeLog 31 Aug 2005 07:37:59 -0000 1.8 @@ -1,4 +1,6 @@ -Asterisk-Java 0.2 +Asterisk-Java 0.2-rc1 + * Added Support for the new Actions, Events and Commands + of Asterisk 1.2 * Fixed getting the uniqueId from a successful originate in the DefaultAsteriskManager * Added isConnected() method to ManagerConnection Index: ANNOUNCEMENT =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/ANNOUNCEMENT,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ANNOUNCEMENT 3 May 2005 16:51:02 -0000 1.1 +++ ANNOUNCEMENT 31 Aug 2005 07:37:59 -0000 1.2 @@ -1,20 +1,38 @@ -ANNOUNCEMENT: Asterisk-java 0.1 released +ANNOUNCEMENT: Asterisk-Java 0.2-rc1 released -Asterisk-java 0.1 a Java control for the Asterisk PBX has been released. +Asterisk-Java 0.2-rc1, a Java control for the Asterisk PBX, has been +released. -The Asterisk-java package consists of a set of Java classes that allow +The Asterisk-Java package consists of a set of Java classes that allow you to easily build Java applications that interact with an Asterisk -PBX Server. Asterisk-java supports both interfaces that Asterisk -provides for this scenario: The FastAGI protocol and the Manager API. +PBX Server. Asterisk-Java supports both interfaces that Asterisk +provides for this scenario: The FastAGI protocol and the Manager API. -The FastAGI implementation supports all commands currently available -from Asterisk. +The 0.2-rc1 release candidate focuses on the new features of +Asterisk 1.2-beta1 though it still supports Asterisk 1.0.x. +The changes include + * Support for the new Actions, Events and Commands of Asterisk 1.2 + * New support for event generating Actions, i.e. Actions + that send their result as a series of Event rather than + the usual ManagerResults. See the sendEventGeneratingAction() + methods in ManagerConnection for more information. + * New base class for AGI scripts that allows you write cleaner + AGI scripts as you don't have to pass the channel variable + to all methods. + * New convenience constructors for manager actions + * Some minor bug fixes -The Manager API implementation supports receiving events from the -Asterisk server (e.g. call progess, registered peers, channel state) -and sending actions to Asterisk (e.g. originate call, -agent login/logoff, start/stop voice recording). +Asterisk-Java is used in several commercial environments and by +the following Open Source projects: + * Asterisk-IM + A plugin for the Jive Messenger XMPP (jabber) server. It provides + integrated presence between your IM client and phone, notification + of incoming calls by IM and originate calls from supported IM + clients. + * Asterisk Desktop Manager (ADM) + A desktop application that will allow for automatic on-call volume + reduction, one click dial from clipboard, integrated phonebook + and more. -Asterisk-java is available under Apache 2.0 license at +Asterisk-Java is available under Apache 2.0 license at http://asterisk-java.sourceforge.net - |
From: Stefan R. <sr...@us...> - 2005-08-31 04:40:56
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10376 Modified Files: project.xml Log Message: [maven-scm-plugin] prepare release 0.2-rc1 Index: project.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -p -r1.17 -r1.18 --- project.xml 8 May 2005 13:14:18 -0000 1.17 +++ project.xml 31 Aug 2005 04:40:48 -0000 1.18 @@ -28,7 +28,7 @@ </reports> <id>asterisk-java</id> <name>Asterisk-Java</name> - <currentVersion>0.2-SNAPSHOT</currentVersion> + <currentVersion>0.2-rc1</currentVersion> <organization> <name>Stefan Reuter</name> <url>http://sourceforge.net/projects/asterisk-java/</url> @@ -67,6 +67,11 @@ <name>0.1</name> <tag>REL_0_1</tag> </version> + <version> + <id>0.2-rc1</id> + <name>0.2-rc1</name> + <tag>RC_0_2_1</tag> + </version> </versions> <mailingLists> <mailingList> |
From: Stefan R. <sr...@us...> - 2005-08-31 04:38:49
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10019/xdocs Modified Files: index.xml Log Message: Updated to include note about Asterisk 1.2 compatibility and release candidates of AJ 0.2 Index: index.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/index.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -p -r1.27 -r1.28 --- index.xml 19 Aug 2005 18:33:32 -0000 1.27 +++ index.xml 31 Aug 2005 04:38:39 -0000 1.28 @@ -32,7 +32,8 @@ supports both interfaces that Asterisk provides for this scenario: The <a href="http://www.voip-info.org/wiki-Asterisk+AGI">FastAGI</a> protocol and the <a - href="http://www.voip-info.org/wiki-Asterisk+manager+API">Manager API</a>.</p> + href="http://www.voip-info.org/wiki-Asterisk+manager+API">Manager API</a>.<br/> + Asterisk-Java is compatible with Asterisk 1.0 and 1.2.</p> <p>The FastAGI implementation supports all <a href="apidocs/net/sf/asterisk/fastagi/command/package-summary.html">commands</a> currently available from Asterisk.</p> @@ -58,7 +59,11 @@ href="http://sourceforge.net/projects/asterisk-java/">sourceforge project page</a>.</p> <p>Asterisk-Java 0.2 will be available with the upcoming - Asterisk release 1.2.</p> + Asterisk release 1.2. It will support all new features of Asterisk + 1.2 but will still be compatible with 1.0.x Asterisk servers. + A release candidate of Asterisk-Java 0.2 is available from the <a + href="http://sourceforge.net/projects/asterisk-java/">sourceforge + project page</a>.</p> <p>Ideas for the future include a stateful higher level API that supports operations like "get list of currently active calls" or "place call" with objects like "Call" or |
From: Stefan R. <sr...@us...> - 2005-08-28 13:37:16
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18340/src/java/net/sf/asterisk/fastagi/command Modified Files: ControlStreamFileCommand.java Log Message: Added javadoc (AJ-3) Index: ControlStreamFileCommand.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/command/ControlStreamFileCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ControlStreamFileCommand.java 28 Aug 2005 13:33:09 -0000 1.1 +++ ControlStreamFileCommand.java 28 Aug 2005 13:37:04 -0000 1.2 @@ -117,9 +117,9 @@ public class ControlStreamFileCommand ex * this command. Maybe <code>null</code> if you don't want the * user to interrupt. * @param offset the offset samples to skip before streaming. - * @param forwardDigit - * @param rewindDigit - * @param pauseDigit + * @param forwardDigit the digit for fast forward. + * @param rewindDigit the digit for rewind. + * @param pauseDigit the digit for pause and unpause. */ public ControlStreamFileCommand(String file, String escapeDigits, int offset, String forwardDigit, String rewindDigit, |
From: Stefan R. <sr...@us...> - 2005-08-28 13:33:21
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17778/src/java/net/sf/asterisk/fastagi/command Added Files: ControlStreamFileCommand.java Log Message: Added ControlStreamFileCommand (AJ-3) --- NEW FILE: ControlStreamFileCommand.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.fastagi.command; /** * Plays the given file, allowing playback to be interrupted by the given * digits, if any, and allows the listner to control the stream.<br> * If offset is provided then the audio will seek to sample offset before play * starts.<br> * Returns 0 if playback completes without a digit being pressed, or the ASCII * numerical value of the digit if one was pressed, or -1 on error or if the * channel was disconnected. <br> * Remember, the file extension must not be included in the filename.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: ControlStreamFileCommand.java,v 1.1 2005/08/28 13:33:09 srt Exp $ * @since 0.2 */ public class ControlStreamFileCommand extends AGICommand { /** * Serial version identifier. */ private static final long serialVersionUID = 3978141041352128820L; /** * The name of the file to stream. */ private String file; /** * When one of these digits is pressed while streaming the command returns. */ private String escapeDigits; /** * The offset samples to skip before streaming. */ private int offset; private String forwardDigit; private String rewindDigit; private String pauseDigit; /** * Creates a new ControlStreamFileCommand, streaming from the beginning. It * uses the default digit "#" for forward and "*" for rewind and does not * support pausing. * * @param file the name of the file to stream, must not include extension. */ public ControlStreamFileCommand(String file) { this.file = file; this.escapeDigits = null; this.offset = -1; } /** * Creates a new ControlStreamFileCommand, streaming from the beginning. It * uses the default digit "#" for forward and "*" for rewind and does not * support pausing. * * @param file the name of the file to stream, must not include extension. * @param escapeDigits contains the digits that allow the user to interrupt * this command. */ public ControlStreamFileCommand(String file, String escapeDigits) { this.file = file; this.escapeDigits = escapeDigits; this.offset = -1; } /** * Creates a new ControlStreamFileCommand, streaming from the given offset. * It uses the default digit "#" for forward and "*" for rewind and does not * support pausing. * * @param file the name of the file to stream, must not include extension. * @param escapeDigits contains the digits that allow the user to interrupt * this command. Maybe <code>null</code> if you don't want the * user to interrupt. * @param offset the offset samples to skip before streaming. */ public ControlStreamFileCommand(String file, String escapeDigits, int offset) { this.file = file; this.escapeDigits = escapeDigits; this.offset = offset; } /** * Creates a new ControlStreamFileCommand, streaming from the given offset. * It uses the default digit "#" for forward and "*" for rewind and does not * support pausing. * * @param file the name of the file to stream, must not include extension. * @param escapeDigits contains the digits that allow the user to interrupt * this command. Maybe <code>null</code> if you don't want the * user to interrupt. * @param offset the offset samples to skip before streaming. * @param forwardDigit * @param rewindDigit * @param pauseDigit */ public ControlStreamFileCommand(String file, String escapeDigits, int offset, String forwardDigit, String rewindDigit, String pauseDigit) { this.file = file; this.escapeDigits = escapeDigits; this.offset = offset; this.forwardDigit = forwardDigit; this.rewindDigit = rewindDigit; this.pauseDigit = pauseDigit; } /** * Returns the name of the file to stream. * * @return the name of the file to stream. */ public String getFile() { return file; } /** * Sets the name of the file to stream. * * @param file the name of the file to stream, must not include extension. */ public void setFile(String file) { this.file = file; } /** * Returns the digits that allow the user to interrupt this command. * * @return the digits that allow the user to interrupt this command. */ public String getEscapeDigits() { return escapeDigits; } /** * Sets the digits that allow the user to interrupt this command. * * @param escapeDigits the digits that allow the user to interrupt this * command or <code>null</code> for none. */ public void setEscapeDigits(String escapeDigits) { this.escapeDigits = escapeDigits; } /** * Returns the offset samples to skip before streaming. * * @return the offset samples to skip before streaming. */ public int getOffset() { return offset; } /** * Sets the offset samples to skip before streaming. * * @param offset the offset samples to skip before streaming. */ public void setOffset(int offset) { this.offset = offset; } /** * Returns the digit for fast forward. * * @return the digit for fast forward. */ public String getForwardDigit() { return forwardDigit; } /** * Returns the digit for rewind. * * @return the digit for rewind. */ public String getRewindDigit() { return rewindDigit; } /** * Retruns the digit for pause and unpause. * * @return the digit for pause and unpause. */ public String getPauseDigit() { return pauseDigit; } /** * Sets the control digits for fast forward and rewind. * * @param forwardDigit the digit for fast forward. * @param rewindDigit the digit for rewind. */ public void setControlDigits(String forwardDigit, String rewindDigit) { this.forwardDigit = forwardDigit; this.rewindDigit = rewindDigit; } /** * Sets the control digits for fast forward, rewind and pause. * * @param forwardDigit the digit for fast forward. * @param rewindDigit the digit for rewind. * @param pauseDigit the digit for pause and unpause. */ public void setControlDigits(String forwardDigit, String rewindDigit, String pauseDigit) { this.forwardDigit = forwardDigit; this.rewindDigit = rewindDigit; this.pauseDigit = pauseDigit; } public String buildCommand() { StringBuffer sb; sb = new StringBuffer("CONTROL STREAM FILE "); sb.append(escapeAndQuote(file)); sb.append(" "); sb.append(escapeAndQuote(escapeDigits)); if (offset >= 0) { sb.append(" "); sb.append(offset); } else if (forwardDigit != null || rewindDigit != null || pauseDigit != null) { sb.append(" 0"); } if (forwardDigit != null || rewindDigit != null || pauseDigit != null) { sb.append(" "); sb.append(forwardDigit); } if (rewindDigit != null || pauseDigit != null) { sb.append(" "); sb.append(rewindDigit); } if (pauseDigit != null) { sb.append(" "); sb.append(pauseDigit); } return sb.toString(); } } |
From: Stefan R. <sr...@us...> - 2005-08-28 12:32:30
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6964/src/java/net/sf/asterisk/manager/event Modified Files: LogChannelEvent.java Log Message: Added "since" information Index: LogChannelEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/LogChannelEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- LogChannelEvent.java 28 Aug 2005 12:28:41 -0000 1.1 +++ LogChannelEvent.java 28 Aug 2005 12:32:21 -0000 1.2 @@ -18,10 +18,12 @@ package net.sf.asterisk.manager.event; /** * A LogChannelEvent is triggered when logging is turned on or off.<br> - * It is implemented in <code>logger.c</code> + * It is implemented in <code>logger.c</code><br> + * Available since Asterisk 1.2 * * @author srt * @version $Id$ + * @since 0.2 */ public class LogChannelEvent extends ManagerEvent { |