Dialogic 05-0867-005 Table Top Game User Manual


 
cc_ToneRedefine( ) redefines a call progress tone’s attributes
286
*/
if ( cc_Close( devhdl ) !=0){
printf( "Error closing devicd, errno= %d\n, errno );
}
/* Terminate the Program */
exit( 0 );
}
The following example illustrates how to override the default tone that is played
with an outgoing message. The example shows how the application uses the
ALERTING message to direct the firmware to play the Busy tone instead of the
default Ringback tone.
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include <cclib.h>
#include <srllib.h>
#include <dxxxlib.h>
main()
{
LINEDEV boardDevHdl, tsDevHdl;
DCHAN_CFG dchan_cfg;
IE_BLK ie_buf;
/*
* Open the BRI Station Device
*/
if ( ( cc_Open(&boardDevHdl, "briS1", 0))<0){
printf( "Error opening board device : errno < %d\n, errno );
exit( 1 );
}
/*
* Open the BRI Channel Device
*/
if ( ( cc_Open(&tsDevHdl, "briS1T1", 0))<0){
printf("Error opening timeslot device : errno < %d\n,errno);
exit( 1 );
}
/*
* Configure the BRI station.
*/
dchan_cfg.layer2_access = FULL_ISDN_STACK;
dchan_cfg.switch_type = ISDN_BRI_NI1;
dchan_cfg.switch_side = NETWORK_SIDE;
dchan_cfg.number_of_endpoints = 1;
dchan_cfg.feature_controlA = DEFAULT_PCM_TONE |
/* Want firmware to apply tones */
HOST_CONTROLLED_RELEASE;
/* App. controls when B channel is fully released. */
/*
* Continue Processing
*.
*.
*/
/*
* Use cc_SetInfoElem() to specify the SIGNAL IE,
* that is to be sent with the
* Alerting message. Firmware will provide the tone,
* corresponding to what is in the
* SIGNAL IE, providing it is available in the tone template