interface .HWTEL

Telephony control interface.

Public Methods

[more]SLHWTEL_API SLresult SLhwTelInit(void *args)
Initializes the Telephony platform.
[more]SLHWTEL_API SLresult SLhwTelShutdown(void *args)
Shutdown the telephony platform.
[more]SLHWTEL_API SLresult SLhwTelGetProperty(SLchar *prop_name, SLValue *value)
Gets the value of a property of the underlying hardware.
[more]SLHWTEL_API SLresult SLhwTelSetProperty(SLchar *prop_name, SLValue *value)
Sets the value of a property of the underlying hardware.
[more]SLHWTEL_API SLresult SLhwTelProperties(SLVector *prop_names)
Gets the list of available properties.
[more]SLHWTEL_API SLresult SLhwTelReserveChannel(SLhwTelChn** channel)
Reserves an idle channel.
[more]SLHWTEL_API SLresult SLhwTelReleaseChannel(SLhwTelChn* channel)
Releases resources associated with channel and puts it back on the list of idle channels.
[more]SLHWTEL_API SLresult SLhwTelChnOpen(SLhwTelChn *channel)
Opens a channel to receive or initiate calls.
[more]SLHWTEL_API SLresult SLhwTelChnClose(SLhwTelChn *channel)
Closes a channel previously opened with SLhwTelChnOpen().
[more]SLHWTEL_API SLresult SLhwTelChnAddCallback(SLtelEvent e, SLhwTelChn* channel, SLhwTelEventInfo *info)
Adds an event callback for the specified event and channel.
[more]SLHWTEL_API SLresult SLhwTelChnRemoveCallback(SLtelEvent e, SLhwTelChn* channel, SLhwTelEventInfo *info)
Removes the callback from the list of callbacks.
[more]SLHWTEL_API SLresult SLhwTelChnGetProperty(SLhwTelChn *channel, SLchar *prop_name, SLValue *value)
Gets the value of a property on the channel
[more]SLHWTEL_API SLresult SLhwTelChnSetProperty(SLhwTelChn *channel, SLchar *prop_name, SLValue *value)
Sets the value of a property of a property on the channel
[more]SLHWTEL_API SLresult SLhwTelChnProperties(SLhwTelChn *channel, SLVector *prop_names)
Get list of available properties.
[more]define SLtelONHOOK 0 define SLtelOFFHOOK 1 define SLtelERROR 1 SLHWTEL_API SLresult SLhwTelChnConnect(SLhwTelChn* channel)
Picks up a call.
[more]SLHWTEL_API SLresult SLhwTelChnDisconnect(SLhwTelChn* channel)
Disconnects caller (ie.
[more]SLHWTEL_API SLresult SLhwTelChnDial(SLhwTelChn* channel, SLchar* dest, SLbool call_prog)
Makes a call asynchronously.
[more]SLHWTEL_API SLresult SLhwTelChnBridge(SLhwTelChn* chorig, SLhwTelChn* chdest)
Makes a full duplex, or bridged, connection between two calls.
[more]SLHWTEL_API SLresult SLhwTelChnTransfer(SLhwTelChn* channel, SLchar* destDialNum, SLbool monitorCall)
Transfers the incoming call to the destination number by sending a transfer request to the PBX/Centrex.
[more]SLHWTEL_API SLresult SLhwTelChnSendDTMF(SLhwTelChn* channel, SLchar *digits)
Sends a DTMF digit sequence.
[more]SLHWTEL_API SLresult SLhwTelChnPlayFile(SLhwTelChn* channel, SLchar *filename)
Plays a file.
[more]SLHWTEL_API SLresult SLhwTelChnRecordFile(SLhwTelChn* ch, SLuint nbSecs, SLchar *filename)
Starts recording into a file.


Documentation

Telephony control interface. This API supports all the functions necessary to control and query the lines.
oSLHWTEL_API SLresult SLhwTelInit(void *args)
Initializes the Telephony platform.

Create a telephony platform API and instantiate it. Used by the Telephony service

Parameters:
args - An object containing args (implementation specific) and to enter return info needed by main.
Returns:
SL_SUCCESS if success, less than SL_SUCCESS otherwise.

oSLHWTEL_API SLresult SLhwTelShutdown(void *args)
Shutdown the telephony platform.

Parameters:
args - An object containing args (implementation specific) and to enter return info needed by main.
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelGetProperty(SLchar *prop_name, SLValue *value)
Gets the value of a property of the underlying hardware.

Parameters:
prop_name - the name of the property
value - out[x] the value of the property
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelSetProperty(SLchar *prop_name, SLValue *value)
Sets the value of a property of the underlying hardware.

Parameters:
prop_name - the name of the property
value - the value of the property
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelProperties(SLVector *prop_names)
Gets the list of available properties.

Parameters:
prop_names - out[x] the list of available properties
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelReserveChannel(SLhwTelChn** channel)
Reserves an idle channel.

Channels are taken from a list of idle channels. The channel must be opened with SLhwTelChnOpen() before it is ready to receive or initiate calls.

Parameters:
channel - out[x] the channel structure.
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelReleaseChannel(SLhwTelChn* channel)
Releases resources associated with channel and puts it back on the list of idle channels.

The channel cannot receive or initiate calls until SLhwTelReserveChannel() and SLhwTelChnOpen() are called again.

Parameters:
channel - out[x] the channel structure to be released.
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnOpen(SLhwTelChn *channel)
Opens a channel to receive or initiate calls.

The channel must have been previously reserved with SLhwTelReserveChannel() prior to making this call. The channel remains open until SLhwTelChnClose() is called.

Parameters:
channel - in[x] The channel to be opened
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnClose(SLhwTelChn *channel)
Closes a channel previously opened with SLhwTelChnOpen(). The channel remains reserved until SLhwTelReleaseChannel() is called.

Parameters:
channel - modify[x] The channel structure to be closed
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnAddCallback(SLtelEvent e, SLhwTelChn* channel, SLhwTelEventInfo *info)
Adds an event callback for the specified event and channel.

Only a reference to the callback information is copied, therefore the caller must ensure that the callback information remains in scope after the call returns. The reason is that the reference of the callback information is used for retrieval when removing a callback information.

Parameters:
e - An event which should be handled by this callback
channel - The channel on which to set the callback.
info - An event information structure to be used if there is an event on the *telephony API
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnRemoveCallback(SLtelEvent e, SLhwTelChn* channel, SLhwTelEventInfo *info)
Removes the callback from the list of callbacks.

Parameters:
e - An event which should be handled by this callback
channel - The channel on which to remove the callback.
info - in[x] The callback structure to remove.
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnGetProperty(SLhwTelChn *channel, SLchar *prop_name, SLValue *value)
Gets the value of a property on the channel

Parameters:
channel - The channel on which the property is set
prop_name - the name of the property
value - out[x] the value of the property
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnSetProperty(SLhwTelChn *channel, SLchar *prop_name, SLValue *value)
Sets the value of a property of a property on the channel

Parameters:
channel - The channel on which to set the property
prop_name - the name of the property
value - the value of the property
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnProperties(SLhwTelChn *channel, SLVector *prop_names)
Get list of available properties.

Parameters:
channel - in[x] The channel on which to get the property names
prop_names - out[x] the set of available properties
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

odefine SLtelONHOOK 0 define SLtelOFFHOOK 1 define SLtelERROR 1 SLHWTEL_API SLresult SLhwTelChnConnect(SLhwTelChn* channel)
Picks up a call. Transition the state from on hook to off hook. This function should be called in a event handler for the SLtel_RINGING event.

Parameters:
channel - A handle to the channel to pickup
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnDisconnect(SLhwTelChn* channel)
Disconnects caller (ie. hangs up). This function can be called to terminate a connection and should also be called by a event handler for the SLtel_HANGUP event.

Parameters:
channel - A handle to the channel resource manager
Returns:
SL_SUCCESS if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnDial(SLhwTelChn* channel, SLchar* dest, SLbool call_prog)
Makes a call asynchronously. An SLtel_DIAL event is generated when dialing is completed.

Parameters:
channel - A handle to the channel on which to make the call
dest - The destination phone number of the transfer. This must be a real phone number
call_prog - Indicates whether call progress detection is used.
Returns:
SL_SUCCESS if success and less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnBridge(SLhwTelChn* chorig, SLhwTelChn* chdest)
Makes a full duplex, or bridged, connection between two calls. Connecting the talk path of the first channel to the listen path of the second channel and vice versa.

Parameters:
chorig - A handle on the channel which is already in the call
chdest - out[x] The new channel which now is the second-half of the bridge
Returns:
SL_SUCCESS if successful, less than SL_SUCCESS otherwise.

oSLHWTEL_API SLresult SLhwTelChnTransfer(SLhwTelChn* channel, SLchar* destDialNum, SLbool monitorCall)
Transfers the incoming call to the destination number by sending a transfer request to the PBX/Centrex.

Parameters:
channel - A handle on the channel which is already in the call
destDialNum - The dial number to transfer to.
MonitorCall - If set to true remain conferenced to the call. Otherwise hang-up and let the transfer proceed with no further interaction.
Returns:
SL_SUCCESS if successful, less than SL_SUCCESS otherwise.

oSLHWTEL_API SLresult SLhwTelChnSendDTMF(SLhwTelChn* channel, SLchar *digits)
Sends a DTMF digit sequence.

Parameters:
channel - A handle to the channel on which to send the DTMF digits.
digits - 0-terminated string of DTMFs to send.
Returns:
SLresult if success, less than SL_SUCCESS if failure.

oSLHWTEL_API SLresult SLhwTelChnPlayFile(SLhwTelChn* channel, SLchar *filename)
Plays a file. The format of the file is implementation-dependant.

Parameters:
channel - in[x] The channel on which the file is to be played.
filename - The path of the file to be played.
Returns:
SL_SUCCESS if success, less than SL_RESULT if failure.

oSLHWTEL_API SLresult SLhwTelChnRecordFile(SLhwTelChn* ch, SLuint nbSecs, SLchar *filename)
Starts recording into a file. The recording is stopped when a DTMF is received or when the specified duration is reached. The format of the file is implementation-dependant.

Parameters:
channel - in[x] The channel on which the file is to be played.
nbSecs - The maximum number of seconds the recording should last. If set to 0, means no time limit.
filename - The path of the file in which the recording is to be saved.
Returns:
SL_SUCCESS if success, less than SL_RESULT if failure.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


Copyright © 2000-2001 SpeechWorks International, Inc. 
This work may only be distributed under the terms of the SpeechWorks Open Document License v1.0