Host port to port connection: hostp2p

hostp2p demonstrates live voice connection between two ports using play and record functions. This program uses simultaneous play and record of small buffers to simulate a real-time voice connection between two voice calls. It uses the asynchronous play and record functions of the ADI service.

Usage

hostp2p options

where options are:

Option

Use this option to specify the...

-b n

Board number. Default = 0.

-B n

Second board number (if different).

-s [n:]m

First port DSP address. Default = 0:0.

Specify only the timeslot.

-S [n:]m

Second port DSP address. Default = 0:1.

Specify only the timeslot.

-p protocol

Protocol to run. Default = LPS0.

-P protocol

Second port protocol (if different).

-e n

Encoding type. Refer to adidef.h. Default = 10 (mu-law).

-f n

Buffer size (ms). Default = 60.

-d digits

Digits to dial on port 2 (if not NOCC).

-E len:tim

Echo cancellation length:adaptime. Default = 4:100.

Running hostp2p

This procedure assumes that you are testing on an AG 2000 board with loop start line interfaces connected to phone lines. hostp2p requires rvoice.m54 and echo.m54 for an AG 2000 board.

Ensure that the board keyword file is set to SwitchConnections = Yes or Clocking.HBus.ClockMode = STANDALONE for the board you are using. These settings ensure that the default DSP-to-line interface connections are set up by the OAM API.

To run hostp2p:

Step

Action

1

Start hostp2p by entering the following command at the prompt:

hostp2p -p lps0 -d digits

hostp2p starts and the following information appears:

CTA host port to port voice Demo V 1.0 (Dec 8 1997)
   Port #1: Board 0 Stream 0 Slot 0 Protocol = lps0
   Port #2: Board 0 Stream 0 Slot 1 Protocol = lps0
   Encoding = 10
   Buffer time = 60 msec
   Echocanceling length = 4 msec, adapt time= 100 msec

   Initializing and opening the CTA context...
   Daemon not running. Using process global default parms.
   Trace disabled.
--------
   Waiting for incoming call...

hostp2p waits for an incoming call.

2

Place a call to the telephone line connected to port 0.

The following information appears:

Incoming Call...
Answering call...
Call connected.
-------
Placing a call to '5551212'...

hostp2p places a call to the number you specified. When the called party answers, you have a connection.