
Description | Cautions | Example | Errors | See Also
Name: |
int cc_CallProgress(crn, indicator) | |
Inputs: |
CRN crn |
|
int indicator |
| |
Returns: |
0 on success < 0 on failure | |
Includes: |
cclib.h | |
Category: |
Optional call handling | |
Mode: |
synchronous | |
Technology: |
BRI/2; BRI/SC; PRI (all protocols) | |
The cc_CallProgress( ) function sends a PROGRESS message to the network. This function can be called after CCEV_OFFERED occurs, in asynchronous mode, or after the cc_WaitCall( ) function successfully completes, in synchronous mode. Applications may use the message on the D channel to indicate that the connection is not an ISDN terminal or that in-band information is available.
The cc_CallProgress( ) function is not needed in terminating mode. It may be used in a drop-and-insert configuration when an in-band Special Information Tone (SIT) or call progress tone is sent to the network.
Parameter |
Description |
crn: |
The call reference number. Each call needs a CRN. |
indicator: |
Specifies the progress indicator. The values are: · CALL_NOT_END_TO_END_ISDN - In drop-and-insert configurations, the application has the option of providing this information to the network. · IN_BAND_INFO - In drop-and-insert configurations, the application has the option of notifying the network that in-band tones are available. |
None
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#include "cclib.h"
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = "dtiB1T1";
if ( cc_Open( &devhdl, devname, 0 ) < 0 )
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
printf("Waiting for call\n");
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC) < 0 )
procdevfail(devhdl);
/*
· using cc_CallProgress(crn,CALL_NOT_END_TO_END_ISDN)
· to indicate that the remote is not an ISDN terminal.
· This function call is optional.
*/
if ( cc_CallProgress(crn,CALL_NOT_END_TO_END_ISDN))
callfail(crn);
printf("Accepting call\n");
if ( cc_AcceptCall(crn, 0, EV_SYNC) < 0 )
callfail(crn);
if ( cc_AnswerCall(crn, 0, EV_SYNC) < 0 )
callfail(crn);
.
.
.
.
.
/* Drop the call */
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC) < 0 )
callfail(crn);
if ( cc_ReleaseCall(crn) < 0 )
callfail(crn);
/* Close the device */
if ( cc_Close( devhdl ) < 0 )
printf("Error closing device, errno = %d\n", errno);
}
int callfail(CRN crn)
{
LINEDEV ld;
cc_CRN2LineDev(crn,&ld);
procdevfail(ld);
}
int procdevfail(LINEDEV handle)
{
int reason;
char *msg;
reason = cc_CauseValue(handle);
cc_ResultMsg(handle,reason,&msg);
printf("reason = %x - %s\n",reason,msg);
}
If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be used to interpret the reason code. Error codes are defined in the files ccerr.h, isdnerr.h and isdncmd.h.
Error codes from the cc_CallProgress( ) function include the following:
Error Code |
Description |
ERR_ISDN_LIB | E_ISBADIF |
Bad interface number |
ERR_ISDN_LIB | E_ISBADCALLID |
Bad call identifier |
ERR_ISDN_LIB | E_ISBADTS |
Bad time slot |
None
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation