/
Diva SDK reject incoming call

Diva SDK reject incoming call

To reject a call in the Dialogic® Diva® Software Development Kit (Diva SDK), you can use the call DivaReject. This can be used either immediately after an incoming call has been seen, or you can first call DivaAlert (so that the caller hears ringing) before calling DivaReject, perhaps many seconds later. 

 

By default, the diagnostic code will be 'normal disconnect'. If you want to indicate some other value, the Diva SDK provides the following standard reject reasons you can use:

  • DivaRRNormalCallClearing

  • DivaRRUserBusy

  • DivaRRChannelNotAvailable

  • DivaRRFacilityRejected

  • DivaRRChannelNotAccepted

  • DivaRRIncompatibleDestination

  • DivaRRDestinationOutOfOrder

 

If none of these values matches your need, you can also use DivaRRUserDefined, which must be ORed with the (byte) value of the code you want, e.g. if you wanted to use the value 50 (hex 32) then you would use the value: 

DivaRejectReason reason = (DivaRejectReason) DivaRRUserDefined | 0x32; 

To set the reject reason, you need to call DivaSetProperties before you make the call to DivaReject. The following is a code fragment showing how this is done: 

  1. DivaCallPropertyValue value; value.RejectReason = DivaRRUserBusy; DivaSetCallProperties( ch, DivaCPT_RejectReason, &value, sizeof(value.RejectReason) ); DivaReject(ch,FALSE);

NOTE

  1. DivaReject is called with the second argument set to FALSE. When this is set to TRUE, the Dialogic® Diva® Media Board allows other applications to take the incoming call, resulting in the reject cause being ignored. With it set to TRUE, your chosen diagnostic code will be sent out on the line. 

  2. You cannot reject a call with DivaReject once the call has been accepted. To disconnect a connected call, use DivaDisconnect.

Related content

Diva SDK call progress
Diva SDK call progress
More like this
Dialogic Voice Cards - How to allow a Diva Analog card to dial the same destination number more than 15 times in a row
Dialogic Voice Cards - How to allow a Diva Analog card to dial the same destination number more than 15 times in a row
More like this
Diva SDK and SIT
Diva SDK and SIT
More like this
Diva LineTest: The call can be established, but in-band tone test failed
Diva LineTest: The call can be established, but in-band tone test failed
More like this
Phone API Reference - Core - digium.phone.reject
Phone API Reference - Core - digium.phone.reject
More like this
Dialogic Voice Cards - Diva® SDK for Windows - Version 5.5 SU 5
Dialogic Voice Cards - Diva® SDK for Windows - Version 5.5 SU 5
More like this

Return to Documentation Home I Return to Sangoma Support