org.freeswitch.esl.client.transport
Class SendMsg

java.lang.Object
  extended by org.freeswitch.esl.client.transport.SendMsg

public class SendMsg
extends Object

Author:
david varnes

Constructor Summary
SendMsg()
          Constructor for use with outbound socket client only.
SendMsg(String uuid)
          Constructor for use with the inbound client.
 
Method Summary
 void addCallCommand(String command)
          Adds the following line to the message:
 void addEventLock()
          Adds the following line to the message:
 void addExecuteAppArg(String arg)
          Adds the following line to the message:
 void addExecuteAppName(String appName)
          Adds the following line to the message:
 void addGenericLine(String name, String value)
          A generic method to add a message line.
 void addHangupCause(String cause)
          Adds the following line to the message:
 void addLoops(int count)
          Adds the following line to the message:
 void addNomediaUuid(String value)
          Adds the following line to the message:
 List<String> getMsgLines()
          The list of strings that make up the message to send to FreeSWITCH.
 boolean hasUuid()
          Indicate if message was constructed with a UUID.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SendMsg

public SendMsg()
Constructor for use with outbound socket client only. This client mode does not need a call UUID for context.


SendMsg

public SendMsg(String uuid)
Constructor for use with the inbound client.

Parameters:
uuid - of the call to send message to (it should be in 'park' to be operated on).
Method Detail

addCallCommand

public void addCallCommand(String command)
Adds the following line to the message:
   call-command: command
 

Parameters:
command - the string command [ execute | hangup ]

addExecuteAppName

public void addExecuteAppName(String appName)
Adds the following line to the message:
   execute-app-name: appName
 

Parameters:
appName - the string app name to execute

addExecuteAppArg

public void addExecuteAppArg(String arg)
Adds the following line to the message:
   execute-app-arg: arg
 

Parameters:
arg - the string arg

addLoops

public void addLoops(int count)
Adds the following line to the message:
   loops: count
 

Parameters:
count - the int number of times to loop

addHangupCause

public void addHangupCause(String cause)
Adds the following line to the message:
   hangup-cause: cause
 

Parameters:
cause - the string cause

addNomediaUuid

public void addNomediaUuid(String value)
Adds the following line to the message:
   nomedia-uid: value
 

Parameters:
value - the string value part of the line

addEventLock

public void addEventLock()
Adds the following line to the message:
    event-lock: true
  


addGenericLine

public void addGenericLine(String name,
                           String value)
A generic method to add a message line. The constructed line in the sent message will be in the form:
   name: value
 

Parameters:
name - part of line
value - part of line

getMsgLines

public List<String> getMsgLines()
The list of strings that make up the message to send to FreeSWITCH.

Returns:
list of strings, as they were added to this message.

hasUuid

public boolean hasUuid()
Indicate if message was constructed with a UUID.

Returns:
true if constructed with a UUID.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 david varnes. All Rights Reserved.