(Page 62 of 80 in this chapter)


adiStopCallProgress

Description

Stops a call progress analysis operation.

Prototype

DWORD adiStopCallProgress( CTAHD ctahd )

ctahd Context handle returned by adiOpenPort.

Return Values

Events

Details

This function disables the call progress analysis operation started by adiStartCallProgress. After this function is called, call progress analysis events will not be reported.

Call progress analysis cannot be restarted until the DONE event is received.

See Also

adiStartCallProgress

Example


int myStopCallProgress( CTAHD ctahd )
{
    ADI_EVENT event;

    if( adiStopCallProgress( ctahd ) != SUCCESS )
        return MYFAILURE;

    while( 1 )
    {
        myGetEvent( &event );           /* see adiFetchAndProcess example */

        switch( event.id )
        {
            case ADIEVN_CP_DONE:
                if( event.value == CTA_REASON_RELEASED )
                    return MYDISCONNECT;    /* call has been terminated */
                else if( IS_ADI_ERROR( event.value ) )
                    return MYFAILURE;       /* API error */
                else
                    return SUCCESS;         /* stopped normally */
                break;

            /* might include cases to handle disconnect, DTMFs, etc. */
        }
    }
}



(Page 62 of 80 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.