(Page 5 of 6 in this chapter)


isdnStartProtocol

Description

Starts up an ISDN protocol stack instance on a specified CTA context.

Prototype

DWORD isdnStartProtocol ( CTAHD ctahd,
unsand forigned protocol,
unsigned netoperator,
unsigned country,
unsigned partner_equip,
unsigned nai,
void *parms )

ctahd CTA context handle associated with a D channel, returned by ctaCreateContext.

protocol Stack mode to start protocol instance in:

ISDN_PROTOCOL_Q931CC for ACU stack mode.


ISDN_PROTOCOL_LAPD for LAPD stack mode.


ISDN_PROTOCOL_CHANNELIZED for NCC stack mode.

netoperator The network operator variant to start. Valid values for netoperator depend on the module file, as follows:

Run Module File

Available Variants

isdnusa.leo

ISDN_OPERATOR_ATT_4ESS
ISDN_OPERATOR_ATT_5E9
ISDN_OPERATOR_NT_DMS
ISDN_OPERATOR_NI2
ISDN_OPERATOR_ATT_5E10

isdneur.leo

ISDN_OPERATOR_FT_VN6
ISDN_OPERATOR_ETSI

isdnasa.leo

ISDN_OPERATOR_NTT
ISDN_OPERATOR_AUSTEL_1
ISDN_OPERATOR_KOREA
ISDN_OPERATOR_HONG_KONG

isdnqsi.leo

ISDN_OPERATOR_ECMA_QSIG

Note: netoperator must be the same for all NAIs on a single board.

country Country mode for the network operator variant to start in. Note that a variant's behavior may change depending on the country specified.

Note: country must be the same for all NAIs on a single board.

The following are valid operator and country combinations:

Available Variants

Country

ISDN_OPERATOR_ATT_4ESS

COUNTRY_USA

ISDN_OPERATOR_ATT_5E9

COUNTRY_USA

ISDN_OPERATOR_NT_DMS

COUNTRY_USA

ISDN_OPERATOR_NI2

COUNTRY_USA

ISDN_OPERATOR_ATT_5E10

COUNTRY_USA

ISDN_OPERATOR_FT_VN6

COUNTRY_FRA

ISDN_OPERATOR_ETSI

COUNTRY_AUS
COUNTRY_BEL
COUNTRY_GER
COUNTRY_SWE
COUNTRY_SINGAPORE
COUNTRY_GBR
COUNTRY_CHINA
COUNTRY_EUR
1

ISDN_OPERATOR_NTT

COUNTRY_JPN

ISDN_OPERATOR_AUSTEL_1

COUNTRY_AUS

ISDN_OPERATOR_HONG_KONG

COUNTRY_HONG_KONG

ISDN_OPERATOR_KOREA

COUNTRY_KOR

ISDN_OPERATOR_ECMA_QSIG

(Not applicable. country is ignored if variant is QSIG.)

1 Includes the following countries: Austria, Denmark, Finland, Greece, Iceland, Ireland, Italy, Liechtenstein, Luxembourg, Netherlands, Norway, Portugal, and Spain.

nai The network access identifier (NAI) of the D channel to link to the protocol stack instance.

partner_equip The type of equipment connected to the AG board:
If AG board is

And AG ISDN is to run in

Set partner_equip to:

Connected to network

ACU stack mode

EQUIPMENT_NT

LAPD stack mode

EQUIPMENT_DCE

Acting as a network

ACU stack mode

EQUIPMENT_TE

LAPD stack mode

EQUIPMENT_DTE

parms Pointer to the parameter block/structure required by the protocol:

For access to the parameters for AG ISDN in LAPD stack mode, use ISDN_PROTOCOL_PARMS_LAPD.


For access to the parameters for AG ISDN in ACU stack mode, use ISDN_PROTOCOL_PARMS_Q931CC.


For access to the parameters for AG ISDN in NCC stack mode, use ISDN_PROTOCOL_PARMS_ CHANNELIZED.

When parms is NULL, the default parameters for the protocol are used. The default parameters for each protocol enable the required service access points (SAPIs). For the ACU stack mode, all the services are supported by default.

Note that the size field of the structure must contain the size of the structure. Refer to for more details on the contents of these parameter structures.

Return Values

Events

Details

Starts the specified protocol on the AG board that is associated with the specified ctahd.

The run module is specified in the AG configuration file. For more information, see the AG ISDN Installation Manual and the AG Runtime Configuration and Developer's Manual.

If the parms pointer is NULL, the default values for the specified protocol are used. It is assumed that an HDLC data stream has been connected to the specified HDLC controller during initialization or by explicit switching calls. The parameters for the particular selected protocol are found in the parms data structure defined in isdnparm.h.

See Also

isdnStopProtocol

Example 1

mystartisdn (CTAHD ctahd)   /* use defaults */
{
CTA_EVENT event;
DWORD ret;
char errortext[40];
unsigned nai = 0;

nai = 0;
ret = isdnStartProtocol( ctahd, ISDN_PROTOCOL_Q931CC,
ISDN_OPERATOR_NI2, COUNTRY_USA, ISDN_PARTNER_NT, nai, NULL);

if( ret != SUCCESS)
{
ctaGetText(ctahd, ret, errortext, 40);
printf("START_FAIL: %s\n", errortext );
return MY_ERROR_START_FAILED;
}
myWaitForEvent( ctahd, &event);
if( event.value != SUCCESS)
{
ctaGetText(ctahd, event.value, errortext, 40);
printf("START_FAIL: %s\n", errortext) );
return MY_ERROR_START_FAILED;
}
return SUCCESS ;
}

Example 2

mystartisdn (CTAHD ctahd)   /* user-specified parms */
{
CTA_EVENT event;
DWORD ret;
char errortext[40];
unsigned nai;
unsigned j;
ISDN_PROTOCOL_PARMS_Q931CC parms;

memset( parms, 0, sizeof parms);
parms.size = sizeof(ISDN_PROTOCOL_PARMS_Q931CC);
nai = 0;
j = 0;

parms.services_list[j++] = ACU_FAX_SERVICE;
parms.services_list[j++] = ACU_VOICE_SERIVCE;
parms.services.list[j] = ACU_NO_SERVICE;
/*
** NOTE: The last service MUST contain ACU_NO_SERVICE
*/


ret = isdnStartProtocol( ctahd, ISDN_PROTOCOL_Q931CC,
ISDN_OPERATOR_NI2, COUNTRY_USA, ISDN_PARTNER_NT, nai, &parms);

if( ret != SUCCESS)
{
ctaGetText(ctahd, ret, errortext, 40);
printf("START_FAIL: %s\n", errortext );
return MY_ERROR_START_FAILED;
}
myWaitForEvent( ctahd, &event)
if( event.value != SUCCESS)
{
ctaGetText(ctahd, event.value, errortext, 40);
printf("START_FAIL: %s\n", errortext );
return MY_ERROR_START_FAILED;
}
return SUCCESS;
}


(Page 5 of 6 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.