net.sf.asterisk.manager.action
Class MonitorAction

java.lang.Object
  extended by net.sf.asterisk.manager.action.AbstractManagerAction
      extended by net.sf.asterisk.manager.action.MonitorAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class MonitorAction
extends AbstractManagerAction

The MonitorAction starts monitoring (recording) a channel.
It is implemented in res/res_monitor.c

Version:
$Id: MonitorAction.java,v 1.4 2005/08/07 16:43:29 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
MonitorAction()
          Creates a new empty MonitorAction.
MonitorAction(java.lang.String channel, java.lang.String file)
          Creates a new MonitorAction that starts monitoring the given channel and writes voice data to the given file(s).
MonitorAction(java.lang.String channel, java.lang.String file, java.lang.String format)
          Creates a new MonitorAction that starts monitoring the given channel and writes voice data to the given file(s).
MonitorAction(java.lang.String channel, java.lang.String file, java.lang.String format, java.lang.Boolean mix)
          Creates a new MonitorAction that starts monitoring the given channel and writes voice data to the given file(s).
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getChannel()
          Returns the name of the channel to monitor.
 java.lang.String getFile()
          Returns the name of the file to which the voice data is written.
 java.lang.String getFormat()
          Returns the format to use for encoding the voice files.
 java.lang.Boolean getMix()
          Returns true if the two voice files should be joined at the end of the call.
 void setChannel(java.lang.String channel)
          Sets the name of the channel to monitor.
This property is mandatory.
 void setFile(java.lang.String file)
          Sets the (base) name of the file(s) to which the voice data is written.
If this property is not set it defaults to to the channel name as per CLI with the '/' replaced by '-'.
 void setFormat(java.lang.String format)
          Sets the format to use for encoding the voice files.
If this property is not set it defaults to "wav".
 void setMix(java.lang.Boolean mix)
          Set to true if the two voice files should be joined at the end of the call.
 
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonitorAction

public MonitorAction()
Creates a new empty MonitorAction.


MonitorAction

public MonitorAction(java.lang.String channel,
                     java.lang.String file)
Creates a new MonitorAction that starts monitoring the given channel and writes voice data to the given file(s).

Parameters:
channel - the name of the channel to monitor
file - the (base) name of the file(s) to which the voice data is written
Since:
0.2

MonitorAction

public MonitorAction(java.lang.String channel,
                     java.lang.String file,
                     java.lang.String format)
Creates a new MonitorAction that starts monitoring the given channel and writes voice data to the given file(s).

Parameters:
channel - the name of the channel to monitor
file - the (base) name of the file(s) to which the voice data is written
format - the format to use for encoding the voice files
Since:
0.2

MonitorAction

public MonitorAction(java.lang.String channel,
                     java.lang.String file,
                     java.lang.String format,
                     java.lang.Boolean mix)
Creates a new MonitorAction that starts monitoring the given channel and writes voice data to the given file(s).

Parameters:
channel - the name of the channel to monitor
file - the (base) name of the file(s) to which the voice data is written
format - the format to use for encoding the voice files
mix - true if the two voice files should be joined at the end of the call
Since:
0.2
Method Detail

getAction

public java.lang.String getAction()
Returns the name of this action, i.e. "Monitor".

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction

getChannel

public java.lang.String getChannel()
Returns the name of the channel to monitor.


setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel to monitor.
This property is mandatory.


getFile

public java.lang.String getFile()
Returns the name of the file to which the voice data is written.


setFile

public void setFile(java.lang.String file)
Sets the (base) name of the file(s) to which the voice data is written.
If this property is not set it defaults to to the channel name as per CLI with the '/' replaced by '-'.


getFormat

public java.lang.String getFormat()
Returns the format to use for encoding the voice files.


setFormat

public void setFormat(java.lang.String format)
Sets the format to use for encoding the voice files.
If this property is not set it defaults to "wav".


getMix

public java.lang.Boolean getMix()
Returns true if the two voice files should be joined at the end of the call.


setMix

public void setMix(java.lang.Boolean mix)
Set to true if the two voice files should be joined at the end of the call.



Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.