From 9aa2e019cf26664d8e1b17dcedede8a67c342359 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Mon, 7 Nov 2016 10:00:03 +0100 Subject: [PATCH 01/11] Only sign archives if we want to upload archives. --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 94e98f9a2..6af40b84c 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,7 @@ artifacts { } signing { + required { gradle.taskGraph.hasTask("uploadArchives") } sign configurations.archives } From b720bcb0187fefb50983088678f89315d54b61b9 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Mon, 7 Nov 2016 10:01:14 +0100 Subject: [PATCH 02/11] Project cleanup. Removed and ignored intellij atlassian-ide-plugin.xml. Removed old pom.xml. --- .gitignore | 1 + atlassian-ide-plugin.xml | 25 ++-- pom.xml | 279 --------------------------------------- 3 files changed, 15 insertions(+), 290 deletions(-) delete mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index ebf99b0ef..6a153ff7d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ classes /bin build/ /.settings/ +atlassian-ide-plugin.xml diff --git a/atlassian-ide-plugin.xml b/atlassian-ide-plugin.xml index d48888417..2a7860308 100644 --- a/atlassian-ide-plugin.xml +++ b/atlassian-ide-plugin.xml @@ -1,28 +1,31 @@ - - - - e88a6130-6bd2-45dd-aa5d-57b845f76d0f + + + + e88a6130-6bd2-45dd-aa5d-57b845f76d0f reucon https://secure.reucon.net/issues false + false - - 68a20e42-e943-4a1d-b807-45cad35b4f73 + + 68a20e42-e943-4a1d-b807-45cad35b4f73 reucon https://secure.reucon.net/build false false + false + false false - - - + + + - 89c4100c-3c20-4d7d-8611-0dbe1bee742e + 89c4100c-3c20-4d7d-8611-0dbe1bee742e repos asterisk-java/trunk - e88a6130-6bd2-45dd-aa5d-57b845f76d0f + e88a6130-6bd2-45dd-aa5d-57b845f76d0f \ No newline at end of file diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 22c84c72b..000000000 --- a/pom.xml +++ /dev/null @@ -1,279 +0,0 @@ - - 4.0.0 - org.asteriskjava - asterisk-java - Asterisk-Java - 2.0.0.alpha-SNAPSHOT - The free Java library for Asterisk PBX integration. - 2004 - - - - The Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - https://github.com/asterisk-java/asterisk-java - - - - Stefan Reuter - srt - stefan.reuter at reucon.com - +1 - - - Pierre-Yves Roger - partoutatis - partoutatis at users.sourceforge.net - +1 - - - John Hood - squinky86 - john at asteriasgi.com - Asteria Solutions Group, Inc. - -6 - - - Martin B. Smith - martins - martins at bebr.ufl.edu - Bureau of Economic and Business Research, University of Florida - -5 - - - S. Brett Sutton - martins - bsutton at noojee.com.au - Noojee Telephony Solutions Pty Ltd - +10 - - - Zoumana TRAORE - zoumhussein - github at zoumanatraore dot fr - +1 - - - Robert Sutton - rsutton - rsutton at noojee.com.au - +10 - - - - scm:git:git@github.com:asterisk-java/asterisk-java.git - scm:git:git@github.com:asterisk-java/asterisk-java.git - https://github.com/asterisk-java/asterisk-java - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 - - - - GitHub - https://github.com/asterisk-java/asterisk-java/issues - - - - Asterisk-Java User List - http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users - http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users - http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-users - - - Asterisk-Java Developer List - http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel - http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel - http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-devel - - - - UTF-8 - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.5 - - true - - - - biz.aQute.bnd - bnd-maven-plugin - 3.2.0 - - - - bnd-process - - - - - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - true - false - release - deploy - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.2 - - 1.7 - 1.7 - - - - maven-surefire-plugin - 2.18 - - - maven-assembly-plugin - 2.5.3 - - - ${project.basedir}/src/main/assembly/bin.xml - - - - - make-assembly - package - - attached - - - - - - ${project.artifactId} - - - - org.easymock - easymock - 3.3 - test - - - junit - junit - 4.12 - test - - - log4j - log4j - 1.2.17 - compile - - - org.slf4j - slf4j-api - 1.7.9 - compile - - - ch.qos.logback - logback-classic - 1.1.2 - test - - - - - release - - - - org.apache.maven.plugins - maven-source-plugin - 2.4 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.1 - - - attach-javadocs - - jar - - - - - - - Core Packages - - org.asteriskjava:org.asteriskjava.fastagi:org.asteriskjava.fastagi.command:org.asteriskjava.fastagi.reply:org.asteriskjava.manager:org.asteriskjava.manager.action:org.asteriskjava.manager.response:org.asteriskjava.manager.event:org.asteriskjava.live:org.asteriskjava.util - - - - Internal Packages - - org.asteriskjava.fastagi.internal:org.asteriskjava.manager.internal:org.asteriskjava.live.internal:org.asteriskjava.util.internal - - - -
${project.name}
-
-
- - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.5 - true - - ossrh - https://oss.sonatype.org/ - false - - -
-
-
-
-
From 2238d2687484bc26b286c08782bb7a42de0786ca Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Wed, 21 Aug 2019 11:47:43 +0200 Subject: [PATCH 03/11] Add support for PJSIPShowContacts --- .../action/PJSipShowContactsAction.java | 59 ++++ .../event/ContactListCompleteEvent.java | 86 +++++ .../manager/event/ContactListEvent.java | 324 ++++++++++++++++++ 3 files changed, 469 insertions(+) create mode 100644 src/main/java/org/asteriskjava/manager/action/PJSipShowContactsAction.java create mode 100644 src/main/java/org/asteriskjava/manager/event/ContactListCompleteEvent.java create mode 100644 src/main/java/org/asteriskjava/manager/event/ContactListEvent.java diff --git a/src/main/java/org/asteriskjava/manager/action/PJSipShowContactsAction.java b/src/main/java/org/asteriskjava/manager/action/PJSipShowContactsAction.java new file mode 100644 index 000000000..e29f0b055 --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/action/PJSipShowContactsAction.java @@ -0,0 +1,59 @@ +/* + * Copyright 2004-2006 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.asteriskjava.manager.action; + +import org.asteriskjava.manager.event.ContactListCompleteEvent; +import org.asteriskjava.manager.event.ResponseEvent; + +/** + * Retrieves a list of all defined contacts. + *

+ * For each Contact a ContactListEvent is raised that contains relevant attributes and status information. + * Once all contacts have been listed a ContactListCompleteEvent is issued. + *

+ * + * @author Stefan Tosic + * @version $Id$ + * @see org.asteriskjava.manager.event.ContactListEvent + * @see org.asteriskjava.manager.event.ContactListCompleteEvent + */ +public class PJSipShowContactsAction extends AbstractManagerAction implements EventGeneratingAction +{ + /** + * Serial version identifier. + */ + private static final long serialVersionUID = 889440154275360382L; + + /** + * Creates a new PJSipShowContactsAction. + */ + public PJSipShowContactsAction() + { + + } + + @Override + public String getAction() + { + return "PJSIPShowContacts"; + } + + public Class< ? extends ResponseEvent> getActionCompleteEventClass() + { + return ContactListCompleteEvent.class; + } +} diff --git a/src/main/java/org/asteriskjava/manager/event/ContactListCompleteEvent.java b/src/main/java/org/asteriskjava/manager/event/ContactListCompleteEvent.java new file mode 100644 index 000000000..54f9c6a9a --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/event/ContactListCompleteEvent.java @@ -0,0 +1,86 @@ +/* + * Copyright 2004-2006 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.asteriskjava.manager.event; + +/** + * A ContactListCompleteEvent is triggered after the details of all contacts has been + * reported in response to an PJSipShowContactsAction. + *

+ * Available since Asterisk 16 + * + * @see org.asteriskjava.manager.event.ContactListEvent + * @see org.asteriskjava.manager.action.PJSipShowContactsAction + * @author Stefan Tosic + * @version $Id$ + */ +public class ContactListCompleteEvent extends ResponseEvent +{ + /** + * Serial version identifier. + */ + private static final long serialVersionUID = -308250379505175949L; + + private Integer listItems; + private String eventList; + + /** + * Creates a new instance. + * + * @param source + */ + public ContactListCompleteEvent(Object source) + { + super(source); + } + + /** + * Returns the number of ContactListEvents that have been reported. + * + * @return the number of ContactListEvents that have been reported. + */ + public Integer getListItems() + { + return listItems; + } + + /** + * Sets the number of ContactListEvents that have been reported. + * + * @param listItems the number of ContactListEvents that have been reported. + */ + public void setListItems(Integer listItems) + { + this.listItems = listItems; + } + + /** + * Returns always "Complete". + * + * @return always returns "Complete" confirming that all ContactListEvents have + * been sent. + * @since 1.0.0 + */ + public String getEventList() + { + return eventList; + } + + public void setEventList(String eventList) + { + this.eventList = eventList; + } +} diff --git a/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java b/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java new file mode 100644 index 000000000..c9f539469 --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java @@ -0,0 +1,324 @@ +/* + * Copyright 2004-2006 Stefan Reuter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.asteriskjava.manager.event; + +/** + * A ContactListEvent is triggered in response to a + * {@link org.asteriskjava.manager.action.PJSipShowContactsAction} + * and contains information about a PJSIP contact + *

+ * Available since Asterisk 16 + * + * @author Stefan Tosic + * @version $Id$ + * @see org.asteriskjava.manager.event.ContactListCompleteEvent + * @see org.asteriskjava.manager.action.PJSipShowContactsAction + */ +public class ContactListEvent extends ResponseEvent { + + /** + * Serial version identifier. + */ + private static final long serialVersionUID = 151278936237115123L; + + public static final String STATUS_REACHABLE = "Reachable"; + public static final String STATUS_UNREACHABLE = "Unreachable"; + public static final String STATUS_NON_QUALIFIED = "NonQualified"; + public static final String STATUS_UNKNOWN = "Unknown"; + + private String objectType; + private String objectName; + private String viaAddr; + private Integer viaPort; + private Double qualifyTimeout; + private String callId; + private String regServer; + private Boolean pruneOnBoot; + private String path; + private String endpoint; + private Boolean authenticateQualify; + private String uri; + private String qualifyFrequency; + private String userAgent; + private String expirationTime; + private String outboundProxy; + private String status; + private Long roundtripUsec; + + /** + * Creates a new instance. + * + * @param source + */ + public ContactListEvent(Object source) { + super(source); + } + + /** + * @return object type, always 'contact' + */ + public String getObjectType() { + return objectType; + } + + /** + * set the object type + * @param objectType + */ + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * @return name of the contact object + */ + public String getObjectName() { + return objectName; + } + + /** + * set the object name + * @param objectName + */ + public void setObjectName(String objectName) { + this.objectName = objectName; + } + + /** + * @return IP address of the last Via header in REGISTER request. Will only appear in the event if available + */ + public String getViaAddr() { + return viaAddr; + } + + /** + * @param viaAddr + */ + public void setViaAddr(String viaAddr) { + this.viaAddr = viaAddr; + } + + /** + * @return Port number of the last Via header in REGISTER request. Will only appear in the event if available + */ + public Integer getViaPort() { + return viaPort; + } + + /** + * @param viaPort + */ + public void setViaPort(Integer viaPort) { + this.viaPort = viaPort; + } + + /** + * @return The elapsed time in decimal seconds after which an OPTIONS message is sent before the contact is considered unavailable + */ + public Double getQualifyTimeout() { + return qualifyTimeout; + } + + /** + * @param qualifyTimeout + */ + public void setQualifyTimeout(Double qualifyTimeout) { + this.qualifyTimeout = qualifyTimeout; + } + + /** + * @return Content of the Call-ID header in REGISTER request. Will only appear in the event if available. + */ + public String getCallId() { + return callId; + } + + /** + * @param callId + */ + public void setCallId(String callId) { + this.callId = callId; + } + + /** + * @return Asterisk Server name + */ + public String getRegServer() { + return regServer; + } + + /** + * @param regServer + */ + public void setRegServer(String regServer) { + this.regServer = regServer; + } + + /** + * @return If true contact will be deleted on Asterisk restart/boot + */ + public Boolean getPruneOnBoot() { + return pruneOnBoot; + } + + /** + * @param pruneOnBoot + */ + public void setPruneOnBoot(Boolean pruneOnBoot) { + this.pruneOnBoot = pruneOnBoot; + } + + /** + * @return The Path header received on the REGISTER + */ + public String getPath() { + return path; + } + + /** + * @param path + */ + public void setPath(String path) { + this.path = path; + } + + /** + * @return The name of the endpoint associated with this information + */ + public String getEndpoint() { + return endpoint; + } + + /** + * @param endpoint + */ + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + /** + * @return true if qualify should be authenticated + */ + public Boolean getAuthenticateQualify() { + return authenticateQualify; + } + + /** + * @param authenticateQualify + */ + public void setAuthenticateQualify(Boolean authenticateQualify) { + this.authenticateQualify = authenticateQualify; + } + + /** + * @return contact's URI + */ + public String getUri() { + return uri; + } + + /** + * @param uri + */ + public void setUri(String uri) { + this.uri = uri; + } + + /** + * @return The interval in seconds at which the contact will be qualified + */ + public String getQualifyFrequency() { + return qualifyFrequency; + } + + /** + * @param qualifyFrequency + */ + public void setQualifyFrequency(String qualifyFrequency) { + this.qualifyFrequency = qualifyFrequency; + } + + /** + * @return Content of the User-Agent header in REGISTER request + */ + public String getUserAgent() { + return userAgent; + } + + /** + * @param userAgent + */ + public void setUserAgent(String userAgent) { + this.userAgent = userAgent; + } + + /** + * @return Absolute time that this contact is no longer valid after + */ + public String getExpirationTime() { + return expirationTime; + } + + /** + * @param expirationTime + */ + public void setExpirationTime(String expirationTime) { + this.expirationTime = expirationTime; + } + + /** + * @return The contact's outbound proxy + */ + public String getOutboundProxy() { + return outboundProxy; + } + + /** + * @param outboundProxy + */ + public void setOutboundProxy(String outboundProxy) { + this.outboundProxy = outboundProxy; + } + + /** + * @return This contact's status + */ + public String getStatus() { + return status; + } + + /** + * @param status + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return The round trip time in microseconds + */ + public Long getRoundtripUsec() { + return roundtripUsec; + } + + /** + * @param roundtripUsec + */ + public void setRoundtripUsec(Long roundtripUsec) { + this.roundtripUsec = roundtripUsec; + } +} From ff27b905b25d75f9c2d78dcc5401e9e1e7eb08b4 Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Mon, 7 Oct 2019 11:41:44 +0200 Subject: [PATCH 04/11] PJSIPShowContacts - RoundtripUsec could have N/A value --- .../org/asteriskjava/manager/event/ContactListEvent.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java b/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java index c9f539469..be4af0752 100644 --- a/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/ContactListEvent.java @@ -57,7 +57,7 @@ public class ContactListEvent extends ResponseEvent { private String expirationTime; private String outboundProxy; private String status; - private Long roundtripUsec; + private String roundtripUsec; /** * Creates a new instance. @@ -309,16 +309,16 @@ public void setStatus(String status) { } /** - * @return The round trip time in microseconds + * @return The round trip time in microseconds or N/A */ - public Long getRoundtripUsec() { + public String getRoundtripUsec() { return roundtripUsec; } /** * @param roundtripUsec */ - public void setRoundtripUsec(Long roundtripUsec) { + public void setRoundtripUsec(String roundtripUsec) { this.roundtripUsec = roundtripUsec; } } From 06351217184a550b3e52d74d1559ed67acf71d45 Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Mon, 7 Oct 2019 11:42:30 +0200 Subject: [PATCH 05/11] Add support for PJSIPShowRegistrationsOutbound --- .../PJSIPShowRegistrationsOutboundAction.java | 42 +++ .../manager/event/AuthDetailEvent.java | 182 +++++++++++ ...tboundRegistrationDetailCompleteEvent.java | 64 ++++ .../OutboundRegistrationDetailEvent.java | 304 ++++++++++++++++++ 4 files changed, 592 insertions(+) create mode 100644 src/main/java/org/asteriskjava/manager/action/PJSIPShowRegistrationsOutboundAction.java create mode 100644 src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java create mode 100644 src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailCompleteEvent.java create mode 100644 src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java diff --git a/src/main/java/org/asteriskjava/manager/action/PJSIPShowRegistrationsOutboundAction.java b/src/main/java/org/asteriskjava/manager/action/PJSIPShowRegistrationsOutboundAction.java new file mode 100644 index 000000000..a7e643b5b --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/action/PJSIPShowRegistrationsOutboundAction.java @@ -0,0 +1,42 @@ +package org.asteriskjava.manager.action; + +import org.asteriskjava.manager.event.OutboundRegistrationDetailCompleteEvent; +import org.asteriskjava.manager.event.ResponseEvent; + +/** + * Lists PJSIP outbound registrations + *

+ * For each outbound registration configuration and status information are received + * Once all events have been listed a OutboundRegistrationDetailCompleteEvent is issued. + *

+ * + * @author Stefan Tosic + * @version $Id$ + * @see org.asteriskjava.manager.event.OutboundRegistrationDetailEvent + * @see org.asteriskjava.manager.event.AuthDetailEvent + * @see org.asteriskjava.manager.event.OutboundRegistrationDetailCompleteEvent + */ +public class PJSIPShowRegistrationsOutboundAction extends AbstractManagerAction implements EventGeneratingAction { + + + /** + * Serial version identifier. + */ + private static final long serialVersionUID = -3074317632738376769L; + + /** + * Creates a new PJSIPShowRegistrationsOutboundAction. + */ + public PJSIPShowRegistrationsOutboundAction() { + + } + + @Override + public String getAction() { + return "PJSIPShowRegistrationsOutbound"; + } + + public Class getActionCompleteEventClass() { + return OutboundRegistrationDetailCompleteEvent.class; + } +} diff --git a/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java b/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java new file mode 100644 index 000000000..b75e93dbd --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java @@ -0,0 +1,182 @@ +package org.asteriskjava.manager.event; + +/** + * @author Stefan Tosic + * @since 2019-10-07 + */ +public class AuthDetailEvent extends ResponseEvent { + + /** + * Serial version identifier. + */ + private static final long serialVersionUID = 390429702738009123L; + + /** + * Creates a new instance. + * + * @param source + */ + public AuthDetailEvent(Object source) { + super(source); + } + + private String objectType; + private String objectName; + private String username; + private String password; + private String md5Cred; + private String realm; + private long nonceLifetime; + private String authType; + private String endpointName; + + + /** + * The object's type. This will always be 'auth' + * @return + */ + public String getObjectType() { + return objectType; + } + + /** + * Set the object type + * @param objectType + */ + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * The name of this object + * @return + */ + public String getObjectName() { + return objectName; + } + + /** + * Set the object name + * @param objectName + */ + public void setObjectName(String objectName) { + this.objectName = objectName; + } + + /** + * Username to use for account + * @return + */ + public String getUsername() { + return username; + } + + /** + * + * @param username + */ + public void setUsername(String username) { + this.username = username; + } + + /** + * Password to use for account + * @return + */ + public String getPassword() { + return password; + } + + /** + * + * @param password + */ + public void setPassword(String password) { + this.password = password; + } + + /** + * MD5 Hash used for authentication + * @return + */ + public String getMd5Cred() { + return md5Cred; + } + + /** + * + * @param md5Cred + */ + public void setMd5Cred(String md5Cred) { + this.md5Cred = md5Cred; + } + + /** + * SIP realm for endpoint + * @return + */ + public String getRealm() { + return realm; + } + + /** + * + * @param realm + */ + public void setRealm(String realm) { + this.realm = realm; + } + + /** + * Lifetime of a nonce associated with this authentication config + * @return + */ + public long getNonceLifetime() { + return nonceLifetime; + } + + /** + * + * @param nonceLifetime + */ + public void setNonceLifetime(long nonceLifetime) { + this.nonceLifetime = nonceLifetime; + } + + /** + * Authentication type + * @return + */ + public String getAuthType() { + return authType; + } + + /** + * + * @param authType + */ + public void setAuthType(String authType) { + this.authType = authType; + } + + /** + * The name of the endpoint associated with this information + * @return + */ + public String getEndpointName() { + return endpointName; + } + + /** + * + * @param endpointName + */ + public void setEndpointName(String endpointName) { + this.endpointName = endpointName; + } + + +} + + + diff --git a/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailCompleteEvent.java b/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailCompleteEvent.java new file mode 100644 index 000000000..3cf33b7d8 --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailCompleteEvent.java @@ -0,0 +1,64 @@ +package org.asteriskjava.manager.event; + +/** + * @author Stefan Tosic + * @since 2019-10-07 + */ +public class OutboundRegistrationDetailCompleteEvent extends ResponseEvent +{ + /** + * Serial version identifier. + */ + private static final long serialVersionUID = -8614746282824243230L; + + + private Integer listItems; + private String eventList; + + /** + * Creates a new instance. + * + * @param source + */ + public OutboundRegistrationDetailCompleteEvent(Object source) + { + super(source); + } + + /** + * Returns the number of OutboundRegistrationDetailEvent that have been reported. + * + * @return the number of OutboundRegistrationDetailEvent that have been reported. + */ + public Integer getListItems() + { + return listItems; + } + + /** + * Sets the number of OutboundRegistrationDetailEvent that have been reported. + * + * @param listItems the number of OutboundRegistrationDetailEvent that have been reported. + */ + public void setListItems(Integer listItems) + { + this.listItems = listItems; + } + + /** + * Returns always "Complete". + * + * @return always returns "Complete" confirming that all OutboundRegistrationDetailEvent have + * been sent. + * @since 1.0.0 + */ + public String getEventList() + { + return eventList; + } + + public void setEventList(String eventList) + { + this.eventList = eventList; + } +} diff --git a/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java b/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java new file mode 100644 index 000000000..78f01d27f --- /dev/null +++ b/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java @@ -0,0 +1,304 @@ +package org.asteriskjava.manager.event; + +/** + * @author Stefan Tosic + * @since 2019-10-07 + */ +public class OutboundRegistrationDetailEvent extends ResponseEvent { + + /** + * Serial version identifier. + */ + private static final long serialVersionUID = 2778011196643095118L; + + public OutboundRegistrationDetailEvent(Object source) { + super(source); + } + + private String objectType; + private String objectName; + private int maxRetries; + private String clientUri; + private boolean authRejectionPermanent; + private String serverUri; + private boolean supportPath; + private int retryInterval; + private int expiration; + private String transport; + private boolean line; + private String contactUser; + private String endpoint; + private int forbiddenRetryInterval; + private String outboundAuth; + private String outboundProxy; + private int fatalRetryInterval; + private String status; + private int nextReg; + + /** + * @return + */ + public String getObjectType() { + return objectType; + } + + /** + * @param objectType + */ + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * @return + */ + public String getObjectName() { + return objectName; + } + + /** + * @param objectName + */ + public void setObjectName(String objectName) { + this.objectName = objectName; + } + + /** + * @return + */ + public int getMaxRetries() { + return maxRetries; + } + + /** + * @param maxRetries + */ + public void setMaxRetries(int maxRetries) { + this.maxRetries = maxRetries; + } + + /** + * @return + */ + public String getClientUri() { + return clientUri; + } + + /** + * @param clientUri + */ + public void setClientUri(String clientUri) { + this.clientUri = clientUri; + } + + /** + * @return + */ + public boolean isAuthRejectionPermanent() { + return authRejectionPermanent; + } + + /** + * @param authRejectionPermanent + */ + public void setAuthRejectionPermanent(boolean authRejectionPermanent) { + this.authRejectionPermanent = authRejectionPermanent; + } + + /** + * @return + */ + public String getServerUri() { + return serverUri; + } + + /** + * @param serverUri + */ + public void setServerUri(String serverUri) { + this.serverUri = serverUri; + } + + /** + * @return + */ + public boolean isSupportPath() { + return supportPath; + } + + /** + * @param supportPath + */ + public void setSupportPath(boolean supportPath) { + this.supportPath = supportPath; + } + + /** + * @return + */ + public int getRetryInterval() { + return retryInterval; + } + + /** + * @param retryInterval + */ + public void setRetryInterval(int retryInterval) { + this.retryInterval = retryInterval; + } + + /** + * @return + */ + public int getExpiration() { + return expiration; + } + + /** + * @param expiration + */ + public void setExpiration(int expiration) { + this.expiration = expiration; + } + + /** + * @return + */ + public String getTransport() { + return transport; + } + + /** + * @param transport + */ + public void setTransport(String transport) { + this.transport = transport; + } + + /** + * @return + */ + public boolean isLine() { + return line; + } + + /** + * @param line + */ + public void setLine(boolean line) { + this.line = line; + } + + /** + * @return + */ + public String getContactUser() { + return contactUser; + } + + /** + * @param contactUser + */ + public void setContactUser(String contactUser) { + this.contactUser = contactUser; + } + + /** + * @return + */ + public String getEndpoint() { + return endpoint; + } + + /** + * @param endpoint + */ + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + /** + * @return + */ + public int getForbiddenRetryInterval() { + return forbiddenRetryInterval; + } + + /** + * @param forbiddenRetryInterval + */ + public void setForbiddenRetryInterval(int forbiddenRetryInterval) { + this.forbiddenRetryInterval = forbiddenRetryInterval; + } + + /** + * @return + */ + public String getOutboundAuth() { + return outboundAuth; + } + + /** + * @param outboundAuth + */ + public void setOutboundAuth(String outboundAuth) { + this.outboundAuth = outboundAuth; + } + + /** + * @return + */ + public String getOutboundProxy() { + return outboundProxy; + } + + /** + * @param outboundProxy + */ + public void setOutboundProxy(String outboundProxy) { + this.outboundProxy = outboundProxy; + } + + /** + * @return + */ + public int getFatalRetryInterval() { + return fatalRetryInterval; + } + + /** + * @param fatalRetryInterval + */ + public void setFatalRetryInterval(int fatalRetryInterval) { + this.fatalRetryInterval = fatalRetryInterval; + } + + /** + * @return + */ + public String getStatus() { + return status; + } + + /** + * @param status + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return + */ + public int getNextReg() { + return nextReg; + } + + /** + * @param nextReg + */ + public void setNextReg(int nextReg) { + this.nextReg = nextReg; + } +} + From d640aef8aaa5d968edeb6ab688db4050a706a9d7 Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Mon, 7 Oct 2019 13:46:09 +0200 Subject: [PATCH 06/11] Add support for PJSIPShowRegistrationsOutbound. Fixed data types --- .../manager/event/AuthDetailEvent.java | 6 +-- .../OutboundRegistrationDetailEvent.java | 54 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java b/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java index b75e93dbd..bcf560d06 100644 --- a/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/AuthDetailEvent.java @@ -26,7 +26,7 @@ public AuthDetailEvent(Object source) { private String password; private String md5Cred; private String realm; - private long nonceLifetime; + private Long nonceLifetime; private String authType; private String endpointName; @@ -131,7 +131,7 @@ public void setRealm(String realm) { * Lifetime of a nonce associated with this authentication config * @return */ - public long getNonceLifetime() { + public Long getNonceLifetime() { return nonceLifetime; } @@ -139,7 +139,7 @@ public long getNonceLifetime() { * * @param nonceLifetime */ - public void setNonceLifetime(long nonceLifetime) { + public void setNonceLifetime(Long nonceLifetime) { this.nonceLifetime = nonceLifetime; } diff --git a/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java b/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java index 78f01d27f..8e520d808 100644 --- a/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/OutboundRegistrationDetailEvent.java @@ -17,23 +17,23 @@ public OutboundRegistrationDetailEvent(Object source) { private String objectType; private String objectName; - private int maxRetries; + private Integer maxRetries; private String clientUri; - private boolean authRejectionPermanent; + private Boolean authRejectionPermanent; private String serverUri; - private boolean supportPath; - private int retryInterval; - private int expiration; + private Boolean supportPath; + private Integer retryInterval; + private Integer expiration; private String transport; - private boolean line; + private Boolean line; private String contactUser; private String endpoint; - private int forbiddenRetryInterval; + private Integer forbiddenRetryInterval; private String outboundAuth; private String outboundProxy; - private int fatalRetryInterval; + private Integer fatalRetryInterval; private String status; - private int nextReg; + private Integer nextReg; /** * @return @@ -66,14 +66,14 @@ public void setObjectName(String objectName) { /** * @return */ - public int getMaxRetries() { + public Integer getMaxRetries() { return maxRetries; } /** * @param maxRetries */ - public void setMaxRetries(int maxRetries) { + public void setMaxRetries(Integer maxRetries) { this.maxRetries = maxRetries; } @@ -94,14 +94,14 @@ public void setClientUri(String clientUri) { /** * @return */ - public boolean isAuthRejectionPermanent() { + public Boolean isAuthRejectionPermanent() { return authRejectionPermanent; } /** * @param authRejectionPermanent */ - public void setAuthRejectionPermanent(boolean authRejectionPermanent) { + public void setAuthRejectionPermanent(Boolean authRejectionPermanent) { this.authRejectionPermanent = authRejectionPermanent; } @@ -122,42 +122,42 @@ public void setServerUri(String serverUri) { /** * @return */ - public boolean isSupportPath() { + public Boolean isSupportPath() { return supportPath; } /** * @param supportPath */ - public void setSupportPath(boolean supportPath) { + public void setSupportPath(Boolean supportPath) { this.supportPath = supportPath; } /** * @return */ - public int getRetryInterval() { + public Integer getRetryInterval() { return retryInterval; } /** * @param retryInterval */ - public void setRetryInterval(int retryInterval) { + public void setRetryInterval(Integer retryInterval) { this.retryInterval = retryInterval; } /** * @return */ - public int getExpiration() { + public Integer getExpiration() { return expiration; } /** * @param expiration */ - public void setExpiration(int expiration) { + public void setExpiration(Integer expiration) { this.expiration = expiration; } @@ -178,14 +178,14 @@ public void setTransport(String transport) { /** * @return */ - public boolean isLine() { + public Boolean isLine() { return line; } /** * @param line */ - public void setLine(boolean line) { + public void setLine(Boolean line) { this.line = line; } @@ -220,14 +220,14 @@ public void setEndpoint(String endpoint) { /** * @return */ - public int getForbiddenRetryInterval() { + public Integer getForbiddenRetryInterval() { return forbiddenRetryInterval; } /** * @param forbiddenRetryInterval */ - public void setForbiddenRetryInterval(int forbiddenRetryInterval) { + public void setForbiddenRetryInterval(Integer forbiddenRetryInterval) { this.forbiddenRetryInterval = forbiddenRetryInterval; } @@ -262,14 +262,14 @@ public void setOutboundProxy(String outboundProxy) { /** * @return */ - public int getFatalRetryInterval() { + public Integer getFatalRetryInterval() { return fatalRetryInterval; } /** * @param fatalRetryInterval */ - public void setFatalRetryInterval(int fatalRetryInterval) { + public void setFatalRetryInterval(Integer fatalRetryInterval) { this.fatalRetryInterval = fatalRetryInterval; } @@ -290,14 +290,14 @@ public void setStatus(String status) { /** * @return */ - public int getNextReg() { + public Integer getNextReg() { return nextReg; } /** * @param nextReg */ - public void setNextReg(int nextReg) { + public void setNextReg(Integer nextReg) { this.nextReg = nextReg; } } From f8f58865927f582156cdbdea932fcaabb0c41dc2 Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Mon, 7 Oct 2019 14:15:10 +0200 Subject: [PATCH 07/11] Fixed attribute name because of collision with other event's attributes --- .../manager/event/ManagerEvent.java | 18 +++++++++--------- .../wrap/events/BlindTransferEvent.java | 4 ++-- .../asterisk/wrap/events/DialBeginEvent.java | 4 ++-- .../pbx/asterisk/wrap/events/DialEndEvent.java | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/asteriskjava/manager/event/ManagerEvent.java b/src/main/java/org/asteriskjava/manager/event/ManagerEvent.java index 3fa1af486..c86bb50b8 100644 --- a/src/main/java/org/asteriskjava/manager/event/ManagerEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/ManagerEvent.java @@ -174,7 +174,7 @@ public void setContext(String context) // AJ-213 only used when debugging is turned on private String file; - private Integer line; + private Integer codeLine; private String func; private Integer sequenceNumber; @@ -306,7 +306,7 @@ public void setSystemName(String systemName) * @return the name of the file in that triggered this event or * null if debgging is turned off. * @see #getFunc() - * @see #getLine() + * @see #getCodeLine() * @since 1.0.0 */ public String getFile() @@ -335,14 +335,14 @@ public void setFile(String file) * @see #getFunc() * @since 1.0.0 */ - public Integer getLine() + public Integer getCodeLine() { - return line; + return codeLine; } - public void setLine(Integer line) + public void setCodeLine(Integer codeLine) { - this.line = line; + this.codeLine = codeLine; } /** @@ -358,7 +358,7 @@ public void setLine(Integer line) * @return the name of the C function that triggered this event or * null if debgging is turned off. * @see #getFile() - * @see #getLine() + * @see #getCodeLine() * @since 1.0.0 */ public String getFunc() @@ -384,7 +384,7 @@ public void setFunc(String func) * @return the sequence number of this event or null if * debgging is turned off. * @see #getFile() - * @see #getLine() + * @see #getCodeLine() * @since 1.0.0 */ public Integer getSequenceNumber() @@ -405,7 +405,7 @@ public String toString() final StringBuilder sb = new StringBuilder(getClass().getName() + "["); appendPropertyIfNotNull(sb, "file", getFile()); appendPropertyIfNotNull(sb, "func", getFunc()); - appendPropertyIfNotNull(sb, "line", getLine()); + appendPropertyIfNotNull(sb, "line", getCodeLine()); appendPropertyIfNotNull(sb, "sequenceNumber", getSequenceNumber()); appendPropertyIfNotNull(sb, "dateReceived", getDateReceived()); appendPropertyIfNotNull(sb, "privilege", getPrivilege()); diff --git a/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/BlindTransferEvent.java b/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/BlindTransferEvent.java index 2e12b2e24..74ff409b6 100644 --- a/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/BlindTransferEvent.java +++ b/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/BlindTransferEvent.java @@ -154,9 +154,9 @@ public String getFile() return rawEvent.getFile(); } - public Integer getLine() + public Integer getCodeLine() { - return rawEvent.getLine(); + return rawEvent.getCodeLine(); } public String getFunc() diff --git a/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialBeginEvent.java b/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialBeginEvent.java index 0585813d0..86fc288f8 100644 --- a/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialBeginEvent.java +++ b/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialBeginEvent.java @@ -175,9 +175,9 @@ public String getDestUniqueId() return rawEvent.getDestUniqueId(); } - public Integer getLine() + public Integer getCodeLine() { - return rawEvent.getLine(); + return rawEvent.getCodeLine(); } public String getDialString() diff --git a/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialEndEvent.java b/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialEndEvent.java index 49d5cc2d0..57da9f234 100644 --- a/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialEndEvent.java +++ b/src/main/java/org/asteriskjava/pbx/asterisk/wrap/events/DialEndEvent.java @@ -185,9 +185,9 @@ public String getDestUniqueId() return rawEvent.getDestUniqueId(); } - public Integer getLine() + public Integer getCodeLine() { - return rawEvent.getLine(); + return rawEvent.getCodeLine(); } public String getDialString() From 83b3d1b657c8663a147564ec36139299facb7724 Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Mon, 20 Jul 2020 16:36:03 +0200 Subject: [PATCH 08/11] MD-12521 - Fix paused reason field --- .../manager/event/QueueMemberEvent.java | 90 +++++++++++-------- .../manager/event/QueueMemberPauseEvent.java | 41 ++------- 2 files changed, 60 insertions(+), 71 deletions(-) diff --git a/src/main/java/org/asteriskjava/manager/event/QueueMemberEvent.java b/src/main/java/org/asteriskjava/manager/event/QueueMemberEvent.java index 381bf39a8..91961de37 100644 --- a/src/main/java/org/asteriskjava/manager/event/QueueMemberEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/QueueMemberEvent.java @@ -21,7 +21,7 @@ * contains information about a member of a queue. *

* It is implemented in apps/app_queue.c - * + * * @see org.asteriskjava.manager.action.QueueStatusAction * @author srt * @version $Id$ @@ -56,11 +56,12 @@ public class QueueMemberEvent extends ResponseEvent private Integer penalty; private Integer callsTaken; private Long lastCall; + private Long lastPause; private Integer status; private Boolean paused; - private String stateinterface; - private Integer incall; - private String pausedreason; + private String stateInterface; + private Integer inCall; + private String pausedReason; private String _interface; @@ -75,7 +76,7 @@ public QueueMemberEvent(Object source) /** * Returns the name of the queue. - * + * * @return the name of the queue. */ public String getQueue() @@ -85,7 +86,7 @@ public String getQueue() /** * Sets the name of the queue. - * + * * @param queue the name of the queue. */ public void setQueue(String queue) @@ -106,7 +107,7 @@ final public String getInterface() /** * Sets the name of the member's interface. - * + * * @param member the name of the member's interface. */ final public void setInterface(String _interface) @@ -139,7 +140,7 @@ final public String getLocation() final public void setLocation(String _interface) { if ((_interface != null) && (!"null".equals(_interface))) - { // Location is not in use since asterisk 12 + { // Location is not in use since asterisk 12 this._interface = _interface; } } @@ -148,7 +149,7 @@ final public void setLocation(String _interface) * Returns if this member has been dynamically added by the QueueAdd command * (in the dialplan or via the Manager API) or if this member is has been * statically defined in queues.conf. - * + * * @return "dynamic" if the added member is a dynamic queue member, "static" * if the added member is a static queue member. */ @@ -160,7 +161,7 @@ public String getMembership() /** * Convenience method that checks whether this member has been statically * defined in queues.conf. - * + * * @return true if this member has been statically defined in * queues.conf, false otherwise. * @since 0.3 @@ -173,7 +174,7 @@ public boolean isStatic() /** * Convenience method that checks whether this member has been dynamically * added by the QueueAdd command. - * + * * @return true if this member has been dynamically added by * the QueueAdd command, false otherwise. * @since 0.3 @@ -185,7 +186,7 @@ public boolean isDynamic() /** * Sets if this member has been dynamically or statically added. - * + * * @param membership "dynamic" if the added member is a dynamic queue * member, "static" if the added member is a static queue member. */ @@ -197,7 +198,7 @@ public void setMembership(String membership) /** * Returns the penalty for the added member. When calls are distributed * members with higher penalties are considered last. - * + * * @return the penalty for the added member. */ public Integer getPenalty() @@ -207,7 +208,7 @@ public Integer getPenalty() /** * Sets the penalty for this member. - * + * * @param penalty the penalty for this member. */ public void setPenalty(Integer penalty) @@ -217,7 +218,7 @@ public void setPenalty(Integer penalty) /** * Returns the number of calls answered by the member. - * + * * @return the number of calls answered by the member. */ public Integer getCallsTaken() @@ -227,7 +228,7 @@ public Integer getCallsTaken() /** * Sets the number of calls answered by the added member. - * + * * @param callsTaken the number of calls answered by the added member. */ public void setCallsTaken(Integer callsTaken) @@ -238,7 +239,7 @@ public void setCallsTaken(Integer callsTaken) /** * Returns the time the last successful call answered by the added member * was hungup. - * + * * @return the time (in seconds since 01/01/1970) the last successful call * answered by the added member was hungup. */ @@ -250,7 +251,7 @@ public Long getLastCall() /** * Sets the time the last successful call answered by this member was * hungup. - * + * * @param lastCall the time (in seconds since 01/01/1970) the last * successful call answered by the added member was hungup. */ @@ -259,6 +260,25 @@ public void setLastCall(Long lastCall) this.lastCall = lastCall; } + /** + * The time when started last pause for queue member. + * + * @return the time (in seconds since 01/01/1970) + */ + public Long getLastPause() + { + return lastPause; + } + + /** + * Sets the time when started last pause for queue member. + * @param lastPause the time (in seconds since 01/01/1970) + */ + public void setLastPause(Long lastPause) + { + this.lastPause = lastPause; + } + /** * Returns the status of this queue member. *

@@ -286,7 +306,7 @@ public void setLastCall(Long lastCall) *

Device is on hold
* - * + * * @return the status of this queue member or null if this * attribute is not supported by your version of Asterisk. * @since 0.2 @@ -298,7 +318,7 @@ public Integer getStatus() /** * Sets the status of this queue member. - * + * * @param status the status of this queue member * @since 0.2 */ @@ -311,7 +331,7 @@ public void setStatus(Integer status) * Is this queue member paused (not accepting calls)? *

* Available since Asterisk 1.2. - * + * * @return Boolean.TRUE if this member has been paused, * Boolean.FALSE if not or null if * pausing is not supported by your version of Asterisk. @@ -324,7 +344,7 @@ public Boolean getPaused() /** * Sets if this member has been paused. - * + * * @since 0.2 */ public void setPaused(Boolean paused) @@ -368,39 +388,37 @@ public void setMemberName(String memberName) /** * @return Name of the interface where device state is taken from. */ - public String getStateinterface() + public String getStateInterface() { - return stateinterface; + return stateInterface; } - public void setStateinterface(String stateinterface) + public void setStateInterface(String stateInterface) { - this.stateinterface = stateinterface; + this.stateInterface = stateInterface; } /** * @return 1 if is incall 0 if not */ - public Integer getIncall() + public Integer getInCall() { - return incall; + return inCall; } - public void setIncall(Integer incall) + public void setInCall(Integer inCall) { - this.incall = incall; + this.inCall = inCall; } - - public String getPausedreason() + public String getPausedReason() { - return pausedreason; + return pausedReason; } - public void setPausedreason(String pausedreason) + public void setPausedReason(String pausedReason) { - this.pausedreason = pausedreason; + this.pausedReason = pausedReason; } - } diff --git a/src/main/java/org/asteriskjava/manager/event/QueueMemberPauseEvent.java b/src/main/java/org/asteriskjava/manager/event/QueueMemberPauseEvent.java index 8070d8286..bf6af8310 100644 --- a/src/main/java/org/asteriskjava/manager/event/QueueMemberPauseEvent.java +++ b/src/main/java/org/asteriskjava/manager/event/QueueMemberPauseEvent.java @@ -6,14 +6,12 @@ public class QueueMemberPauseEvent extends QueueMemberPausedEvent // Logger logger = LogManager.getLogger(); String membership; - Long lastcall; + Long lastCall; Integer callsTaken; Integer penalty; Integer status; Boolean ringinuse; String stateInterface; - Integer incall; - String pausedreason; public QueueMemberPauseEvent(Object source) { @@ -40,17 +38,17 @@ public void setMembership(String membership) /** * @return the lastcall */ - public Long getLastcall() + public Long getLastCall() { - return lastcall; + return lastCall; } /** - * @param lastcall the lastcall to set + * @param lastCall the lastcall to set */ - public void setLastcall(Long lastcall) + public void setLastCall(Long lastCall) { - this.lastcall = lastcall; + this.lastCall = lastCall; } /** @@ -134,31 +132,4 @@ public void setStateInterface(String stateInterface) this.stateInterface = stateInterface; } - /** - * @return get Incall - */ - public Integer getIncall() - { - return incall; - } - - /** - * @param setIncall the incall to set - */ - public void setIncall(Integer incall) - { - this.incall = incall; - } - - public String getPausedreason() - { - return pausedreason; - } - - public void setPausedreason(String pausedreason) - { - this.pausedreason = pausedreason; - } - - } From ac65d597c9a050e23b17e44dcbea093c95360dbe Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Mon, 20 Jul 2020 17:23:08 +0200 Subject: [PATCH 09/11] MD-12521 - Fixed maven central URL --- build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6af40b84c..f2f89fc89 100644 --- a/build.gradle +++ b/build.gradle @@ -13,8 +13,7 @@ sourceCompatibility = 1.7 targetCompatibility = 1.7 repositories { - - maven { url "http://repo.maven.apache.org/maven2" } + mavenCentral() } dependencies { From ecdac9b865b8613e2c570b14b549832cc5df5aca Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Fri, 20 Nov 2020 17:43:56 +0100 Subject: [PATCH 10/11] New attributes added to dtmf action --- .../manager/action/PlayDtmfAction.java | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java b/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java index db4b9c175..3bb003213 100644 --- a/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java +++ b/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java @@ -20,7 +20,7 @@ * The PlayDTMFAction plays a DTMF digit on the specified channel.

* It is definied in apps/app_senddtmf.c.

* Available since Asterisk 1.2.8 - * + * * @since 0.3 * @author srt * @version $Id$ @@ -34,6 +34,8 @@ public class PlayDtmfAction extends AbstractManagerAction private String channel; private String digit; + private Integer duration; + private Boolean receive; /** * Creates a new empty PlayDtmfAction. @@ -45,14 +47,16 @@ public PlayDtmfAction() /** * Creates a new PlayDtmfAction that sends the given DTMF digit to the given channel. - * + * * @param channel the name of the channel to send the digit to. * @param digit the DTML digit to play. */ - public PlayDtmfAction(String channel, String digit) + public PlayDtmfAction(String channel, String digit, Integer duration, Boolean receive) { this.channel = channel; this.digit = digit; + this.duration = duration; + this.receive = receive; } /** @@ -66,7 +70,7 @@ public String getAction() /** * Returns the name of the channel to send the digit to. - * + * * @return the name of the channel to send the digit to. */ public String getChannel() @@ -76,7 +80,7 @@ public String getChannel() /** * Sets the name of the channel to send the digit to. - * + * * @param channel the name of the channel to send the digit to. */ public void setChannel(String channel) @@ -86,7 +90,7 @@ public void setChannel(String channel) /** * Returns the DTMF digit to play. - * + * * @return the DTMF digit to play. */ public String getDigit() @@ -96,11 +100,43 @@ public String getDigit() /** * Sets the DTMF digit to play. - * + * * @param digit the DTMF digit to play. */ public void setDigit(String digit) { this.digit = digit; } + + /** + * The duration, in milliseconds, of the digit to be played. + * @return + */ + public Integer getDuration() { + return duration; + } + + /** + * Set the duration, in milliseconds, of the digit to be played. + * @return + */ + public void setDuration(Integer duration) { + this.duration = duration; + } + + /** + * Emulate receiving DTMF on this channel instead of sending it out. + * @return + */ + public Boolean getReceive() { + return receive; + } + + /** + * Emulate receiving DTMF on this channel instead of sending it out. + * @param receive + */ + public void setReceive(Boolean receive) { + this.receive = receive; + } } From b3a8731f22715dfb929b96d99b32acc8827fa663 Mon Sep 17 00:00:00 2001 From: Stefan Tosic Date: Fri, 20 Nov 2020 17:54:46 +0100 Subject: [PATCH 11/11] New attributes added to dtmf action --- .../manager/action/PlayDtmfAction.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java b/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java index 3bb003213..83088598b 100644 --- a/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java +++ b/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java @@ -51,14 +51,28 @@ public PlayDtmfAction() * @param channel the name of the channel to send the digit to. * @param digit the DTML digit to play. */ - public PlayDtmfAction(String channel, String digit, Integer duration, Boolean receive) + public PlayDtmfAction(String channel, String digit) { this.channel = channel; this.digit = digit; - this.duration = duration; - this.receive = receive; } + /** + * Creates a new PlayDtmfAction that sends the given DTMF digit to the given channel. + * + * @param channel the name of the channel to send the digit to. + * @param digit the DTML digit to play. + * @param duration the duration, in milliseconds, of the digit to be played + * @param receive emulate receiving DTMF on this channel instead of sending it out + */ + public PlayDtmfAction(String channel, String digit, Integer duration, Boolean receive) + { + this.channel = channel; + this.digit = digit; + this.duration = duration; + this.receive = receive; + } + /** * Returns the name of this action, i.e. "PlayDTMF". */