Building Interactive Voice Response Applications

The Application Server environment includes an integrated, full-featured, software-based media server that supports multiple codecs and is deployed along with the application server. There are also hardware-based media servers available from third party vendors that are compatible with the Application Server. However, the Application Server does include a software-based media server and MGCP-based interface to third party hardware-based media servers.

You can write an application that provides Interactive Voice Response (IVR) features such as playing prompts, collecting DTMF input, and recording speech input. It is then possible to deploy it across the different application server types without having to make any changes to the application.

XTML Media Server Data Types

A media server contains one or more media endpoints. A media endpoint can be both a source and a receiver of media and can perform processing on media streams such as DTMF detection and speech energy detection.

You create IVR applications by controlling a media endpoint in conjunction with a SIP dialog. To facilitate creating IVR applications, the following XTML objects are provided:

  • MediaEndpoint represents all the information related to a media endpoint.

  • MediaEndpointArray is an array of one or more MediaEndpoint objects.

Many of the PACs listed under Media/IVR on the Actions tab in the workspace pane operate on a MediaEndpoint object. Grouping all of the information associated with a media endpoint into a MediaEndpoint object simplifies application design and provides a level of abstraction that allows the same application to run over different underlying media server interfaces.

The properties and methods associated with a MediaEndpoint object are described in the following tables. The MediaEndpointArray object is a simple JavaScript array and does not have any new properties or methods.

MediaEndpoint Properties

Property

Type

Description

callid

String

Media server call ID value (MGCP only).

coachee

String

Associated media endpoint that is receiving the output of this endpoint in addition to any other inputs.

Note

The software media server supports a coach mode type of conference where one input stream is delivered to only a single conference participant. This facilitates call center type of applications, where a supervisor can hear an agent/customer conversation, but only the agent can hear the supervisor speak. In this scenario, the supervisor’s MediaEndpoint.coachee refers to the agent’s MediaEndpoint.

conference_mode

Integer

Value if the MediaEndpoint object is in a conference.

  • 0 - full send-receive audio

  • 1 - listen-only

  • 2 - speak only

  • 3 - no audio either way (on hold)

  • 4 - coach (receive all, send to one)

connection_id

String

Media server connection ID (MGCP only).

dtmf_clamp

Integer

Value if the MediaEndpoint is in a conference.

  • 0 - DTMF clamping off (DTMF is passed in audio)

  • 1 - DTMF clamping on (DTMF is removed from audio)

media_server_type

String

Indicates the underlying media server type.

  • PCS (Application Server software media server)

  • MGCP

  • SIP+MSML

  • SIP+MSCML

Note

Applications should store this value in a shared string variable that can be loaded at startup in the OnServiceLoad handler from a configuration file. Thus, only the value in the configuration file needs to be altered to run the application over a different underlying protocol.

mode

Integer

Endpoint mode.

  • 100 - conference

  • 101 - send/receive

  • 102 - listen-only

  • 103 - inactive

sdp

String

Session description protocol for the endpoint.

state

Integer

Current state of the endpoint.

  • 0 - not connected

  • 1 - connected/idle

  • 2 - previous play operation stopping

  • 3 - starting play operation

  • 4 - play operation complete

  • 5 - play operation failed

  • 6 - starting record operation

  • 7 - record operation complete

  • 8 - record operation failed

  • 9 - record operation terminated due to no speech detected

name

String

Endpoint name.

sip_dialog

String

Contains the information about the SIP dialog used to control the MediaEndpoint if SIP+MSML is the underlying interface.

MediaEndpoint Methods

Method

Return

Description

Clear()

Void

Clears the values of all properties and resets the MediaEndpoint to an uninitialized state.

LogDebug()

Void

Logs all of the MediaEndpoint properties to the PS_SysLog.txt file at DEBUG level.

LogInfo()

Void

Logs all of the MediaEndpoint properties to the PS_SysLog.txt file at INFO level.

Matches(MediaEndpoint)

Boolean

Returns true if the two objects refer to the same underlying media endpoint.

XTML Media Server PACs

This section defines the unique tabs included in the Properties window and the standard results available for each PAC listed under Media Server Commands and Media/IVR on the Actions tab in the workspace pane.

The Media Server Commands PACs are used to audit the media servers and connect to endpoints.

The Media/IVR PACs are used to perform functions related to the media server such as connecting to endpoints and playing prompts. These PACs also interact with media streams for functions such as playing or recording audio, collecting DTMF digits, or conferencing audio streams.

For more information about the common Description tab and Custom tab, see Build Functions and Custom Results.

Audit Media Server

The Audit Media Server PAC sends the Audit endpoint MGCP message to the media server. A successful response indicates that the media server is functioning, and no response indicates that the media server is not functioning.

Properties

The Audit Media Server PAC includes the General tab.

General
_images/Fig8_1.png
General Fields

Field Name

Type

Description

Media Server

String

Name of the user whose mail is to be updated.

Timeout

Short, Integer, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Return Code

Integer

Value returned to the calling function indicating the outcome of the operation.

  • 0 - success

  • 1 - login failed

  • 2 - create request failed

  • 3 - unable to connect to server

Exit Paths

In addition to the default result exit path, the Audit Media Server PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Connect to Media Server

The Connect to Media Server PAC connects an incoming call to the media server or creates a new media session for an existing stable call, such as a call that is on hold. The following are the different ways to establish a media session between a media server and a remote party.

  • A new arriving call is immediately connected to the media server.

  • A stable call leg that has already been answered is switched to be connected to the media server.

Properties

The Connect to Media Server PAC includes the General tab.

General
_images/Fig8_2.png

In the Call information section, enter the SIP headers for the call leg to connect to the media server. If the Connect to Media Server PAC is used for an inbound call or an existing stable call, enter the SIP headers from the call leg.

If the Connect to Media Server PAC is used to initiate an outdial, the application allows the PAC to generate default values for the SIP call information, with the exception of the gateway/proxy. In this case, be sure to provide output variables for each of the edit fields, and they will be updated with the values generated by the PAC.

General Fields

Field Name

Type

Description

To

String

To header from the SIP call leg that is going to be connected to the media server.

From

String

From header from the SIP call leg that is going to be connected to the media server.

SDP

String

Session description protocol (SDP) from the SIP call leg that is going to be connected to the media server. This describes the media session capabilities of the remote end of the connection.

Via

String

Via header from the arriving call. Only required when connecting an inbound call to the media server.

Call ID

String

SIP call ID from the call leg that will be connected to the media server.

CSeq

String

CSeq value from the call leg that will be connected to the media server.

Direct inbound call to media server

Radio Button

If selected, directs an incoming call to the media server.

Outdial from media server to caller

Radio Button

If selected, connects an existing, stable call leg to the media server or initiates an outdial of a new call from the media server.

Send early media before answer

Checkbox

If selected, a SIP 183 Session Progress provisional response will be sent to the connected SIP endpoint before the 200 OK final response. Applicable only when Direct inbound call to media server is selected.

Send early media only

Checkbox

If selected, only a SIP 183 Session Progress provisional response will be sent to the connected SIP endpoint and no 200 OK final response is sent. This allows an application to set up an early media connection without propagating answer supervision to the network. Applicable only when Direct inbound call to media server is selected.

Gateway / Proxy

Checkbox

SIP URL indicating the remote SIP endpoint to which signaling requests should be sent when connecting an existing call leg to the media server or when outdialing from the media server. Applicable only when Outdial from media server to caller is selected.

Route

String

Route header that will be contained in the SIP INVITE message sent to connect an existing call leg or outdial a new call leg. The Route header indicates the request’s signaling path. Applicable only when Outdial from media server to caller is selected.

Session Expires

String, Integer

For incoming calls, the Session-Expires header that was received in the SIP INVITE for the incoming call. Based on this value, and the application preferences specified in the Preferences section, a session timer value will be negotiated. For outbound calls, the Session Timer value that the application proposes to use for the call leg.

Supported

String

Supported header received on the incoming call. It is used to determine whether the remote party supports session timers as part of session timer negotiation during call setup. Applicable only to inbound scenarios.

Exit Paths

In addition to the default result exit path, the Connect to Media Server PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Resource Unavailable

Caller Hung Up

Create Connection

The Create Connection PAC is used to allocate a resource on a media server without actually connecting or generating any SIP signaling to a remote party.

In most cases, the Connect to Media Server PAC is the preferred method to allocate media server connections because that PAC automatically handles connecting the remote party to the endpoint. However, this PAC can be used to allocate a resource on a media server independently of any other action.

Properties

The Create Connection PAC includes the General and Events tabs.

General
_images/Fig8_3.png
General Fields

Field Name

Type

Description

Media endpoint object

String

Media endpoint associated with the connection.

Mode

Drop-down List

Mode of connection.

  • send-receive for generic IVR connections

  • conference for connections that will be mixed in a multi-party conference

  • inactive to initially created a connection if the remote media endpoint information is not known at the time of allocation

Remote SDP

String

Session description protocol describing the characteristics of the remote media endpoint. This is a required field, except when inactive is the selected mode.

Codec

Drop-down List

Audio codec to use on this media session. Allow the media server to choose by selecting no preference.

Packetization period

Integer

Time interval (in milliseconds) for which samples are encoded to make up a frame for the media stream sent if the media server default value is used.

Local connection options

String

Attributes that determine the operation of the media stream. These are attributes such as the packetization period, preferred type of compression algorithm, bandwidth, echo cancellation, gain control, silence suppression, type of service, and resource reservation parameters. Encryption key and type of network are also suggested to be included.

Media requirements

Drop-down List

Select ivr or conference.

Second endpoint object

String

Second media endpoint associated with the connection.

Media server type

Drop-down List

Type of media server. Select PCS for local media servers or another protocol for external media servers.

Media server

String

External media server.

Return value

Integer, Short, Float

Value returned to the calling function indicating the outcome of the operation, such as timeout or messaging failure.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Events
_images/Fig8_4.png
Events Fields

Field Name

Type

Description

Digit map

String

MGCP-style digit map that determines how DTMF events are collected and reported on the allocated connection.

Request

String

MGCP-style event request indicating which events should be reported from the allocated connection.

Signal

String

MGCP-style signal request indicating an operation to perform on the allocated connection.

Step

Checkbox

Quarantine handling that indicates how events should be processed when they are received in the absence of an active event request on the connection. If selected, indicates that exactly one notification is expected.

Process

Checkbox

If selected, quarantine events are processed.

Loop

Checkbox

If selected, multiple notifications are allowed.

Discard

Checkbox

If selected, quarantine events are discarded.

Note

These settings correspond directly to MGCP parameters described in IETF RFC 2705.

Exit Paths

In addition to the default result exit path, the Create Connection PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Delete Connection

The Delete Connection PAC is used to terminate a connection on a media server when an application has finished using it. When a current media server connection is deleted, the connection is then available for use by other application sessions.

The application server automatically deletes all connections associated with an application session when that session terminates. Therefore, even if an application does not properly delete its connections after use, there will be no stray connections left allocated on the media server.

Properties

The Delete Connection PAC includes the General and Events tabs.

General
_images/Fig8_5.png
General Fields

Field Name

Type

Description

Media endpoint object

String

Media endpoint associated with the connection.

Return Value

Integer, Short, Float

Value returned to the calling function indicating the outcome of the operation, such as timeout or messaging failure.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Events
_images/Fig8_6.png
Events Fields

Field Name

Type

Description

Digit map

String

MGCP-style digit map that determines how DTMF events are collected and reported on the allocated connection.

Request

String

MGCP-style event request indicating which events should be reported from the allocated connection.

Signal

String

MGCP-style signal request indicating an operation to perform on the allocated connection.

Step

Checkbox

Quarantine handling that indicates how events should be processed when they are received in the absence of an active event request on the connection. If selected, indicates that exactly one notification is expected.

Process

Checkbox

If selected, quarantine events are processed.

Loop

Checkbox

If selected, multiple notifications are allowed.

Discard

Checkbox

If selected, quarantine events are discarded.

Note

These settings correspond directly to MGCP parameters described in IETF RFC 2705.

Exit Paths

In addition to the default result exit path, the Delete Connection PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Modify Connection

The Modify Connection PAC is used to modify a connection to an MGCP endpoint. For example, you can connect to a remote endpoint identified by the SDP in a SIP Request.

Properties

The Modify Connection PAC includes the General and Events tabs.

General
_images/Fig8_7.png
General Fields

Field Name

Type

Description

Media endpoint object

String

Media endpoint associated with the connection.

Second endpoint object

String

Second media endpoint associated with the connection.

Local connection options

String

Attributes that determine the operation of the media stream. These are attributes such as the packetization period, preferred type of compression algorithm, bandwidth, echo cancellation, gain control, silence suppression, type of service, and resource reservation parameters. Encryption key and type of network are also suggested to be included.

Mode

Drop-down List

Mode of connection.

  • send-receive for generic IVR connections

  • conference for connections that will be mixed in a multi-party conference

  • inactive to initially created a connection if the remote media endpoint information is not known at the time of allocation

Remote SDP

String

Session description protocol describing the characteristics of the remote media endpoint. This is a required field, except when inactive is the selected mode.

Codec

Drop-down List

Audio codec to use on this media session. Allow the media server to choose by selecting no preference.

Packetization period

Integer

Time interval (in milliseconds) for which samples are encoded to make up a frame for the media stream sent if the media server default value is used.

Return value

Integer, Short, Float

Value returned to the calling function indicating the outcome of the operation, such as timeout or messaging failure.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Events
_images/Fig8_6.png
Events Fields

Field Name

Type

Description

Digit map

String

MGCP-style digit map that determines how DTMF events are collected and reported on the allocated connection.

Request

String

MGCP-style event request indicating which events should be reported from the allocated connection.

Signal

String

MGCP-style signal request indicating an operation to perform on the allocated connection.

Step

Checkbox

Quarantine handling that indicates how events should be processed when they are received in the absence of an active event request on the connection. If selected, indicates that exactly one notification is expected.

Process

Checkbox

If selected, quarantine events are processed.

Loop

Checkbox

If selected, multiple notifications are allowed.

Discard

Checkbox

If selected, quarantine events are discarded.

Note

These settings correspond directly to MGCP parameters described in IETF RFC 2705.

Exit Paths

In addition to the default result exit path, the Modify Connection PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Notify Request

The Notify Request PAC is used to send an MGCP notify request to a media server endpoint. A notify request is a general purpose message that can carry any type of signal request and is used for performing most operations on a media server connection.

For more information about how this PAC can be used, see Appendix E: Generate Tones with Notify Request PAC.

Properties

The Notify Request PAC includes the General and Events tabs.

General
_images/Fig8_9.png
General Fields

Field Name

Type

Description

Media endpoint object

String

Media endpoint associated with the connection.

Return Value

Integer, Short, Float

Value returned to the calling function indicating the outcome of the operation, such as timeout or messaging failure.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Events
_images/Fig8_10.png
Events Fields

Field Name

Type

Description

Digit map

String

MGCP-style digit map that determines how DTMF events are collected and reported on the allocated connection.

Request

String

MGCP-style event request indicating which events should be reported from the allocated connection.

Signal

String

MGCP-style signal request indicating an operation to perform on the allocated connection.

Step

Checkbox

Quarantine handling that indicates how events should be processed when they are received in the absence of an active event request on the connection. If selected, indicates that exactly one notification is expected.

Process

Checkbox

If selected, quarantine events are processed.

Loop

Checkbox

If selected, multiple notifications are allowed.

Discard

Checkbox

If selected, quarantine events are discarded.

Note

These settings correspond directly to MGCP parameters described in IETF RFC 2705.

Exit Paths

In addition to the default result exit path, the Notify Request PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Play and Collect

The Play and Collect PAC is used to play prompts and collect dual-tone multi-frequency (DTMF) signals in a single MGCP signal.

Properties

The Play and Collect PAC includes the General, Prompts, and Collect tabs.

General
_images/Fig8_11.png
General Fields

Field Name

Type

Description

Start play/Stop play

Radio Button

This PAC operation either starts or stops play on a media endpoint.

Return immediate

Checkbox

If selected, this PAC returns and follows its exit paths before play is finished.

Play on endpoint/Play on conference

Radio Button

Choose between playing this media to an individual media endpoint or all of the endpoints in a conference.

Media endpoint object

String

Media endpoint associated with the connection.

Conference object

String

Conference associated with the connection.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Played length

String

Length of time used for the playing of media by this PAC.

Digits collected

String

DTMF digits and symbols collected during playback.

Terminating digit

Final digit in the digits collected.

Reason code

Variable to hold the numeric code on completion of the PAC.

Prompts
_images/Fig8_12.png
Prompts Fields

Field Name

Type

Description

Stop on DTMF

Checkbox

Stops media playback on detection of DTMF.

Repeat forever

Checkbox

If selected, the prompt repeats forever.

Clear digit buffer

Checkbox

Removes any digits currently in the DTMF digit buffer.

Offset to play initial prompt

String

Silence before playing this prompt.

Language

String

Language to use when playing media. Requires that the appropriate prompts in the language requested are available.

Number of times to repeat

Drop-down List

Number of times to repeat the prompt.

Time to play

String

Time to play the prompt.

Prompt list

String

List of prompts that will be played by this PAC.

Collect
_images/Fig8_13.png
Collect Fields

Field Name

Type

Description

Digit map

String

MGCP-style digit map that determines how DTMF events are collected and reported on the allocated connection.

First digit timer

Integer

End key

String

DTMF key to end collecting.

Inter digit timer

Integer

Inter digit critical timer

Integer

Exit Paths

In addition to the default result exit path, the Play and Collect PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

No/Impossible Match

The collected digits did not match the digit map.

First Digit Timeout

No digits were entered by the far end before the first timeout expired.

Play Prompts on a Media Server

To play audio prompts on a media server resource, an application uses the Play and Collect PAC.

The Prompts tab of the PAC specifies information for playing the prompt where you can build a prompt list and select pre-recorded prompts in the Message type field.

_images/Fig8_19.png

Specifying the language of the prompt is a requirement on this tab. The Application Server comes with prompts in English. If other languages are required, contact Customer Support.

Collect DTMF digits from the Media Server

When a connection is established to a media server resource, an application can prompt the caller and collect DTMF entries using the Play and Collect PAC.

The application provides a specification of the digit patterns using a digit map, and the media server then collects the digits without reporting back to the application until either one of the specified digit maps is matched or a timeout condition occurs. At that point, all the digits that were collected are returned back to the application with an indication of the event triggering the report.

Digit maps are specified according to the syntax originally defined as part of the IETF protocol. The table below defines the digit map tokens.

Token

Description

x or X

Any digit.

0-9, A-D, number sign (#), and asterisk (*)

Exact match to the character.

T

Interdigit timeout.

period (.)

Any number of the token preceding the dot.

[token1|token2|token3]

Any one of the specified token.

[token1-token2]

Any token in the range.

Note

Language grammars are supported using software plug-ins that allow additional grammars to be added upon customer demand.

Examples
Digit Map: x.T|x.#
Explanation: Any number of digits, terminated either by a number sign or an interdigit timeout. This digit map might be used, for example, when collecting a generic digit string when the user has been prompted to terminate the entry with a number sign.
Digit Map: 1xxxxxxxxxx|[2-9]xxxxxxxxx
Explanation: If the user first enters a 1, collect 10 more digits. If they enter a digit between 2 and 9 inclusive, collect 9 more digits. This digit map might be used, for example, to collect a North American phone.
Digit Map: Xxxxxxxxxx|x.T|.x#
Explanation: Collect exactly 10 digits or some lesser number of digits if terminated by a number sign or by an interdigit timeout. This digit map might be used, for example, to collect a 10-digit pin.

Record Audio Stream

The Record Audio Stream PAC allows the application to record an incoming media stream.

Properties

The Record Audio Stream PAC includes the General, Record Parameters, and Auxiliary Parameters tabs.

General
_images/Fig8_14.png
General Fields

Field Name

Type

Description

Return immediate

Checkbox

If selected, this PAC returns and follows its exist paths before recording is finished.

Start/Stop/Delete

Radio Button

Starts, stops, or deletes a recording.

Record on endpoint/Record on conference

Radio Button

Choose between recording media from an individual media endpoint or all endpoints in a conference.

Media endpoint object

String

Media endpoint associated with the connection.

Conference object

String

Conference associated with the connection.

Return Value

Integer, Short, Float

Value returned to the calling function indicating the outcome of the operation, such as timeout or messaging failure.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Record Parameters
_images/Fig8_15.png
Record Parameters Fields

Field Name

Type

Description

Record URL

String

Location to send the recording.

Note

When this field is empty, the software media server records to a local file and updates the string variable with the file name.

Append to file

Checkbox

Adds the recording to an existing file or records to a new file.

Cleanup

Checkbox

If selected, indicates to the application server that it should delete the temporary file when the application session that created the file ends.

Play beep

Checkbox

Plays a beep sound before recording.

Record length timer

Integer

Length of time before recording.

Pre speech timer

Integer

Record after this amount of time regardless of if speech is detected.

End key

String

DTMF key to end recording.

Post speech timer

Integer

Stops recording after no speech is detected for this amount of time.

Record length

Integer

Length of time of the recording.

DTMF Digits

String

Any DTMF collected during this recording.

Reason code

String

Variable to hold the numeric code on completion of the PAC.

Auxiliary Parameters
_images/Fig8_16.png
Auxiliary Parameters Fields

Field Name

Type

Description

Encoding

String

The audio codec used to store this recording.

AGC

Checkbox

Auto Gain Control

AGC target

String

Target decibel level for the media.

Gain

String

Increase the volume of the recording by this number of dB.

Silence level

String

An audio filter that cuts away sound of this number of dB or less.

Beep frequency

String

Frequency of the “Record Now” beep.

Beep amplitude

String

Volume of the “Record Now” beep.

Beep duration

String

Duration of the “Record Now” beep.

Exit Paths

In addition to the default result exit path, the Record Audio Stream PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

No Speech Detected

The timeout for speech detection has expired and no speech was detected.

RTP Relay

Properties

The RTP Relay PAC includes the General tab.

General
_images/Fig8_17.png
General Fields

Field Name

Type

Description

Source media endpoint

String

The media endpoint generating media

Destination media endpoint

String

The media endpoint receiving media.

Timeout

Integer, Short, Float

Time period (in seconds) in which a response is required. If there is no response within this period, the PAC returns a timeout error branch.

Exit Paths

In addition to the default result exit path, the RTP Relay PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to next PAC to be executed in the event that the operation times out.

No Speech Detected

The timeout for speech detection has expired and no speech was detected.

Set Digit Map

The Set Digit Map PAC is used to specify a map for how DTMF events are collected and reported on the allocated connection.

Properties

The Set Digit Map PAC includes the General tab.

General
_images/Fig8_18.png
General Fields

Field Name

Type

Description

Media endpoint object

String

Media endpoint associated with the connection.

Digit map

String

MGCP-style digit map that determines how DTMF events are collected and reported on the allocated connection.

Exit Paths

In addition to the default result exit path, the Set Digit Map PAC includes the result exit paths listed in the following table.

Exit Path

Description

Success

Points to the next PAC to be executed in the event that the connection is successful.

Error

Points to the next PAC to be executed in the event that the operation returned an error.

Timeout

Points to the next PAC to be executed in the event that the operation times out.

Application Development Guidelines

The following are guidelines to follow when developing applications:

  • In your OnSipDialogRequested event handler, allocate an endpoint and connect the caller to it by using the Respond to SIP Dialog Request PAC.

_images/Fig8_20.png

On the SIP dialog configuration tab, configure the following settings:

  • Select Connect dialog to a local media endpoint in the Action field.

  • Type the media endpoint variable in the Media endpoint object field.

  • Select the Allocate new endpoint checkbox.

  • Select ivr in the Media requirements field.


  • Have a shared string variable containing the media server type value. For the best application portability, populate this string variable from a configuration file in your OnServiceLoad handler.

  • If you are using the SIP interface to the media server, then the media server SIP address should be supplied in the Media server field on the SIP dialog configuration tab. Otherwise, this field is not used. To build your application to work for all interfaces, always supply a variable for this field. You will need to make sure you have logic elsewhere in the application (or in the database or external java code that you call from your application) that sets this appropriately if a SIP interface is being used.

  • Use the Play and Collect PAC to prompt and collect DTMF input and the Record Audio Stream PAC to record audio.

  • Use the Delete Connection PAC to free the media endpoint when the application is done with it. If you forget to do so, the application server automatically frees the endpoint when the application session ends.