asterisk-java-cvs Mailing List for Asterisk-Java Library (Page 103)
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
(23) |
Nov
(7) |
Dec
(55) |
| 2026 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(24) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:33
|
Update of /cvsroot/asterisk-java/asterisk-java/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/build Modified Files: global.properties Log Message: moved src and test to src/java and src/test first steps to introduce maven Index: global.properties =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/build/global.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- global.properties 15 Sep 2004 01:18:53 -0000 1.1 +++ global.properties 23 Feb 2005 12:45:23 -0000 1.2 @@ -1,4 +1,4 @@ -src.dir = src +src.dir = src/java build.dir = tmp dist.dir = dist |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager/response Added Files: ManagerResponse.java MailboxStatusResponse.java CommandResponse.java ChallengeResponse.java ManagerError.java ExtensionStateResponse.java MailboxCountResponse.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: ManagerResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.response; import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; /** * Represents a response received from the Asterisk server as the result of a previously sent * ManagerAction.<br> * The response can be linked with the action that caused it by looking the action id * attribute that will match the action id of the corresponding action. * * @see net.sf.asterisk.manager.action.ManagerAction * @author srt * @version $Id: ManagerResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ManagerResponse implements Serializable { static final long serialVersionUID = -935845815108584292L; private Date dateReceived; private String actionId; private String response; private String message; private String uniqueId; /** * Returns the point in time this response was received from the asterisk server. */ public Date getDateReceived() { return dateReceived; } /** * Sets the point in time this response was received from the asterisk server. */ public void setDateReceived(Date dateReceived) { this.dateReceived = dateReceived; } /** * Returns the action id received with this response referencing the action * that generated this response. */ public String getActionId() { return actionId; } /** * Sets the action id. */ public void setActionId(String actionId) { this.actionId = actionId; } /** * Returns the message received with this response. * The content depends on the action that generated this response. */ public String getMessage() { return message; } /** * Sets the message. */ public void setMessage(String message) { this.message = message; } /** * Returns the value of the "Response:" line. * This typically a String like "Success" or "Error" but depends on the action that * generated this response. */ public String getResponse() { return response; } /** * Sets the response. */ public void setResponse(String response) { this.response = response; } /** * Returns the unique id received with this response. * The unique id is used to keep track of channels created by the action sent, * for example an OriginateAction. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id received with this response. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } final public String toString() { return ToStringBuilder.reflectionToString(this); } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: MailboxStatusResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** * A MailboxStatusResponse is sent in response to a MailboxStatusAction * and indicates if a mailbox contains waiting messages. * * @see net.sf.asterisk.manager.action.MailboxStatusAction * * @author srt * @version $Id: MailboxStatusResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MailboxStatusResponse extends ManagerResponse { private static final long serialVersionUID = -7193581424292429279L; private String mailbox; private Integer waiting; /** * Returns the name of the mailbox. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox. */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } /** * Returns 1 if the mailbox has waiting messages; 0 otherwise. */ public Integer getWaiting() { return waiting; } /** * Set to 1 if the mailbox has waiting messages; 0 otherwise. */ public void setWaiting(Integer waiting) { this.waiting = waiting; } } --- NEW FILE: CommandResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 25, 2004 */ package net.sf.asterisk.manager.response; import java.util.List; /** * Corresponds to a CommandAction.<br> * * Asterisk's handling of the command action is generelly quite hairy. It sends a "Response: Follows" * line followed by the raw output of the command including empty lines. At the end of the command * output a line containing "--END COMMAND--" is sent. The reader parses this response into a * CommandResponse object to hide these details. * * @see net.sf.asterisk.manager.action.CommandAction * * @author srt * @version $Id: CommandResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class CommandResponse extends ManagerResponse { static final long serialVersionUID = -350763332794275049L; protected List result; /** * Returns a List containing strings representing the lines returned by * the CLI command. */ public List getResult() { return result; } /** * Sets the result. */ public void setResult(List result) { this.result = result; } } --- NEW FILE: ChallengeResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.response; /** * Corresponds to a ChallengeAction and contains the challenge needed to log in * using challenge/response. * * @see net.sf.asterisk.manager.action.ChallengeAction * @see net.sf.asterisk.manager.action.LoginAction * * @author srt * @version $Id: ChallengeResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ChallengeResponse extends ManagerResponse { static final long serialVersionUID = -7253724086340850957L; private String challenge; /** * Returns the challenge to use when creating the key for log in. * * @see net.sf.asterisk.manager.action.LoginAction#key */ public String getChallenge() { return challenge; } /** * Sets the challenge to use when creating the key for log in. */ public void setChallenge(String challenge) { this.challenge = challenge; } } --- NEW FILE: ManagerError.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.response; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; /** * Represents an "Response: Error" response received from the asterisk server. * The cause for the error is given in the message attribute. * * @author srt * @version $Id: ManagerError.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ManagerError extends ManagerResponse { static final long serialVersionUID = -8753149536715547476L; /** * */ public ManagerError() { } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: ExtensionStateResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** * @author srt * @version $Id: ExtensionStateResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ExtensionStateResponse extends ManagerResponse { private static final long serialVersionUID = -2044248427247227390L; private String exten; private String context; private String hint; private Integer status; public String getExten() { return exten; } public void setExten(String exten) { this.exten = exten; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getHint() { return hint; } public void setHint(String hint) { this.hint = hint; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } } --- NEW FILE: MailboxCountResponse.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.response; /** * A MailboxCountResponse is sent in response to a MailboxCountAction * and contains the number of old and new messages in a mailbox. * * @see net.sf.asterisk.manager.action.MailboxCountAction * * @author srt * @version $Id: MailboxCountResponse.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MailboxCountResponse extends ManagerResponse { private static final long serialVersionUID = 7820598941277275838L; private String mailbox; private Integer newMessages; private Integer oldMessages; /** * Returns the name of the mailbox. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox. */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } /** * Returns the number of new messages in the mailbox. */ public Integer getNewMessages() { return newMessages; } /** * Sets the number of new messages in the mailbox. */ public void setNewMessages(Integer newMessages) { this.newMessages = newMessages; } /** * Returns the number of old messages in the mailbox. */ public Integer getOldMessages() { return oldMessages; } /** * Sets the number of old messages in the mailbox. */ public void setOldMessages(Integer oldMessages) { this.oldMessages = oldMessages; } } |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:33
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816 Modified Files: .classpath Added Files: project.xml checkstyle.xml project.properties Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: project.xml --- <?xml version="1.0"?> <project> <pomVersion>3</pomVersion> <id>asterisk-java</id> <name>asterisk-java</name> <currentVersion>0.1-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>jakarta.apache.org</siteAddress> <siteDirectory> /www/maven.apache.org/ </siteDirectory> <distributionDirectory> /www/jakarta.apache.org/builds/jakarta-turbine-maven/ </distributionDirectory> <repository> <connection> scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java </connection> <url> http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/ </url> </repository> <versions> <version> <id>b1</id> <name>0.1-b1</name> <tag>HEAD</tag> </version> </versions> <mailingLists> <mailingList> <name>Asterisk-java User List</name> <subscribe> ast...@li... </subscribe> <unsubscribe> ast...@li... </unsubscribe> <archive> http://www.mail-archive.com/us...@ma.../ </archive> </mailingList> <mailingList> <name>Asterisk-java Developer List</name> <subscribe> ast...@li... </subscribe> <unsubscribe> ast...@li... </unsubscribe> <archive> http://www.mail-archive.com/de...@ma.../ </archive> </mailingList> <mailingList> <name>Asterisk-java CVS Commit List</name> <subscribe> ast...@li... </subscribe> <unsubscribe> ast...@li... </unsubscribe> <archive> http://sourceforge.net/mailarchive/forum.php?forum_id=43809 </archive> </mailingList> </mailingLists> <developers> <developer> <name>Stefan Reuter</name> <id>srt</id> <email>sr...@re...</email> <organization></organization> </developer> <developer> <name>Pierre-Yves Roger</name> <id>partoutatis</id> <email>par...@us...</email> </developer> </developers> <dependencies> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.8</version> <properties> <dependencyType>lib</dependencyType> </properties> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.3</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.0</version> </dependency> <!-- <dependency> <groupId>bcel</groupId> <artifactId>bcel</artifactId> <version>5.0</version> <url>http://jakarta.apache.org/bcel/</url> </dependency> . . . <dependency> <groupId>regexp</groupId> <artifactId>regexp</artifactId> <version>1.2</version> <url>http://jakarta.apache.org/regexp/</url> </dependency> --> </dependencies> <build> <nagEmailAddress> sr...@re... </nagEmailAddress> <sourceDirectory>src/java</sourceDirectory> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <aspectSourceDirectory/> <!-- Unit test cases --> <unitTest> <includes> <include>**/*Test.java</include> </includes> <excludes> <exclude>**/RepositoryTest.java</exclude> </excludes> </unitTest> <!-- J A R R E S O U R C E S --> <!-- Resources that are packaged up inside the JAR file --> <resources> <resource> <directory>${basedir}/src/resources/misc</directory> <includes> <include>*.xsd</include> </includes> </resource> <resource> <directory>${basedir}/src/resources/logging</directory> <includes> <include>log4j.properties</include> </includes> </resource> </resources> </build> </project> --- NEW FILE: checkstyle.xml --- <?xml version="1.0"?> <!-- /* * Copyright 2001-2004 The Apache Software Foundation. * * 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. */ --> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> <!-- Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices Checkstyle is very configurable. Be sure to read the documentation at http://checkstyle.sf.net (or in your downloaded distribution). Most Checks are configurable, be sure to consult the documentation. To completely disable a check, just comment it out or delete it from the file. Finally, it is worth reading the documentation. --> <module name="Checker"> <!-- Checks that a package.html file exists for each package. --> <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> <module name="PackageHtml"/> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> <module name="NewlineAtEndOfFile"/> <!-- Checks that property files contain the same keys. --> <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> <module name="Translation"/> <module name="TreeWalker"> <property name="cacheFile" value="${checkstyle.cache.file}"/> <!-- ************************************************************** --> <!-- Checks that are different from the sun coding conventions ones --> <!-- ************************************************************** --> <property name="tabWidth" value="4"/> <module name="LeftCurly"> <property name="option" value="nl"/> </module> <module name="RightCurly"> <property name="option" value="alone"/> </module> <module name="LineLength"> <property name="max" value="120"/> <property name="ignorePattern" value="@version"/> </module> <module name="MemberName"> <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> </module> <!-- ************************************************************** --> <!-- Default Sun coding conventions checks --> <!-- ************************************************************** --> <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> <module name="JavadocMethod"/> <module name="JavadocType"/> <module name="JavadocVariable"/> <!-- Checks for Naming Conventions. --> <!-- See http://checkstyle.sf.net/config_naming.html --> <module name="ConstantName"/> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="MethodName"/> <module name="PackageName"/> <module name="ParameterName"/> <module name="StaticVariableName"/> <module name="TypeName"/> <!-- Checks for Headers --> <!-- See http://checkstyle.sf.net/config_header.html --> <module name="Header"> <!-- The follow property value demonstrates the ability --> <!-- to have access to ANT properties. In this case it uses --> <!-- the ${basedir} property to allow Checkstyle to be run --> <!-- from any directory within a project. --> <property name="headerFile" value="${checkstyle.header.file}"/> <property name="ignoreLines" value="1,6"/> </module> <!-- Following interprets the header file as regular expressions. --> <!-- <module name="RegexpHeader"/> --> <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"/> <module name="IllegalImport"/> <!-- defaults to sun.* packages --> <module name="RedundantImport"/> <module name="UnusedImports"/> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"/> <module name="MethodLength"/> <module name="ParameterNumber"/> <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <module name="EmptyForIteratorPad"/> <module name="NoWhitespaceAfter"/> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="ParenPad"/> <module name="TabCharacter"/> <module name="WhitespaceAfter"/> <module name="WhitespaceAround"/> <!-- Modifier Checks --> <!-- See http://checkstyle.sf.net/config_modifiers.html --> <module name="ModifierOrder"/> <module name="RedundantModifier"/> <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"/> <module name="EmptyBlock"/> <module name="NeedBraces"/> <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="AvoidInlineConditionals"/> <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="HiddenField"/> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> <module name="MagicNumber"/> <module name="MissingSwitchDefault"/> <module name="RedundantThrows"/> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <!-- Checks for class design --> <!-- See http://checkstyle.sf.net/config_design.html --> <module name="DesignForExtension"/> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> <module name="VisibilityModifier"/> <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> <module name="ArrayTypeStyle"/> <module name="FinalParameters"/> <module name="GenericIllegalRegexp"> <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module> <module name="TodoComment"/> <module name="UpperEll"/> </module> </module> --- NEW FILE: project.properties --- maven.jar.override = on maven.jar.commons-lang = /home/srt/workspace/asterisk-java/lib/commons-lang-2.0.jar maven.checkstyle.properties = checkstyle.xml maven.compile.source = 1.3 maven.compile.target = 1.3 Index: .classpath =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/.classpath,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- .classpath 24 Sep 2004 09:27:07 -0000 1.2 +++ .classpath 23 Feb 2005 12:45:22 -0000 1.3 @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="src" path="src/test"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="lib/commons-logging.jar"/> - <classpathentry kind="lib" path="lib/commons-lang-2.0.jar"/> - <classpathentry kind="src" path="test"/> <classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> + <classpathentry kind="lib" path="lib/commons-lang-2.0.jar"/> <classpathentry kind="output" path="bin"/> </classpath> |
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/test/net/sf/asterisk/manager Added Files: TestEventBuilder.java TestDefaultManagerConnection.java TestDefaultAsteriskManager.java TestMultiAsteriskManager.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: TestEventBuilder.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; import net.sf.asterisk.manager.event.ChannelEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.ShutdownEvent; /** * @author srt * @version $Id: TestEventBuilder.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestEventBuilder extends TestCase { private EventBuilder getEventBuilder() { return new EventBuilder(); } public void testRegisterEvent() { EventBuilder eb = getEventBuilder(); eb.registerEventClass(NewChannelEvent.class); } public void testRegisterEventWithAbstractEvent() { EventBuilder eb = getEventBuilder(); try { eb.registerEventClass(ChannelEvent.class); fail("registerEvent() must not accept abstract classes"); } catch (IllegalArgumentException ex) { } } public void testRegisterEventWithWrongClass() { EventBuilder eb = getEventBuilder(); try { eb.registerEventClass(String.class); fail("registerEvent() must only accept subclasses of ManagerEvent"); } catch (IllegalArgumentException ex) { } } /* public void testGetSetters() { Map setters; EventBuilder eb = getEventBuilder(); setters = eb.getSetters(NewChannelEvent.class); assertTrue("Setter not found", setters.containsKey("callerid")); } */ public void testBuildEventWithMixedCaseSetter() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); String callerid = "1234"; NewChannelEvent event; properties.put("event", "Newchannel"); properties.put("callerid", callerid); event = (NewChannelEvent) eb.buildEvent(this, properties); assertNotNull(event); assertEquals("Returned event is of wrong type", NewChannelEvent.class, event.getClass()); assertEquals("String property not set correctly", callerid, event.getCallerId()); assertEquals("Source not set correctly", this, event.getSource()); } public void testBuildEventWithIntegerProperty() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); String channel = "SIP/1234"; Integer priority = new Integer(1); NewExtenEvent event; properties.put("event", "newexten"); properties.put("channel", channel); properties.put("priority", priority.toString()); event = (NewExtenEvent) eb.buildEvent(this, properties); assertNotNull(event); assertEquals("Returned event is of wrong type", NewExtenEvent.class, event.getClass()); assertEquals("String property not set correctly", channel, event.getChannel()); assertEquals("Integer property not set correctly", priority, event.getPriority()); } public void testBuildEventWithBooleanProperty() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); ShutdownEvent event; eb.registerEventClass(ShutdownEvent.class); properties.put("event", "shutdown"); properties.put("restart", "True"); event = (ShutdownEvent) eb.buildEvent(this, properties); assertNotNull(event); assertEquals("Returned event is of wrong type", ShutdownEvent.class, event.getClass()); assertEquals("Boolean property not set correctly", Boolean.TRUE, event.getRestart()); } public void testBuildEventWithUnregisteredEvent() { EventBuilder eb = getEventBuilder(); Map properties = new HashMap(); ManagerEvent event; properties.put("event", "Nonexisting"); event = eb.buildEvent(this, properties); assertNull(event); } } --- NEW FILE: TestDefaultManagerConnection.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; import junit.framework.TestCase; import net.sf.asterisk.manager.action.StatusAction; import net.sf.asterisk.manager.event.ManagerEvent; /** * @author srt * @version $Id: TestDefaultManagerConnection.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestDefaultManagerConnection extends TestCase { private DefaultManagerConnection getDefaultManagerConnection() { DefaultManagerConnection dmc; dmc = new DefaultManagerConnection(); dmc.setUsername("manager"); dmc.setPassword("obelisk"); dmc.setHostname("deprecated"); return dmc; } public void testLogin() throws Exception { DefaultManagerConnection dmc; dmc = getDefaultManagerConnection(); dmc.login(); dmc.addEventHandler(new ManagerEventHandler() { public void handleEvent(ManagerEvent event) { System.out.println(event); } }); dmc.sendAction(new StatusAction()); // wait for 3 seconds to receive events Thread.sleep(3000); dmc.logoff(); } } --- NEW FILE: TestDefaultAsteriskManager.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; import junit.framework.TestCase; /** * @author srt * @version $Id: TestDefaultAsteriskManager.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestDefaultAsteriskManager extends TestCase { protected DefaultAsteriskManager getDefaultManager() { DefaultAsteriskManager dm = new DefaultAsteriskManager(); DefaultManagerConnection dmc = new DefaultManagerConnection(); dmc.setHostname("deprecated"); dmc.setUsername("manager"); dmc.setPassword("obelisk"); dm.setManagerConnection(dmc); return dm; } public void testInit() throws Exception { DefaultAsteriskManager dm = getDefaultManager(); dm.initialize(); try { Thread.sleep(30000); } catch (InterruptedException e) { } System.out.println(dm.getChannels()); } } --- NEW FILE: TestMultiAsteriskManager.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; import junit.framework.TestCase; /** * @author PY * @version $Id: TestMultiAsteriskManager.java,v 1.1 2005/02/23 12:45:23 srt Exp $ */ public class TestMultiAsteriskManager extends TestCase { protected MultiAsterisksManager getDefaultManager() { MultiAsterisksManager mam = new MultiAsterisksManager(); DefaultManagerConnection dmc1 = new DefaultManagerConnection(); dmc1.setHostname("asterisk1"); dmc1.setUsername("username"); dmc1.setPassword("password"); mam.addManagerConnection(dmc1); DefaultManagerConnection dmc2 = new DefaultManagerConnection(); dmc2.setHostname("asterisk2"); dmc2.setUsername("username"); dmc2.setPassword("password"); mam.addManagerConnection(dmc2); return mam; } public void testInit() throws Exception { MultiAsterisksManager mam = getDefaultManager(); mam.initialize(); try { Thread.sleep(5000); } catch (InterruptedException e) { } System.out.println(mam.getChannels()); } } |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager/event Added Files: QueueEntryEvent.java PeerStatusEvent.java OriginateSuccessEvent.java AgentCallbackLogoffEvent.java StatusEvent.java ChannelEvent.java NewChannelEvent.java AgentLogoffEvent.java ReloadEvent.java QueueEvent.java UnlinkEvent.java ZapShowChannelsCompleteEvent.java RenameEvent.java StatusCompleteEvent.java HangupEvent.java ConnectEvent.java ParkedCallEvent.java LeaveEvent.java JoinEvent.java ExtensionStatusEvent.java LinkageEvent.java LinkEvent.java NewCallerIdEvent.java NewExtenEvent.java AlarmClearEvent.java NewStateEvent.java AgentCallbackLoginEvent.java QueueParamsEvent.java DisconnectEvent.java AgentLoginEvent.java QueueMemberEvent.java HoldedCallEvent.java OriginateFailureEvent.java MeetMeJoinEvent.java ZapShowChannelsEvent.java AgentCalledEvent.java MeetMeLeaveEvent.java ResponseEvent.java MessageWaitingEvent.java ParkedCallsCompleteEvent.java MeetMeEvent.java ShutdownEvent.java RegistryEvent.java CdrEvent.java ManagerEvent.java OriginateEvent.java AlarmEvent.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: QueueEntryEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A QueueEntryEvent is triggered in response to a QueueStatusAction and contains * information about an entry in a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction * * @author srt * @version $Id: QueueEntryEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class QueueEntryEvent extends ResponseEvent { private static final long serialVersionUID = 3419114730595151514L; private String queue; private Integer position; private String channel; private String callerId; private Long wait; /** * @param source */ public QueueEntryEvent(Object source) { super(source); } /** * Returns the name of the queue that contains this entry. */ public String getQueue() { return queue; } /** * Sets the name of the queue that contains this entry. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the position of this entry in the queue. */ public Integer getPosition() { return position; } /** * Sets the position of this entry in the queue. */ public void setPosition(Integer position) { this.position = position; } /** * Returns the name of the channel of this entry. */ public String getChannel() { return channel; } /** * Sets the name of the channel of this entry. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the callerid of the channel of this entry. */ public String getCallerId() { return callerId; } /** * Sets the callerid of the channel of this entry. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the number of seconds this entry has spent in the queue. */ public Long getWait() { return wait; } /** * Sets the number of seconds this entry has spent in the queue. */ public void setWait(Long wait) { this.wait = wait; } } --- NEW FILE: PeerStatusEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A PeerStatusEvent is triggered when a SIP or IAX client attempts to registrer * at this asterisk server.<br> * This event is implemented in <code>channels/chan_iax2.c</code> and * <code>channels/chan_sip.c</code> * * @author srt * @version $Id: PeerStatusEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class PeerStatusEvent extends ManagerEvent { private static final long serialVersionUID = 8384939771592846892L; private String peer; private String peerStatus; private String cause; private Integer time; /** * @param source */ public PeerStatusEvent(Object source) { super(source); } /** * Returns the name of the peer that registered. The peer's name starts * with "IAX2/" if it is an IAX client or "SIP/" if it is a SIP client. * It is followed by the username that is used for registration. */ public String getPeer() { return peer; } /** * Sets the name of the peer that registered. */ public void setPeer(String peer) { this.peer = peer; } /** * Returns the registration state.<br> * This may be one of * <ul> * <li>Registered</li> * <li>Unregistered</li> * <li>Reachable</li> * <li>Lagged</li> * <li>Rejected (IAX only)</li> * <li>Unreachable</li> * </ul> */ public String getPeerStatus() { return peerStatus; } /** * Sets the registration state. */ public void setPeerStatus(String peerStatus) { this.peerStatus = peerStatus; } /** * Returns the cause of a rejection or unregistration.<br> * For IAX peers this is set only if the status equals "Rejected".<br> * For SIP peers this is set if the status equals "Unregistered" and the * peer was unregistered due to an expiration. In that case the cause is set * to "Expired". */ public String getCause() { return cause; } /** * Sets the cause of the rejection or unregistration. */ public void setCause(String cause) { this.cause = cause; } /** * Returns the ping time of the client if status equals "Reachable" or "Lagged"; if * the status equals "Unreachable" it returns how long the last response took * (in ms) for IAX peers or -1 for SIP peers. */ public Integer getTime() { return time; } public void setTime(Integer time) { this.time = time; } } --- NEW FILE: OriginateSuccessEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * An OriginateSuccessEvent is triggered when the execution of an OriginateAction * succeeded. * * @see net.sf.asterisk.manager.action.OriginateAction * * @author srt * @version $Id: OriginateSuccessEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class OriginateSuccessEvent extends OriginateEvent { private static final long serialVersionUID = -5086668438614692086L; /** * @param source */ public OriginateSuccessEvent(Object source) { super(source); } } --- NEW FILE: AgentCallbackLogoffEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in * using AgentCallbackLogin is logged of.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentCallbackLoginEvent * @author srt * @version $Id: AgentCallbackLogoffEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentCallbackLogoffEvent extends ManagerEvent { private static final long serialVersionUID = 8458799161502800576L; private String agent; private String loginChan; private String loginTime; private String reason; private String uniqueId; /** * @param source */ public AgentCallbackLogoffEvent(Object source) { super(source); } /** * Returns the name of the agent that logged off. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged off. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginChan() { return loginChan; } public void setLoginChan(String loginChan) { this.loginChan = loginChan; } public String getLoginTime() { return loginTime; } public void setLoginTime(String loginTime) { this.loginTime = loginTime; } /** * Returns the reason for the logoff. * The reason is set to Autologoff if the agent has been logged off due to not * answering the phone in time. * Autologoff is configured by setting <code>autologoff</code> to the appropriate * number of seconds in <code>agents.conf</code>. */ public String getReason() { return reason; } /** * Sets the reason for the logoff. */ public void setReason(String reason) { this.reason = reason; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: StatusEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A StatusEvent is triggered for each active channel in response to a * StatusAction. * * @see net.sf.asterisk.manager.action.StatusAction * * @author srt * @version $Id: StatusEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class StatusEvent extends ResponseEvent { private static final long serialVersionUID = -3619197512835308812L; private String channel; private String callerId; private String account; private String state; private String context; private String extension; private Integer priority; private Integer seconds; private String link; private String uniqueId; /** * @param source */ public StatusEvent(Object source) { super(source); } /** * Returns the name of this channel. */ public String getChannel() { return channel; } /** * Sets the name of this channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the caller id of this channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id of this channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the account code of this channel. */ public String getAccount() { return account; } /** * Sets the account code of this channel. */ public void setAccount(String account) { this.account = account; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public Integer getPriority() { return priority; } public void setPriority(Integer priority) { this.priority = priority; } /** * Returns the number of elapsed seconds. */ public Integer getSeconds() { return seconds; } /** * Sets the number of elapsed seconds. */ public void setSeconds(Integer seconds) { this.seconds = seconds; } /** * Returns the name of the linked channel if this channel is bridged. */ public String getLink() { return link; } /** * Sets the name of the linked channel. */ public void setLink(String link) { this.link = link; } /** * Returns the unique id of this channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of this channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: ChannelEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class providing common properties for * HangupEvent, NewChannelEvent and NewStateEvent. * * @author srt * @version $Id: ChannelEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class ChannelEvent extends ManagerEvent { static final long serialVersionUID = 5906599407896179295L; private String channel; private String state; private String callerId; private String uniqueId; /** * @param source */ public ChannelEvent(Object source) { super(source); } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the caller id of the channel if set or "unknown" if none has been set. */ public String getCallerId() { return callerId; } /** * Sets the caller id of the channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the (new) state of the channel.<br> * The following states are used:<br> * <ul> * <li>Down</li> * <li>OffHook</li> * <li>Dialing</li> * <li>Ring</li> * <li>Ringing</li> * <li>Up</li> * <li>Busy</li> * <ul> */ public String getState() { return state; } /** * Sets the (new) state of the channel. */ public void setState(String state) { this.state = state; } } --- NEW FILE: NewChannelEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewChannelEvent is triggered when a new channel is created.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: NewChannelEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewChannelEvent extends ChannelEvent { static final long serialVersionUID = -4503396901506287549L; /** * @param source */ public NewChannelEvent(Object source) { super(source); } } --- NEW FILE: AgentLogoffEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCallbackLogoffEvent is triggered when an agent that previously logged in * using AgentLogin is logged of.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentLoginEvent * @author srt * @version $Id: AgentLogoffEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentLogoffEvent extends ManagerEvent { private static final long serialVersionUID = -3482474719161350942L; private String agent; private String loginChan; private String loginTime; private String reason; private String uniqueId; /** * @param source */ public AgentLogoffEvent(Object source) { super(source); } /** * Returns the name of the agent that logged off. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged off. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginTime() { return loginTime; } public void setLoginTime(String loginTime) { this.loginTime = loginTime; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: ReloadEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A ReloadEvent is triggerd when the <code>reload</code> console command is executed * or the asterisk server is started.<br> * It is implemented in <code>manager.c</code> * * @author srt * @version $Id: ReloadEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ReloadEvent extends ManagerEvent { private static final long serialVersionUID = 7503005587022499819L; private String message; /** * @param source */ public ReloadEvent(Object source) { super(source); } /** * Always returns "Reload Requested". */ public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } --- NEW FILE: QueueEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class providing common properties for JoinEvent and LeaveEvent. * * @author srt * @version $Id: QueueEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class QueueEvent extends ManagerEvent { static final long serialVersionUID = -8554382298783676181L; private String channel; private String queue; private Integer count; /** * @param source */ public QueueEvent(Object source) { super(source); } /** * Returns the name of the channel that joines or leaves a queue. */ public String getChannel() { return channel; } /** * Sets the name of the channel that joines or leaves a queue. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the number of elements in the queue, i.e. the number of calls waiting * to be answered by an agent. */ public Integer getCount() { return count; } /** * Sets the number of elements in the queue. */ public void setCount(Integer count) { this.count = count; } /** * Returns the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } } --- NEW FILE: UnlinkEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * An UnlinkEvent is triggered when a link between two voice channels is * discontinued, for example, just before call completion.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: UnlinkEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class UnlinkEvent extends LinkageEvent { static final long serialVersionUID = -2943257621137870024L; /** * @param source */ public UnlinkEvent(Object source) { super(source); } } --- NEW FILE: ZapShowChannelsCompleteEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A ZapShowChannelsCompleteEvent is triggered after the state of all zap channels has * been reported in response to a ZapShowChannelsAction. * * @see net.sf.asterisk.manager.action.ZapShowChannelsAction * @see net.sf.asterisk.manager.event.ZapShowChannelsEvent * * @author srt * @version $Id: ZapShowChannelsCompleteEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ZapShowChannelsCompleteEvent extends ResponseEvent { private static final long serialVersionUID = 6323249250335886462L; /** * @param source */ public ZapShowChannelsCompleteEvent(Object source) { super(source); } } --- NEW FILE: RenameEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A RenameEvent is triggered when the name of a channel is changed.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: RenameEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class RenameEvent extends ManagerEvent { static final long serialVersionUID = 3400165738000349767L; protected String oldname; protected String newname; protected String uniqueId; /** * @param source */ public RenameEvent(Object source) { super(source); } /** * Returns the new name of the channel. */ public String getNewname() { return newname; } /** * Sets the new name of the channel. */ public void setNewname(String newname) { this.newname = newname; } /** * Returns the old name of the channel. */ public String getOldname() { return oldname; } /** * Sets the old name of the channel. */ public void setOldname(String oldname) { this.oldname = oldname; } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: StatusCompleteEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A StatusCompleteEvent is triggered after the state of all channels has been * reported in response to a StatusAction. * * @see net.sf.asterisk.manager.action.StatusAction * @see net.sf.asterisk.manager.event.StatusEvent * * @author srt * @version $Id: StatusCompleteEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class StatusCompleteEvent extends ResponseEvent { private static final long serialVersionUID = -1177773673509373296L; /** * @param source */ public StatusCompleteEvent(Object source) { super(source); } } --- NEW FILE: HangupEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A HangupEvent is triggered when a channel is hung up.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: HangupEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class HangupEvent extends ChannelEvent { static final long serialVersionUID = 650153034857116588L; private Integer cause; /** * @param source */ public HangupEvent(Object source) { super(source); } /** * Returns the cause of the hangup. */ public Integer getCause() { return cause; } /** * Sets the cause of the hangup. */ public void setCause(Integer cause) { this.cause = cause; } } --- NEW FILE: ConnectEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A ConnectEvent is triggered after successful login to the asterisk server.<br> * It is a pseudo event not directly related to an asterisk generated event. * * @author srt * @version $Id: ConnectEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ConnectEvent extends ManagerEvent { private static final long serialVersionUID = 3257845467831284784L; /** * @param source */ public ConnectEvent(Object source) { super(source); } } --- NEW FILE: ParkedCallEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A ParkedCallEvent is triggered when a channel is parked (in this case no action id * is set) and in response to a ParkedCallsAction.<br> * It is implemented in <code>res/res_features.c</code> * * @see net.sf.asterisk.manager.action.ParkedCallsAction * * @author srt * @version $Id: ParkedCallEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ParkedCallEvent extends ResponseEvent { private static final long serialVersionUID = -7437833328723536814L; private String exten; private String channel; private String from; private Integer timeout; private String callerId; private String uniqueId; /** * @param source */ public ParkedCallEvent(Object source) { super(source); } /** * Returns the extension the channel is parked at. */ public String getExten() { return exten; } /** * Sets the extension the channel is parked at. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the name of the channel that is parked. */ public String getChannel() { return channel; } /** * Sets the name of the channel that is parked. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the channel that parked the call. */ public String getFrom() { return from; } /** * Sets the name of the channel that parked the call. */ public void setFrom(String from) { this.from = from; } /** * Returns the number of seconds this call will be parked.<br> * This corresponds to the <code>parkingtime</code> option in * <code>features.conf</code>. */ public Integer getTimeout() { return timeout; } /** * Sets the number of seconds this call will be parked. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** * Returns the caller id of the parked channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id of the parked channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the unique id of the parked channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the parked channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: LeaveEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A LeaveEvent is triggered when a channel leaves a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: LeaveEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class LeaveEvent extends QueueEvent { static final long serialVersionUID = -7450401017732634240L; /** * @param source */ public LeaveEvent(Object source) { super(source); } } --- NEW FILE: JoinEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A JoinEvent is triggered when a channel joines a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: JoinEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class JoinEvent extends QueueEvent { static final long serialVersionUID = 4961288508235470985L; protected String callerId; protected Integer position; /** * @param source */ public JoinEvent(Object source) { super(source); } /** * Returns the caller id of the channel that joined the queue if set. If the * channel has no caller id set "unknown" is returned. */ public String getCallerId() { return callerId; } /** * Sets the caller id of the channel that joined the queue. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the position of the joined channel in the queue. */ public Integer getPosition() { return position; } /** * Sets the position of the joined channel in the queue. */ public void setPosition(Integer position) { this.position = position; } } --- NEW FILE: ExtensionStatusEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * An ExtensionStatusEvent is triggered when the state of an extension changes.<br> * It is implemented in <code>manager.c</code> * * @author srt * @version $Id: ExtensionStatusEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ExtensionStatusEvent extends ManagerEvent { private static final long serialVersionUID = -6459014125704286869L; private String exten; private String context; private Integer status; /** * @param source */ public ExtensionStatusEvent(Object source) { super(source); } /** * Returns the extension. */ public String getExten() { return exten; } /** * Sets the extension. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the context of the extension. */ public String getContext() { return context; } /** * Sets the context of the extension. */ public void setContext(String context) { this.context = context; } /** * Returns the state of the extension. */ public Integer getStatus() { return status; } /** * Sets the state of the extension. */ public void setStatus(Integer status) { this.status = status; } } --- NEW FILE: LinkageEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class providing common properties for LinkEvent and UnlinkEvent. * * @author srt * @version $Id: LinkageEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class LinkageEvent extends ManagerEvent { static final long serialVersionUID = 6563044930071030273L; private String uniqueId1; private String uniqueId2; private String channel1; private String channel2; /** * @param source */ public LinkageEvent(Object source) { super(source); } /** * Returns the unique id of the first channel. */ public String getUniqueId1() { return uniqueId1; } /** * Sets the unique id of the first channel. */ public void setUniqueId1(String uniqueId1) { this.uniqueId1 = uniqueId1; } /** * Returns the unique id of the second channel. */ public String getUniqueId2() { return uniqueId2; } /** * Sets the unique id of the second channel. */ public void setUniqueId2(String uniqueId2) { this.uniqueId2 = uniqueId2; } /** * Returns the name of the first channel. */ public String getChannel1() { return channel1; } /** * Sets the name of the first channel. */ public void setChannel1(String channel1) { this.channel1 = channel1; } /** * Returns the name of the second channel. */ public String getChannel2() { return channel2; } /** * Sets the name of the second channel. */ public void setChannel2(String channel2) { this.channel2 = channel2; } } --- NEW FILE: LinkEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A LinkEvent is triggered when two voice channels are linked together * and voice data exchange commences.<br> * Several Link events may be seen for a single call. This can occur when Asterisk * fails to setup a native bridge for the call.This is when Asterisk must sit * between two telephones and perform CODEC conversion on their behalf.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: LinkEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class LinkEvent extends LinkageEvent { static final long serialVersionUID = -4023240534975776225L; /** * @param source */ public LinkEvent(Object source) { super(source); } } --- NEW FILE: NewCallerIdEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewCallerIdEvent is triggered when the caller id of a channel changes.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: NewCallerIdEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewCallerIdEvent extends ManagerEvent { static final long serialVersionUID = 6639570533512201213L; private String callerId; private String channel; private String uniqueId; /** * @param source */ public NewCallerIdEvent(Object source) { super(source); } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the new caller id. */ public String getCallerId() { return callerId; } /** * Sets the new caller id. */ public void setCallerId(String callerId) { this.callerId = callerId; } } --- NEW FILE: NewExtenEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewExtenEvent is triggered when a channel is connected to a new extension.<br> * It is implemented in <code>pbx.c</code> * * @author srt * @version $Id: NewExtenEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewExtenEvent extends ManagerEvent { static final long serialVersionUID = -467486409866099387L; private String uniqueId; private String context; private String extension; private String application; private String appData; private Integer priority; private String channel; /** * @param source */ public NewExtenEvent(Object source) { super(source); } /** * Returns the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the name of the application that is executed. */ public String getApplication() { return application; } /** * Sets the name of the application that is executed. */ public void setApplication(String application) { this.application = application; } /** * Returns the parameters passed to the application that is executed. * The parameters are separated by a '|' character. */ public String getAppData() { return appData; } /** * Sets the parameters passed to the application that is executed. */ public void setAppData(String appData) { this.appData = appData; } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the context of the connected extension. */ public String getContext() { return context; } /** * Sets the name of the context of the connected extension. */ public void setContext(String context) { this.context = context; } /** * Returns the extension. */ public String getExtension() { return extension; } /** * Sets the extension. */ public void setExtension(String extension) { this.extension = extension; } /** * Returns the priority. */ public Integer getPriority() { return priority; } /** * Sets the priority. */ public void setPriority(Integer priority) { this.priority = priority; } } --- NEW FILE: AlarmClearEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AlarmEvent is triggered when a Zap channel leaves alarm state.<br> * It is implemented in <code>channels/chan_zap.c</code> * * @author srt * @version $Id: AlarmClearEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AlarmClearEvent extends ManagerEvent { private static final long serialVersionUID = -3584791971422266558L; private String alarm; private Integer channel; /** * @param source */ public AlarmClearEvent(Object source) { super(source); } /** * Returns the number of the channel that left alarm state. */ public Integer getChannel() { return channel; } /** * Sets the number of the channel that left alarm state. */ public void setChannel(Integer channel) { this.channel = channel; } } --- NEW FILE: NewStateEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager.event; /** * A NewStateEvent is triggered when the state of a channel has changed.<br> * It is implemented in <code>channel.c</code> * * @author srt * @version $Id: NewStateEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class NewStateEvent extends ChannelEvent { static final long serialVersionUID = -3660049241052945802L; /** * @param source */ public NewStateEvent(Object source) { super(source); } } --- NEW FILE: AgentCallbackLoginEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCallbackLoginEvent is triggered when an agent is successfully * logged in using AgentCallbackLogin.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentCallbackLogoffEvent * @author srt * @version $Id: AgentCallbackLoginEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentCallbackLoginEvent extends ManagerEvent { private static final long serialVersionUID = -3510642916347427230L; private String agent; private String loginChan; private String uniqueId; /** * @param source */ public AgentCallbackLoginEvent(Object source) { super(source); } /** * Returns the name of the agent that logged in. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged in. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginChan() { return loginChan; } public void setLoginChan(String loginChan) { this.loginChan = loginChan; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: QueueParamsEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A QueueParamsEvent is triggered in response to a QueueStatusAction and contains * the parameters of a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction * * @author srt * @version $Id: QueueParamsEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class QueueParamsEvent extends ResponseEvent { private static final long serialVersionUID = -170511596914604717L; private String queue; private Integer max; private Integer calls; private Integer holdtime; private Integer completed; private Integer abandoned; private Integer serviceLevel; private Double serviceLevelPerf; /** * @param source */ public QueueParamsEvent(Object source) { super(source); } /** * Returns the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the maximum number of people waiting in the queue or 0 for unlimited.<br> * This corresponds to the <code>maxlen</code> setting in <code>queues.conf</code>. */ public Integer getMax() { return max; } /** * Sets the maximum number of people waiting in the queue. */ public void setMax(Integer max) { this.max = max; } /** * Returns the number of calls currently waiting in the queue. */ public Integer getCalls() { return calls; } /** * Sets the number of calls currently waiting in the queue. */ public void setCalls(Integer calls) { this.calls = calls; } /** * Returns the current average holdtime for this queue (in seconds). */ public Integer getHoldtime() { return holdtime; } /** * Sets the current average holdtime for this queue. */ public void setHoldtime(Integer holdtime) { this.holdtime = holdtime; } /** * Returns the number of completed calls. */ public Integer getCompleted() { return completed; } /** * Sets the number of completed calls. */ public void setCompleted(Integer complete) { this.completed = complete; } /** * Returns the number of abandoned calls. */ public Integer getAbandoned() { return abandoned; } /** * Sets the number of abandoned calls. */ public void setAbandoned(Integer abandoned) { this.abandoned = abandoned; } /** * Returns the service level (in seconds) as defined by the * <code>servicelevel</code> setting in <code>queues.conf</code>. */ public Integer getServiceLevel() { return serviceLevel; } /** * Sets the service level. */ public void setServiceLevel(Integer serviceLevel) { this.serviceLevel = serviceLevel; } /** * Returns the ratio of calls answered within the specified service level * per total completed calls (in percent). */ public Double getServiceLevelPerf() { return serviceLevelPerf; } /** * Sets the ratio of calls answered within the specified service level * per total completed calls. */ public void setServiceLevelPerf(Double serviceLevelPerf) { this.serviceLevelPerf = serviceLevelPerf; } } --- NEW FILE: DisconnectEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager.event; /** * A DisconnectEvent is triggered when the connection to the asterisk server is lost.<br> * It is a pseudo event not directly related to an asterisk generated event. * * @author srt * @version $Id: DisconnectEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class DisconnectEvent extends ManagerEvent { private static final long serialVersionUID = 3689355411862206518L; /** * @param source */ public DisconnectEvent(Object source) { super(source); } } --- NEW FILE: AgentLoginEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentLoginEvent is triggered when an agent is successfully * logged in using AgentLogin.<br> * It is implemented in <code>channels/chan_agent.c</code> * * @see net.sf.asterisk.manager.event.AgentLogoffEvent * @author srt * @version $Id: AgentLoginEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentLoginEvent extends ManagerEvent { private static final long serialVersionUID = 7125917930904957919L; private String agent; private String loginChan; private String uniqueId; /** * @param source */ public AgentLoginEvent(Object source) { super(source); } /** * Returns the name of the agent that logged in. */ public String getAgent() { return agent; } /** * Sets the name of the agent that logged in. */ public void setAgent(String agent) { this.agent = agent; } public String getLoginChan() { return loginChan; } public void setLoginChan(String loginChan) { this.loginChan = loginChan; } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } } --- NEW FILE: QueueMemberEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * A QueueMemberEvent is triggered in response to a QueueStatusAction and contains * information about a member of a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.action.QueueStatusAction * * @author srt * @version $Id: QueueMemberEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class QueueMemberEvent extends ResponseEvent { private static final long serialVersionUID = -2293926744791895763L; private String queue; private String location; private String membership; private Integer penalty; private Integer callsTaken; private Long lastCall; /** * @param source */ public QueueMemberEvent(Object source) { super(source); } /** * Returns the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the location of this member.<br> * E.g. the channel name or agent group. */ public String getLocation() { return location; } /** * Sets the location of this member. */ public void setLocation(String location) { this.location = location; } /** * Returns "dynamic" if this member has been dynamically added by the * QueueAdd command (in the dialplan or via the manager api) or "static" * if this member is has been statically defined in <code>queues.conf</code>. */ public String getMembership() { return membership; } /** * Sets if this member has been dynamically or statically added. * @param membership either "dynamic" or "static". */ public void setMembership(String membership) { this.membership = membership; } /** * Returns the penality of this member. */ public Integer getPenalty() { return penalty; } /** * Sets the penality of this member. */ public void setPenalty(Integer penality) { this.penalty = penality; } /** * Returns the number of calls answered by this member. */ public Integer getCallsTaken() { return callsTaken; } /** * Sets the number of calls answered by this member. */ public void setCallsTaken(Integer callsTaken) { this.callsTaken = callsTaken; } /** * Returns the time (in seconds since 01/01/1970) the last successful call * answered by this member was hungup. */ public Long getLastCall() { return lastCall; } /** * Sets the time (in seconds since 01/01/1970) the last successful call * answered by this member was hungup. */ public void setLastCall(Long lastCall) { this.lastCall = lastCall; } } --- NEW FILE: HoldedCallEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A ParkedCallEvent is triggered when a channel is put on hold.<br> * It is implemented in <code>res/res_features.c</code> * * @author srt * @version $Id: HoldedCallEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class HoldedCallEvent extends ManagerEvent { private static final long serialVersionUID = 7384290590382334480L; private String uniqueId1; private String uniqueId2; private String channel1; private String channel2; /** * @param source */ public HoldedCallEvent(Object source) { super(source); } /** * Returns the unique id of the channel that put the other channel on hold. */ public String getUniqueId1() { return uniqueId1; } /** * Sets the unique id of the channel that put the other channel on hold. */ public void setUniqueId1(String uniqueId1) { this.uniqueId1 = uniqueId1; } /** * Returns the unique id of the channel that has been put on hold. */ public String getUniqueId2() { return uniqueId2; } /** * Sets the unique id of the channel that has been put on hold. */ public void setUniqueId2(String uniqueId2) { this.uniqueId2 = uniqueId2; } /** * Returns the name of the channel that put the other channel on hold. */ public String getChannel1() { return channel1; } /** * Sets the name of the channel that put the other channel on hold. */ public void setChannel1(String channel1) { this.channel1 = channel1; } /** * Returns the name of the channel that has been put on hold. */ public String getChannel2() { return channel2; } /** * Sets the name of the channel that has been put on hold. */ public void setChannel2(String channel2) { this.channel2 = channel2; } } --- NEW FILE: OriginateFailureEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * An OriginateFailureEvent is triggered when the execution of an OriginateAction * failed. * * @see net.sf.asterisk.manager.action.OriginateAction * * @author srt * @version $Id: OriginateFailureEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class OriginateFailureEvent extends OriginateEvent { private static final long serialVersionUID = -6812199688948480631L; /** * @param source */ public OriginateFailureEvent(Object source) { super(source); } } --- NEW FILE: MeetMeJoinEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MeetMeJoinEvent is triggered if a channel joins a meet me conference.<br> * It is implemented in <code>apps/app_meetme.c</code> * * @author srt * @version $Id: MeetMeJoinEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MeetMeJoinEvent extends MeetMeEvent { private static final long serialVersionUID = -8554403451985143184L; /** * @param source */ public MeetMeJoinEvent(Object source) { super(source); } } --- NEW FILE: ZapShowChannelsEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 30, 2004 */ package net.sf.asterisk.manager.event; /** * A ZapShowChannelsEvent is triggered in response to a ZapShowChannelsAction and * shows the state of a zap channel. * * @see net.sf.asterisk.manager.action.ZapShowChannelsAction * * @author srt * @version $Id: ZapShowChannelsEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class ZapShowChannelsEvent extends ResponseEvent { private static final long serialVersionUID = -3613642267527361400L; private Integer channel; private String signalling; private String context; private String alarm; /** * @param source */ public ZapShowChannelsEvent(Object source) { super(source); } /** * Returns the number of this zap channel. */ public Integer getChannel() { return channel; } /** * Sets the number of this zap channel. */ public void setChannel(Integer channel) { this.channel = channel; } /** * Returns the signalling of this zap channel.<br> * Possible values are: * <ul> * <li>E & M Immediate</li> * <li>E & M Wink</li> * <li>E & M E1</li> * <li>Feature Group D (DTMF)</li> * <li>Feature Group D (MF)</li> * <li>Feature Group B (MF)</li> * <li>E911 (MF)</li> * <li>FXS Loopstart</li> * <li>FXS Groundstart</li> * <li>FXS Kewlstart</li> * <li>FXO Loopstart</li> * <li>FXO Groundstart</li> * <li>FXO Kewlstart</li> * <li>PRI Signalling</li> * <li>R2 Signalling</li> * <li>SF (Tone) Signalling Immediate</li> * <li>SF (Tone) Signalling Wink</li> * <li>SF (Tone) Signalling with Feature Group D (DTMF)</li> * <li>SF (Tone) Signalling with Feature Group D (MF)</li> * <li>SF (Tone) Signalling with Feature Group B (MF)</li> * <li>GR-303 Signalling with FXOKS</li> * <li>GR-303 Signalling with FXSKS</li> * <li>Pseudo Signalling</li> * </ul> */ public String getSignalling() { return signalling; } /** * Sets the signalling of this zap channel. */ public void setSignalling(String signalling) { this.signalling = signalling; } /** * Returns the context of this zap channel as defined in * <code>zapata.conf</code>. */ public String getContext() { return context; } /** * Sets the context of this zap channel. */ public void setContext(String context) { this.context = context; } /** * Returns the alarm state of this zap channel.<br> * This may be one of * <ul> * <li>Red Alarm</li> * <li>Yellow Alarm</li> * <li>Blue Alarm</li> * <li>Recovering</li> * <li>Loopback</li> * <li>Not Open</li> * <li>No Alarm</li> * </ul> */ public String getAlarm() { return alarm; } /** * Sets the alarm state of this zap channel. */ public void setAlarm(String alarm) { this.alarm = alarm; } } --- NEW FILE: AgentCalledEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * An AgentCalledEvent is triggered when an agent is rung.<br> * To enable AgentCalledEvents you have to set <code>eventwhencalled = yes</code> * in <code>queues.conf</code>.<br> * This event is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: AgentCalledEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class AgentCalledEvent extends ManagerEvent { private static final long serialVersionUID = -8736410893935374606L; private String agentCalled; private String channelCalling; private String callerId; private String context; private String extension; private String priority; /** * @param source */ public AgentCalledEvent(Object source) { super(source); } public String getAgentCalled() { return agentCalled; } public void setAgentCalled(String agentCalled) { this.agentCalled = agentCalled; } public String getChannelCalling() { return channelCalling; } public void setChannelCalling(String channelCalling) { this.channelCalling = channelCalling; } public String getCallerId() { return callerId; } public void setCallerId(String callerId) { this.callerId = callerId; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public String getPriority() { return priority; } public void setPriority(String priority) { this.priority = priority; } } --- NEW FILE: MeetMeLeaveEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MeetMeLeaveEvent is triggered if a channel leaves a meet me conference.<br> * It is implemented in <code>apps/app_meetme.c</code> * * @author srt * @version $Id: MeetMeLeaveEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public class MeetMeLeaveEvent extends MeetMeEvent { private static final long serialVersionUID = 7692361610793036224L; /** * @param source */ public MeetMeLeaveEvent(Object source) { super(source); } } --- NEW FILE: ResponseEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.event; /** * Abstract base class for events triggered in response to an Action.<br> * All ResponseEvents contain an additional action id property that links * the event to the action that caused it. * * @see net.sf.asterisk.manager.action.ManagerAction * * @author srt * @version $Id: ResponseEvent.java,v 1.1 2005/02/23 12:45:22 srt Exp $ */ public abstract class ResponseEvent extends ManagerEvent { private String actionId; /** * @param source */ public ResponseEvent(Object source) { super(source); } /** * Returns the action id of the corresponding ManagerAction that * caused this event. */ public String getActionId() { return actionId; } /** * Sets the action id of the corresponding ManagerAction that * caused this event. */ public void setActionId(String actionId) { this.actionId = actionId; } } --- NEW FILE: MessageWaitingEvent.java --- /* * (c) 2004 Stefan Reuter * * Created on Aug 28, 2004 */ package net.sf.asterisk.manager.event; /** * A MessageWaitingEvent is triggered when someone leaves voicemail.<br> * It is implemented in <code>apps/app_voicemail.c</code> * * @author srt * @version $Id: Mes... [truncated message content] |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager/action Added Files: SetCDRUserFieldAction.java ZapTransferAction.java PingAction.java ParkedCallsAction.java QueueAddAction.java RedirectAction.java LogoffAction.java OriginateAction.java AbsoluteTimeoutAction.java ChangeMonitorAction.java MailboxCountAction.java GetVarAction.java ZapDialOffhookAction.java MailboxStatusAction.java QueueRemoveAction.java HangupAction.java ZapHangupAction.java StopMonitorAction.java ZapShowChannelsAction.java ZapDNDOffAction.java ManagerAction.java MonitorAction.java QueueStatusAction.java ChallengeAction.java ZapDNDOnAction.java StatusAction.java EventsAction.java ExtensionStateAction.java LoginAction.java CommandAction.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: SetCDRUserFieldAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The SetCDRUserFieldAction causes the user field of the call detail record * for the given channel to be changed.<br> * Depending on the value of the append property the value is appended or * overwritten.<br> * The SetCDRUserFieldAction is implemented in <code>apps/app_setcdruserfield.c</code> * * @author srt * @version $Id: SetCDRUserFieldAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class SetCDRUserFieldAction extends ManagerAction { private static final long serialVersionUID = -2024074141079750509L; private String channel; private String userField; private Boolean append; /** * Returns the name of the action, i.e. "SetCDRUserField". */ public String getAction() { return "SetCDRUserField"; } /** * Returns the name of the channel to set the cdr user field on. */ public String getChannel() { return channel; } /** * Sets the name of the channel to set the cdr user field on.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the value of the cdr user field to set or append. */ public String getUserField() { return userField; } /** * Sets the value of the cdr user field to set or append.<br> * This property is mandatory. */ public void setUserField(String userField) { this.userField = userField; } /** * Returns if the value of the cdr user field is appended or overwritten. */ public Boolean getAppend() { return append; } /** * Set to true to append the value to the cdr user field or false to * overwrite. */ public void setAppend(Boolean append) { this.append = append; } } --- NEW FILE: ZapTransferAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapTransferAction transfers a zap channel. * * @author srt * @version $Id: ZapTransferAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapTransferAction extends ManagerAction { private static final long serialVersionUID = -2802091639000800786L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapTransfer". */ public String getAction() { return "ZapTransfer"; } /** * Returns the number of the zap channel to transfer. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to transfer.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: PingAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The PingAction will ellicit a 'Pong' response, it is used to keep the * manager connection open and performs no operation. * * @author srt * @version $Id: PingAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class PingAction extends ManagerAction { private static final long serialVersionUID = -2930397629192323391L; /** * Returns the name of this action, i.e. "Ping". */ public String getAction() { return "Ping"; } } --- NEW FILE: ParkedCallsAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ParkedCallsAction requests a list of all currently parked calls.<br> * For each active channel a ParkedCallEvent is generated. After all parked calls * have been reported a ParkedCallsCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.ParkedCallEvent * @see net.sf.asterisk.manager.event.ParkedCallsCompleteEvent * * @author srt * @version $Id: ParkedCallsAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ParkedCallsAction extends ManagerAction { private static final long serialVersionUID = 1859575016378824743L; /** * Returns the name of this action, i.e. "ParkedCalls". */ public String getAction() { return "ParkedCalls"; } } --- NEW FILE: QueueAddAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The QueueAddAction adds a new member to a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: QueueAddAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class QueueAddAction extends ManagerAction { private static final long serialVersionUID = -7022129266332219953L; private String queue; private String iface; private Integer penality; /** * Returns the name of this action, i.e. "QueueAdd". */ public String getAction() { return "QueueAdd"; } /** * Returns the name of the queue the new member will be added to. */ public String getQueue() { return queue; } /** * Sets the name of the queue the new member will be added to.<br> * This property is mandatory. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the interface to add. */ public String getInterface() { return iface; } /** * Sets the interface to add.<br> * To add a specific channel just use the channel name, e.g. "SIP/1234".<br> * This property is mandatory. */ public void setInterface(String iface) { this.iface = iface; } /** * Returns the penality for this member. */ public Integer getPenality() { return penality; } /** * Sets the penality for this member.<br> * The penality must be a positive integer or 0 for no penality. If it is not set * 0 is assumed.<br> * When calls are distributed members with higher penalties are considered last. */ public void setPenality(Integer penality) { this.penality = penality; } } --- NEW FILE: RedirectAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * @author srt * @version $Id: RedirectAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class RedirectAction extends ManagerAction { static final long serialVersionUID = 1869279324159418150L; private String channel; private String extraChannel; private String exten; private String context; private Integer priority; /** * Returns the name of this action, i.e. "Redirect". */ public String getAction() { return "Redirect"; } /** * @return Returns the channel. */ public String getChannel() { return channel; } /** * @param channel The channel to set. */ public void setChannel(String channel) { this.channel = channel; } /** * @return Returns the context. */ public String getContext() { return context; } /** * @param context The context to set. */ public void setContext(String context) { this.context = context; } /** * @return Returns the exten. */ public String getExten() { return exten; } /** * @param exten The exten to set. */ public void setExten(String exten) { this.exten = exten; } /** * @return Returns the extraChannel. */ public String getExtraChannel() { return extraChannel; } /** * @param extraChannel The extraChannel to set. */ public void setExtraChannel(String extraChannel) { this.extraChannel = extraChannel; } /** * @return Returns the priority. */ public Integer getPriority() { return priority; } /** * @param priority The priority to set. */ public void setPriority(Integer priority) { this.priority = priority; } } --- NEW FILE: LogoffAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The LogoffAction causes the server to close the connection. * * @author srt * @version $Id: LogoffAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class LogoffAction extends ManagerAction { static final long serialVersionUID = -7576797478570238525L; /** * Returns the name of this action, i.e. "Logoff". */ public String getAction() { return "Logoff"; } } --- NEW FILE: OriginateAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The OriginateAction generates an outgoing call to the extension * in the given context with the given priority or to a given * application with optional parameters.<br> * * If you want to connect to an extension use the properties context, exten and * priority. If you want to connect to an application use the properties * application and data if needed. Note that no call detail record will be written when * directly connecting to an application, so it may be better to connect to an * extension that starts the application you wish to connect to.<br> * * The response to this action is sent when the channel has been answered and * asterisk starts connecting it to the given extension. So be careful not * to choose a too short timeout when waiting for the response.<br> * * If the origination succeeds an OriginateSuccessEvent is generated, if it * fails an OriginateFailureEvent is generated. The action id of these events * equals the action id of this OriginateAction. * * @see net.sf.asterisk.manager.event.OriginateSuccessEvent * @see net.sf.asterisk.manager.event.OriginateFailureEvent * * @author srt * @version $Id: OriginateAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class OriginateAction extends ManagerAction { static final long serialVersionUID = 8194597741743334704L; private String channel; private String exten; private String context; private Integer priority; private Integer timeout; private String callerId; private Boolean callingPres; private String variable; private String account; private String application; private String data; private Boolean async; /** * Returns the name of this action, i.e. "Originate". */ public String getAction() { return "Originate"; } /** * Returns the account code to use for the originated call. */ public String getAccount() { return account; } /** * Sets the account code to use for the originated call.<br> * The account code is included in the call detail record generated for this * call and will be used for billing. */ public void setAccount(String account) { this.account = account; } /** * Returns the caller id to set on the outgoing channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id to set on the outgoing channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns <code>true</code> if Caller ID presentation is set on the outgoing channel. */ public Boolean getCallingPres() { return callingPres; } /** * Set to <code>true</code> if you want Caller ID presentation to be set on the outgoing channel. */ public void setCallingPres(Boolean callingPres) { this.callingPres = callingPres; } /** * Returns the name of the channel to connect to the outgoing call. */ public String getChannel() { return channel; } /** * Sets the name of the channel to connect to the outgoing call.<br> * This property is required. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the context of the extension to connect to. */ public String getContext() { return context; } /** * Sets the name of the context of the extension to connect to.<br> * If you set the context you also have to set the exten and * priority properties. */ public void setContext(String context) { this.context = context; } /** * Returns the extension to connect to. */ public String getExten() { return exten; } /** * Sets the extension to connect to.<br> * If you set the extension you also have to set the context and * priority properties. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the priority of the extension to connect to. */ public Integer getPriority() { return priority; } /** * Sets the priority of the extension to connect to. * If you set the priority you also have to set the context and * exten properties. */ public void setPriority(Integer priority) { this.priority = priority; } /** * Returns the name of the application to connect to. */ public String getApplication() { return application; } /** * Sets the name of the application to connect to. */ public void setApplication(String application) { this.application = application; } /** * Returns the parameters to pass to the application. */ public String getData() { return data; } /** * Sets the parameters to pass to the application. */ public void setData(String data) { this.data = data; } /** * Returns the timeout for the origination. */ public Integer getTimeout() { return timeout; } /** * Sets the timeout (in milliseconds) for the origination.<br> * The channel must be answered within this time, otherwise the origination * is considered to have failed and an OriginateFailureEvent is generated.<br> * If not set, asterisk assumes a default value of 30000 meaning 30 seconds. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** * Returns the variables to set on the originated call. */ public String getVariable() { return variable; } /** * Sets the variables to set on the originated call.<br> * Variable assignments are of the form "VARNAME=VALUE". * You can specify multiple variable assignments separated by the '|' character.<br> * Example: "VAR1=abc|VAR2=def" sets the channel variables VAR1 to "abc" and * VAR2 to "def". */ public void setVariable(String variable) { this.variable = variable; } /** * Returns true if this is a fast origination. */ public Boolean getAsync() { return async; } /** * Set to true for fast origination. */ public void setAsync(Boolean async) { this.async = async; } } --- NEW FILE: AbsoluteTimeoutAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The AbsoluteTimeoutAction sets the absolute maximum amount of time permitted * for a call on a given channel.<br> * Note that the timeout is set from the current time forward, not counting the * number of seconds the call has already been up.<br> * When setting a new timeout all previous absolute timeouts are cancelled.<br> * When the timeout is reached the call is returned to the T extension so that * you can playback an explanatory note to the calling party (the called * party will not hear that).<br> * This action corresponds the the AbsoluteTimeout command used in the dialplan. * * @author srt * @version $Id: AbsoluteTimeoutAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class AbsoluteTimeoutAction extends ManagerAction { static final long serialVersionUID = 3073237188819825503L; private String channel; private Integer timeout; /** * Returns the name of this action, i.e. "AbsoluteTimeout". */ public String getAction() { return "AbsoluteTimeout"; } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the timeout (in seconds) to set. */ public Integer getTimeout() { return timeout; } /** * Sets the timeout (in seconds) to set on channel.<br> * Setting the timeout to 0 cancels the timeout. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } } --- NEW FILE: ChangeMonitorAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The ChangeMonitorAction changes the monitoring filename of a channel. * It has no effect if the channel is not monitored.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt * @version $Id: ChangeMonitorAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ChangeMonitorAction extends ManagerAction { private static final long serialVersionUID = -798530703607827118L; private String channel; private String file; /** * Returns the name of this action, i.e. "ChangeMonitor". */ public String getAction() { return "ChangeMonitor"; } /** * Returns the name of the channel to start monitoring. */ public String getChannel() { return channel; } /** * Sets the name of the channel to start monitoring.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the file to which the voice data is written. */ public String getFile() { return file; } /** * Sets the (base) name of the file(s) to which the voice data is written.<br> * This property is mandatory. */ public void setFile(String file) { this.file = file; } } --- NEW FILE: MailboxCountAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The MailboxCountAction queries the number of unread and read messages * in a mailbox.<br> * The MailboxCountAction returns a MailboxStatusResponse. * * @see net.sf.asterisk.manager.response.MailboxCountResponse * * @author srt * @version $Id: MailboxCountAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class MailboxCountAction extends ManagerAction { static final long serialVersionUID = -6900421919824575941L; private String mailbox; /** * Returns the name of this action, i.e. "MailboxCount". */ public String getAction() { return "MailboxCount"; } /** * Returns the name of the mailbox to query. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox to query.<br> * This can either be only the number of the mailbox or a string of the * form mai...@co... no context is specified "default" is * assumed.<br> * This property is mandatory. */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } } --- NEW FILE: GetVarAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The GetVarAction queries for a channel variable. * * @author srt * @version $Id: GetVarAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class GetVarAction extends ManagerAction { private static final long serialVersionUID = 5239805071977668779L; private String channel; private String variable; /** * Returns the name of this action, i.e. "GetVar". */ public String getAction() { return "GetVar"; } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Retruns the name of the variable to query. */ public String getVariable() { return variable; } /** * Sets the name of the variable to query. */ public void setVariable(String variable) { this.variable = variable; } } --- NEW FILE: ZapDialOffhookAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapDialOffhookAction dials a number on a zap channel while offhook. * * @author srt * @version $Id: ZapDialOffhookAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapDialOffhookAction extends ManagerAction { private static final long serialVersionUID = -4708738122184810899L; private Integer zapChannel; private String number; /** * Returns the name of this action, i.e. "ZapDialOffhook". */ public String getAction() { return "ZapDialOffhook"; } /** * Returns the number of the zap channel. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } /** * Returns the number to dial. */ public String getNumber() { return number; } /** * Sets the number to dial.<br> * This property is mandatory. */ public void setNumber(String number) { this.number = number; } } --- NEW FILE: MailboxStatusAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The MailboxStatusAction checks if a mailbox contains waiting messages.<br> * The MailboxStatusAction returns a MailboxStatusResponse. * * @see net.sf.asterisk.manager.response.MailboxStatusResponse * * @author srt * @version $Id: MailboxStatusAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class MailboxStatusAction extends ManagerAction { static final long serialVersionUID = -3845028207155711950L; private String mailbox; /** * Returns the name of this action, i.e. "MailboxStatus". */ public String getAction() { return "MailboxStatus"; } /** * Returns the name of the mailbox to query. */ public String getMailbox() { return mailbox; } /** * Sets the name of the mailbox to query.<br> * This can either be only the number of the mailbox or a string of the * form mailboxnumber@context. If no context is specified "default" is * assumed.<br> * Multiple mailboxes may be given, separated by ','. In this case the * action checks whether at least one of the given mailboxes has waiting * messages.<br> * This property is mandatory.<br> * Example: "1234,1235@mycontext" */ public void setMailbox(String mailbox) { this.mailbox = mailbox; } } --- NEW FILE: QueueRemoveAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The QueueRemoveAction removes a member from a queue.<br> * It is implemented in <code>apps/app_queue.c</code> * * @author srt * @version $Id: QueueRemoveAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class QueueRemoveAction extends ManagerAction { private static final long serialVersionUID = -4296471882045706821L; private String queue; private String iface; private Integer penality; /** * Returns the name of this action, i.e. "QueueRemove". */ public String getAction() { return "QueueRemove"; } /** * Returns the name of the queue the member will be removed from. */ public String getQueue() { return queue; } /** * Sets the name of the queue the member will be removed from.<br> * This property is mandatory. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the interface to remove. */ public String getInterface() { return iface; } /** * Sets the interface to remove.<br> * This property is mandatory. */ public void setInterface(String iface) { this.iface = iface; } } --- NEW FILE: HangupAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The HangupAction causes the pbx to hang up a given channel. * * @author srt * @version $Id: HangupAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class HangupAction extends ManagerAction { static final long serialVersionUID = 3479615884618713986L; private String channel; /** * Returns the name of this action, i.e. "Hangup". */ public String getAction() { return "Hangup"; } /** * Returns the channel to hangup. */ public String getChannel() { return channel; } /** * Sets the channel to hangup. */ public void setChannel(String channel) { this.channel = channel; } } --- NEW FILE: ZapHangupAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapHangupAction hangs up a zap channel. * * @author srt * @version $Id: ZapHangupAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapHangupAction extends ManagerAction { private static final long serialVersionUID = -4064616334146097495L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapHangup". */ public String getAction() { return "ZapHangup"; } /** * Returns the number of the zap channel to hangup. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to hangup.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: StopMonitorAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The StopMonitorAction ends monitoring (recording) a channel.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt * @version $Id: StopMonitorAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class StopMonitorAction extends ManagerAction { private static final long serialVersionUID = -6316010713240389305L; private String channel; private String file; private String format; private Boolean mix; /** * Returns the name of this action, i.e. "StopMonitor". */ public String getAction() { return "StopMonitor"; } /** * Returns the name of the channel to end monitoring. */ public String getChannel() { return channel; } /** * Sets the name of the channel to end monitoring.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } } --- NEW FILE: ZapShowChannelsAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapShowChannelsAction requests the state of all zap channels.<br> * For each zap channel a ZapShowChannelsEvent is generated. After * all zap channels have been listed a ZapShowChannelsCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.ZapShowChannelsEvent * @see net.sf.asterisk.manager.event.ZapShowChannelsCompleteEvent * * @author srt * @version $Id: ZapShowChannelsAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapShowChannelsAction extends ManagerAction { private static final long serialVersionUID = 8697000330085766825L; /** * Returns the name of this action, i.e. "ZapShowChannels". */ public String getAction() { return "ZapShowChannels"; } } --- NEW FILE: ZapDNDOffAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapDNDOnAction toggles a zap channel "Do Not Disturb" status off. * * @author srt * @version $Id: ZapDNDOffAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapDNDOffAction extends ManagerAction { private static final long serialVersionUID = 6596440995467988436L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapDNDOff". */ public String getAction() { return "ZapDNDOff"; } /** * Returns the number of the zap channel to switch to dnd off. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to switch to dnd off.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: ManagerAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; import java.io.Serializable; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** * Abstract base class for all Actions that can be sent to the Asterisk * server.<br> * Instances of this class represent a command sent to Asterisk, requesting * a particular Action be performed. The number of actions available to the client * are determined by the modules presently loaded in the Asterisk engine.<br> * There is one conrete subclass of ManagerAction per each supported Asterisk * Action. * * @author srt * @version $Id: ManagerAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public abstract class ManagerAction implements Serializable { static final long serialVersionUID = -7667827187378395689L; private String actionId; /** * Returns the name of the action. */ public abstract String getAction(); /** * Returns the action id. */ public String getActionId() { return actionId; } /** * Sets the action id.<br> * If the action id is set and sent to the asterisk server any response returned by * the asterisk server will include the same action id. This way the action id can * be used to track actions and their corresponding responses. */ public void setActionId(String actionId) { this.actionId = actionId; } public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } --- NEW FILE: MonitorAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 29, 2004 */ package net.sf.asterisk.manager.action; /** * The MonitorAction starts monitoring (recording) a channel.<br> * It is implemented in <code>res/res_monitor.c</code> * * @author srt * @version $Id: MonitorAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class MonitorAction extends ManagerAction { private static final long serialVersionUID = 6840975934278794758L; private String channel; private String file; private String format; private Boolean mix; /** * Returns the name of this action, i.e. "Monitor". */ public String getAction() { return "Monitor"; } /** * Returns the name of the channel to start monitoring. */ public String getChannel() { return channel; } /** * Sets the name of the channel to start monitoring.<br> * This property is mandatory. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the file to which the voice data is written. */ public String getFile() { return file; } /** * Sets the (base) name of the file(s) to which the voice data is written.<br> * If this property is not set it defaults to to the channel name as per CLI * with the '/' replaced by '-'. */ public void setFile(String file) { this.file = file; } /** * Returns the format to use for encoding the voice files. */ public String getFormat() { return format; } /** * Sets the format to use for encoding the voice files.<br> * If this property is not set it defaults to "wav". */ public void setFormat(String format) { this.format = format; } /** * Returns true if the two voice files should be joined at the end of the call. */ public Boolean getMix() { return mix; } /** * Set to true if the two voice files should be joined at the end of the call. */ public void setMix(Boolean mix) { this.mix = mix; } } --- NEW FILE: QueueStatusAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The QueueStatusAction requests the state of all defined queues their * members (agents) and entries (callers).<br> * * For each queue a QueueParamsEvent is generated, followed by * a QueueMemberEvent for each member of that queue and a QueueEntryEvent * for each entry in the queue.<br> * * Note: Currently asterisk does not send a special event to denote the end of the * generated dump.<br> * * This action is implemented in <code>apps/app_queue.c</code> * * @see net.sf.asterisk.manager.event.QueueParamsEvent * @see net.sf.asterisk.manager.event.QueueMemberEvent * @see net.sf.asterisk.manager.event.QueueEntryEvent * * @author srt * @version $Id: QueueStatusAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class QueueStatusAction extends ManagerAction { private static final long serialVersionUID = -8599401015517232869L; /** * Returns the name of this action, i.e. "QueueStatus". */ public String getAction() { return "QueueStatus"; } } --- NEW FILE: ChallengeAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ChallengeAction requests a challenge from the server to use when logging in * using challenge/response. * Sending this action to the asterisk server results in a ChallengeResponse * being received from the server. * * @see net.sf.asterisk.manager.action.LoginAction * @see net.sf.asterisk.manager.response.ChallengeResponse * * @author srt * @version $Id: ChallengeAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ChallengeAction extends ManagerAction { static final long serialVersionUID = 7240516124871953971L; private String authType; /** * Returns Returns the name of this action, i.e. "Challenge". */ public String getAction() { return "Challenge"; } /** * Returns the digest alogrithm to use. */ public String getAuthType() { return authType; } /** * Sets the digest alogrithm to use. * Currently asterisk only supports "MD5". */ public void setAuthType(String authType) { this.authType = authType; } } --- NEW FILE: ZapDNDOnAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ZapDNDOnAction toggles a zap channel "Do Not Disturb" status on. * * @author srt * @version $Id: ZapDNDOnAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ZapDNDOnAction extends ManagerAction { private static final long serialVersionUID = -4669362344411680132L; private Integer zapChannel; /** * Returns the name of this action, i.e. "ZapDNDOn". */ public String getAction() { return "ZapDNDOn"; } /** * Returns the number of the zap channel to switch to dnd on. */ public Integer getZapChannel() { return zapChannel; } /** * Sets the number of the zap channel to switch to dnd on.<br> * This property is mandatory. */ public void setZapChannel(Integer channel) { this.zapChannel = channel; } } --- NEW FILE: StatusAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The StatusAction requests the state of all active channels.<br> * For each active channel a StatusEvent is generated. After the state * of all channels has been reported a StatusCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.StatusEvent * @see net.sf.asterisk.manager.event.StatusCompleteEvent * * @author srt * @version $Id: StatusAction.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class StatusAction extends ManagerAction { static final long serialVersionUID = -320228893513973367L; /** * Returns the name of this action, i.e. "Status". */ public String getAction() { return "Status"; } } --- NEW FILE: EventsAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * With the EventsAction you can specify what kind of events should be sent * to this manager connection. * * @author srt * @version $Id: EventsAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class EventsAction extends ManagerAction { static final long serialVersionUID = -8042435402644984875L; private String eventMask; /** * Returns the name of this action, i.e. "Events". */ public String getAction() { return "Events"; } /** * Returns the event mask. */ public String getEventMask() { return eventMask; } /** * Sets the event mask.<br> * Set to "on" if all events should be send, "off" if not events should be sent * or a combination of "system", "call" and "log" (separated by ',') to specify * what kind of events should be sent. */ public void setEventMask(String eventMask) { this.eventMask = eventMask; } } --- NEW FILE: ExtensionStateAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The ExtensionStateAction queries the state of an extension in a given context. * * @author srt * @version $Id: ExtensionStateAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class ExtensionStateAction extends ManagerAction { static final long serialVersionUID = 6537408784388696403L; private String exten; private String context; /** * Returns the name of this action, i.e. "ExtensionState". */ public String getAction() { return "ExtensionState"; } /** * Returns the extension to query. */ public String getExten() { return exten; } /** * Sets the extension to query. */ public void setExten(String exten) { this.exten = exten; } /** * Returns the name of the context that contains the extension to query. */ public String getContext() { return context; } /** * Sets the name of the context that contains the extension to query. */ public void setContext(String context) { this.context = context; } } --- NEW FILE: LoginAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The LoginAction authenticates the connection.<br> * A successful login is the precondition for sending any other action except for * the ChallengeAction.<br> * An unsuccessful login results in an ManagerError being received from the server * with a message set to "Authentication failed" and the socket being closed * by asterisk. * * @see net.sf.asterisk.manager.action.ChallengeAction * @see net.sf.asterisk.manager.response.ManagerError * * @author srt * @version $Id: LoginAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class LoginAction extends ManagerAction { static final long serialVersionUID = -2600694249339115032L; private String username; private String secret; private String authType; private String key; private String events; /** * Returns the name of this action, i.e. "Login". */ public String getAction() { return "Login"; } /** * Returns the username. */ public String getUsername() { return username; } /** * Sets the username as configured in asterik's <code>manager.conf</code>. */ public void setUsername(String username) { this.username = username; } /** * Returns the secret. */ public String getSecret() { return secret; } /** * Sets the secret to use when using clear text login.<br> * The secret contains the user's password as configured in * asterisk's <code>manager.conf</code>.<br> * The secret and key properties are mutually exclusive. */ public void setSecret(String secret) { this.secret = secret; } /** * Returns the digest alogrithm when using challenge/response. */ public String getAuthType() { return authType; } /** * Sets the digest alogrithm when using challenge/response.<br> * The digest algorithm is used to create the key based on the challenge * and the user's password.<br> * Currently asterisk supports only "MD5". */ public void setAuthType(String authType) { this.authType = authType; } /** * @return Returns the key. */ public String getKey() { return key; } /** * @param key The key to set. */ public void setKey(String key) { this.key = key; } /** * @return Returns the events. */ public String getEvents() { return events; } /** * @param events The events to set. */ public void setEvents(String events) { this.events = events; } } --- NEW FILE: CommandAction.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager.action; /** * The CommandAction sends a command line interface (CLI) command to the * asterisk server.<br> * For a list of supported commands type <code>help</code> on * asterisk's command line. * * @author srt * @version $Id: CommandAction.java,v 1.1 2005/02/23 12:45:21 srt Exp $ */ public class CommandAction extends ManagerAction { static final long serialVersionUID = 4753117770471622025L; protected String command; /** * Returns the name of this action, i.e. "Command". */ public String getAction() { return "Command"; } /** * Returns the command. */ public String getCommand() { return command; } /** * Sets the CLI command to send to the asterisk server. */ public void setCommand(String command) { this.command = command; } } |
Update of /cvsroot/asterisk-java/asterisk-java/src/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/net/sf/asterisk/manager/event Removed Files: HoldedCallEvent.java AgentCallbackLogoffEvent.java ManagerEvent.java ConnectEvent.java QueueEntryEvent.java PeerStatusEvent.java ResponseEvent.java ExtensionStatusEvent.java NewStateEvent.java AgentCalledEvent.java NewExtenEvent.java AgentLogoffEvent.java ReloadEvent.java MeetMeEvent.java AgentLoginEvent.java LinkEvent.java StatusEvent.java ShutdownEvent.java QueueEvent.java ParkedCallEvent.java RenameEvent.java ChannelEvent.java MessageWaitingEvent.java HangupEvent.java LinkageEvent.java QueueParamsEvent.java NewChannelEvent.java AgentCallbackLoginEvent.java MeetMeJoinEvent.java OriginateSuccessEvent.java StatusCompleteEvent.java AlarmClearEvent.java NewCallerIdEvent.java UnlinkEvent.java MeetMeLeaveEvent.java JoinEvent.java RegistryEvent.java ParkedCallsCompleteEvent.java AlarmEvent.java LeaveEvent.java ZapShowChannelsEvent.java QueueMemberEvent.java ZapShowChannelsCompleteEvent.java OriginateEvent.java DisconnectEvent.java CdrEvent.java OriginateFailureEvent.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- HoldedCallEvent.java DELETED --- --- AgentCallbackLogoffEvent.java DELETED --- --- ManagerEvent.java DELETED --- --- ConnectEvent.java DELETED --- --- QueueEntryEvent.java DELETED --- --- PeerStatusEvent.java DELETED --- --- ResponseEvent.java DELETED --- --- ExtensionStatusEvent.java DELETED --- --- NewStateEvent.java DELETED --- --- AgentCalledEvent.java DELETED --- --- NewExtenEvent.java DELETED --- --- AgentLogoffEvent.java DELETED --- --- ReloadEvent.java DELETED --- --- MeetMeEvent.java DELETED --- --- AgentLoginEvent.java DELETED --- --- LinkEvent.java DELETED --- --- StatusEvent.java DELETED --- --- ShutdownEvent.java DELETED --- --- QueueEvent.java DELETED --- --- ParkedCallEvent.java DELETED --- --- RenameEvent.java DELETED --- --- ChannelEvent.java DELETED --- --- MessageWaitingEvent.java DELETED --- --- HangupEvent.java DELETED --- --- LinkageEvent.java DELETED --- --- QueueParamsEvent.java DELETED --- --- NewChannelEvent.java DELETED --- --- AgentCallbackLoginEvent.java DELETED --- --- MeetMeJoinEvent.java DELETED --- --- OriginateSuccessEvent.java DELETED --- --- StatusCompleteEvent.java DELETED --- --- AlarmClearEvent.java DELETED --- --- NewCallerIdEvent.java DELETED --- --- UnlinkEvent.java DELETED --- --- MeetMeLeaveEvent.java DELETED --- --- JoinEvent.java DELETED --- --- RegistryEvent.java DELETED --- --- ParkedCallsCompleteEvent.java DELETED --- --- AlarmEvent.java DELETED --- --- LeaveEvent.java DELETED --- --- ZapShowChannelsEvent.java DELETED --- --- QueueMemberEvent.java DELETED --- --- ZapShowChannelsCompleteEvent.java DELETED --- --- OriginateEvent.java DELETED --- --- DisconnectEvent.java DELETED --- --- CdrEvent.java DELETED --- --- OriginateFailureEvent.java DELETED --- |
Update of /cvsroot/asterisk-java/asterisk-java/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/test/net/sf/asterisk/manager Removed Files: TestEventBuilder.java TestMultiAsteriskManager.java TestDefaultManagerConnection.java TestDefaultAsteriskManager.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- TestEventBuilder.java DELETED --- --- TestMultiAsteriskManager.java DELETED --- --- TestDefaultManagerConnection.java DELETED --- --- TestDefaultAsteriskManager.java DELETED --- |
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/java/net/sf/asterisk/manager Added Files: DefaultAsteriskManager.java Channel.java ManagerConnection.java AuthenticationFailedException.java AsteriskServer.java EventBuilder.java Queue.java ManagerReader.java ChannelStateEnum.java ManagerConnectionFactory.java Util.java TimeoutException.java MultiAsterisksManager.java ManagerEventHandler.java AsteriskManager.java ManagerResponseHandler.java ActionBuilder.java DefaultManagerConnection.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- NEW FILE: DefaultAsteriskManager.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 28, 2004 */ package net.sf.asterisk.manager; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import net.sf.asterisk.manager.action.OriginateAction; import net.sf.asterisk.manager.action.QueueStatusAction; import net.sf.asterisk.manager.action.StatusAction; import net.sf.asterisk.manager.event.ConnectEvent; import net.sf.asterisk.manager.event.DisconnectEvent; import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.LinkEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.NewStateEvent; import net.sf.asterisk.manager.event.QueueEntryEvent; import net.sf.asterisk.manager.event.QueueMemberEvent; import net.sf.asterisk.manager.event.QueueParamsEvent; import net.sf.asterisk.manager.event.RenameEvent; import net.sf.asterisk.manager.event.StatusCompleteEvent; import net.sf.asterisk.manager.event.StatusEvent; import net.sf.asterisk.manager.event.UnlinkEvent; import net.sf.asterisk.manager.response.ManagerResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author srt * @version $Id: DefaultAsteriskManager.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class DefaultAsteriskManager implements AsteriskManager, ManagerEventHandler { private final Log log = LogFactory.getLog(this.getClass()); private ManagerConnection connection; /** * A map of all active channel by their unique id. */ private Map channels; private Map queues; private List queuedEvents; private boolean channelsInitialized; private boolean queuesInitialized; private boolean initialized; public DefaultAsteriskManager() { this.channels = Collections.synchronizedMap(new HashMap()); this.queues = Collections.synchronizedMap(new HashMap()); this.queuedEvents = Collections.synchronizedList(new ArrayList()); this.channelsInitialized = false; //TODO fix detection of queuesInitialized this.queuesInitialized = true; this.initialized = false; } public void setManagerConnection(ManagerConnection connection) { this.connection = connection; } public void initialize() throws TimeoutException, IOException, AuthenticationFailedException { connection.addEventHandler(this); connection.login(); connection.sendAction(new StatusAction()); connection.sendAction(new QueueStatusAction()); } public String originateCall(OriginateAction originateAction) throws TimeoutException, IOException { ManagerResponse response; response = connection.sendAction(originateAction); return response == null ? null : response.getUniqueId(); } /** * Returns a map of all active channel by their unique id. */ public Map getChannels() { return channels; } public Map getQueues() { return queues; } /** * Handles all events received from the asterisk server.<br> * Events are queued until channels and queues are initialized and then * delegated to the dispatchEvent method. */ public void handleEvent(ManagerEvent event) { System.out.println("received: " + event); if (event instanceof ConnectEvent) { handleConnectEvent((ConnectEvent) event); } else if (event instanceof DisconnectEvent) { handleDisconnectEvent((DisconnectEvent) event); } // build initial state if not yet initialized, dispatch otherwise. if (!initialized) { if (event instanceof StatusEvent) { handleStatusEvent((StatusEvent) event); } else if (event instanceof StatusCompleteEvent) { handleStatusCompleteEvent((StatusCompleteEvent) event); } else if (event instanceof QueueParamsEvent) { handleQueueParamsEvent((QueueParamsEvent) event); } else if (event instanceof QueueMemberEvent) { handleQueueMemberEvent((QueueMemberEvent) event); } else if (event instanceof QueueEntryEvent) { handleQueueEntryEvent((QueueEntryEvent) event); } else { queuedEvents.add(event); } if (channelsInitialized && queuesInitialized) { Iterator i = queuedEvents.iterator(); while (i.hasNext()) { ManagerEvent queuedEvent = (ManagerEvent) i.next(); dispatchEvent(queuedEvent); i.remove(); } this.initialized = true; } } else { dispatchEvent(event); } } protected void dispatchEvent(ManagerEvent event) { if (event instanceof NewChannelEvent) { handleNewChannelEvent((NewChannelEvent) event); } else if (event instanceof NewExtenEvent) { handleNewExtenEvent((NewExtenEvent) event); } else if (event instanceof NewStateEvent) { handleNewStateEvent((NewStateEvent) event); } else if (event instanceof LinkEvent) { handleLinkEvent((LinkEvent) event); } else if (event instanceof UnlinkEvent) { handleUnlinkEvent((UnlinkEvent) event); } else if (event instanceof RenameEvent) { handleRenameEvent((RenameEvent) event); } else if (event instanceof HangupEvent) { handleHangupEvent((HangupEvent) event); } } protected void addChannel(Channel channel) { channels.put(channel.getId(), channel); } protected void removeChannel(Channel channel) { channels.remove(channel.getId()); } protected void addQueue(Queue queue) { queues.put(queue.getName(), queue); } protected void removeQueue(Queue queue) { queues.remove(queue.getName()); } protected void handleStatusEvent(StatusEvent event) { Channel channel; boolean isNew = false; channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { channel = new Channel(event.getChannel(), event.getUniqueId()); if (event.getSeconds() != null) { channel .setDateOfCreation(new Date(System.currentTimeMillis() - (event.getSeconds().intValue() * 1000))); } isNew = true; } synchronized (channel) { channel.setCallerId(event.getCallerId()); channel.setAccount(event.getAccount()); channel.setState(ChannelStateEnum.getEnum(event.getState())); channel.setContext(event.getContext()); channel.setExtension(event.getExtension()); channel.setPriority(event.getPriority()); if (event.getLink() != null) { Channel linkedChannel = getChannelByName(event.getLink()); if (linkedChannel != null) { channel.setLinkedChannel(linkedChannel); synchronized (linkedChannel) { linkedChannel.setLinkedChannel(channel); } } } } if (isNew) { log.info("Adding new channel " + channel.getName()); addChannel(channel); } } protected void handleStatusCompleteEvent(StatusCompleteEvent event) { log.info("Channels are now initialized"); this.channelsInitialized = true; } /** * Resets the internal state when the connection to the asterisk server is lost. */ protected void handleDisconnectEvent(DisconnectEvent disconnectEvent) { this.channels.clear(); this.queues.clear(); this.queuedEvents.clear(); this.channelsInitialized = false; //TODO fix detection of queuesInitialized this.queuesInitialized = true; this.initialized = false; } /** * Requests the current state from the asterisk server after the connection to the asterisk * server is restored. */ protected void handleConnectEvent(ConnectEvent connectEvent) { try { connection.sendAction(new StatusAction()); } catch (Exception e) { log.error("Unable to request channel status from asterisk server after reconnect.", e); } try { connection.sendAction(new QueueStatusAction()); } catch (Exception e) { log.error("Unable to request queue status from asterisk server after reconnect.", e); } } protected void handleQueueParamsEvent(QueueParamsEvent event) { Queue queue; boolean isNew = false; queue = (Queue) queues.get(event.getQueue()); if (queue == null) { queue = new Queue(event.getQueue()); isNew = true; } synchronized (queue) { queue.setMax(event.getMax()); } if (isNew) { log.info("Adding new queue " + queue.getName()); addQueue(queue); } } protected void handleQueueMemberEvent(QueueMemberEvent event) { } protected void handleQueueEntryEvent(QueueEntryEvent event) { Queue queue = (Queue) queues.get(event.getQueue()); Channel channel = getChannelByName(event.getChannel()); if (queue == null) { log.error("ignored QueueEntryEvent for unknown queue " + event.getQueue()); return; } if (channel == null) { log.error("ignored QueueEntryEvent for unknown channel " + event.getChannel()); return; } if (!queue.getEntries().contains(channel)) { queue.addEntry(channel); } } /** * Returns a channel by its name. * * @param name name of the channel to return * @return the channel with the given name */ private Channel getChannelByName(String name) { //TODO must get unique Channel channel = null; Iterator channelIterator = channels.values().iterator(); while (channelIterator.hasNext()) { Channel tmp = (Channel) channelIterator.next(); if (tmp.getName() != null && tmp.getName().equals(name)) { channel = tmp; } } return channel; } protected void handleNewChannelEvent(NewChannelEvent event) { Channel channel = new Channel(event.getChannel(), event.getUniqueId()); channel.setCallerId(event.getCallerId()); channel.setState(ChannelStateEnum.getEnum(event.getState())); log.info("Adding channel " + channel.getName()); addChannel(channel); } protected void handleNewExtenEvent(NewExtenEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { log.error("Ignored NewExtenEvent for unknown channel " + event.getChannel()); return; } synchronized (channel) { channel.setContext(event.getContext()); channel.setExtension(event.getExtension()); channel.setPriority(event.getPriority()); channel.setApplication(event.getApplication()); channel.setAppData(event.getAppData()); } } protected void handleNewStateEvent(NewStateEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { log.error("Ignored NewStateEvent for unknown channel " + event.getChannel()); return; } channel.setState(ChannelStateEnum.getEnum(event.getState())); } protected void handleHangupEvent(HangupEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); if (channel == null) { log.error("Ignored HangupEvent for unknown channel " + event.getChannel()); return; } synchronized (channel) { channel.setState(ChannelStateEnum.HUNGUP); } log.info("Removing channel " + channel.getName() + " due to hangup"); removeChannel(channel); } protected void handleLinkEvent(LinkEvent event) { Channel channel1 = (Channel) channels.get(event.getUniqueId1()); Channel channel2 = (Channel) channels.get(event.getUniqueId2()); if (channel1 == null) { log.error("Ignored LinkEvent for unknown channel " + event.getChannel1()); return; } if (channel2 == null) { log.error("Ignored LinkEvent for unknown channel " + event.getChannel2()); return; } log.info("Linking channels " + channel1.getName() + " and " + channel2.getName()); synchronized (this) { channel1.setLinkedChannel(channel2); channel2.setLinkedChannel(channel1); } } protected void handleUnlinkEvent(UnlinkEvent event) { Channel channel1 = getChannelByName(event.getChannel1()); Channel channel2 = getChannelByName(event.getChannel2()); if (channel1 == null) { log.error("Ignored UnlinkEvent for unknown channel " + event.getChannel1()); return; } if (channel2 == null) { log.error("Ignored UnlinkEvent for unknown channel " + event.getChannel2()); return; } log.info("Unlinking channels " + channel1.getName() + " and " + channel2.getName()); synchronized (channel1) { channel1.setLinkedChannel(null); } synchronized (channel2) { channel2.setLinkedChannel(null); } } protected void handleRenameEvent(RenameEvent event) { Channel channel = (Channel) channels.get(event.getUniqueId()); log.info("Renaming channel '" + channel.getName() + "' to '" + event.getNewname() + "'"); channel.setName(event.getNewname()); } } --- NEW FILE: Channel.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 29, 2004 */ package net.sf.asterisk.manager; import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** * @author srt * @version $Id: Channel.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class Channel implements Serializable { private static final long serialVersionUID = -6919877370396385380L; private AsteriskServer asteriskServer; private String id; private String name; private String callerId; private ChannelStateEnum state; private String account; private String context; private String extension; private Integer priority; private String application; private String appData; private Date dateOfCreation; private Channel linkedChannel; /** * Creates a new channel. * @param name name of this channel, for example "SIP/1310-20da" * @param id unique id of this channel, for example "1099015093.165" */ public Channel(String name, String id) { this.name = name; this.id = id; } public Channel(String name, String id, AsteriskServer server) { this.name = name; this.id = id; this.asteriskServer = server; } /** * @return Returns the asteriskServer. */ public AsteriskServer getAsteriskServer() { return asteriskServer; } /** * @param asteriskServer The asteriskServer to set. */ public void setAsteriskServer(AsteriskServer asteriskServer) { this.asteriskServer = asteriskServer; } /** * Returns the unique id of this channel, for example "1099015093.165". */ public String getId() { return id; } /** * Returns the name of this channel, for example "SIP/1310-20da". */ public String getName() { return name; } /** * Sets the name of this channel. */ public void setName(String name) { this.name = name; } /** * Returns the caller id of this channel. */ public String getCallerId() { return callerId; } /** * Sets the caller id of this channel. */ public void setCallerId(String callerId) { this.callerId = callerId; } /** * Returns the state of this channel. */ public ChannelStateEnum getState() { return state; } /** * Sets the state of this channel. */ public void setState(ChannelStateEnum state) { this.state = state; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public Integer getPriority() { return priority; } public void setPriority(Integer priority) { this.priority = priority; } public String getApplication() { return application; } public void setApplication(String application) { this.application = application; } public String getAppData() { return appData; } public void setAppData(String appData) { this.appData = appData; } public Date getDateOfCreation() { return dateOfCreation; } public void setDateOfCreation(Date dateOfCreation) { this.dateOfCreation = dateOfCreation; } public Channel getLinkedChannel() { return linkedChannel; } public void setLinkedChannel(Channel linkedChannel) { this.linkedChannel = linkedChannel; } public boolean equals(Object obj) { if (!(obj instanceof Channel)) { return false; } return id.equals(((Channel) obj).getId()); } public int hashCode() { return id.hashCode(); } public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } } --- NEW FILE: ManagerConnection.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; import java.io.IOException; import net.sf.asterisk.manager.action.ManagerAction; import net.sf.asterisk.manager.response.ManagerResponse; /** * The main interface to talk to an asterisk server via the manager api. * A concrete implementation of this interface is obtained from a ManagerConnectionFactory. * * @see net.sf.asterisk.manager.ManagerConnectionFactory * * @author srt * @version $Id: ManagerConnection.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public interface ManagerConnection { /** * Logs in to the asterisk server with the username and password specified when this connection * was created. * * @throws IOException * @throws AuthenticationFailedException if the username and/or password are incorrect * or the ChallengeResponse could not be built. * @throws TimeoutException if no response is received within the default timeout period. * If the implementation uses challenge/response this can either be a * timeout of the ChallengeAction or the LoginAction; otherwise it * is always a timeout of the LoginAction. * * @see net.sf.asterisk.manager.action.LoginAction * @see net.sf.asterisk.manager.action.ChallengeAction */ void login() throws IOException, AuthenticationFailedException, TimeoutException; /** * Sends a LogoffAction to the asterisk server and disconnects. * * @throws IOException * @throws TimeoutException if no response to the logoff action is received within the default * timeout period. * * @see net.sf.asterisk.manager.action.LogoffAction */ void logoff() throws IOException, TimeoutException; /** * Returns the protocol identifier, i.e. a string like "Asterisk Call Manager/1.0". * * @return the protocol identifier of the asterisk manager interface in use if it has already * been received; <code>null</code> otherwise */ String getProtocolIdentifier(); /** * Sends a ManagerAction to the asterisk manager interface and waits for the * corresponding ManagerResponse. * * @param action the action to send to the asterisk server * * @return the corresponding response received from the asterisk server * * @throws IOException * @throws TimeoutException if no reponse is received within the default timeout period. * * @see #sendAction(ManagerAction, long) * @see #sendAction(ManagerAction, ManagerResponseHandler) */ ManagerResponse sendAction(ManagerAction action) throws IOException, TimeoutException; /** * Sends a ManagerAction to the asterisk manager interface and waits for the * corresponding {@link ManagerResponse}. * * @param action the action to send to the asterisk server * @param timeout milliseconds to wait for the reponse before throwing a TimeoutException * * @return the corresponding response received from the asterisk server * * @throws IOException * @throws TimeoutException if no reponse is received within the given timeout period. * * @see #sendAction(ManagerAction, ManagerResponseHandler) */ ManagerResponse sendAction(ManagerAction action, long timeout) throws IOException, TimeoutException; /** * Sends a ManagerAction to the asterisk manager interface and registers a callback handler * to be called when the corresponding ManagerResponse is received. * * @param action the action to send to the asterisk server * @param callbackHandler the callback handler to call when the response is received * * @throws IOException */ void sendAction(ManagerAction action, ManagerResponseHandler callbackHandler) throws IOException; /** * Registers an event handler to be called whenever an {@link net.sf.asterisk.manager.event.ManagerEvent} * is receiced from the asterisk server. * * @param eventHandler the handler to call whenever a manager event is received * * @see #removeEventHandler(ManagerEventHandler) */ void addEventHandler(ManagerEventHandler eventHandler); /** * Unregisters a previously registered event handler.<br> * Does nothing if the given event handler hasn't be been regiered before. * * @param eventHandler the event handle to unregister * * @see #addEventHandler(ManagerEventHandler) */ void removeEventHandler(ManagerEventHandler eventHandler); /** * Return Asterisk server of connection * */ AsteriskServer getAsteriskServer(); } --- NEW FILE: AuthenticationFailedException.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; /** * An AuthenticationFailedException is thrown when a login fails due to an * incorrect username and/or password. * * @author srt * @version $Id: AuthenticationFailedException.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class AuthenticationFailedException extends Exception { static final long serialVersionUID = 7674248607624140309L; public AuthenticationFailedException(String message) { super(message); } public AuthenticationFailedException(String message, Throwable cause) { super(message, cause); } } --- NEW FILE: AsteriskServer.java --- /* * Created on 3 févr. 2005 by Pierre-Yves ROGER. * */ package net.sf.asterisk.manager; import java.io.Serializable; /** * Represents an asterisk server that is connected via the manager API. * * @author PY * @version $Id: AsteriskServer.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class AsteriskServer implements Serializable { private static final long serialVersionUID = 3257284738393125176L; private String hostname = "localhost"; private int port = 5038; public AsteriskServer() { } public AsteriskServer(String hostname, int port) { this.hostname = hostname; this.port = port; } /** * @return Returns the hostname. */ public String getHostname() { return hostname; } /** * @param hostname The hostname to set. */ public void setHostname(String hostname) { this.hostname = hostname; } /** * @return Returns the port. */ public int getPort() { return port; } /** * @param port The port to set. */ public void setPort(int port) { this.port = port; } } --- NEW FILE: EventBuilder.java --- /* * (c) 2004 Stefan Reuter * * Created on Sep 24, 2004 */ package net.sf.asterisk.manager; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import net.sf.asterisk.manager.event.AgentCallbackLoginEvent; import net.sf.asterisk.manager.event.AgentCallbackLogoffEvent; import net.sf.asterisk.manager.event.AgentCalledEvent; import net.sf.asterisk.manager.event.AgentLoginEvent; import net.sf.asterisk.manager.event.AgentLogoffEvent; import net.sf.asterisk.manager.event.AlarmClearEvent; import net.sf.asterisk.manager.event.AlarmEvent; import net.sf.asterisk.manager.event.CdrEvent; import net.sf.asterisk.manager.event.ExtensionStatusEvent; import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.HoldedCallEvent; import net.sf.asterisk.manager.event.JoinEvent; import net.sf.asterisk.manager.event.LeaveEvent; import net.sf.asterisk.manager.event.LinkEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.MeetMeJoinEvent; import net.sf.asterisk.manager.event.MeetMeLeaveEvent; import net.sf.asterisk.manager.event.MessageWaitingEvent; import net.sf.asterisk.manager.event.NewCallerIdEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.NewStateEvent; import net.sf.asterisk.manager.event.OriginateFailureEvent; import net.sf.asterisk.manager.event.OriginateSuccessEvent; import net.sf.asterisk.manager.event.ParkedCallEvent; import net.sf.asterisk.manager.event.ParkedCallsCompleteEvent; import net.sf.asterisk.manager.event.PeerStatusEvent; import net.sf.asterisk.manager.event.QueueEntryEvent; import net.sf.asterisk.manager.event.QueueMemberEvent; import net.sf.asterisk.manager.event.QueueParamsEvent; import net.sf.asterisk.manager.event.RegistryEvent; import net.sf.asterisk.manager.event.ReloadEvent; import net.sf.asterisk.manager.event.RenameEvent; import net.sf.asterisk.manager.event.ResponseEvent; import net.sf.asterisk.manager.event.ShutdownEvent; import net.sf.asterisk.manager.event.StatusCompleteEvent; import net.sf.asterisk.manager.event.StatusEvent; import net.sf.asterisk.manager.event.UnlinkEvent; import net.sf.asterisk.manager.event.ZapShowChannelsCompleteEvent; import net.sf.asterisk.manager.event.ZapShowChannelsEvent; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author srt * @version $Id: EventBuilder.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class EventBuilder { private final Log logger = LogFactory.getLog(getClass()); private Map registeredEventClasses; public EventBuilder() { this.registeredEventClasses = new HashMap(); registerBuiltinEventClasses(); } private void registerBuiltinEventClasses() { registerEventClass(AgentCallbackLoginEvent.class); registerEventClass(AgentCallbackLogoffEvent.class); registerEventClass(AgentCalledEvent.class); registerEventClass(AgentLoginEvent.class); registerEventClass(AgentLogoffEvent.class); registerEventClass(AlarmEvent.class); registerEventClass(AlarmClearEvent.class); registerEventClass(CdrEvent.class); registerEventClass(ExtensionStatusEvent.class); registerEventClass(HangupEvent.class); registerEventClass(HoldedCallEvent.class); registerEventClass(JoinEvent.class); registerEventClass(LeaveEvent.class); registerEventClass(LinkEvent.class); registerEventClass(MeetMeJoinEvent.class); registerEventClass(MeetMeLeaveEvent.class); registerEventClass(MessageWaitingEvent.class); registerEventClass(NewCallerIdEvent.class); registerEventClass(NewChannelEvent.class); registerEventClass(NewExtenEvent.class); registerEventClass(NewStateEvent.class); registerEventClass(OriginateFailureEvent.class); registerEventClass(OriginateSuccessEvent.class); registerEventClass(ParkedCallEvent.class); registerEventClass(ParkedCallsCompleteEvent.class); registerEventClass(PeerStatusEvent.class); registerEventClass(QueueEntryEvent.class); registerEventClass(QueueMemberEvent.class); registerEventClass(QueueParamsEvent.class); registerEventClass(RegistryEvent.class); registerEventClass(ReloadEvent.class); registerEventClass(RenameEvent.class); registerEventClass(ShutdownEvent.class); registerEventClass(StatusEvent.class); registerEventClass(StatusCompleteEvent.class); registerEventClass(UnlinkEvent.class); registerEventClass(ZapShowChannelsEvent.class); registerEventClass(ZapShowChannelsCompleteEvent.class); } /** * 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. */ public void registerEventClass(Class clazz) { String className; String eventType; className = clazz.getName(); eventType = className.substring(className.lastIndexOf('.') + 1).toLowerCase(); if (eventType.endsWith("event")) { eventType = eventType.substring(0, eventType.length() - "event".length()); } registerEventClass(eventType, clazz); } /** * Registers a new event class for the event given by eventType. * @param eventType the name of the event to register the class for. For example "Join". * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. */ public void registerEventClass(String eventType, Class clazz) { Constructor defaultConstructor; if (!ManagerEvent.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException(clazz + " is not a ManagerEvent"); } if ((clazz.getModifiers() & Modifier.ABSTRACT) != 0) { throw new IllegalArgumentException(clazz + " is abstract"); } try { defaultConstructor = clazz.getConstructor(new Class[] { Object.class }); } catch (NoSuchMethodException ex) { throw new IllegalArgumentException(clazz + " has no usable constructor"); } if ((defaultConstructor.getModifiers() & Modifier.PUBLIC) == 0) { throw new IllegalArgumentException(clazz + " has no public default constructor"); } registeredEventClasses.put(eventType.toLowerCase(), clazz); logger.info("Registered event type '" + eventType + "' (" + clazz + ")"); } public ManagerEvent buildEvent(Object source, Map attributes) { ManagerEvent event; String eventType; Class eventClass; Constructor constructor; if (attributes.get("event") == null) { logger.error("No event event type in properties"); return null; } eventType = ((String) attributes.get("event")).toLowerCase(); eventClass = (Class) registeredEventClasses.get(eventType); if (eventClass == null) { logger.warn("No event class registered for event type '" + eventType + "', attributes: " + attributes); return null; } try { constructor = eventClass.getConstructor(new Class[] { Object.class }); } catch (NoSuchMethodException ex) { logger.error("Unable to get constructor of " + eventClass, ex); return null; } try { event = (ManagerEvent) constructor.newInstance(new Object[] { source }); } catch (InstantiationException ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; } catch (IllegalAccessException ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; } catch (InvocationTargetException ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; } setAttributes(event, attributes); if (event instanceof ResponseEvent) { ResponseEvent responseEvent; String actionId; responseEvent = (ResponseEvent) event; actionId = responseEvent.getActionId(); if (actionId != null) { responseEvent.setActionId(Util.stripInternalActionId(actionId)); } } return event; } private void setAttributes(ManagerEvent event, Map attributes) { Map setters; setters = getSetters(event.getClass()); Iterator i = attributes.keySet().iterator(); while (i.hasNext()) { String name; Object value; Class dataType; Method setter; name = (String) i.next(); if ("event".equals(name)) { continue; } /* * The source property needs special handling as it is already defined * in java.util.EventObject (the base class of ManagerEvent), so we * have to translate it. */ if ("source".equals(name)) { setter = (Method) setters.get("src"); } else { setter = (Method) setters.get(name); } if (setter == null) { logger.error("Unable to set property '" + name + "' on " + event.getClass() + ": no setter"); continue; } dataType = setter.getParameterTypes()[0]; if (dataType.isAssignableFrom(String.class)) { value = attributes.get(name); } else { try { Constructor constructor = dataType.getConstructor(new Class[] { String.class }); value = constructor.newInstance(new Object[] { attributes.get(name) }); } catch (Exception e) { logger.error("Unable to convert value '" + attributes.get(name) + "' of property '" + name + "' on " + event.getClass() + " to required type " + dataType, e); continue; } } try { setter.invoke(event, new Object[] { value }); } catch (Exception e) { logger.error("Unable to set property '" + name + "' on " + event.getClass(), e); continue; } } } private Map getSetters(Class clazz) { Map accessors = new HashMap(); Method[] methods = clazz.getMethods(); for (int i = 0; i < methods.length; i++) { String name; String methodName; Method method = methods[i]; methodName = method.getName(); if (!methodName.startsWith("set")) { continue; } // skip non public methods if ((method.getModifiers() & Modifier.PUBLIC) == 0) { continue; } // skip methods with != 1 parameters if (method.getParameterTypes().length != 1) { continue; } // ok seems to be an accessor name = methodName.substring("set".length()).toLowerCase(); accessors.put(name, method); } return accessors; } } --- NEW FILE: Queue.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 31, 2004 */ package net.sf.asterisk.manager; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * @author srt * @version $Id: Queue.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class Queue implements Serializable { private static final long serialVersionUID = -6597536667933738312L; private String name; private Integer max; private List entries; public Queue(String name) { this.name = name; this.entries = Collections.synchronizedList(new ArrayList()); } public String getName() { return name; } public Integer getMax() { return max; } public void setMax(Integer max) { this.max = max; } public List getEntries() { return entries; } public void addEntry(Channel entry) { entries.add(entry); } public void removeEntry(Channel entry) { entries.remove(entry); } } --- NEW FILE: ManagerReader.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; import java.io.BufferedReader; import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.response.ChallengeResponse; import net.sf.asterisk.manager.response.CommandResponse; import net.sf.asterisk.manager.response.ExtensionStateResponse; import net.sf.asterisk.manager.response.MailboxCountResponse; import net.sf.asterisk.manager.response.MailboxStatusResponse; import net.sf.asterisk.manager.response.ManagerError; import net.sf.asterisk.manager.response.ManagerResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * The ManagerReader is a Thread that reads events and responses from an asterisk * server, parses them to the corresponding ManagerEvent and ManagerResponse objects and * dispatches them via the associated DefaultManagerConnection. * <br> * This class is intended to be used only by the DefaultManagerConnection. * * @see net.sf.asterisk.manager.event.ManagerEvent * @see net.sf.asterisk.manager.response.ManagerResponse * @see net.sf.asterisk.manager.DefaultManagerConnection * * @author srt * @version $Id: ManagerReader.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ class ManagerReader extends Thread { private Log log = LogFactory.getLog(getClass()); private static int threadCount = 0; private EventBuilder eventBuilder; private boolean die = false; private BufferedReader reader; private DefaultManagerConnection connection; ManagerReader(DefaultManagerConnection connection, BufferedReader reader) { int i = threadCount++; setName("ManagerReader-" + i); this.connection = connection; this.reader = reader; this.eventBuilder = new EventBuilder(); } /** * Reads line by line from the asterisk server, sets the protocol identifier * as soon as it is received and dispatches the received * events and responses via the associated connection. * * @see DefaultManagerConnection#dispatchEvent(ManagerEvent) * @see DefaultManagerConnection#dispatchResponse(ManagerResponse) * @see DefaultManagerConnection#setProtocolIdentifier(String) */ public void run() { String line; List commandResult = new ArrayList(); boolean processingCommandResult = false; Map buffer = new HashMap(); try { while ((line = reader.readLine()) != null && !die) { // dirty hack for handling the CommandAction. Needs fix when manager protocol is enhanced. if (processingCommandResult) { if ("--END COMMAND--".equals(line)) { CommandResponse commandResponse = new CommandResponse(); if (!commandResult.isEmpty() && ((String) commandResult.get(0)).startsWith("ActionID")) { String tmp = (String) commandResult.get(0); int delimiterIndex = tmp.indexOf(":"); if (delimiterIndex > 0 && tmp.length() > delimiterIndex + 2) { commandResult.remove(0); commandResponse.setActionId(tmp.substring(delimiterIndex + 2)); } } commandResponse.setResponse("Follows"); commandResponse.setDateReceived(new Date()); commandResponse.setResult(commandResult); connection.dispatchResponse(commandResponse); commandResult = new ArrayList(); processingCommandResult = false; } else { commandResult.add(line); } continue; } if ("Response: Follows".equalsIgnoreCase(line)) { processingCommandResult = true; continue; } // maybe we will find a better way to identify the protocol identifier but for now // this works quite well. if (line.startsWith("Asterisk Call Manager/") && connection.getProtocolIdentifier() == null) { connection.setProtocolIdentifier(line); continue; } // an empty line indicates a normal response's or event's end so we build // the corresponding value object and dispatch it through the ManagerConnection. if (line.length() == 0) { if (buffer.containsKey("response")) { ManagerResponse response = buildResponse(buffer); if (response != null) { connection.dispatchResponse(response); } } else if (buffer.containsKey("event")) { ManagerEvent event = buildEvent(connection.getAsteriskServer(), buffer); if (event != null) { connection.dispatchEvent(event); } } buffer.clear(); } else { int delimiterIndex; delimiterIndex = line.indexOf(":"); if (delimiterIndex > 0 && line.length() > delimiterIndex + 2) { String name; String value; name = line.substring(0, delimiterIndex).toLowerCase(); value = line.substring(delimiterIndex + 2); buffer.put(name, value); } } } connection.handleDisconnection(); } catch (IOException e) { log.warn("IOException while reading from asterisk server, terminating thread.", e); } finally { log.info("Disconnected, closing reader"); try { reader.close(); } catch (IOException ex) { log.warn("Unable to close reader", ex); } } } public void die() { this.die = true; } private ManagerResponse buildResponse(Map buffer) { ManagerResponse response; String responseType = (String) buffer.get("response"); // determine type if ("error".equals(responseType)) { response = new ManagerError(); } else if (buffer.containsKey("challenge")) { ChallengeResponse challengeResponse = new ChallengeResponse(); challengeResponse.setChallenge((String) buffer.get("challenge")); response = challengeResponse; } else if (buffer.containsKey("mailbox") && buffer.containsKey("waiting")) { MailboxStatusResponse mailboxStatusResponse = new MailboxStatusResponse(); mailboxStatusResponse.setMailbox((String) buffer.get("mailbox")); mailboxStatusResponse.setWaiting(new Integer((String) buffer.get("mailbox"))); response = mailboxStatusResponse; } else if (buffer.containsKey("mailbox") && buffer.containsKey("newmessages") && buffer.containsKey("oldmessages")) { MailboxCountResponse mailboxCountResponse = new MailboxCountResponse(); mailboxCountResponse.setMailbox((String) buffer.get("mailbox")); mailboxCountResponse.setNewMessages(new Integer((String) buffer.get("newmessages"))); mailboxCountResponse.setOldMessages(new Integer((String) buffer.get("oldmessages"))); response = mailboxCountResponse; } else if (buffer.containsKey("exten") && buffer.containsKey("context") && buffer.containsKey("hint") && buffer.containsKey("status")) { ExtensionStateResponse extensionStateResponse = new ExtensionStateResponse(); extensionStateResponse.setExten((String) buffer.get("exten")); extensionStateResponse.setContext((String) buffer.get("context")); extensionStateResponse.setHint((String) buffer.get("hint")); extensionStateResponse.setStatus(new Integer((String) buffer.get("status"))); response = extensionStateResponse; } else { response = new ManagerResponse(); } // fill known attributes response.setResponse(responseType); if (buffer.containsKey("actionid")) { response.setActionId((String) buffer.get("actionid")); } if (buffer.containsKey("message")) { response.setMessage((String) buffer.get("message")); } if (buffer.containsKey("uniqueid")) { response.setUniqueId((String) buffer.get("uniqueid")); } response.setDateReceived(new Date()); return response; } private ManagerEvent buildEvent(Object source, Map buffer) { ManagerEvent event; event = this.eventBuilder.buildEvent(source, buffer); if (event != null) { event.setDateReceived(new Date()); } return event; } } --- NEW FILE: ChannelStateEnum.java --- /* * (c) 2004 Stefan Reuter * * Created on Oct 29, 2004 */ package net.sf.asterisk.manager; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.commons.lang.enums.Enum; /** * Enumeration that represents the state of a channel. * * @author srt * @version $Id: ChannelStateEnum.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ChannelStateEnum extends Enum { private static final long serialVersionUID = 6436381500165485011L; public static final ChannelStateEnum DOWN = new ChannelStateEnum("Down"); public static final ChannelStateEnum OFF_HOOK = new ChannelStateEnum("OffHook"); public static final ChannelStateEnum DIALING = new ChannelStateEnum("Dialing"); public static final ChannelStateEnum RING = new ChannelStateEnum("Ring"); public static final ChannelStateEnum RINGING = new ChannelStateEnum("Ringing"); public static final ChannelStateEnum UP = new ChannelStateEnum("Up"); public static final ChannelStateEnum BUSY = new ChannelStateEnum("Busy"); public static final ChannelStateEnum RSRVD = new ChannelStateEnum("Rsrvd"); public static final ChannelStateEnum HUNGUP = new ChannelStateEnum("Hungup"); private ChannelStateEnum(String state) { super(state); } public static ChannelStateEnum getEnum(String state) { return (ChannelStateEnum) getEnum(ChannelStateEnum.class, state); } public static Map getEnumMap() { return getEnumMap(ChannelStateEnum.class); } public static List getEnumList() { return getEnumList(ChannelStateEnum.class); } public static Iterator iterator() { return iterator(ChannelStateEnum.class); } } --- NEW FILE: ManagerConnectionFactory.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; import java.io.IOException; /** * This factory is used to obtain new ManagerConnections. * * @see net.sf.asterisk.manager.ManagerConnection * * @author srt * @version $Id: ManagerConnectionFactory.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class ManagerConnectionFactory { private static final String DEFAULT_HOSTNAME = "localhost"; private static final int DEFAULT_PORT = 5038; /** * Creates a new ManagerConnectionFactory. */ public ManagerConnectionFactory() { } /** * Returns a new ManagerConnection to an asterisk server running on localhost with * the call manager interface listening on its default port 5038. * * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * * @return the created connection to the asterisk call manager * * @throws IOException if the connection cannot be established. */ public ManagerConnection getManagerConnection(String username, String password) throws IOException { return new DefaultManagerConnection(DEFAULT_HOSTNAME, DEFAULT_PORT, username, password); } /** * Returns a new ManagerConnection to an asterisk server running on given host with * the call manager interface listening on its default port 5038. * * @param hostname the name of the host the asterisk server is running on * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * * @return the created connection to the asterisk call manager * * @throws IOException if the connection cannot be established. */ public ManagerConnection getManagerConnection(String hostname, String username, String password) throws IOException { return new DefaultManagerConnection(hostname, DEFAULT_PORT, username, password); } /** * Returns a new ManagerConnection to an asterisk server running on given host with * the call manager interface listening on the given port. * * @param hostname the name of the host the asterisk server is running on * @param port the port the call manager interface is listening on * @param username the username as specified in asterisk's <code>manager.conf</code> * @param password the password as specified in asterisk's <code>manager.conf</code> * * @return the created connection to the asterisk call manager * * @throws IOException if the connection cannot be established. */ public ManagerConnection getManagerConnection(String hostname, int port, String username, String password) throws IOException { return new DefaultManagerConnection(hostname, port, username, password); } } --- NEW FILE: Util.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 23, 2004 */ package net.sf.asterisk.manager; /** * Utilitiy class with some static helper methods that are used in multiple * contexts. * * @author srt * @version $Id: Util.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class Util { /** * The hex digits used to build a hex string representation of a byte array. */ private static final char[] hexChar = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; /** * Converts a byte array to a hex string representing it. The hex digits are lower case. * * @param b the byte array to convert * * @return the hex representation of b */ public static String toHexString(byte[] b) { StringBuffer sb = new StringBuffer(b.length * 2); for (int i = 0; i < b.length; i++) { sb.append(hexChar[(b[i] & 0xf0) >>> 4]); sb.append(hexChar[b[i] & 0x0f]); } return sb.toString(); } public static String getInternalActionId(String actionId) { int delimiterIndex; delimiterIndex = actionId.indexOf('-'); if (delimiterIndex > 0) { return actionId.substring(0, delimiterIndex); } else { return null; } } public static String stripInternalActionId(String actionId) { int delimiterIndex; delimiterIndex = actionId.indexOf('-'); if (delimiterIndex > 0) { if (actionId.length() > delimiterIndex + 1) { return actionId.substring(delimiterIndex + 1); } else { return null; } } else { return null; } } } --- NEW FILE: TimeoutException.java --- /* * (c) 2004 Stefan Reuter * * Created on Apr 22, 2004 */ package net.sf.asterisk.manager; /** * A TimeoutException is thrown if a ManagerResponse is not * received within the expected time period. * * @author srt * @version $Id: TimeoutException.java,v 1.1 2005/02/23 12:45:20 srt Exp $ */ public class TimeoutException extends Exception { static final long serialVersionUID = 7674248607624140309L; public TimeoutException(String message) { super(message); } } --- NEW FILE: MultiAsterisksManager.java --- /* * Created on 1 févr. 2005 by Pierre-Yves ROGER. * */ package net.sf.asterisk.manager; import java.io.IOException; import java.util.*; import net.sf.asterisk.manager.action.*; import net.sf.asterisk.manager.event.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author PY */ public class MultiAsterisksManager implements AsteriskManager, ManagerEventHandler { private final Log log = LogFactory.getLog(this.getClass()); /** * A map of all Asterisk servers connections by their unique hostname. */ private Map managerConnections; /** * A map of all active channel by theirs hostname of connection and unique id. * keyMap -> "hostname:uniqueId" */ private Map channels; private Map queues; private List queuedEvents; /** * A map of all "Initiallize flag" per connection. * keyMap -> "hostname" */ private Map initialized; public MultiAsterisksManager() { this.channels = Collections.synchronizedMap(new HashMap()); this.queues = Collections.synchronizedMap(new HashMap()); this.queuedEvents = Collections.synchronizedList(new ArrayList()); this.managerConnections = Collections.synchronizedMap(new HashMap()); this.initialized = Collections.synchronizedMap(new HashMap()); } public void addManagerConnection(ManagerConnection connection) { managerConnections.put(connection.getAsteriskServer(), connection); Hashtable initializedBoolean = new Hashtable(3, 1); initializedBoolean.put("channelsInitialized", new Boolean(false)); // TODO fix detection of queuesInitialized initializedBoolean.put("queuesInitialized", new Boolean(true)); initializedBoolean.put("initialized", new Boolean(false)); initialized.put(connection.getAsteriskServer(), initializedBoolean); } public void initialize() throws TimeoutException, IOException, AuthenticationFailedException { Iterator iterConnect = managerConnections.values().iterator(); while (iterConnect.hasNext()) { ManagerConnection connection = (ManagerConnection) iterConnect.next(); connection.addEventHandler(this); connection.login(); connection.sendAction(new StatusAction()); connection.sendAction(new QueueStatusAction()); } } /** * Returns a map of all active channel by their unique id: "hostname:ChannelId". */ public Map getChannels() { return channels; } public Map getQueues() { return queues; } /** * Handles all events received from the asterisk server... [truncated message content] |
Update of /cvsroot/asterisk-java/asterisk-java/src/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/net/sf/asterisk/manager Removed Files: AsteriskServer.java ManagerReader.java AuthenticationFailedException.java MultiAsterisksManager.java ActionBuilder.java TimeoutException.java DefaultAsteriskManager.java Channel.java ChannelStateEnum.java AsteriskManager.java ManagerConnectionFactory.java ManagerEventHandler.java EventBuilder.java DefaultManagerConnection.java ManagerConnection.java Util.java ManagerResponseHandler.java Queue.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- AsteriskServer.java DELETED --- --- ManagerReader.java DELETED --- --- AuthenticationFailedException.java DELETED --- --- MultiAsterisksManager.java DELETED --- --- ActionBuilder.java DELETED --- --- TimeoutException.java DELETED --- --- DefaultAsteriskManager.java DELETED --- --- Channel.java DELETED --- --- ChannelStateEnum.java DELETED --- --- AsteriskManager.java DELETED --- --- ManagerConnectionFactory.java DELETED --- --- ManagerEventHandler.java DELETED --- --- EventBuilder.java DELETED --- --- DefaultManagerConnection.java DELETED --- --- ManagerConnection.java DELETED --- --- Util.java DELETED --- --- ManagerResponseHandler.java DELETED --- --- Queue.java DELETED --- |
Update of /cvsroot/asterisk-java/asterisk-java/src/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/net/sf/asterisk/manager/action Removed Files: GetVarAction.java ManagerAction.java EventsAction.java ExtensionStateAction.java SetCDRUserFieldAction.java ZapHangupAction.java OriginateAction.java LoginAction.java PingAction.java QueueStatusAction.java MailboxCountAction.java ChangeMonitorAction.java LogoffAction.java ZapDialOffhookAction.java StopMonitorAction.java ZapTransferAction.java MailboxStatusAction.java StatusAction.java HangupAction.java AbsoluteTimeoutAction.java QueueAddAction.java ChallengeAction.java ZapShowChannelsAction.java ParkedCallsAction.java ZapDNDOnAction.java ZapDNDOffAction.java QueueRemoveAction.java MonitorAction.java RedirectAction.java CommandAction.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- GetVarAction.java DELETED --- --- ManagerAction.java DELETED --- --- EventsAction.java DELETED --- --- ExtensionStateAction.java DELETED --- --- SetCDRUserFieldAction.java DELETED --- --- ZapHangupAction.java DELETED --- --- OriginateAction.java DELETED --- --- LoginAction.java DELETED --- --- PingAction.java DELETED --- --- QueueStatusAction.java DELETED --- --- MailboxCountAction.java DELETED --- --- ChangeMonitorAction.java DELETED --- --- LogoffAction.java DELETED --- --- ZapDialOffhookAction.java DELETED --- --- StopMonitorAction.java DELETED --- --- ZapTransferAction.java DELETED --- --- MailboxStatusAction.java DELETED --- --- StatusAction.java DELETED --- --- HangupAction.java DELETED --- --- AbsoluteTimeoutAction.java DELETED --- --- QueueAddAction.java DELETED --- --- ChallengeAction.java DELETED --- --- ZapShowChannelsAction.java DELETED --- --- ParkedCallsAction.java DELETED --- --- ZapDNDOnAction.java DELETED --- --- ZapDNDOffAction.java DELETED --- --- QueueRemoveAction.java DELETED --- --- MonitorAction.java DELETED --- --- RedirectAction.java DELETED --- --- CommandAction.java DELETED --- |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:45:30
|
Update of /cvsroot/asterisk-java/asterisk-java/src/net/sf/asterisk/manager/response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11816/src/net/sf/asterisk/manager/response Removed Files: ManagerResponse.java MailboxCountResponse.java MailboxStatusResponse.java ExtensionStateResponse.java CommandResponse.java ManagerError.java ChallengeResponse.java Log Message: moved src and test to src/java and src/test first steps to introduce maven --- ManagerResponse.java DELETED --- --- MailboxCountResponse.java DELETED --- --- MailboxStatusResponse.java DELETED --- --- ExtensionStateResponse.java DELETED --- --- CommandResponse.java DELETED --- --- ManagerError.java DELETED --- --- ChallengeResponse.java DELETED --- |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:38
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net/sf/asterisk/manager/action Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:38
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/test Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/test added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:34
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net/sf Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net/sf added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:34
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net/sf/asterisk Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:34
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net/sf/asterisk/manager/response Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/test/net Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/test/net added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/test/net/sf Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/test/net/sf added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/test/net/sf/asterisk Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/test/net/sf/asterisk/manager Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:32
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net/sf/asterisk/manager Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:32
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net/sf/asterisk/manager/event Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:30
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java/net Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java/net added to the repository |
|
From: Stefan R. <sr...@us...> - 2005-02-23 12:44:30
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11605/src/java Log Message: Directory /cvsroot/asterisk-java/asterisk-java/src/java added to the repository |