TestSipApp

Test SIP Application Configuration

The Test SIP Application is a utility application which listens for and sends out UDP or TCP payloads on behalf of other applications.

It exists as a separate application for two reasons:

  1. To allow test agents to send/receive UDP and TCP without needing to manage sockets directly,
  2. For scalability, to allow multiple processes to serve inbound requests from a single UDP or TCP port.

Here is a configuration example, connecting to a remote host via UDP:

<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
  ...
  <applications>
    ...
    <application name="TestSipApp" module="TestSipApp">
      <include>
        <lib>../apps/test_sip/lib</lib>
      </include>
      <parameters>
        <parameter name="sip_listen_udp" value="yes"/>
        <parameter name="sip_bind_host" value="${N2SVCD_TEST_IP}"/>
        <parameter name="sip_bind_port" value="5063"/>
        <parameter name="allow_default_sip_peer" value="yes"/>
      </parameters>
      <config>
        <sip_peers>
          <sip_peer id="LHO" sip_host="${N2SVCD_TEST_IP}" sip_port="5061" sip_domain="${N2SVCD_TEST_IP}" tcp_connect="no"/>
        </sip_peers>
        <trunks>
          <trunk sip_peer_id="LHO"/>
        </trunks>
      </config>
    </application>
    ...
  </applications>
  ...
</n2svcd>

Note the use of ${N2SVCD_TEST_IP}. All parameter value attributes support the use of environment variables to allow a single n2svcd.xml to operate on different platforms without needing to be modified for each platform.

Configuration Details

The application element attributes for a Test SIP Application instance may include the below.

For details of the various parameter types used, refer to Common Configuration.

Parameter Name Type XML Type Description
See: Common Application configuration
See: SIP Application configuration
Note the following parameters apply as documented:
  • throttle_max_instances to sip_udp_sndbuf (inclusive)
  • sip_contact_host and sip_contact_port
  • default_transport_policy
  • sip_tcp_link_reconnect_secs, sip_link_check_secs, and sip_link_check_type
  • sip_peers, sip_peer_groups, trunks, and endpoints
The following parameters apply only for link check OPTIONS requests and responses:
  • sip_user_agent
  • allowed_method_list
  • suppress_to_user and suppress_to_port
  • sip_notrace_options
  • sip_response_error_mode
  • sip_auth_schema and sip_open_options
  • sip_accounts
The following parameters apply only for endpoint REGISTER requests and responses:
  • sip_contact_transport and sip_contact_user
  • sip_user_agent
  • allowed_method_list
  • suppress_to_port
  • sip_notrace_register
  • sip_response_error_mode
  • out_registration_expires, out_registration_retry, and out_registration_buffer
  • sip_auth_schema
  • sip_registry_cache
  • sip_accounts
All other parameters have no effect.
See: Normalisation and Denormalisation Rules
module String Attribute [Required] TestSipApp
include.lib String Attribute [Required] ../apps/test_sip/lib
parameters Array Element [Required] As per Common Configuration Application parameters.
"edr_enabled" - - This value is ignored; the Test SIP Application does not support writing EDRs.
"allow_default_sip_peer" Boolean Attribute True to allow the Test SIP Application to use the called party to select the target peer for out-calls.
When false, the Test SIP Lua Agent must specify the target peer.
(Default = false, the target peer must be specified).
"incall_reg_expiry_secs" Positive Integer Attribute The expiry period in seconds for in-call registrations.
The first in-call request must be received within this time.
(Default = 5 seconds).
"activity_extension_secs" Positive Integer Attribute The extension period in seconds for call lifetime, applied when an inbound or outbound request or response is received or sent.
Calls that do not send or receive any inbound or outbound requests or responses for this period of time will be purged.
(Default = 310 seconds).

Message Handling

In addition to the common Application management messages, the TestSipApp uses the following messages: