forked from asterisk-java/asterisk-java
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:srt/asterisk-java
- Loading branch information
Showing
5 changed files
with
375 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/main/java/org/asteriskjava/manager/action/DAHDIShowChannelsAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* 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.DahdiShowChannelsCompleteEvent; | ||
import org.asteriskjava.manager.event.ResponseEvent; | ||
|
||
/** | ||
* The DahdiShowChannelsAction requests the state of all Dahdi channels.<p> | ||
* For each Dahdi channel aDahdiShowChannelsEvent is generated. After all Dahdi | ||
* channels have been listed a DahdiShowChannelsCompleteEvent is generated. | ||
* | ||
* @see org.asteriskjava.manager.event.DahdiShowChannelsEvent | ||
* @see org.asteriskjava.manager.event.DahdiShowChannelsCompleteEvent | ||
* @author srt | ||
* @version $Id$ | ||
*/ | ||
public class DahdiShowChannelsAction extends AbstractManagerAction | ||
implements | ||
EventGeneratingAction | ||
{ | ||
/** | ||
* Serializable version identifier | ||
*/ | ||
private static final long serialVersionUID = 8697000330085766825L; | ||
|
||
/** | ||
* Creates a new DahdiShowChannelsAction. | ||
*/ | ||
public DahdiShowChannelsAction() | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* Returns the name of this action, i.e. "DahdiShowChannels". | ||
*/ | ||
@Override | ||
public String getAction() | ||
{ | ||
return "DahdiShowChannels"; | ||
} | ||
|
||
public Class<? extends ResponseEvent> getActionCompleteEventClass() | ||
{ | ||
return DahdiShowChannelsCompleteEvent.class; | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
src/main/java/org/asteriskjava/manager/event/DAHDIShowChannelsCompleteEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* 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 DahdiShowChannelsCompleteEvent is triggered after the state of all Dahdi channels has been reported | ||
* in response to a DahdiShowChannelsAction. | ||
* | ||
* @see org.asteriskjava.manager.action.DahdiShowChannelsAction | ||
* @see org.asteriskjava.manager.event.DahdiShowChannelsEvent | ||
* | ||
* @author srt | ||
* @version $Id$ | ||
*/ | ||
public class DahdiShowChannelsCompleteEvent extends ResponseEvent | ||
{ | ||
/** | ||
* Serial version identifier | ||
*/ | ||
private static final long serialVersionUID = 6323249250335885462L; | ||
|
||
private Integer listitems; | ||
private String eventlist; | ||
private Integer items; | ||
|
||
public Integer getItems() { | ||
return items; | ||
} | ||
|
||
public void setItems(Integer items) { | ||
this.items = items; | ||
} | ||
|
||
/** | ||
* @param source | ||
*/ | ||
public DahdiShowChannelsCompleteEvent(Object source) | ||
{ | ||
super(source); | ||
} | ||
|
||
/** | ||
* Returns if the status of the eventlist (should be Complete).<p> | ||
* | ||
* @return the status of the list. | ||
* @since 1.0.0 | ||
*/ | ||
public String getEventlist() | ||
{ | ||
return eventlist; | ||
} | ||
|
||
public void setEventlist(String eventlist) | ||
{ | ||
this.eventlist = eventlist; | ||
} | ||
|
||
/** | ||
* Returns the number of channels reported.<p> | ||
* | ||
* @return the number of channels reported. | ||
*/ | ||
public Integer getListitems() | ||
{ | ||
return listitems; | ||
} | ||
|
||
/** | ||
* Sets the number of channels reported.<p> | ||
* | ||
* @param items the number of channels reported. | ||
*/ | ||
public void setListitems(Integer listitems) | ||
{ | ||
this.listitems = listitems; | ||
} | ||
|
||
} |
204 changes: 204 additions & 0 deletions
204
src/main/java/org/asteriskjava/manager/event/DAHDIShowChannelsEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
/* | ||
* 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 DahdiShowChannelsEvent is triggered in response to a DahdiShowChannelsAction and shows the state of | ||
* a Dahdi channel. | ||
* | ||
* @see org.asteriskjava.manager.action.DahdiShowChannelsAction | ||
* | ||
* @author srt | ||
* @version $Id$ | ||
*/ | ||
public class DahdiShowChannelsEvent extends ResponseEvent | ||
{ | ||
/** | ||
* Serial version identifier | ||
*/ | ||
private static final long serialVersionUID = -3613642267527361400L; | ||
private Integer Dahdichannel; | ||
private String signalling; | ||
private String signallingcode; | ||
private String context; | ||
private Boolean dnd; | ||
private String alarm; | ||
private String uniqueid; | ||
private String accountcode; | ||
private String channel; | ||
|
||
public String getAccountcode() { | ||
return accountcode; | ||
} | ||
|
||
public void setAccountcode(String accountcode) { | ||
this.accountcode = accountcode; | ||
} | ||
|
||
public String getChannel() { | ||
return channel; | ||
} | ||
|
||
public void setChannel(String channel) { | ||
this.channel = channel; | ||
} | ||
|
||
public Integer getDahdichannel() { | ||
return Dahdichannel; | ||
} | ||
|
||
public void setDahdichannel(Integer Dahdichannel) { | ||
this.Dahdichannel = Dahdichannel; | ||
} | ||
|
||
public String getSignallingcode() { | ||
return signallingcode; | ||
} | ||
|
||
public void setSignallingcode(String signallingcode) { | ||
this.signallingcode = signallingcode; | ||
} | ||
|
||
public String getUniqueid() { | ||
return uniqueid; | ||
} | ||
|
||
public void setUniqueid(String uniqueid) { | ||
this.uniqueid = uniqueid; | ||
} | ||
|
||
|
||
|
||
|
||
/** | ||
* @param source | ||
*/ | ||
public DahdiShowChannelsEvent(Object source) | ||
{ | ||
super(source); | ||
} | ||
|
||
|
||
/** | ||
* Returns the signalling of this Dahdi channel.<p> | ||
* Possible values are: | ||
* <ul> | ||
* <li>E & M Immediate</li> | ||
* <li>E & M Wink</li> | ||
* <li>E & M E1</li> | ||
* <li>Feature Group D (DTMF)</li> | ||
* <li>Feature Group D (MF)</li> | ||
* <li>Feature Group B (MF)</li> | ||
* <li>E911 (MF)</li> | ||
* <li>FXS Loopstart</li> | ||
* <li>FXS Groundstart</li> | ||
* <li>FXS Kewlstart</li> | ||
* <li>FXO Loopstart</li> | ||
* <li>FXO Groundstart</li> | ||
* <li>FXO Kewlstart</li> | ||
* <li>PRI Signalling</li> | ||
* <li>R2 Signalling</li> | ||
* <li>SF (Tone) Signalling Immediate</li> | ||
* <li>SF (Tone) Signalling Wink</li> | ||
* <li>SF (Tone) Signalling with Feature Group D (DTMF)</li> | ||
* <li>SF (Tone) Signalling with Feature Group D (MF)</li> | ||
* <li>SF (Tone) Signalling with Feature Group B (MF)</li> | ||
* <li>GR-303 Signalling with FXOKS</li> | ||
* <li>GR-303 Signalling with FXSKS</li> | ||
* <li>Pseudo Signalling</li> | ||
* </ul> | ||
*/ | ||
public String getSignalling() | ||
{ | ||
return signalling; | ||
} | ||
|
||
/** | ||
* Sets the signalling of this Dahdi channel. | ||
*/ | ||
public void setSignalling(String signalling) | ||
{ | ||
this.signalling = signalling; | ||
} | ||
|
||
|
||
|
||
/** | ||
* Returns the context of this Dahdi channel as defined in <code>chan_Dahdi.conf</code>. | ||
*/ | ||
public String getContext() | ||
{ | ||
return context; | ||
} | ||
|
||
/** | ||
* Sets the context of this Dahdi channel. | ||
*/ | ||
public void setContext(String context) | ||
{ | ||
this.context = context; | ||
} | ||
|
||
/** | ||
* Returns whether dnd (do not disturb) is enabled for this Dahdi channel. | ||
* | ||
* @return Boolean.TRUE if dnd is enabled, Boolean.FALSE if it is disabled, | ||
* <code>null</code> if not set. | ||
* @since 0.3 | ||
*/ | ||
public Boolean getDnd() | ||
{ | ||
return dnd; | ||
} | ||
|
||
/** | ||
* Sets whether dnd (do not disturb) is enabled for this Dahdi channel. | ||
* | ||
* @param dnd Boolean.TRUE if dnd is enabled, Boolean.FALSE if it is disabled. | ||
* @since 0.3 | ||
*/ | ||
public void setDnd(Boolean dnd) | ||
{ | ||
this.dnd = dnd; | ||
} | ||
|
||
/** | ||
* Returns the alarm state of this Dahdi channel.<p> | ||
* This may be one of | ||
* <ul> | ||
* <li>Red Alarm</li> | ||
* <li>Yellow Alarm</li> | ||
* <li>Blue Alarm</li> | ||
* <li>Recovering</li> | ||
* <li>Loopback</li> | ||
* <li>Not Open</li> | ||
* <li>No Alarm</li> | ||
* </ul> | ||
*/ | ||
public String getAlarm() | ||
{ | ||
return alarm; | ||
} | ||
|
||
/** | ||
* Sets the alarm state of this Dahdi channel. | ||
*/ | ||
public void setAlarm(String alarm) | ||
{ | ||
this.alarm = alarm; | ||
} | ||
} |
Oops, something went wrong.