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.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database