# adiStopSignalDetector

Stops the out-of-band signaling
bit detector.

#### Supported board types

- AG

- CG

#### Prototype

DWORD adiStopSignalDetector ( CTAHD ctahd)

Argument | Description
ctahd | Context handle returned by ctaCreateContext or ctaAttachContext.

#### Return values

Return value | Description
SUCCESS |
CTAERR_FUNCTION_NOT_ACTIVE | Attempt made to stop a function that was not running.
CTAERR_INVALID_CTAHD | Context handle is invalid.
CTAERR_INVALID_SEQUENCE | Attempt was made to stop a function that is already being stopped.
CTAERR_INVALID_STATE | Function not available in the current port state.
CTAERR_SVR_COMM | Server communication error.

#### Events

Event | Description
ADIEVN_SIGNAL_DETECT_DONE | After signal detection stops, the ADI service generates a DONE event with a value field of CTA_REASON_STOPPED.

#### Details

Use adiStopSignalDetector to disable detection of incoming out-of-band signaling bits. After calling this function, incoming out-of-band bit transitions are not reported.

This function is incompatible with standard call control. Contexts
running a standard protocol other than NOCC
are usually excluded from using this function. Protocols usually use out-of-band signaling bits for call setup (detection of incoming calls) and call teardown (detection of hang-up). For information about controlling calls under specific TCP
s, refer to the Dialogic® NaturalAccess™ CAS API Developer's Manual.

For more information, refer to Performing low-level call control.

#### See also

adiStartSignalDetector

#### Example

int myStopSignalDetector( CTAHD ctahd )
{
CTA_EVENT event;
if( adiStopSignalDetector( ctahd ) != SUCCESS )
return MYFAILURE;
while( 1 )
{
myGetEvent( &event ); /* see ctaWaitEvent example */
switch( event.id )
{
case ADIEVN_SIGNAL_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. */
}
}
}