|
lineSetMediaControl
The lineSetMediaControl function enables and disables control actions on the media stream associated
with the specified line, address, or call. Media control actions can be
triggered by the detection of specified digits, media modes, custom tones, and call
states.
LONG lineSetMediaControl(
HLINE hLine,
|
| DWORD dwAddressID,
|
| HCALL hCall,
|
| DWORD dwSelect,
|
| LPLINEMEDIACONTROLDIGIT const lpDigitList,
|
| DWORD dwDigitNumEntries,
|
| LPLINEMEDIACONTROLMEDIA const lpMediaList,
|
| DWORD dwMediaNumEntries,
|
| LPLINEMEDIACONTROLTONE const lpToneList,
|
| DWORD dwToneNumEntries,
|
| LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
|
| DWORD dwCallStateNumEntries
|
| );
|
|
Parameters
hLine
SAa handle to an open line device.
dwAddressID
An address on the given open line device.
hCall
A handle to a call. The application must be an owner of the call. The call
state of hCall can be any state.
dwSelect
Specifies whether the media control requested is associated with a single
call, is the default for all calls on an address, or is the default for all calls
on a line. This parameter can only have a single flag set, and it uses the
following LINECALLSELECT_ constants:
LINECALLSELECT_LINE
Selects the specified line device. The hLine parameter must be a valid line handle; hCall and dwAddressID are ignored.
LINECALLSELECT_ADDRESS
Selects the specified address on the line. Both hLine and dwAddressID must be valid; hCall is ignored.
LINECALLSELECT_CALL
Selects the specified call. hCall must be valid; hLine and dwAddressID are both ignored.
lpDigitList
A pointer to the array that contains the digits that are to trigger media
control actions, of type LINEMEDIACONTROLDIGIT. Each time a digit in the digit list is detected, the specified media control
action is carried out on the call's media stream.
Valid digits for pulse mode are '0' through '9'. Valid digits for DTMF mode
are '0' through '9', 'A', 'B', 'C', 'D', '*', '#'.
dwDigitNumEntries
The number of entries in the lpDigitList.
lpMediaList
A pointer to an array with entries of type LINEMEDIACONTROLMEDIA. The array has dwMediaNumEntries entries. Each entry contains a media mode to be monitored, media-type
specific information (such as duration), and a media control field. If a media mode in
the list is detected, the corresponding media control action is performed on
the call's media stream.
dwMediaNumEntries
The number of entries in lpMediaList.
lpToneList
A pointer to an array with entries of type LINEMEDIACONTROLTONE. The array has dwToneNumEntries entries. Each entry contains a description of a tone to be monitored,
duration of the tone, and a media-control field. If a tone in the list is detected,
the corresponding media control action is performed on the call's media stream.
dwToneNumEntries
The number of entries in lpToneList.
lpCallStateList
A pointer to an array with entries are of type LINEMEDIACONTROLCALLSTATE. The array has dwCallStateNumEntries entries. Each entry contains a call state and a media control action.
Whenever the given call transitions into one of the call states in the list, the
corresponding media control action is invoked.
dwCallStateNumEntries
The number of entries in lpCallStateList.
Return Values
Returns zero if the request is successful or a negative error number if an
error has occurred. Possible return values are:
LINEERR_INVALADDRESSID, LINEERR_NOMEM, LINEERR_INVALCALLHANDLE,
LINEERR_NOTOWNER, LINEERR_INVALCALLSELECT, LINEERR_OPERATIONUNAVAIL,
LINEERR_INVALCALLSTATELIST, LINEERR_OPERATIONFAILED, LINEERR_INVALDIGITLIST, LINEERR_RESOURCEUNAVAIL,
LINEERR_INVALLINEHANDLE, LINEERR_UNINITIALIZED, LINEERR_INVALMEDIALIST,
LINEERR_INVALPOINTER, LINEERR_INVALTONELIST.
Remarks
The lineSetMediaControl function is considered successful if media control has been correctly
initiated, not when any media control has taken effect. Media control in progress is
changed or is canceled by calling this function again with either different
parameters or NULLs. If one or more of the parameters lpDigitList, lpMediaList, lpToneList, and lpCallStateList are NULL, then the corresponding digit, media mode, tone, or call
state-triggered media control is disabled. To modify just a portion of the media control
parameters while leaving the remaining settings in effect, the application
should invoke lineSetMediaControl supplying the previous parameters for those portions that must remain in
effect, and new parameters for those parts that are to be modified.
If hCall is selected and the call terminates or the application deallocates its
handle, media control on that call is canceled.
All applications that are owners of the call are in principle allowed to make
media control requests on the call. Only a single media control request can be
outstanding on a call across all applications that own the call. Each time lineSetMediaControl is called, the new request overrides any media control then in effect on the
call, whether set by the calling application or any other owning application.
Depending on the service provider and other activities that compete for such
resources, the amount of simultaneous detections that can be made may vary over
time. If service provider resources are overcommitted, the
LINEERR_RESOURCEUNAVAIL error is returned.
Whether or not media control is supported by the service provider is a device
capability.
See Also
LINEMEDIACONTROLCALLSTATE, LINEMEDIACONTROLDIGIT, LINEMEDIACONTROLMEDIA, LINEMEDIACONTROLTONE
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|