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:
- To allow test agents to send/receive UDP and TCP without needing to manage sockets directly,
- 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:
|
|||
| 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: