N2IVR (INAP)

Introduction

This section describes a base/typical deployment of the N2IVR product configured to offer INAP call control.

The solution specific applications which must be configured are:

The sub-component labelled “IVR” is the n2ivr_inap.lua script which defines the service logic.

LhoSipApp

The LhoSipApp is responsible for accepting the inbound SIP INVITE request, and handing it off to the LogicApp for call control.

You will need to review and configure the common SIP configuration parameters for this application as described in the Common SIP Configuration page. The default parameters should typically startup and function. Parameter settings are deployment-specific and cannot be generalised here.

In addition, for an N2IVR deployment of LhoSipApp set the additional parameters:

You can only have on LhoSipApp per SIP port number. I.e. you may not use the repeat attribute for this application unless you use multiple SIP ports.

NOTE: To migrate from SrpSipApp the following tasks are required:

Regarding the removed parameters listed above:

The LhoSipApp will communicate with the LogicApp. At the start of the call control it sends the message SCC-HANDLE-ALEG-INBOUND-INVITE.

The LhoSipApp will communicate with the RtpApp. When the RTP channel is required it sends the message RTP-ESTABLISH.

LogicApp

Configure a LogicApp as described in the Logic App Configuration page.

Various IVR-specific configuration is required, including application parameters:

Example:

    <parameters>
        <parameter name="default_lua_lib_path" value="../lua/lib/?.lua;../../n2sip/lua/lib/?.lua"/>
        <parameter name="default_tcap_app_name" value="SIGTRAN"/>
        ...

The InapLuaAgent and TcapLuaAgent agents must be configured. The IVR uses the INAP Agent to encode and decode INAP operation parameters. The IVR uses the TCAP Agent to send and receive TCAP messages via the configured SigtranApp.

Example:

    <agents>
      <agent module="SigtranApp::InapLuaAgent" libs="../apps/sigtran/lib"/>
      <agent module="SigtranApp::TcapLuaAgent" libs="../apps/sigtran/lib"/>
    </agents>

There must be an LhoSipIncallLuaService configured which handles the SIP incall sequence which begins when the LogicApp receives SCC-HANDLE-ALEG-INBOUND-INVITE.

This must have:

Example:

    <application name="Logic" module="LogicApp">
        <include>
            <lib>../apps/logic/lib</lib>
        </include>
        <parameters>
            <parameter name="default_lua_lib_path" value="../lua/lib/?.lua;../../n2sip/lua/lib/?.lua"/>
            <parameter name="default_tcap_app_name" value="SIGTRAN"/>
        </parameters>
        <services>
          <service module="LhoSipApp::LhoSipIncallLuaService" libs="../../n2sip/apps/lho_sip/lib" script_dir="../../n2sip/lua/svc" edr_stream_key="n2ivr">
            <globals>
              <global name="INAP_CONFIG">
                <scps type="array">
                  <scp id="1" dpc="4114" dssn="106"/>
                </scps>
                <correlation_id_len type="integer" value="3"/>
                <scp_id_location value="before"/>
                <scp_id_len type="integer" value="1"/>
                <nap_language_extension_id type="integer" value="400"/>
                <default_language_name value="English"/>
                <languages type="array">
                  <language id="1" name="English"/>
                  <language id="2" name="German"/>
                </languages>
              </global>
            </globals>

            <triggers >
              <trigger to_dtg="IVR" script_key="n2ivr_inap"/>              
            </triggers>
          </service>
          ...

The parameters in INAP_CONFIG are defined in the N2IVR (INAP) Lua Application Configuration page.

The LogicApp may have the “repeat” attribute configured to run multiple instances sharing system load, however this is not typically required even under load.

The LogicApp will communicate with the LogicApp by responding to the SCC-HANDLE-ALEG-INBOUND-INVITE message and subsequently exchanging messages to control the RTP stream and the SIP call.

The LogicApp will communicate with the SigtranApp by using the TcapLuaAgent to send a TCAP-SEND message containing the AssistRequestInstructions and subsequently sending/receiving TCAP messages containing INAP/CAMEL components and/or pre-arranged end.

RtpApp

The RtpApp should be configured as as described in the RTP App Configuration page.

The RtpApp may have the “repeat” attribute configured to run multiple instances sharing system load, and this is typically required for deployments which are expected to operate more than 100 channels. Refer to the RTP App Configuration page especially for information how RTP port assignment functions when using the “repeat” attribute.

The RtpApp will communicate with the LhoSipApp by responding to the RTP-ESTABLISH message and processing RTP-PLAY/RTP-PLAYED messages.

The RtpApp will communicate with the DBApp by sending DB-REQUEST to fetch audio metadata and audio data from the database.

Note: The RtpApp can also be configured to operate from flat file configuration/audio without using the database.

DBApp

The DBApp should be configured as as described in the DB App Configuration page.

The DBApp may have the “repeat” attribute configured to run multiple instances sharing system load. It may be desirable to run more than one copy of the DBApp in order to reduce set-up latency.

The DBApp for RTP operates in DBI mode.

The DBApp responds to the DB-REQUEST messages received from the RtpApp and returns DB-RESPONSE messages.

SigtranApp

The SigtranApp should be configured as as described in the SIGTRAN App Configuration page.

SIGTRAN parameter and connection settings are deployment-specific and cannot be generalised here.

You can only have on SigtranApp per SCTP port number. I.e. you may not use the repeat attribute for this application unless you use multiple SCTP ports.

The SigtranApp responds to the TCAP-SEND messages received from the LogicApp.