Set Deploy Patterns
The Deploy Patterns defines actions that will be taken when a rule’s conditions defined in the Matching Pattern are met. At Deploy Patterns, you can define SIP header, routing destination, error response, environment variables as server’s behavior, plug-in to load, and whether to perform RTP relay or not. Action is defined with a pair of SIP header name, handling variable name or environment variable and value. You can define multiple actions in one rule.
In the Value field of Deploy Patterns, matched string in Matching Patterns can be referred. When ‘%n‘ (n=number < 10) was defined in value, the character string that locates in n-th number of parenthesis ( ) in Matching Patterns’ value will be inserted at the Deploy Patterns field. In the case 10th or more of parenthesis () in Matching Patterns’ value should be referred, the syntax ‘%{n}‘ (n=number) can be used.
To add a definition to the Deploy Patterns section:
- Push […] button (which is between the Variable field and the Value field).
- Select a variable name from the pull-down list or type a variable name directly in the Variable field.
- Type a value to the Value field and then, push the [+] Refer to the section “New Rule/ Edit Rule” for more information.
Syntax
Deploy Patterns Syntax:
SIP_header_field = setting value &environment_variable_name = setting value $handling_variable_name = setting value
SIP Header Field Name
By specifying a SIP header name in variable field, you can replace, add or delete the value of the SIP header. If the specified SIP header field exists in a SIP packet, the header will be replaced with the specified value. If specified value is empty, the header will be removed from the SIP packet.
The SIP routing destination can be decided depending on the setting for “To” header as follows:
If To = sip:username@host is set, the SIP session will be routed to the address “host”.
If To = sip:username@ is set, the SIP session will be routed to the contact address for the registered user “username” in Registrar Database.
Syntax:
SIP header field name = setting value
Example:
From = sip:admin@192.168.0.1
From header will be replaced with “sip:admin@192.168.0.1”.
To = sip:boss@192.168.0.100
To header will be replaced with “sip:boss@192.168.0.100”. And the session will be routed to the address “192.168.0.100”.
To = sip:sales@
The session will be routed to the contact address of the registered user “sales”.
From = “Ted” <sip:1650111@domain>
From header’s SIP URI will be replaced with <sip:1650111@domain>. Caller’s display name will be set as “Ted”.
Expires = 300
The value of Expires: will be set as 300.
User-Agent =
User-Agent: header will be deleted.
Refer-To = sip:user@server
Refer-To: header field will be replaced with “user@server”.
Environment Variable
The variable which starts with ‘&’ is treated as an environment variable. The environment variable name isn’t case sensitive.
This setting will be applied only for the session that matches with Matching Patterns. To configure the environment variables for the whole system, please set them in the property file or in the Configuration page.
Syntax:
&environment_variable_name = a setting value
Example:
&net.sip.timeout.ringing = 10000
Set the value of ringing timeout to 10000.
(Set the environment variable net.sip.timeout.ringing = 10000 )
&net.sip.addrecordroute = false
Don’t add Record-Route: header.
(Set the environment variable net.sip.addrecordroute = false)
&net.rtp.audio.payloadtype = 0
Change the audio payload type in SDP to PCMU.
(Set the environment variable net.rtp.audio.payloadtype = 0)
Handling Variable
The variable which starts with ‘$’ is treated as a handling variable. Handling variables are not case sensitive.
Syntax:
$handling_variable_name = a setting value