Duties of the Media Application

The media mode application that receives a call as a handoff target first checks the bit flags of dwMediaMode in LINECALLINFO. If only a single media mode flag is set, the call is officially of that media mode, and the application can act accordingly.

If the UNKNOWN and other media mode flags are set, the media mode of the call is officially UNKNOWN, but is assumed to be one of the media modes for which a flag is set in LINECALLINFO. The application should now probe for the highest priority media mode.

If more than one bit is set in LINECALLINFO and the call has not been answered, the application must perform a lineAnswer to continue probing. If the call has already been answered, the application can continue probing without having to first answer the call.

If the probe succeeds (either for the highest-priority media mode or for another one), the application should set dwMediaMode in LINECALLINFO to the single media mode that was recognized. If the actual media mode is this expected media mode, the application can act accordingly. Otherwisepics/TAPI00090000.gifif it makes a determination of another media modepics/TAPI00090000.gifit must first attempt to hand off the call in case it is not the highest priority application for the detected media mode.

If the probe fails, the application should clear the flag for that media mode in dwMediaMode in LINECALLINFO, and hand the call off to the Unknown application. It should also deallocate its call handle or revert back to monitoring the call. At this point, the fate of the call is determined by the steps described under the preceding topics of this sectionpics/TAPI00090000.gifdepending on whether or not an Unknown application is active.

If the attempt to hand off the call to the UNKNOWN application fails, this means that no unknown application is running. It is then the responsibility of the application that currently owns the call to attempt to hand it off to the next-highest-priority media mode (while leaving the UNKNOWN bit turned on in dwMediaMode in LINECALLINFO). If that handoff fails, the application should turn off that media bit, and attempt the next higher-priority bit, until the handoff succeeds or all of the bits are off except for the UNKNOWN bit.

If none of the media modes were determined to be the actual one, only the UNKNOWN flag will remain set in dwMediaMode in LINECALLINFO at the time the media application attempts to hand the call off to UNKNOWN. The final lineHandoff invocation will fail if the application is the only remaining owner of the call. This failure informs the application that it should drop the call and then deallocate the call's handle. At this point, the call is abandoned.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples