org.asteriskjava.pbx.asterisk.wrap.actions.PlayDtmfAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asterisk-java Show documentation
Show all versions of asterisk-java Show documentation
The free Java library for Asterisk PBX integration.
package org.asteriskjava.pbx.asterisk.wrap.actions;
import org.asteriskjava.manager.action.ManagerAction;
import org.asteriskjava.pbx.Channel;
import org.asteriskjava.pbx.DTMFTone;
public class PlayDtmfAction extends AbstractManagerAction
{
private final Channel _channel;
private final DTMFTone _tone;
public PlayDtmfAction(final Channel channel, final DTMFTone tone)
{
this._channel = channel;
this._tone = tone;
}
@Override
public ManagerAction getAJAction()
{
final org.asteriskjava.manager.action.PlayDtmfAction action = new org.asteriskjava.manager.action.PlayDtmfAction();
action.setActionId(this.getActionId());
action.setChannel(this._channel.getChannelName());
action.setDigit(this._tone.toString());
return action;
}
public String toString()
{
return "PlayDtmfAction: channel=" + this._channel + " tone=" + this._tone; //$NON-NLS-1$ //$NON-NLS-2$
}
}