org.asteriskjava.pbx.asterisk.wrap.events.UnparkedCallEvent 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.events;
import org.asteriskjava.pbx.Channel;
import org.asteriskjava.pbx.InvalidChannelName;
import org.asteriskjava.pbx.PBXFactory;
import org.asteriskjava.pbx.internal.core.AsteriskPBX;
import org.asteriskjava.pbx.internal.core.ChannelImpl;
public class UnparkedCallEvent extends AbstractParkedCallEvent {
private static final long serialVersionUID = 1L;
private final Channel fromChannel;
public UnparkedCallEvent(final org.asteriskjava.manager.event.UnparkedCallEvent event) throws InvalidChannelName {
super(event);
final AsteriskPBX pbx = (AsteriskPBX) PBXFactory.getActivePBX();
this.fromChannel = pbx.internalRegisterChannel(event.getParkerDialString(), ChannelImpl.UNKNOWN_UNIQUE_ID);
}
public Channel getFromChannel() {
return this.fromChannel;
}
}