Common Configuration (SIP)
Overview
Some Application instances contain SIP functionality based on the SipApp
base class. In addition to the
common Application configuration parameters and their
application-specific attributes, these SIP Applications typically require SIP configuration as indicated below.
<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
...
<applications>
...
<application name="(name)" module="(module)">
<include><lib>/path/to/library</lib></include>
<parameters>
<!-- application-specific parameters -->
...
<!-- SIP application parameters -->
<parameter name="sip_bind_host" value="0.0.0.0"/>
<parameter name="sip_bind_port" value="5060"/>
...
<!-- SDP and RTP integration -->
<parameter name="early_media_policy" value="never"/>
</parameters>
<!-- SIP extended configuration -->
<config>
<!-- INVITE headers -->
<invite_headers>
<invite_header name="Diversion" request_edr="DVT" response_edr="DVT2" relay_request="yes"/>
<invite_header name="Remote-Party-ID" relay_request="yes"/>
<invite_header name="Ring-Timer" relay_response="yes"/>
</invite_headers>
<!-- Outbound -->
<sip_peers>
<sip_peer id="LOCAL-IVR" sip_host="192.168.1.5" sip_port="5060"/>
<sip_peer id="LOCAL-MSS1" sip_host="192.168.1.6" sip_port="5060"/>
<sip_peer id="LOCAL-MSS2" sip_host="192.168.1.7" sip_port="5060"/>
<sip_peer id="REMOTE-MSS" sip_host="1.2.3.4" sip_port="5060"/>
</sip_peers>
<sip_peer_groups>
<sip_peer_group name="MSS-GROUP">
<sip_peer id="LOCAL-MSS1" priority="2"/>
<sip_peer id="LOCAL-MSS2" priority="2"/>
<sip_peer id="REMOTE-MSS" priority="1"/>
</sip_peer_group>
</sip_peer_groups>
<trunks>
<trunk sip_peer_id="LOCAL-IVR" leading="999" />
<trunk sip_peer_group="MSS-GROUP"/>
</trunks>
<!-- Inbound -->
<sip_accounts>
<sip_account id="LP1" username="665566" password="ABC" from_user_prefix="+9111421451"/>
<sip_account id="IVR" username="+911142145100@192.168.1.5" password="Aclmob#1" from_user="665566"/>
</sip_accounts>
</config>
</application>
...
</application>
...
</n2svcd>
These SIP parameters include both server-relevant (inbound) and client-relevant (outbound) configuration parameters.
Not all parameters are relevant to all SIP applications.
Configuration Details
The application
element attributes for all SIP Application instances are as below.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
parameters
|
Array | Element |
[Required] As per Common Configuration Application
parameters .
|
throttle_max_instances
|
Positive Integer | Attribute |
A hard limit on the number of instances which may be in progress at any time. An instance is created by an inbound or outbound SIP Request for OPTIONS, REGISTER. An instance is also created by an inbound or outbound INVITE associated with an A-Leg. An outbound INVITE for a B-Leg associated with an existing A-Leg does not create a new instance. If this limit reaches the percentage configured by high_load_pc then an alarm will be activated.If this limit is exceeded, then new inbound A-Leg INVITE requests will be throttled and an alarm will be activated. (Default = 50,000 )
|
throttle_max_tps
|
Positive Integer | Attribute |
A hard limit on the number of transactions which are permitted when computed as an average over throttle_average_secs seconds.A transaction in this context means the creation of a new instance as described for throttle_max_instances .If this limit reaches the percentage configured by high_load_pc then an alarm will be activated.If this limit is exceeded, then new inbound A-Leg INVITE requests will be throttled and an alarm will be activated. (Default = 200 )
|
throttle_average_secs
|
Integer ( 1 ..60 )
|
Attribute |
The number of seconds over which the average TPS will be measured for the purpose of throttling. The value is measured over this many whole seconds, plus the additional in-progress partial second. (Default = 5 )
|
sip_public_host
|
Hostname or IPv4 Address |
Attribute |
Default public host name fallback for various other configuration parameters. (Default = automatically determined from system configuration) |
sip_public_port
|
Integer | Attribute |
Default public port number fallback for various other configuration parameters. (Default = the relevant UDP and/or TCP bind port) |
sip_public_domain
|
Hostname or IPv4 Address |
Attribute |
The advertised public domain name for the "From" header address URI for generated INVITE and
REGISTER SIP requests. Realm Inbound REGISTER requests must match this domain. (Default = the value of sip_public_host )
|
sip_bind_host
|
Hostname or IPv4 Address |
Attribute |
Convenience parameter which sets sip_bind_udp_host , sip_bind_tcp_host ,
sip_public_udp_host , sip_public_tcp_host , and sip_contact_host .(Default = 0.0.0.0 )
|
sip_bind_port
|
Integer | Attribute |
Convenience parameter which sets sip_bind_udp_port and sip_bind_tcp_port .(Default = 5060 )
|
sip_listen_udp
|
Boolean | Attribute |
Whether to bind to a UDP port to accept and send SIP. (Default = true )
|
sip_bind_udp_host
|
Hostname or IPv4 Address |
Attribute |
Bind address for local SIP UDP listener (also used for sending UDP). (Default = the value of sip_bind_host >)
|
sip_bind_udp_port
|
Integer | Attribute |
Bind port for local SIP UDP listener (also used for sending UDP). (Default = the value of sip_bind_port )
|
sip_public_udp_host
|
Hostname or IPv4 Address |
Attribute |
The public UDP host, placed in the "Via" sent-by for Requests sent over UDP transport. (Default = the configured value for "sip_public_host"). |
sip_public_udp_port
|
Integer | Attribute |
The public UDP port, placed in the "Via" sent-by for Requests sent over UDP transport. This value is only placed in the "Via" sent-by if it is a value other than 5060 (the well-known default).(Default = the value for sip_public_port if explicitly configured, otherwise sip_bind_udp_port ).
|
sip_bind_tcp_host
|
Hostname or IPv4 Address |
Attribute |
Bind address for local SIP listener for accepting inbound TCP connections. (Default = the value of sip_bind_host )
|
sip_bind_tcp_port
|
Integer | Attribute |
Bind port for local SIP listener for accepting inbound TCP connections. (Default = the value of sip_bind_port )
|
sip_public_tcp_host
|
Hostname or IPv4 Address |
Attribute |
The public TCP host, placed in the "Via" sent-by for Requests sent over TCP transport. (Default = the configured value for sip_public_host ).
|
sip_public_tcp_port
|
Integer | Attribute |
The public TCP port, placed in the "Via" sent-by for Requests sent over TCP transport. This value is only placed in the "Via" sent-by if it is a value other than 5060 (the well-known default).(Default = the value for sip_public_port if explicitly configured, otherwise sip_bind_tcp_port ).
|
sip_peer_tcp_connect
|
Boolean | Attribute |
The default setting for if a SIP Peer should automatically attempt to out-bind a permanent TCP connection. This value may be overridden on a per-Peer basis. Changing this value dynamically via the management interface will only take effect for any SIP Peers if they are updated via the management interface. (Default = true )
|
sip_tcp_nodelay
|
Boolean | Attribute |
When true, the TCP-specific flag TCP_NODELAY will be explicitly
set for both:
When false, the flag is not explicitly set and the operating system default values will apply. It is not possible to expressly disable TCP_NODELAY on
SIP TCP connections.Note that some operating systems may not accept this value, or may accept it but not apply it. (Default = false , use operating system default)
|
sip_tcp_quickack
|
Boolean | Attribute |
When true, the TCP-specific flag TCP_QUICKACK will be explicitly
set for both:
When false, the flag is not explicitly set, and the operating system default values will apply. It is not possible to expressly disable TCP_QUICKACK on
SIP TCP connections.Note that some operating systems may not accept this value, or may accept it but not apply it. (Default = false , use operating system default)
|
sip_tcp_rcvbuf
|
Integer | Attribute |
Setting this attribute will cause the socket SO_RCVBUF receive buffer size to be explicitly set to the indicated
value for both:
Note that the actual value applied by the operating system is typically double the requested/configured value, and that the operating system will typically apply minimum/maximum buffer sizes which must be respected. (Default = system default sizing will apply) |
sip_tcp_sndbuf
|
Integer | Attribute |
Setting this attribute will cause the socket SO_SNDBUF send buffer size to be explicitly set to the indicated
value for both:
Note that the actual value applied by the operating system is typically double the requested/configured value, and that the operating system will typically apply minimum/maximum buffer sizes which must be respected. (Default = system default sizing will apply) |
sip_contact_transport
|
String | Attribute |
The value for the ;transport=... parameter that will be included in the Contact address URI created
for sending in SIP INVITE Request and Response messages as our address for the purpose of subsequent in-dialog
transactions, e.g. BYE, re-INVITE, or INFO. Possible values are:
Otherwise, the Contact sent will not include any transport parameter. (Default = udp if only UDP is bound, tcp if only TCP is bound, otherwise not present)
|
sip_contact_user
|
String | Attribute |
The user that will be included in the Contact address URI created
for sending in SIP INVITE Request and Response messages as our address for the purpose of subsequent in-dialog
transactions, e.g. BYE, re-INVITE, or INFO. This value is only used in the unusual case when there is not a more appropriate calling or called party PSTN. (Default = n2sip )
|
sip_contact_host
|
Hostname or IPv4 Address |
Attribute |
The host name that will be included in the Contact address URI created
for sending in SIP INVITE Request and Response messages as our address for the purpose of subsequent in-dialog
transactions, e.g. BYE, re-INVITE, or INFO. (Default = the value of sip_public_host )
|
sip_contact_port
|
Integer | Attribute |
The port number that will be included in the Contact address URI created
for sending in SIP INVITE Request and Response messages as our address for the purpose of subsequent in-dialog
transactions, e.g. BYE, re-INVITE, or INFO. If this value is configured, then it will be included as the Contact port number (even if it is the default). Otherwise, the Contact sent will only include the port number if it is not the default. (Default = the UDP bind port (if not = 5060 ), or the TCP bind port (if not = 5060 )
|
sip_user_agent
|
String | Attribute |
User Agent Identifier for outbound SIP Request/Response header. (Default = N-Squared SIP )
|
allowed_method_list
|
String | Attribute |
The list of allowed methods that we return in our Allow header.(Default = INVITE,ACK,BYE,CANCEL,OPTIONS,REGISTER,INFO,PRACK )
|
default_transport_policy
|
String | Attribute |
Allows specifying a transport policy name to use
as the default transport policy when no policy otherwise applies. Note that this does not change the default values within other transport policies. (Default = no default policy, default transport policy values apply) |
suppress_to_user
|
Boolean | Attribute |
Should the user part in the To URI and Request-URI be suppressed for OPTIONS Requests initiated? If true, the user address part will never be included in the To URI and Request-URI for OPTIONS Requests initiated. Otherwise, the peer ID is included as the user address part in the To URI and Request-URI for OPTIONS Requests initiated. (Default = true )
|
suppress_to_port
|
Boolean | Attribute |
Should peer port numbers be suppressed in the To URI and Request-URI for INVITE and REGISTER Requests initiated? If true, the port number will never be included in the To URI and Request-URI for INVITE and REGISTER Requests initiated. Otherwise, when the port number in the To URI and Request-URI for INVITE and REGISTER Requests initiated is a value other than 5060 (the well-known default) then it will be explicitly included.Note that the default value of 5060 is never included.(Default = false )
|
sip_inbound_prack_policy
|
String | Attribute |
Specifies the handling of requests to support RFC 3262 reliable provisional response (PRACK)
for inbound INVITE requests. Valid values are:
if_supported )
|
sip_outbound_prack_policy
|
String | Attribute |
The support offered for RFC 3262 reliable provisional response (PRACK)
when handling outbound SIP INVITE requests. Valid values are:
disabled )
|
allow_1xx_policy
|
String | Attribute |
Specifies when the optional Allow header should be included when sending INVITE
Responses with status codes 100 -199 . Valid values are:
reliable )
|
early_dialog_100
|
Boolean | Attribute |
Should the SIP Dialog be constructed early (at the time of sending the 100 Trying response)?This is not valid according to RFC 3261, however some user agents expect/require it. (Default = false )
|
sip_max_forwards
|
Integer | Attribute |
Value for the Max-Forwards header in outbound SIP Requests. (Default = 70 )
|
sip_edr_merge
|
Boolean | Attribute |
Should SIP Request/Response EDRs be merged into a single EDR logged at response time? (Default = true )
|
sip_edr_ack
|
Boolean | Attribute |
Should EDRs be generated for received inbound and sent outbound ACK Requests? (Default = false )
|
sip_edr_prack
|
Boolean | Attribute |
Should EDRs be generated for received inbound and sent outbound PRACK Requests? (Default = false )
|
sip_edr_reinvite
|
Boolean | Attribute |
Should EDRs be generated for received inbound and sent outbound re-INVITE Transactions? (Default = false )
|
sip_notrace_options
|
Boolean | Attribute |
Force disabling of tracing for inbound and outbound SIP OPTIONS instances? (Default = true )
|
sip_notrace_register
|
Boolean | Attribute |
Force disabling of tracing for inbound and outbound SIP REGISTER instances? (Default = true )
|
sip_bleg_invite_header_attempt_num
|
Boolean | Attribute |
Whether to add an Attempt-Number header to all outbound B-Leg SIP INVITE Requests for new SIP Dialogs. This header contains an integer counter that begins at 1 for the first B-Leg attempt on this
call and is incremented for each subsequent B-Leg attempt.(Default = false )
|
sip_bleg_invite_header_aleg_callid
|
Boolean | Attribute |
Whether to add an A-Leg-Call-ID header to all outbound B-Leg SIP INVITE Requests for new SIP Dialogs. This header copies the inbound A-Leg Call-ID field across to the B-Leg outbound INVITE. (Default = false )
|
sip_invite_request_header_instance_gid
|
Boolean | Attribute |
Whether to add an Instance-GID header to all outbound SIP INVITE Requests for new SIP Dialogs. This header contains the Instance GID (global unique ID) for the call instance controlling this INVITE, allowing easy correlation with EDRs. (Default = false )
|
sip_invite_response_header_instance_gid
|
Boolean | Attribute |
Whether to add an Instance-GID header to Responses to new, valid inbound SIP INVITE Requests (not re-INVITE). This header is added to non-Trying provisional (1XX), OK (2XX), or Decline (300-699) Responses sent for the INVITE and contains the Instance GID (global unique ID) for the call instance controlling this INVITE. Note that this header is not added to Responses to invalid INVITE Requests. (Default = false )
|
sip_rfc3325_mode
|
String | Attribute |
Configures support for RFC 3325 P-Asserted-Identity header relay from A-Leg to B-Leg. Possible values are:
trusted )
|
sip_charging_vector_relay_mode
|
String | Attribute |
Configures support for RFC 3455 P-Charging-Vector header relay from A-Leg to B-Leg. Possible values are:
trusted )
|
sip_charging_vector_outcall_mode
|
String | Attribute |
Configures support for the RFC 3455 P-Charging-Vector header when creating a new A-Leg Outcall. Valid values are:
icid )
|
sip_response_error_mode
|
warning / text_plain / error_info / none
|
Attribute |
Configure how extended error descriptions are sent back in SIP Responses for 500 Server Internal Error and other similar cases. Valid values are:
warning )
|
sip_queue_blocked_relay_reinvite
|
Boolean | Attribute |
Queue re-INVITEs that can't be relayed immediately? RFC 3261 specifies that only one re-INVITE can be in progress on a SIP Dialog at any given time. This attribute specifies what an application will do if a re-INVITE is received from an external User Agent for relay on a dialog that already has a re-INVITE in-progress. When this attribute is true, the new re-INVITE will be queued for relay at a later time. Note that queued re-INVITEs can be cancelled. Otherwise, the new re-INVITE will be declined with response code 491 Request Pending , allowing the User Agent to choose what to do.(Default = true ).
|
out_registration_expires
|
Integer | Attribute |
Requested number of seconds for expiry of outbound REGISTER Requests for configured endpoints. (Default = 3600 )
|
out_registration_retry
|
Integer | Attribute |
Number of seconds between retry of failed outbound REGISTER for configured endpoints. (Default = 600 )
|
out_registration_buffer
|
Integer | Attribute |
Number of seconds prior to expiry before renewing REGISTER for configured endpoints. (Default = 30 )
|
sip_tcp_link_reconnect_secs
|
Positive Integer | Attribute |
How often (in seconds) between attempts to re-connect a SIP TCP connection which has disconnected or failed to connect. (Default = 5 )
|
sip_link_check_secs
|
Integer | Attribute |
How often (in seconds) to perform a status check on a TCP or UDP link. Setting to 0 will disable link status checks.
(Default = 30 )
|
sip_link_check_type
|
String | Attribute |
How to perform a status check on a connected Link (including the initial login check).
dada )
|
sip_auth_schema
|
String | Attribute |
How inbound SIP Requests are authenticated. Valid values are:
open , do not validate inbound SIP Requests)
|
sip_open_ack
|
Boolean | Attribute |
Whether to allow inbound SIP ACK Requests to bypass any authentication in sip_auth_schema .(Default = false , inbound SIP ACK authentication is controlled by sip_auth_schema )
|
sip_open_bye
|
Boolean | Attribute |
Whether to allow inbound SIP BYE Requests to bypass any authentication in sip_auth_schema .(Default = false , inbound SIP BYE authentication is controlled by sip_auth_schema )
|
sip_open_options
|
Boolean | Attribute |
Whether to allow inbound SIP OPTIONS Requests to bypass any authentication in sip_auth_schema .(Default = false , inbound SIP OPTIONS authentication is controlled by sip_auth_schema )
|
sip_registry_cache
|
String | Attribute |
File path and name for read/write of SIP registration records at shutdown/startup. (Default = none, SIP registrations are lost on restart) |
isup_default_bci_ci
|
Integer ( 0 - 3 )
|
Attribute |
Specifies the value of the Backward Call Indicators (Charging Indicator) two-bit subfield. Applies only when either:
(Default = 2 )
|
rtp_app_name
|
String | Attribute |
The name of the RtpApp which will perform any required RTP streaming. (Default = RTP streaming is not available) |
early_media_policy
|
prefer / allow / never
|
Attribute |
Configures when 183 Early Media is used instead of 200 OK for "internal" announcements
played by RtpApp. Valid values are:
When configuring the SrpSipApp, this configuration must be set to never .(Default = allow )
|
rtp_response_timer_ms
|
Integer | Attribute |
Guard timer (in milliseconds) in which the RtpApp
must accept the RTP processing. If this does not occur within this time, the controlling
application will abort the RTP session. (Default = 1000 )
|
rtp_max_play_secs
|
Integer | Attribute |
The default maximum duration of any single "play" (including prompt and collect) interaction
performed by the RtpApp. This should be set to be as long as the maximum single
interaction expected to be performed on the platform. If a single interaction does not
complete within this time, then the controlling application will abort the RTP session. The user-defined service logic may override this timer on a per-interaction basis. (Default = 300 )
|
sdp_owner_username
|
String | Attribute |
The SDP session owner username to be specified in the o= "owner" line of
the SDP content for all SDP generated by this application.This must be a valid username according to RFC 2327. It may not contain spaces. (Default = - )
|
sdp_owner_host
|
Hostname or IPv4 Address |
Attribute |
The hostname for session ownership
in the o= "owner" line for SDP content for all SDP generated by this application.(Default = the value used for sip_public_host )
|
sdp_suspend_policy
|
String | Attribute |
Defines how the m=audio block should be constructed when suspending the RTP stream
after it has been established – e.g. following a pre-call announcement, while setting-up
a follow-on call, or post-call announcement, etc. Valid values are:
inactive )
|
sdp_suspend_host
|
Hostname or IPv4 Address |
Attribute |
The hostname to specify as the connection end-point in
the c= line for the SDP when suspending the RTP stream after it has been
established.(Default = the value used for sip_public_host )
|
sdp_suspend_inactive_port
|
Integer ( 0 ..65535 )
|
Attribute |
Specifies the port number to use in the m=audio [port] ... line
in the SDP block when using a=inactive to suspend the RTP stream.Note that a port number of 0 is permitted in this case, which means
"remove this media stream" as defined in
RFC 3264 section 8.2.In practice, not all SIP end-points will accept a port number of zero. (Default = 65535 )
|
config
|
Object | Element | Container for extended configuration for this Application instance. |
.invite_headers
|
Array | Element |
Array of invite_header elements defining INVITE headers given special treatment.
|
.invite_header
|
Object | Element | Provisions a SIP INVITE header which is given special treatment. |
.sip_peers
|
Array | Element |
Array of sip_peer elements defining static SIP nodes to which to send or proxy an INVITE.
|
.sip_peer
|
Object | Element | Provisions a single static SIP peer. |
.sip_peer_groups
|
Array | Element |
Array of sip_peer_group elements defining collections of static SIP peers.
|
.sip_peer_group
|
Object | Element | Provisions a single SIP peer group. |
.trunks
|
Array | Element |
Array of static trunk elements for routing number blocks to SIP peers or peer groups
when sending the initial INVITE for a Dialog for a call leg.
|
.trunk
|
Object | Element | Provisions a single SIP trunk. |
.endpoints
|
Array | Element |
Array of endpoint elements to perform outbound registration against.
|
.endpoint
|
Object | Element | Provisions a single SIP endpoint. |
.sip_accounts
|
Array | Element |
Array of sip_account elements to use for the purpose of
authenticating inbound requests.
|
.sip_account
|
Object | Element | Provisions a single SIP account. |
.trace_traps
|
Array |
Array of trace_trap elements specifying the pre-defined traces.
|
|
.trace trap
|
Object | Provisions a single trace trap. |
SIP INVITE Headers
Each SIP INVITE Header definition in this section defines an additional “known” SIP INVITE Header which will be given additional handling for inbound/outbound SIP INVITE requests and responses.
The base SIP App provides base support for the mandatory, base headers such as From
, To
, Via
,
Requires
, CSeq
etc. as documented in this technical guide and the Protocol Conformance Statement
documentation. Those base headers already have special treatment built into the system, and hence
do not need to be (and must not be) configured in this section. The complete list of special headers
which may not be configured here is:
Via
From
To
Call-ID
CSeq
Contact
Authorization
WWW-Authenticate
Content-Type
Content-Length
Allow
User-Agent
Require
Supported
RSeq
Privacy
P-Asserted-Identity
P-Preferred-Identity
P-Charging-Vector
Route
Record-Route
Specifically, when handling inbound SIP INVITE, for headers whose name (case-insensitive) matches a header from the SIP INVITE Header configuration.
- The Header will (if configured) be logged to the
IN-ALEG-INVITE
EDR. - The Header will (if configured) be automatically confirmed back in any 2XX Response.
- The Header will (if configured) be automatically confirmed back in any 300-699 Response.
- The Header will (if configured) be automatically relayed in any outbound B-Leg INVITE for this call and will (if configured) be logged to the
OUT-BLEG-INVITE
EDR. - The Header will (if configured) be automatically relayed in any outbound A-Leg/B-Leg re-INVITE for this call and will (if configured) be logged to the
OUT-ALEG-INVITE
/OUT-BLEG-INVITE
EDR.
Specifically, when the service logic expressly adds one of these additional known SIP INVITE Headers to an outbound SIP A-Leg INVITE:
- The Header will (if configured) be logged to the
OUT-ALEG-INVITE
EDR. - The Header will (if configured) be automatically relayed in any outbound B-Leg INVITE for this call and will (if configured) be logged to the
OUT-BLEG-INVITE
EDR. - The Header will (if configured) be automatically relayed in any outbound A-Leg/B-Leg re-INVITE for this call and will (if configured) be logged to the
OUT-ALEG-INVITE
/OUT-BLEG-INVITE
EDR.
Specifically, when the service logic expressly adds one of these additional known SIP INVITE Headers to an outbound SIP B-Leg INVITE:
- The Header will (if configured) be logged to the
OUT-BLEG-INVITE
EDR.
Each invite_header
Object in the config
.invite_headers
Array is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
name
|
String | Attribute |
[Required] The SIP header name . When matching inbound headers, this name will be matched case-insensitive. When adding outbound headers, this name will be used exactly "as-is". This means that when relaying headers, the outbound name may not exactly case-match the received name. |
short_name
|
String | Attribute |
The SIP header short name . Alternative short name form for this header. When matching inbound headers, this name will be matched case-insensitive. When adding outbound headers (in short mode), this name will be used exactly "as-is". This means that when relaying headers, the outbound name may not exactly case-match the received name. (Default = do not read or write any short name for this header) |
request_edr
|
`/^[a-zA-Z][a-zA-Z0-9_\-]*$/` | Attribute |
The EDR field name to use when this field occurs in a SIP Request message. Please ensure that this field name does not conflict with any of the documented base SIP EDR field names. (Default = do not log this Request header value to any EDRs) |
response_edr
|
`/^[a-zA-Z][a-zA-Z0-9_\-]*$/` | Attribute |
The EDR field name to use when this field occurs in a SIP Response message. Please ensure that this field name does not conflict with any of the documented base SIP EDR field names. (Default = do not log this Response header value to any EDRs) |
relay_request
|
Boolean | Attribute |
If enabled, when this header is received in an A-Leg INVITE Request, relay the value to any associated B-Leg INVITE. If enabled, when this header is received in any re-INVITE Request which is passed-through include this header in the other-leg re-INVITE. (Default = do not relay this header from INVITE/re-INVITE Request to INVITE/re-INVITE Request) |
relay_response
|
Boolean | Attribute |
If enabled, when this header is received in a B-Leg INVITE Response, relay the value to any associated A-Leg INVITE Responses. (Default = do not relay this header from B-Leg INVITE Response to A-Leg INVITE Response) |
relay_transfer
|
Boolean | Attribute |
If enabled, when this header is received in a B-Leg INVITE Response, relay the value to any associated A-Leg re-INVITE Request. (Default = do not transfer this header from B-Leg INVITE Response to B-Leg re-INVITE Request) |
sort_order
|
top / bottom / middle
|
Attribute |
When adding this header to an outbound INVITE, where should it be placed in the header list. (Default = middle )
|
Note that:
- Any inbound INVITE header listed here will be silently ignored when received on the initial A-Leg INVITE. It will not be passed to the service logic and will not be logged to any EDR
- The service logic (when generating an outbound SIP INVITE for the A-Leg or B-Leg) may add headers over and above the headers expressly defined here. However, those additional headers will not be logged to the base SIP EDRs, and will not automatically be relayed as headers in any other A-Leg or B-Leg set-up such as re-INVITE.
- All automatic relay/confirmation/provision of the headers configured here will treat the header value as opaque, and will never attempt to parse or modify it.
SIP Transport Policies
SIP transport policies control the outbound transport protocol selected for requests that may create a dialog (INVITE) or new requests within an existing dialog (e.g. re-INVITE or BYE).
SIP Peers may specify which transport policy to use. If no policy is specified:
- If configured, the default transport policy will apply.
- Otherwise, the default transport policy values will apply.
An example transport policy definition might be:
<transport_policies>
<policy name="policy1"
inbound_invite_tcp_reuse="always"
ignore_drt_transport="yes"
protocol_preference="udp,tcp"/>
</transport_policies>
Each policy
Object in the config
.transport_policies
Object is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
inbound_invite_tcp_reuse |
String | Attribute | Affects the routing of in-dialog client transactions (e.g. re-INVITE or BYE) that occur within any dialog initiated by an INVITE sent to us over a TCP connection which is still open at the time of creating a subsequent in-dialog transaction. Possible values are:
never ) |
ignore_drt_transport |
Boolean | Attribute | If false and the dialog remote target URI includes a transport parameter and the applicable SIP peer configuration allows it, that protocol will be used for the next in-dialog client transaction. Otherwise, the dialog remote target transport (if any) will be ignored. (Default = false, use dialog remote target transport if present ) |
protocol_preference |
String | Attribute | A comma-separated list of transport protocols to use, from most preferred to least. The first protocol found that aligns with the applicable SIP peer configuration will be used. If specified, all possible values must be included in the list. Possible list values are:
tcp,udp ) |
All attributes of SIP transport policies may be N2SVCD evaluated parameters.
Peer Protocol Availability
Some protocols may not be available for use regardless of transport policy configuration:
- If SIP peer configuration prevents protocol selection (e.g. peer
tcp_connect
is false and dialog remote target specifiestcp
), the selected transport policy will continue to be parsed for an applicable protocol. - When link status checks are in use:
- TCP and UDP connections to peers are individually considered available if the last status check on that transport succeeded.
- When a link status check indicates that a particular protocol is not available for a given SIP peer, that protocol will not be used in messages to that peer regardless of all other circumstances until a successful status check has been made.
- When link status checks are not in use:
- UDP is always considered to be available.
- TCP is considered to be available if a TCP connection has been successfully established.
New Dialog Transport Policy Use
At runtime, the following procedure is used to select the transport to be used for a new outbound dialog:
- Determine the SIP peer to use via inbound REGISTER or SIP trunks (and possibly SIP peer groups).
- For each protocol in the peer transport policy’s
protocol_preference
(or default if not defined or a dyanmic peer), use that protocol if the protocol is considered available.
In-Dialog Transport Policy Use
At runtime, the following procedure is used to select the transport policy to be used for a new outbound transaction within an existing dialog:
- Preferentially by matching dialog remote target details to configured SIP peers -> the SIP peer transport policy (or default values if not defined or complete) is used.
- Otherwise, the default transport policy values are used.
Transport policy values are applied in this order:
- TCP connection reuse -> existing TCP connection only; no route determination
- Dialog remote target transport -> restrict to specified protocol only for finding route
- Find route in (possibly restricted) protocol preference order.
Default Transport Policy Values
If no peer-defined transport policy applies and no default transport policy name is configured, default values will be used whenever a transport policy is required. These default values are:
inbound_invite_tcp_reuse
:never
ignore_drt_transport
:true
protocol_preference
:tcp,udp
SIP Peers
Each SIP Peer definition defines an endpoint which is “known” for the purposes of initiating a new outbound (client) SIP Transaction. Specifically:
- A peer may contain one or more
endpoints
. We sendREGISTER
andINVITE
. - A peer may terminate one or more
trunks
. We sendINVITE
without registration. - A peer has credentials which may be used if a sent Request receives a
401 Unauthorized
Response.
Each sip_peer
Object in the config
.sip_peers
Array is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
id
|
String ( [A-Z0-0_-.] )
|
Attribute |
[Required] An internal key associated with this SIP Peer. This may contain letters, digits, _ , - , or . . Spaces are not permitted.
|
sip_user
|
String | Attribute |
The user part of the To address when sending OPTIONS for this link, or
any other To address that is not associated with a specific called party. (Default = The configured id for the connection)
|
udp_send
|
Boolean | Attribute |
When creating a new SIP transaction for this SIP Peer, can we send the SIP Request via UDP? This can only be specified when sip_listen_udp is enabled.If not enabled, UDP will never be sent for this peer under any circumstance. (Default = true if sip_listen_udp is enabled)
|
tcp_connect
|
Boolean | Attribute |
Should a TCP connection be opened and maintained towards this SIP Peer? (Default = true if sip_peer_tcp_connect is enabled)
|
transport_policy
|
String | Attribute |
The name of the [transport policy](#sip-transport-policies) that this peer uses. (Default = use default transport policy) |
sip_host
|
IPv4 Address or Hostname |
Attribute |
[Required] Far-end address to send requests for this SIP Peer. For outbound connections, this may be a numeric IP or a name (which will be resolved on every connection). |
sip_port
|
Integer ( 1 ..65535 )
|
Attribute |
Far-end Port number to send Requests to for this SIP Peer. If not supplied, the default SIP port 5060 will be used at runtime.
|
local_host
|
IPv4 Address or Hostname |
Attribute |
Specify the local bind host for this outbound TCP connection. Only relevant for TCP connections; UDP connections will use the application parameter sip_bind_udp_host .(Default = the value of sip_bind_host )
|
local_port
|
Integer | Attribute |
Specify the local bind port for this outbound TCP connection. Only relevant for TCP connections; UDP connections will use the application parameter sip_bind_udp_port .(Default = an ephemeral port) |
sip_domain
|
String | Attribute |
This specifies the domain which will be used for URIs in relation to this SIP Peer. This will be used for the REGISTER Request URI, and as the domain for the From and To URIs. (Default = the sip_host for the connection)
|
username
|
String | Attribute |
This is the username part of the From URI in SIP OPTIONS Requests, which
will be used for Digest authentication against this SIP Peer. (Default = the OPTIONS From address has no username, and Digest authentication is not performed) |
password
|
String | Attribute |
This is the password which will be used for Digest authentication against this SIP Peer. (Default = digest authentication cannot be performed) |
sip_link_check_secs
|
Integer | Attribute |
Overrides the global parameter sip_link_check_secs for this peer.
|
sip_link_check_type
|
String | Attribute |
Overrides the global parameter sip_link_check_type for this peer.
|
All attributes of SIP peers may be N2SVCD evaluated parameters.
Note that the combination of resolved sip_host
and sip_port
must be unique for each protocol.
SIP Peer Groups
Each SIP peer group definition specifies a collection of one or more SIP peers, along with a priority determining preferred peer usage.
<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
...
<applications>
...
<application name="<name>" module="<module>">
...
<config>
...
<sip_peer_groups>
<sip_peer_group name="MSS-GROUP">
<sip_peer id="LOCAL-MSS1" priority="2"/>
<sip_peer id="LOCAL-MSS2" priority="2"/>
<sip_peer id="REMOTE-MSS" priority="1"/>
</sip_peer_group>
</sip_peer_groups>
...
</config>
</application>
...
</application>
...
</n2svcd>
SIP peer groups may be used within SIP trunk definitions to allow preferential routing of trunks.
Each sip_peer_group
object in the config
.sip_peer_groups
array is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
name
|
String | Attribute | [Required] The name of the SIP peer group. Will be referenced in SIP trunk definitions. |
sip_peer
|
Object | Element | Holds one of the SIP peers that comprise a SIP peer group. |
id
|
String | Attribute | [Required] The SIP peer ID of the SIP peer for this definition. |
priority
|
Number | Attribute |
The priority of this peer when routing. Higher priorities are used preferentially if available. (Default = 0 )
|
Note that:
- SIP peers may appear in multiple SIP peer groups.
- A SIP peer group must have one or more SIP peers.
- A SIP peer may only appear once in a SIP peer group.
- SIP peers with the same priority in a group will have traffic loadshared amongst themselves at the same priority.
SIP Trunks
Each Trunk specifies a number block which is statically configured for sending the outbound INVITE transaction which attempts to create a new dialog for a call leg.
These addresses do not use REGISTER. They are assumed to be always available for INVITE.
When routing INVITE messages, all matching trunks are selected for use, in order of:
- Matching
leading
characters, longest first, then - If a SIP peer group is defined, by peer priority in that group.
Each trunk
Object in the config
.trunks
Array is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
leading
|
(+)Hex Digits | Attribute |
Prefix matched called-party digits routable on using this trunk. This must be a digit string with an optional leading + .A trunk with an empty string configured for leading digits will match all destinations. (Default = , an empty string)
|
sip_peer_group
|
String | Attribute |
[Conditional] The name of a configured SIP Peer Group to which this prefix can route.One of sip_peer_id or sip_peer_group must be specified.
|
sip_peer_id
|
String | Attribute |
[Conditional] The id of a configured SIP Peer to which this prefix can route.One of sip_peer_id or sip_peer_group must be specified.
|
Note that in-Dialog client transactions (for re-INVITE, BYE, or 2XX ACK) do not use
this SIP Trunks configuration. They will instead search directly for an available
entry in the SIP Peers configuration where the SIP Peer host, port, and protocol
match the dialog target as defined by the Contact
headers supplied to us within
the dialog.
SIP Endpoints
Each Endpoint specifies a called party number which this application “dynamically manages”, meaning that the nominated SIP Peer will be sent REGISTER events informing it of local availability to receive inbound requests related to that endpoint.
Each endpoint
Object in the config
.endpoints
Array is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
leading
|
(+)Hex Digits | Attribute |
[Required] The exact or number block prefix for which this endpoint applies. This must be a digit string with an optional leading "+". We may use this to check that inbound received INVITEs are valid from this SIP Peer. |
sip_peer_id
|
String | Attribute |
[Required] The id of a configured SIP Peer.
|
contact_user
|
(+)Hex Digits | Attribute |
The digits which will be used to construct the Contact URI header value. This is typically a digit string with an optional leading + >.(Default = leading )
|
SIP Accounts
Each SIP Account definition defines an account identity which is recognised for inbound request processing. Account membership is determined by simple exact or prefix match of the offered From address URI.
Specifically, when authorization is enabled:
- An account has credentials which are verified by sending
401 Unauthorized
. - If no account is matched, the response will be
404 Not Found
.
Note that if sip_auth_schema
is configured to be open
then SIP Account checking
is completely bypassed for all inbound requests, and the sip_accounts
configuration
is irrelevant.
Otherwise, this access challenge is applied to all inbound SIP Requests, excepting that:
- SIP
CANCEL
is never challenged. - SIP
BYE
is challenged by default, but this may be disabled withsip_open_bye
. - SIP
OPTIONS
is challenged by default, but this may be disabled withsip_open_options
. - Challenges may be bypassed for requests recevied on TCP connections associated with known SIP Peers.
Each sip_account
Object in the config
.sip_accounts
Array is configured as follows.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
id
|
String ( [A-Z0-0_-.] )
|
Attribute |
[Required] An internal key associated with this SIP Account. This may contain letters, digits, _ , - , or . . Spaces are not permitted.
|
username
|
String | Attribute |
[Conditional] The username to use for Digest authentication with this SIP Account. If neither from_user nor from_user_prefix are specified,
username must be present and will be used as from_user .
(Default = <Endpoint Digits>@<SIP Peer Domain> )
|
password
|
String | Attribute |
The password which will be used for Digest authentication with this SIP Account. (Default = Digest authentication cannot be performed) |
from_user
|
String | Attribute |
Exact match for the user part of the offered From header URI. At most one of from_user or from_user_prefix must be specified.
|
from_user_prefix
|
String | Attribute |
Exact or prefix match for the user part of the offered From header URI. At most one of from_user or from_user_prefix must be specified.
|
Trace Trap Entry
Each Trace Trap defines a rule for potentially enabling tracing for inbound or outbound calls.
Each trace_trap
Object is configured as follows:
Attribute | Type | Description |
---|---|---|
calling_party
|
Hex String |
[Conditional] The full normalised calling party, as it would appear in the SIP INVITE To header, up to but not including
the @ symbol, but including the leading + (if present).At least one of calling_party or called_party must be defined.If both are defined, then both must match before the trace trap is considered matched. |
called_party
|
Hex String |
[Conditional] The full normalised called party, as it would appear in the SIP INVITE From header, up to but not including
the @ symbol, but including the leading + (if present).At least one of calling_party or called_party must be defined.If both are defined, then both must match before the trace trap is considered matched. |
trace_level
|
0 - 3
|
[Required] The trace level. Possible values are:
|