(Page 65 of 80 in this chapter)
adiStopDTMFDetector
Description
- Stops the DTMF detector.
Prototype
- DWORD adiStopDTMFDetector( CTAHD ctahd )
- ctahd Context handle returned by adiOpenPort.
Return Values
Events
Details
- This function disables detection of DTMFs. Detection is generally enabled automatically by the call control protocols upon transition to the ADI_CC_STATE_CONNECTED state. After this function is called, DTMF events will not be reported. The detector may be restarted with adiStartDTMFDetector. The DTMF detector cannot be restarted until the DONE event is received.
Note: The digit collection function, adiCollectDigits, will not work if you disable DTMF detection. No digits will be collected and no events will be generated.
See Also
- adiStartDTMFDetector
Example
int myStopDTMFDetector( CTAHD ctahd )
{
ADI_EVENT event;
if( adiStopDTMFDetector( ctahd ) != SUCCESS )
return MYFAILURE;
while( 1 )
{
myGetEvent( &event ); /* see adiFetchAndProcess example */
switch( event.id )
{
case ADIEVN_DTMF_DETECT_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 65 of 80 in this chapter)
Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights
reserved.