|
An Unknown Application Is Running
If at least one Unknown application has opened the line, the TAPI dynamic-link
library gives an ownership handle for the incoming call to the highest
priority Unknown application. It also passes monitoring handles to the other
applications that have the line open for monitoring. The Unknown application receives a LINE_CALLSTATE message with dwParam3 set to owner.
This Unknown application can then try to perform media determination itself,
or use the assistance of the other media applications, allowing them to perform
probes for their media mode(s), if appropriate. The Unknown application can
pass the call to another media application using lineHandoff. The Unknown application would examine dwMediaMode in LINECALLINFO to determine the possible remaining candidate media. In doing so, it uses the
highest priority media to determine the initial handoff target. It calls lineHandoff, specifying the single highest priority destination media mode as the target.
The following is the default priority of media modes, listed in order from
first tried to last tried when used during media-type handoffs.
Order
| Media Mode
| -
| LINEMEDIAMODE_INTERACTIVEVOICE
| -
| LINEMEDIAMODE_DATAMODEM
| -
| LINEMEDIAMODE_G3FAX
| -
| LINEMEDIAMODE_TDD
| -
| LINEMEDIAMODE_G4FAX
| -
| LINEMEDIAMODE_DIGITALDATA
| -
| LINEMEDIAMODE_TELETEX
| -
| LINEMEDIAMODE_VIDEOTEX
| -
| LINEMEDIAMODE_TELEX
| -
| LINEMEDIAMODE_MIXED
| -
| LINEMEDIAMODE_ADSI
|
Automated voice is a media mode that has no meaningful distinction with
interactivevoice at this level, and is therefore not listed.
If the handoff fails, the Unknown application should clear that media mode
flag in the dwMediaMode member of LINECALLINFO. This action moves the probe for the call one step closer to a final
determination of the media mode. If the handoff indicates TARGETSELF, it means that the
Unknown application is the highest priority application for the media mode for
which it was trying to hand off the call, so it should go ahead and do the
probing itself.
If the handoff indicates SUCCESS, it means that a different application is the
highest priority application for the media mode for which the call was being
handed off. The Unknown application should deallocate the call handle or change
to being a monitor while the new owner has control and proceeds with probing.
The receiving application controls the call. If the probe is successful, it
should set the correct media mode bit. If the probe fails, the application should
clear the failed media mode bit in LINECALLINFO and hand the call off to the next highest priority application. If no more
media mode bits are set, the handoff fails, because no suitable owner application
exists for the call.
Eventually, the media mode may be identified through monitoring or successful
probing, though the UNKNOWN bit still may be set in dwMediaMode in the data structure LINECALLINFO. In this case, the application that has received the call cannot be sure that
it is the highest priority application for the identified media mode. It is
now the duty of that application to ensure that the call goes to the highest
priority application. To do so, it follows these steps:
- It calls lineSetMediaMode, which writes into the dwMediaMode field of the call to turn off the UNKNOWN bit and specify the newly
identified media mode bit.
- It calls lineHandoff to return the call to TAPI. The TAPI dynamic-link library is not explicitly
specified in this command, but rather a media-type handoff is performed, through
which the TAPI library knows that it must look for other applications to find
the highest priority application for that media mode.
- If this application is itself the highest priority application for this media
mode, it receives a LINEERR_TARGETSELF return value (for the lineHandoff function call). This error means "No, you already are the highest priority
application for that media mode." The application never loses control of the
call, and it continues handling the call normally. If the lineHandoff succeeds, then there was a higher priority application for the identified
media mode, and the application that called lineHandoff should deallocate its handle or change to being a monitor while the
highest-priority application handles the call.
As long as the UNKNOWN bit is still on, the receiving application still does
not know that the highest-priority media mode is present on the call, so it
still needs to probe for it. It only considers the media mode to be present if the
UNKNOWN bit is off only then can it use the call as a call of that media mode.
| 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 without manual coding. Full C# source codes are available 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 » |
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
|