Version
Opening the AG Driver, CTA Context, and Protocol 161
Calling MyReceiveCall Or MyPlaceCall 161
Call Receiving Function MyReceiveCall 162
Call Placement Function MyPlaceCall 165
Switching Function ConnectBChannel 165
Opening the AG Driver, CTA Context, and Protocol 172
Calling MyReceiveCall Or MyPlaceCall 173
Call Receiving Function MyReceiveCall 173
Call Placement Function MyPlaceCall 175
Disconnecting Function MyHangUp 176
Switching Function ConnectBChannel 177

· The board is executing.

|
Program
|
Description
|
|---|---|
isdncta |
A daemon which starts and stops the ISDN protocol stack.
|
isdnncc |
ISDN NCC call control demonstration program.
|
isdnchan |
ISDN ADI call control demonstration program.
|

Usage
| 1
Use for the following countries: Austria, Denmark, Finland, Greece, Iceland, Ireland, Italy, Liechtenstein, Luxembourg, Netherlands, Norway, Portugal, Russia, Spain, or Switzerland.
|
2. It initializes Natural Access.
3. If the -s option is specified, isdncta makes connections needed to support NMS ISDN call control. (If .Clocking.HBus
4. If the -g option is specified, isdncta sets ENABLE_MULTIPLE_CCID parameters in the ISDN_PROTOCOL_PARMS_CHANNELIZED structure to enable Multiple CCID configuration, and passes the provided NFAS group number as an extra argument to isdnStartProtocol.
2. Run oamsys (or agmon for versions prior to Natural Access 4.0) to initialize your hardware and to make your configuration file changes effective.
3. To start the ISDN protocol stack, enter:
isdncta [options]
... where options is one or more of the command line options described above.
4. Now launch another demonstration program.
5. When you have finished, press Q to terminate isdncta.
|
Under this OS...
|
Go to this directory...
|
Enter...
|
|---|---|---|
|
Windows NT
|
\nms\ctaccess\demos\isdncta
|
nmake
|
|
UNIX
|
/opt/nms/ctaccess/demos/isdncta
|
make
|

2. Enter the following at the command line:
2. It starts the NMS ISDN TCP isd0.tcp, configuring it using the parameters loaded in step 1.
3. It either places a call or waits for an inbound call, depending on the -i command line option.
4. If it is commanded to dial out (outbound behavior), it dials either automatically or interactively, depending on the -i command line option.
5. If the demonstration program is commanded to wait for a call (inbound behavior):
a. It waits for incoming calls.
b. When a call arrives, if the user has selected the -P command line option (Non-Exclusive Mode), the program performs the switching to connect the B channel on which the call has been received to the appropriate DSP resource on the board.
c. The user can answer immediately by pressing a key on the computer keyboard, or wait until a specified number of rings has been played by the TCP. When the rings have been played, the TCP answers without the user's intervention.
d. At this point, the program checks the first digit of the incoming number. If the digit is an 8, it rejects the call and plays a busy tone. If the digit is a 9, it rejects the call, plays a reorder tone and goes back to waiting for calls. If the digit is a 0, it rejects the call and plays a Special Information Tone (SIT).
Note: These digits are assigned in the code with a preprocessor directive. You can change them; for example, for tests in a switch-room environment where the demonstration program is connected to a line with an address starting with 8, 9, or 0. e. If the first digit is not an 8, 9, or 0, the demonstration program plays a welcome message and speaks back the digits it received.
f. It then plays another prompt asking the user to choose an action by pressing a key on the telephone keypad. Available actions are: play a file, record a file, or hang up.
g. It starts the DTMF tone detector and waits for a tone. If the tone does not arrive, it hangs up.
h. If the tone arrives, the demonstration program performs the action that the tone specifies, then hangs up.
6. If the demonstration program seizes the line first (outbound behavior):
a. It dials the number specified by the user.
b. If the user has selected the -P command line option (Non-Exclusive Mode), the program performs the switching to connect the B channel on which the call has been placed to the appropriate DSP resource on the board.
c. When the call is answered, the demonstration program starts recording.
d. When silence is detected, the demonstration program stops recording and plays the DTMF tone meaning "hang up" for its inbound counterpart.
e. Then the program starts playing back the newly recorded voice file.
f. When playing is completed, it hangs up.
|
Under this OS...
|
Go to this directory...
|
Enter...
|
|---|---|---|
|
Windows NT
|
\nms\ctaccess\demos\isdnchan
|
nmake
|
|
UNIX
|
/opt/nms/ctaccess/demos/isdnchan
|
make
|
If a call comes in while the loop is waiting for the user to press a key, the function MyReceiveCall is called. This function is described in detail below.
Call Receiving Function MyReceiveCall
- The called number- The calling party's number (ANI - Automatic Number Identification digits)
- User-to-user (UUI) information, if present
- If Non-Exclusive Mode was selected, the stream and timeslot to be connected with the DSP resource managed by the application
All these attributes are stored in a data structure, of type ADI_CALL_STATUS (See Section 5.5, Retrieving Call Information for more information.)
If the TCP signals to the application that the line has been seized and that call setup has begun, then the application must wait for the incoming call setup to be completed. The function does so by waiting for the appropriate Natural Access event (ADIEVN_INCOMING_CALL). Once this event is detected, the function calls adiGetCallStatus to get the digit information as described above.
If Non-Exclusive Mode has been selected, the function calls ConnectBChannel to connect the appropriate DSP resource on the board to the B channel on the trunk.
While waiting for ADIEVN_INCOMING_CALL, MyReceiveCall may receive ADIEVN_INCOMING_DIGIT, indicating that a digit has arrived in the queue. MyReceiveCall displays a message on the screen which indicates the digit.
MyReceiveCall may also receive ADIEVN_CALL_DISCONNECTED, indicating that the calling party has hung up. MyReceiveCall calls hangup_in to hang up the call.
- If the first digit equals BUSY_DIGIT, MyReceiveCall rejects the call. To do so, it calls CTADEMO function DemoRejectCall, which calls adiRejectCall, directing it to signal that the line is busy. Then DemoRejectCall waits for the event signifying that the caller has hung up (ADIEVN_CALL_DISCONNECTED).- If the first digit equals REJECT_DIGIT, MyReceiveCall rejects the call using DemoRejectCall, directing the TCP to signal that the number called is not allocated.
- If the first digit equals USER_AUDIO_DIGIT, MyReceiveCall rejects the call using CustomRejectCall, which plays a Special Information Tone (SIT). CustomRejectCall defines the SIT, and then calls adiRejectCall with the argument ADI_REJ_USER_AUDIO. This tells the TCP to reject the call, and to open a DSP resource to the application, so that custom audio can be played on the line. Then CustomRejectCall plays the defined SIT, and waits for ADIEVN_TONES_DONE with reason ADI_REASON_RELEASED, and an ADIEVN_CALL_DISCONNECTED event. When both have been received, the function terminates.
- If the first digit does not match any of these digits, MyReceiveCall answers the call. To do so, it calls adiAnswerCall a first time with an argument to make the TCP play four rings before answering automatically. Then MyReceiveCall waits for a user's keystroke. If this is detected, MyReceiveCall calls the function adiAnswerCall again. This makes the TCP answer the call immediately.
- First, it plays a voice message welcoming the user. To play voice files, it calls MyPlayMessage, which opens a voice file and calls vcePlayList to play it.- Next, MyReceiveCall plays voice files announcing the called number and the calling number, if available.
- It plays another voice file with a menu, prompting the user to enter a DTMF tone from the telephone keypad to do one of the following: record a voice file, play a previously recorded voice file, or hang up.
- It waits for a DTMF tone to be detected. To do so, it calls adiCollectDigits twice in an attempt to get the digits. If a DTMF tone is not detected, MyReceiveCall hangs up.
- If a DTMF tone is detected, MyReceiveCall performs the task corresponding to the tone, and then hangs up. (If the command was to hangup, it hangs up immediately.) If the voice file to be played does not exist, MyReceiveCall plays a default voice file ("There is nothing to play.").
Call Placement Function MyPlaceCall
Switching Function ConnectBChannel

Usage
2. Enter the following at the command line:
isdnncc [options]
... where options is one or more of the command line options described above.
To do so, it loads and parses one of the nccxisdn.par parameter files provided with the product.
2. It starts the NMS ISDN TCP isd0.tcp, configuring it using the parameters loaded in step 1.
3. It either places a call or waits for an inbound call, depending on the -i command line option.
4. If it is commanded to dial out (outbound behavior), it dials automatically.
5. If the demonstration program is commanded to wait for a call (inbound behavior):
a. It waits for incoming calls.
b. When a call arrives, call status structures are accessed to retrieve the incoming call information such as the called number, calling number, or UUI, if any.
c. If the user has selected the -P command line option (Non-Exclusive Mode), the program performs the switching to connect the B channel on which the call has been received to the appropriate DSP resource on the board.
d. If the -a option has been specified in the command line, the call is accepted using the mode supplied by the user.
e. At this point, the program checks the first digit of the incoming number. If the digit is an 8, it rejects the call and plays a busy tone. If the digit is a 9, it rejects the call, plays a reorder tone and goes back to waiting for calls. If the digit is a 0, it immediately rejects the call by calling nccDisconnectCall, starting the disconnect procedure.
f. If a reject digit was not found in the incoming number, the program waits until a specified number of rings have been played by the TCP. When the rings have been played, the TCP answers the call.
g. If the first digit is not an 8, 9, or 0, the demonstration program plays a welcome message and speaks back the digits it received.
h. It then plays another prompt asking the user to choose an action by pressing a key on the telephone keypad. Available actions are: record a file (1), play a file (2), or hang up (3).
i. The demonstration program starts the DTMF tone detector and waits for a tone. If the tone does not arrive, it hangs up.
j. If the tone arrives, the demonstration program performs the action that the tone specifies, then hangs up.
6. If the demonstration program seizes the line first (outbound behavior):
a. It dials the number specified by the user. The calling number is precoded as 987.
b. If the user has selected the -P command line option (Non-Exclusive Mode), the program performs the switching to connect the B channel on which the call has been placed to the appropriate DSP resource on the board.
c. When the call is answered, the demonstration program starts call progress.
d. If call progress detects the busy tone, the program hangs up, and ring tones are reported to the user. If call progress finishes with silence or detects voice, the program starts recording.
e. When silence is detected by the recording functions, the demonstration program stops recording and plays the DTMF tone 3 meaning hang up for its inbound counterpart.
f. When playing is completed, it hangs up.
|
Outbound
|
|
Inbound
|
|---|---|---|
|
Place call.
|
![]()
|
Wait for call.
|
|
Get connected.
|
![]()
|
Answer call.
|
|
Record.
|
![]()
|
Speak prompt and digits.
|
|
Send DTMF tone.
|
![]()
|
Detect DTMF tone.
|
|
Hang up.
|
![]()
|
Hang up.
|
|
Under this OS...
|
Go to this directory...
|
Enter...
|
|---|---|---|
|
Windows NT
|
\nms\ctaccess\demos\isdnncc
|
nmake
|
|
UNIX
|
/opt/nms/ctaccess/demos/isdnncc
|
make
|
Call Placement Function MyPlaceCall
MyPlaceCall may also receive NCCEVN_CALL_DISCONNECTED, indicating that the called party has hung up. MyPlaceCall calls MyHangUp function to hang up the call.
Version2 In MVIP-90 terms, this is local streams 18:0,0.
Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.