
Description | Cautions | Example | Errors | See Also
Name: |
int cc_SetParm(linedev, parm_id, value) | |
Inputs: |
LINEDEV linedev |
|
int parm_id |
| |
long value |
| |
Returns: |
0 on success | |
Includes: |
cclib.h | |
Category: |
System tools | |
Mode: |
synchronous | |
Technology: |
BRI/2; BRI/SC; PRI (all protocols) | |
The cc_SetParm( ) function sets the default channel parameters of the line device. The channel parameters are included in the call setup message to describe the characteristics of the channel and tell the network the path for routing the call.
Parameter |
Description |
linedev: |
The line device handle. |
parm_id: |
The parameter identification. See Table 26 below for a list of possible parameter ID definitions. |
value: |
The address of the buffer where the default parameters/information will be stored. |
The following table describes the possible parameter ID definitions for the cc_SetParm( ) function. The parameters are the same as those listed for the cc_GetParm( ) function.
Table 26. cc_SetParm( ) Parameter ID Definitions
Define |
Description |
Possible return values |
BC_XFER_CAP |
Bearer channel information transfer capability |
BEAR_CAP_SPEECH - speech BEAR_CAP_UNREST_DIG - unrestricted data BEAR_REST_DIG - restricted data |
BC_XFER_MODE |
Bearer channel Information Transfer Mode |
ISDN_ITM_CIRCUIT - circuit switch |
BC_XFER_RATE |
Bearer channel, Information Transfer Rate |
BEAR_RATE_64KBPS - 64Kbps transfer rate |
USRINFO_LAYER1_PROTOCOL |
Layer 1 protocol to use on bearer channel |
ISDN_UIL1_CCITTV.110 - CCITT standardized rate adaptation ISDN_UIL1_G711uLAW - Recommendation G.117 u-Law ISDN_UIL1_G711ALAW - Recommendation G.117 a-Law ISDN_UIL1_G721ADCPM - Recommendation G.721 32 kbits/s ADCPM and Recommendation I.460 ISDN_UIL1_G722G725 - Recommendation G.722 and G.725 - 7kHz audio ISDN_UIL1_H261 - Recommendation H.261 - 384 kbits/s video ISDN_UIL1_NONCCITT - Non-CCITT standardized rate adaptation ISDN_UIL1_CCITTV120 - CCITT standardized rate adaptation V.120 ISDN_UIL1_CCITTX31 - CCITT standardized rate adaptation X.31 HDLC |
USR_RATE |
User rate to use on bearer channel (layer 1 rate) |
ISDN_UR_EINI460 - determined by E bits in I.460 ISDN_UR_56000 - 56 kbits, V.6 ISDN_UR_64000 - 64 kbits, X.1 ISDN_UR_134 - 134.5 bits, X.1 ISDN_UR_12000 - 12 kbits, V.6 |
CALLED_NUM_TYPE |
Called number type |
EN_BLOC_NUMBER - number is sent en-block (in whole, not overlap sending) INTL_NUMBER - international number for international call. (Verify availability with service provider.) NAT_NUMBER - national number for call within national numbering plan (accepted by most networks) LOC_NUMBER - subscriber number for a local call. (Verify availability with service provider.) OVERLAP_NUMBER - overlap sending; number is not sent in whole (not available on all networks) |
CALLED_NUM_PLAN |
Called number plan |
UNKNOWN_NUMB_PLAN - unknown number plan ISDN_NUMB_PLAN - ISDN/telephony (E.164/E.163) (accepted by most networks) TELEPHONY_NUMB_PLAN - telephony numbering plan PRIVATE_NUMB_PLAN - private numbering plan |
CALLING_NUM_TYPE |
Calling number type |
Same values as CALLED_NUM_TYPE |
CALLING_NUM_PLAN |
Calling number plan |
Same values as CALLED_NUM_PLAN |
CALLING_PRESENTATION |
Calling presentation indicator |
PRESENTATION_ALLOWED - allows the display of the calling number at the remote end |
CALLING_SCREENING |
Calling screening indicator field |
USER_PROVIDED - user provided, not screened (passes through) |
RECEIVE_INFO_BUF |
Multiple IE buffer; sets the size of the buffer, that is, the number of messages that can be stored in the information queue |
Any number in the range of 1 to MAX_RECEIVE_INFO_BUF (The cc_SetParm( ) function returns -1 (error) or 0 (success).) |
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";
long value;
if ( cc_Open( &devhdl, devname, 0 ) < 0 )
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
/*
* using cc_ SetParm(devhdl, CALLED_NUM_TYPE,EN_NAT_NUMBER)
* to set the default value for "called party number type" to
* 'enbloc national' type
*/
if ( cc_SetParm(devhdl, CALLED_NUM_TYPE, NAT_NUMBER) < 0 )
procdevfail(devhdl);
else
printf("Parameter CALLED_NUM_TYPE has value: 0x%x\n",value);
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC) < 0 )
procdevfail(devhdl);
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);
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_SetParm( ) function include the following:
Error Code |
Description |
ERR_ISDN_LIB | E_ISBADTS |
Bad time slot |
ERR_ISDN_LIB | E_ISBADIF |
Bad interface number |
ERR_ISDN_LIB | E_ISBADPAR |
Bad input parameter |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation