Synopsis:
CCdisconnect(port, channel,cause[,std_or_raw])
Arguments:
port – The logical E1/T1 port number.
channel – The channel number.
cause – The cause code
[std_or_raw] – Optional flag to define whether to use the generic (standardised cause code or protocol specific raw cause code)
Description: This function maps to the following Aculab functions:
ACU_ERR call_disconnect(CAUSE_XPARMS *causep);
or ACU_ERR xcall_disconnect(DISCONNECT_XPARMS *causep);
It is used to disconnect an incoming or outgoing call on the specified logical port and channel. The cause parameter can either be one of the Aculab defined generic cause codes (which will be translated to the appropriate protocol specific cause code where possible) or else a raw protocol specific code can be used (by setting the optional std_or_raw flag to 1). The standard cause codes are defined in the ACULAB.INC file as follows:
const LC_NORMAL = 0;
const LC_NUMBER_BUSY = 1;
const LC_NO_ANSWER = 2;
const LC_NUMBER_UNOBTAINABLE = 3;
const LC_NUMBER_CHANGED = 4;
const LC_OUT_OF_ORDER = 5;
const LC_INCOMING_CALLS_BARRED = 6;
const LC_CALL_REJECTED = 7;
const LC_CALL_FAILED = 8;
const LC_CHANNEL_BUSY = 9;
const LC_NO_CHANNELS =10;
const LC_CONGESTION =11;
If any of the extended parameters have been set using the CCsetparm() function with a ParmType of PARM_TYPE_DISCONNECT then the extended version of the function will be called.
Returns: This function returns 0 upon success or a negative error code.