
Description | Cautions | Example | Errors | See Also
Name: |
int cc_GetParm(linedev, parm_id, valuep) | |
Inputs: |
LINEDEV linedev |
|
int parm_id |
| |
CC_PARM *valuep |
| |
Returns: |
0 on success | |
Includes: |
cclib.h | |
Category: |
System tools | |
Mode: |
synchronous | |
Technology: |
BRI/2; BRI/SC; PRI (all protocols) | |
The cc_GetParm( ) function gets the current parameter values of the line device. The application can retrieve only one parameter at a time.
The parameter values are set using the cc_SetParm( ) function or during the initialization of the MAKECALL Block. See the cc_SetParm( ) function description and Section 8.3.2. MAKECALL Block Initialization and Settings for more information.
Parameter |
Description |
linedev: |
The line device handle. |
parm_id: |
The specified parameter ID. Definitions and return values are listed in Table 21. |
valuep: |
Pointer to the address of the buffer in which the requested information will be stored. |
The following table lists the cc_GetParm( ) function parameter ID definitions.
Table 21. cc_GetParm( ) 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 - 64K bps 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 ISDN_UR_64000 - 64 kbits 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 -- the number of messages that can be stored in the information queue. |
Buffer number (any number in the range of 1 to MAX_RECEIVE_INFO_BUF) The cc_GetParm( ) function returns the buffer number. |
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";
CC_PARM value;
if ( cc_Open( &devhdl, devname, 0 ) < 0 )
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
if ( cc_GetParm(devhdl, BC_XFER_RATE, &value) < 0 )
procdevfail(devhdl);
else
printf("Parameter BC_XFER_RATE 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);
.
.
.
.
.
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC) < 0 )
callfail(crn);
if ( cc_ReleaseCall(crn) < 0 )
procdevfail(devhdl);
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_GetParm( ) function include the following:
Error Code |
Description |
ERR_ISDN_LIB | E_ISBADIF |
Bad interface number |
ERR_ISDN_LIB | E_ISBADTS |
Bad time slot |
ERR_ISDN_LIB | E_ISBADPAR |
Bad input parameter |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation