com.safi.asterisk.examples
Class MonkeyPlayerExample

java.lang.Object
  extended by com.safi.asterisk.examples.MonkeyPlayerExample
All Implemented Interfaces:
AgentEventListener, CallEventListener, CommandEventListener, LogEventListener, SafiAppListener, SystemEventListener, UserEventListener, VerboseEventListener, java.util.EventListener

public class MonkeyPlayerExample
extends java.lang.Object
implements AgentEventListener, CallEventListener, CommandEventListener, LogEventListener, SystemEventListener, UserEventListener, VerboseEventListener, SafiAppListener

Author:
Zac Wolfe TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
MonkeyPlayerExample(boolean startAsterisk)
           
 
Method Summary
 void agentEvent(AgentEvent event)
           
static int astStateStr2State(java.lang.String state)
           
 void callEvent(CallEvent event)
           
 void commandEvent(CommandEvent event)
           
 void doHangup(ast_channel chan)
           
 boolean isAlive(ast_channel chan)
           
 void logEvent(LogEvent event)
           
static void main(java.lang.String[] args)
           
 void playMonkeys(ast_channel channel)
           
 void safiCall(java.lang.String channelid)
           
static void shutdown(boolean nice, boolean safe, boolean restart)
           
 void startAsterisk(java.lang.String opts, boolean newthread, boolean startAsterisk)
           
 void systemEvent(SystemEvent event)
           
 void userEvent(UserEvent event)
           
 void verboseEvent(VerboseEvent event)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonkeyPlayerExample

public MonkeyPlayerExample(boolean startAsterisk)
Method Detail

astStateStr2State

public static int astStateStr2State(java.lang.String state)

startAsterisk

public void startAsterisk(java.lang.String opts,
                          boolean newthread,
                          boolean startAsterisk)

shutdown

public static void shutdown(boolean nice,
                            boolean safe,
                            boolean restart)

isAlive

public boolean isAlive(ast_channel chan)

doHangup

public void doHangup(ast_channel chan)

agentEvent

public void agentEvent(AgentEvent event)
Specified by:
agentEvent in interface AgentEventListener

callEvent

public void callEvent(CallEvent event)
Specified by:
callEvent in interface CallEventListener

commandEvent

public void commandEvent(CommandEvent event)
Specified by:
commandEvent in interface CommandEventListener

logEvent

public void logEvent(LogEvent event)
Specified by:
logEvent in interface LogEventListener

systemEvent

public void systemEvent(SystemEvent event)
Specified by:
systemEvent in interface SystemEventListener

userEvent

public void userEvent(UserEvent event)
Specified by:
userEvent in interface UserEventListener

verboseEvent

public void verboseEvent(VerboseEvent event)
Specified by:
verboseEvent in interface VerboseEventListener

safiCall

public void safiCall(java.lang.String channelid)
Specified by:
safiCall in interface SafiAppListener

playMonkeys

public void playMonkeys(ast_channel channel)

main

public static void main(java.lang.String[] args)