|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sipresponse.flibblecallmgr.CallManager
public class CallManager
Object is central to flibble-voip. Allows for call control and media control. Provides a simple to use interface for controlling SIP based calls.
| Field Summary | |
|---|---|
static java.lang.String |
AUTO_DISCOVER
|
| Constructor Summary | |
|---|---|
CallManager()
Constructor. |
|
| Method Summary | |
|---|---|
FlibbleResult |
acceptCall(java.lang.String callHandle,
int statusCode)
Accepts an invite from a remote party, sending a non final response |
java.lang.String |
addLine(java.lang.String sipUriString,
java.lang.String displayName,
boolean register,
int registerPeriod,
java.lang.String password)
Creates a line entity associated with a SIP URL (display name + uri). |
void |
addListener(FlibbleListener listener)
Sets an object to receive Flibble Events. |
FlibbleResult |
answerCall(java.lang.String callHandle,
MediaSourceType mediaSourceType,
java.lang.String mediaFilename,
boolean loop,
int initialVolume,
int initialGain)
Answers an invite from a remote party, sending a final 200 OK response |
FlibbleResult |
blindTransfer(java.lang.String callHandle,
java.lang.String targetUri)
Transfers a currently connected call by sending a REFER message to the remote party. |
FlibbleResult |
changeMediaSource(java.lang.String callHandle,
MediaSourceType mediaSourceType,
java.lang.String mediaFilename,
boolean loop)
Changes the media source for a call in progress. |
java.lang.String |
createCall(java.lang.String lineHandle,
java.lang.String sipUriString)
Creates a call entity on the requested line |
void |
destroyCallManager()
Tears down this call manager. |
FlibbleResult |
enableEchoSuppression(boolean enable,
float percentSuppression)
Enables local echo suppression. |
FlibbleResult |
endCall(java.lang.String callHandle)
Ends a currently connected call by sending a BYE message to the remote party. |
CallData |
getCallData(java.lang.String callHandle)
|
java.lang.String |
getContactIp()
|
java.lang.String |
getDomain()
|
java.lang.String |
getLocalIp()
|
int |
getMediaPortEnd()
|
int |
getMediaPortStart()
|
java.lang.String |
getProxyAddress()
|
int |
getProxyPort()
|
java.lang.String |
getPublicIp()
|
java.lang.String |
getStunServer()
|
int |
getUdpSipPort()
|
java.lang.String |
getUserAgent()
|
boolean |
getUseSoundCard()
|
FlibbleResult |
holdCall(java.lang.String callHandle,
boolean hold,
int volume)
Puts a call on hold, or takes a call off hold, in a asynchronous manner. |
FlibbleResult |
holdCallSynchronous(java.lang.String callHandle,
boolean hold,
int volume,
int timeout)
Puts a call on hold, or takes a call off hold, in a synchronous manner. |
FlibbleResult |
initialize()
Initializes the CallManager by loading the default property file, "flibble.properties", |
FlibbleResult |
initialize(java.lang.String filename)
Initializes the CallManager by loading the default property file specified by the filename |
FlibbleResult |
initialize(java.lang.String localIp,
int udpSipPort,
int mediaPortStart,
int mediaPortEnd,
java.lang.String domain,
java.lang.String proxyAddress,
int proxyPort,
java.lang.String stunServer,
java.lang.String userAgent,
boolean useSoundCard,
java.lang.String mediaPluginClass)
Initializes the CallManager. |
FlibbleResult |
joinCalls(CallData[] calls)
Joins currently connected calls into a conference (CURRENTLY UNIMPLEMENTED) |
FlibbleResult |
joinCalls(java.util.Vector<CallData> calls)
Joins currently connected calls into a conference (CURRENTLY UNIMPLEMENTED) |
FlibbleResult |
placeCall(java.lang.String callHandle,
MediaSourceType mediaSourceType,
java.lang.String filename,
boolean loop,
int initialVolume,
int initialGain)
Sends an INVITE to the remote party. |
FlibbleResult |
playFileLocally(java.net.URL url,
boolean loop,
int volume)
Plays a media file to the system's audio playout device. |
void |
removeAllListeners()
Removes aLL objectS from the list of objects to receive Flibble Events. |
void |
removeListener(FlibbleListener listener)
Removes an object from the list of objects to receive Flibble Events. |
void |
sendDtmf(java.lang.String callHandle,
int dtmfCode)
Sends a dtmf event to the remote party of the call. |
FlibbleResult |
setCallVolume(java.lang.String callHandle,
int vol)
Sets the call playout volume for a specific call. |
FlibbleResult |
setGain(int gain)
Sets the microphone gain level. |
void |
setPublicIp(java.lang.String publicIp)
|
void |
setUdpSipPort(int udpSipPort)
|
void |
setVolume(int vol)
Sets the audio playout volume for non-call related scenarios, such as local media file playout. |
FlibbleResult |
stopFileLocally(java.net.URL url)
Stops local playout of a media file. |
FlibbleResult |
stopLocalPlayoutAll()
Stops local playout of all media files. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String AUTO_DISCOVER
| Constructor Detail |
|---|
public CallManager()
| Method Detail |
|---|
public FlibbleResult initialize()
throws java.io.IOException,
java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
public FlibbleResult initialize(java.lang.String filename)
throws java.io.IOException,
java.lang.IllegalArgumentException
filename - The filename of property file to be used for initialization.
java.io.IOException
java.lang.IllegalArgumentException
public FlibbleResult initialize(java.lang.String localIp,
int udpSipPort,
int mediaPortStart,
int mediaPortEnd,
java.lang.String domain,
java.lang.String proxyAddress,
int proxyPort,
java.lang.String stunServer,
java.lang.String userAgent,
boolean useSoundCard,
java.lang.String mediaPluginClass)
throws java.lang.IllegalArgumentException
localIp - -
The IP address to be bound to for receiving SIP messages. This
address (or the associated public address, if STUN is enabled)
will appear in the SIP contact and via headers, and in the
SDP's origin and destination headers.udpSipPort - The udp port for receiving and sending SIP messages.mediaPortStart - The start of the range of allowable ports for use with RTP.mediaPortEnd - The end of the range of allowable ports for use with RTP.proxyAddress - SIP proxy address or host name.proxyPort - Port value for the SIP proxy.stunServer - The stun server name or address to be used for STUN discovery.useSoundCard - True if the application wishes to use an audio hardware
device. Otherwise, false.mediaPluginClass - Full classpath and name of the the media plugin class. Can
be set to null to indicate usage of the default media plugin.
java.lang.IllegalArgumentException
public java.lang.String addLine(java.lang.String sipUriString,
java.lang.String displayName,
boolean register,
int registerPeriod,
java.lang.String password)
sipUriString - -
The SIP uri associated with this line. eg
"sip:foo@example.com"displayName - -
Display name portion of the SIP URL for this line. Useful for
caller ID.register - -
Whether or not to perform SIP registration with the proxy.registerPeriod - -
The requested period (in seconds) of the registration.password - -
A password used for registration authentication.
public java.lang.String createCall(java.lang.String lineHandle,
java.lang.String sipUriString)
lineHandle - The line handle to be used for the call.sipUriString - The callee's SIP uri.
public FlibbleResult placeCall(java.lang.String callHandle,
MediaSourceType mediaSourceType,
java.lang.String filename,
boolean loop,
int initialVolume,
int initialGain)
callHandle - The call handle obtained by invoking createCall.mediaSourceType - Type of media source to send to the remote endpoint of the call.filename - For file media types, the filename of the .wav file to be
used as a media source.loop - For file media types, and indication of the desired looping behaviorinitialVolume - Initial volume for audio playout. Valid values are between 0 and 100, inclusiveinitialGain - Initial microphone gain. Valid values are between 0 and 100, inclusive
public FlibbleResult joinCalls(CallData[] calls)
calls - array of calls to be joined into a conference.
public FlibbleResult joinCalls(java.util.Vector<CallData> calls)
calls - array of calls to be joined into a conference.
public FlibbleResult endCall(java.lang.String callHandle)
callHandle - Handle of the call to end.
public FlibbleResult acceptCall(java.lang.String callHandle,
int statusCode)
callHandle - - Handle of the call to be acceptedstatusCode - - The non final response code to send back to the remote party.
For example, a 180 Ringing response.
public FlibbleResult answerCall(java.lang.String callHandle,
MediaSourceType mediaSourceType,
java.lang.String mediaFilename,
boolean loop,
int initialVolume,
int initialGain)
callHandle - Handle of the call to be answered.mediaSourceType - Type of media source to send to the remote endpoint of the call.filename - For file media types, the filename of the .wav file to be
used as a media source.loop - For file media types, and indication of the desired looping behaviorinitialVolume - Initial volume for audio playout. Valid values are between 0 and 100, inclusiveinitialGain - Initial microphone gain. Valid values are between 0 and 100, inclusive
public FlibbleResult changeMediaSource(java.lang.String callHandle,
MediaSourceType mediaSourceType,
java.lang.String mediaFilename,
boolean loop)
callHandle - Handle of the call.mediaSourceType - Type of media source to send to the remote endpoint of the call.filename - For file media types, the filename of the .wav file to be
used as a media source.loop - For file media types, and indication of the desired looping behaviorinitialVolume - Initial volume for audio playout. Valid values are between 0 and 100, inclusiveinitialGain - Initial microphone gain. Valid values are between 0 and 100, inclusive
public FlibbleResult enableEchoSuppression(boolean enable,
float percentSuppression)
enable - Enables or disables echo suppression.percentSuppression - The percent of echo suppression to use.
(100% will mute the microphone during above-threshold local audio playout)
public FlibbleResult setGain(int gain)
gain - Gain level (valid values are 0 - 100)
public FlibbleResult setCallVolume(java.lang.String callHandle,
int vol)
callHandle - vol -
public void setVolume(int vol)
vol -
public FlibbleResult playFileLocally(java.net.URL url,
boolean loop,
int volume)
url - - Url of the media file.loop - - Looping preference.volume - Volume (valid values are 0 - 100)
public FlibbleResult stopFileLocally(java.net.URL url)
url - Url of the media file to be stopped.
public FlibbleResult stopLocalPlayoutAll()
public FlibbleResult holdCallSynchronous(java.lang.String callHandle,
boolean hold,
int volume,
int timeout)
callHandle - The call to put on or off hold.hold - On-hold or off-hold preferencevolume - For off-hold operations, the local playout volume
at which to resume the call.timeout - Maximum time to wait for a hold operation to complete
public FlibbleResult holdCall(java.lang.String callHandle,
boolean hold,
int volume)
callHandle - The call to put on or off hold.hold - On-hold or off-hold preferencevolume - For off-hold operations, the local playout volume
at which to resume the call.
public FlibbleResult blindTransfer(java.lang.String callHandle,
java.lang.String targetUri)
callHandle - Handle of the call to transfer.targetUri - URI of the transfer target.
public void sendDtmf(java.lang.String callHandle,
int dtmfCode)
callHandle - - Handle of the call for the sending of dtmf.dtmfCode - - 0-9 for digits 0 to 9, * is 10, # is 11.public void addListener(FlibbleListener listener)
listener - Listener to add.public void removeListener(FlibbleListener listener)
listener - Listener to remove.public void removeAllListeners()
public java.lang.String getLocalIp()
public int getMediaPortEnd()
public int getMediaPortStart()
public java.lang.String getDomain()
public java.lang.String getProxyAddress()
public int getProxyPort()
public int getUdpSipPort()
public void setUdpSipPort(int udpSipPort)
public boolean getUseSoundCard()
public CallData getCallData(java.lang.String callHandle)
public java.lang.String getPublicIp()
public void setPublicIp(java.lang.String publicIp)
public java.lang.String getContactIp()
public java.lang.String getUserAgent()
public java.lang.String getStunServer()
public void destroyCallManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||