csplayrc
Demonstrates context sharing on a local server. Use csplayrc to
Attach and share contexts.
Hand off Natural Access object descriptors or context names from application to application.
Queue and receive events through shared communication contexts.
csplayrc [options]
where options include:
|
Option |
Use this option to specify... |
|---|---|
|
-m contextname |
The context name for the communication context. Note: This name must be the same communication context name as specified with incta.
|
|
-F filename |
The name of the Natural Access configuration file. |
ctaAttachContext, ctaCreateContextEx, ctaQueueEvent, vceCreateFile, vceOpenFile, vcePlayList, vceRecordMessage
Provides the same functionality as incta, but executes commands through a context shared by both csplayrc and incta. csplayrc performs voice play and record functions, while incta performs call control for incoming calls.
Note: When two applications are using a local server, an application-defined context name (specified with ctaCreateContextEx) can be used with ctaAttachContext as a substitute for an object descriptor. The object descriptor consists only of the host name and a context name.
csplayrc and incta work together as follows:
When you start csplayrc, it creates and names a context (by default named commn-cxt) which is used for sharing events with incta. csplayrc uses ctaWaitEvent to listen for events on the event queue.
When you start incta (specifying the -C option for server mode), it creates and names a context, and opens the Natural Call Control (NCC) service and the Voice Message (VCE) service on the context.
incta uses ctaAttachContext to attach to the context created by csplayrc (commn-cxt), and uses ctaQueueEvent to send an APPEVN_CONTEXT_NAME event to the context's event queue. The buffer field in the APPEVN_CONTEXT_NAME event points to the context name used to create the context in step 2.
csplayrc receives the APPEVN_CONTEXT_NAME event and extracts the context name from the buffer field of the event. csplayrc uses ctaAttachContext to attach to the context.
When incta receives calls, it uses ctaQueueEvent to send an APPEVN_RECORD_MESSAGE or APPEVN_PLAY_MESSAGE event to the communication context event queue, according to the input the user supplies.
Depending on the type of events it receives on the event queue, csplayrc uses appropriate VCE service functions to play or record voice messages for the specified calls.
The following procedure describes how to run csplayrc with incta. The procedure assumes you are testing on an AG 2000 board that has a 2500-type telephone connected to one of the lines.
Note: After Step 2, this procedure is identical to that used for running incta.
To run csplayrc with incta
Start csplayrc
by entering the following command at the prompt:
csplayrc
Start incta
by entering the following command at the prompt:
incta -C -b
n -s [stream:]slot -p wnk0
Specify the board and timeslot for the handset you are using.
Take the handset off-hook. The wink-start is acknowledged.
Enter three DTMF digits as the address.
|
If the first digit is... |
Then the demonstration releases the call... |
|---|---|
|
8 |
By playing a reorder tone. |
|
9 |
With a busy tone. |
|
0 |
By playing a special information tone. |
Otherwise, the call connects and the demonstration proceeds into the conversation state. You are prompted to record voice, play back your recorded sample, or hang up.
Select the record voice option.
You hear the record beep prompt.
Begin speaking after the prompt.
After you stop speaking, the record operation terminates and you return
to the options menu.
Select the playback option.
The sample you just recorded plays back and you return to the options
menu.
Select the hang-up option.