Technical Helpweb

- more articles

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: 
DivaCallPropertyValue value; 

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

Notes:

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.




Feedback

Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page:


Open access: Product rule: ; Page rule: Auto

Service Center Logon