diff --git a/.gitignore b/.gitignore
index 647fe6c60..e3e218580 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ classes
build/
/.settings/
/.metadata/
+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 @@
+ * 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 extends ResponseEvent> getActionCompleteEventClass() { + return OutboundRegistrationDetailCompleteEvent.class; + } +} 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/action/PlayDtmfAction.java b/src/main/java/org/asteriskjava/manager/action/PlayDtmfAction.java index db4b9c175..83088598b 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,7 +47,7 @@ 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. */ @@ -55,6 +57,22 @@ public PlayDtmfAction(String channel, String digit) this.digit = digit; } + /** + * 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". */ @@ -66,7 +84,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 +94,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 +104,7 @@ public void setChannel(String channel) /** * Returns the DTMF digit to play. - * + * * @return the DTMF digit to play. */ public String getDigit() @@ -96,11 +114,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; + } } 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..bcf560d06 --- /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/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..be4af0752 --- /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 String 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 or N/A
+ */
+ public String getRoundtripUsec() {
+ return roundtripUsec;
+ }
+
+ /**
+ * @param roundtripUsec
+ */
+ public void setRoundtripUsec(String roundtripUsec) {
+ this.roundtripUsec = roundtripUsec;
+ }
+}
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/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..8e520d808
--- /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 Integer maxRetries;
+ private String clientUri;
+ private Boolean authRejectionPermanent;
+ private String serverUri;
+ private Boolean supportPath;
+ private Integer retryInterval;
+ private Integer expiration;
+ private String transport;
+ private Boolean line;
+ private String contactUser;
+ private String endpoint;
+ private Integer forbiddenRetryInterval;
+ private String outboundAuth;
+ private String outboundProxy;
+ private Integer fatalRetryInterval;
+ private String status;
+ private Integer 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 Integer getMaxRetries() {
+ return maxRetries;
+ }
+
+ /**
+ * @param maxRetries
+ */
+ public void setMaxRetries(Integer 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 Integer getRetryInterval() {
+ return retryInterval;
+ }
+
+ /**
+ * @param retryInterval
+ */
+ public void setRetryInterval(Integer retryInterval) {
+ this.retryInterval = retryInterval;
+ }
+
+ /**
+ * @return
+ */
+ public Integer getExpiration() {
+ return expiration;
+ }
+
+ /**
+ * @param expiration
+ */
+ public void setExpiration(Integer 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 Integer getForbiddenRetryInterval() {
+ return forbiddenRetryInterval;
+ }
+
+ /**
+ * @param forbiddenRetryInterval
+ */
+ public void setForbiddenRetryInterval(Integer 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 Integer getFatalRetryInterval() {
+ return fatalRetryInterval;
+ }
+
+ /**
+ * @param fatalRetryInterval
+ */
+ public void setFatalRetryInterval(Integer fatalRetryInterval) {
+ this.fatalRetryInterval = fatalRetryInterval;
+ }
+
+ /**
+ * @return
+ */
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * @param status
+ */
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ /**
+ * @return
+ */
+ public Integer getNextReg() {
+ return nextReg;
+ }
+
+ /**
+ * @param nextReg
+ */
+ public void setNextReg(Integer nextReg) {
+ this.nextReg = nextReg;
+ }
+}
+
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) *
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;
- }
-
-
}
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()