To allow an application access to ISDN channels, several MVIP switch connections must be made. In your AG configuration file, if EnableMvip=NO and DigitalMode=PRI, these settings are automatically made when the AG board boots. However, if EnableMvip=YES, the application must make these settings, using the CTA switching service or swish utility (CT Access) or SwitchPath function calls (AG Access).
The connections to be made are:
The following table shows the connections made by default when EnableMVIP=NO and DigitalMode=PRI.
Note: Connections are listed in MVIP 95 nomenclature unless otherwise specified.
|
Board |
Default Connections |
|
Full duplex, between trunk voice information and DSP resources: Full duplex, between HDLC controller and signaling streams: | |
|
AG Quad E |
Full duplex, between trunk voice information and DSP resources: Full duplex, between HDLC controller and signaling streams: |
|
No DSP resource connections. Full duplex, between HDLC controller and signaling streams: | |
|
AG Quad Connect E |
No DSP resource connections. Full duplex, between HDLC controller and signaling streams: |
|
Full duplex, between trunk voice information and DSP resources: Full duplex, between HDLC controller and signaling streams: | |
|
AG Dual E |
Full duplex, between trunk voice information and DSP resources: Full duplex, between HDLC controller and signaling streams: |
|
Full duplex, between trunk voice information and DSP resources: MVIP 95: 0:0..22 => 5:0..22, 4:0..22 => 1:0..22 MVIP 90: 16:0..22 <=> 18:0..22 Full duplex, between HDLC controller and signaling streams: MVIP 95: 2:0 => 9:0, 8:0 => 3:0 MVIP 90: 17:0 <=> 20:0 | |
|
Full duplex, between trunk voice information and DSP resources: MVIP 95: 0:0..29 => 5:0..29, 4:0..29 => 1:0..29 MVIP 90: 16:0..29 <=> 18:0..29 Full duplex, between HDLC controller and signaling streams: MVIP 95: 2:0 => 9:0, 8:0 => 3:0 MVIP 90: 17:0 <=> 20:0 |
To begin operations, the application initializes CT Access or AG Access, and creates a separate CTA context for each D channel and B channel it will require. To accomplish this:
For more information about initializing CT Access, see the CT Access Developer's Reference Manual. For more information about initializing AG Access, see the AG Access Developer's Manual.
Create a separate CTA context for each D channel that your application will interact with. The AG Quad T, AG Quad E, AG Quad Connect T, and AG Quad Connect E can each support up to four separate D channels. The AG Dual T and AG Dual E can each support up to two separate D channels. The AG-T1 and AG-E1 can support one D channel each.
To open CTA contexts under CT Access, use ctaCreateContext followed by ctaOpenServices. To open CTA contexts under AG Access, use adiOpenPort. In each call to ctaCreateContext or adiOpenPort, specify:
Under CT Access, these values are included in the CTA_MVIP_ADDR structure passed to ctaCreateContext. Under AG Access, they are specified directly in the adiOpenPort.
Along with your D channel contexts, create a separate CTA context for each B channel that your application will interact with. In each call to ctaCreateContext or adiOpenPort, specify:
|
Board |
DSP Resource Stream |
|
AG-T1, AG-E1 |
MVIP 95: Local stream 4 MVIP 90: Stream 18 |
|
AG Quad T, AG Quad E, AG Dual T, AG Dual E |
MVIP 95: Local stream 16 |
|
AG Quad Connect T, AG Quad Connect E |
No on-board DSP resources |
Under CT Access, these values are included in the CTA_MVIP_ADDR structure passed to ctaCreateContext. Under AG Access, they are specified directly in adiOpenPort.
Once one or more CTA contexts have been created for the D channels, initialize a separate ISDN protocol stack instance for each of these CTA contexts, and associate a specific D channel with each one. When this is done, a D channel is ready to send and receive messages.
Use isdnStartProtocol to initialize ISDN protocol stack instances.
Note: Once you call isdnStartProtocol, any CTA contexts you assign to D channels should be used only by the ISDN part of your application, and not in any other ADI calls.
To start up an ISDN protocol stack instance for ISDN ACU call control or LAPD, set the protocol, partner_equip, and parms arguments as follows:
partner_equip
The type of equipment connected to the AG board. Set to one of the following:
|
If the AG board is... |
And AG ISDN is to run in: |
Set partner_equip to: |
|
Connected to network |
ACU configuration |
EQUIPMENT_NT |
|
Connected to network |
LAPD configuration |
EQUIPMENT_DCE |
|
Acting as network |
ACU configuration |
EQUIPMENT_TE |
|
Acting as network |
LAPD configuration |
EQUIPMENT_DTE |
parms Pointer to a parameter structure to configure the protocol stack. If the application needs to change any of the parameters described in Appendix C: Parameters, pass a pointer to one of the following structures in this call:
If the application will not need to modify parameters, pass NULL to accept the default settings. The default parameters for either configuration enable the required service access points (SAPIs). Furthermore, for ACU, all the services are supported by default.
The ISDNEVN_START_PROTOCOL event contains the completion status of the start request. If the ISDN protocol stack instance started successfully, the value field in this event will contain SUCCESS. Otherwise, another value will appear here.
For more information about isdnStartProtocol, see Chapter 7.
Once all ISDN protocol stack instances have been created, start a "no call control" TCP on each B channel CTA context. This TCP puts the CTA context in a state where voice or media functions can be used without call control.
To start the TCP, call adiStartProtocol for each B channel CTA context, specifying NOCC in the protoname argument.
When adiStartProtocol is called, ADIEVN_STARTPROTOCOL_DONE is returned. If the NOCC TCP is started successfully, the event value field contains ADI_REASON_FINISHED. Otherwise, the value field contains another reason code.
mediamask is a field in the ADI_CALLCTL_PARMS structure passed in the adiStartProtocol call. It controls which DSP resources are reserved for each DSP function (DTMF detection, echo cancellation, etc.). If you are using an AG Quad T or AG Quad E, you may need to change the setting of mediamask depending upon the setting of the CCMode statement in your AG configuration file. CCMode defines the call control resource allocation for these boards.
Set CCMode and mediamask this way if your application primarily performs switching (i.e. does not require heavy use of DSP resources).
Set CCMode and mediamask this way if your application requires heavy use of DSP resources (i.e. for interactive voice response or another such task).
If CCMode is set to HIGH, MEDIUM, or LOW and mediamask is non-zero, when adiStartProtocol is called, an ADIEVN_START_PROTOCOL_DONE event is returned with the value field set to ADIERR_NOT_ENOUGH_ RESOURCES.
Natural MicroSystems, Inc.
100 Crossing Boulevard
Framingham, MA 01702