(Page 54 of 69 in this chapter) Version
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.
int myStopDTMFDetector( CTAHD ctahd )
{
CTA_EVENT event;
if( adiStopDTMFDetector( ctahd ) != SUCCESS )
return MYFAILURE;
while( 1 )
{
myGetEvent( &event ); /* see ctaWaitEvent example */
switch( event.id )
{
case ADIEVN_DTMF_DETECT_DONE:
if( event.value == CTA_REASON_RELEASED )
return MYDISCONNECT; /* call has been terminated */
else if( CTA_IS_ERROR( event.value ) )
return MYFAILURE; /* API error */
else
return SUCCESS; /* stopped normally */
break;
/* might include cases to handle disconnect, DTMFs, etc. */
}
}
}
(Page 54 of 69 in this chapter) Version