Condividi tramite


Making a TAPI Call (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

An NDIS WAN miniport driver with an open line can also receive a request to initiate a call in one of two ways. Either the miniport driver receives:

  • An OID_TAPI_MAKE_CALL request that contains the destination address or that specifies that a predefined default number should be used

  • Or, an OID_TAPI_MAKE_CALL request that does not include a destination address

    In this case, the OID_TAPI_MAKE_CALL will be followed by an OID_TAPI_DIAL request that includes the destination address

When MiniportQueryInformation is called with an OID_TAPI_MAKE_CALL request, NDISTAPI passes the line identifier for the line on which the call is to be made in the hdLine member of the NDIS_TAPI_MAKE_CALL structure. The hdLine value is the value returned by the miniport driver to an OID_TAPI_OPENrequest.

The miniport driver should store the htCall value passed in this request with the call context it maintains and pass it in subsequent status calls and responses related to this call instance. For example, the miniport driver will supply this value as the ConnectionWrapperIDwhen it indicates a line up to NDISWAN.

The ulDestAddressSize can be zero for undialed addresses, such as for a hot phone, which always automatically connects to a predefined number, or when dialing will be done subsequently with an OID_TAPI_DIAL request.

If the bUseDefaultLineCallParams member of NDIS_TAPI_MAKE_CALL is set to FALSE, the miniport driver should use the call parameters in the LineCallParams member. If bUseDefaultLineCallParams is TRUE, the previously set default call parameters should be used.

The miniport driver must check the state of the line on which the make-call request is made to ensure that it can make the requested call. If not, the miniport driver should fail the call.

MiniportQueryInformationreturns when either:

  • It has made the call,

  • Or, if the number will be dialed as a result of a subsequent OID_TAPI_DIAL request, the miniport driver allocates a structure and sets itself in a state, probably the dialtone state, to subsequently complete the call.

The miniport driver must return a call-specific context value in the hdCall member if MiniportQueryInformation returns NDIS_STATUS_SUCCESS. This unique hdCall value will be passed to the miniport driver in subsequent requests related to this call.

If a call is made in two steps by first making an OID_TAPI_MAKE_CALL request to MiniportQueryInformation, followed by an OID_TAPI_DIAL request to MiniportSetInformation, the destination number is passed to the miniport driver in the NDIS_TAPI_DIAL structure. The OID_TAPI_DIAL request requires an hdCall member to be passed in the NDIS_TAPI_DIAL structure; its value will match the handle the miniport driver returned from a previous OID_TAPI_MAKE_CALL request.

 

 

Send comments about this topic to Microsoft