All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.asteriskjava.pbx.asterisk.wrap.actions.HangupAction Maven / Gradle / Ivy

There is a newer version: 3.41.0
Show newest version
package org.asteriskjava.pbx.asterisk.wrap.actions;

import org.asteriskjava.pbx.Channel;

public class HangupAction extends AbstractManagerAction {

    private final Channel _channel;
    private Integer _cause;

    public HangupAction(final Channel channel) {
        this._channel = channel;
    }

    @Override
    public org.asteriskjava.manager.action.ManagerAction getAJAction() {
        final org.asteriskjava.manager.action.HangupAction action = new org.asteriskjava.manager.action.HangupAction();
        action.setActionId(this.getActionId());
        action.setCause(this._cause);
        action.setChannel(this._channel.getChannelName());

        return action;
    }

    public Channel getChannel() {
        return this._channel;
    }

    public String toString() {
        return "HangupAction: channel=" + this._channel + " cause=" + this._cause; //$NON-NLS-1$ //$NON-NLS-2$
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy