SIP Manipulation Syntax
This appendix describes the syntax to be used to define a SIP Condition. SIP Manipulation Rule parts are:
■ | SIP Condition group |
■ | Action Subject - as described at Subject |
■ | Action Type |
■ | Action Value |
■ | Description |
If the chosen action is 'Send By Web-Service' and web-service is also selected, a new line will open that will include the following fields:
● | Request Method |
● | Content-Type |
● | URL Suffix |
● | Body |
Action Type
The 'Action Type' field specifies the type of action you want to perform on the Action Subject by the Action Value. The following table describes the manipulation actions.
Action Type |
Description |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Add |
Add a new Action Subject with the Action Value |
|||||||||
Remove |
Deletes the Action Subject |
|||||||||
Modify |
Sets the Action Subject to Action Value |
|||||||||
Add Prefix |
Adds the Action Value to the beginning of the Action Subject |
|||||||||
Add Suffix |
Adds the Action Value to the end of the Action Subject |
|||||||||
Remove Prefix |
Remove Action Value from the beginning of the Action Subject |
|||||||||
Remove Suffix |
Remove Action Value from the end of the Action Subject |
|||||||||
Normalization |
Run Normalization group (Action Value) on the Action Subject |
|||||||||
Random From Pool |
|
|||||||||
Send By Web-Service |
Sends the configured HTTP Request via the selected Custom Web-Service. |
Action Value
Syntax
<Value>/Normalization group/Prefix Group/Custom Web-Service
Where:
Value - as described at Value.
The value should be empty for ‘Remove’ action.
The value should be a Normalization group for ‘Normalization’ action.
The value should be a Prefix Group for ‘Random From Pool’ action.
The value should be a 'Custom' Web-Service for 'Send By Web-Service' action.
The following table describes the possible manipulation actions per subject.
Action Subject |
Action Type |
---|---|
Header.From |
Modify, Normalization |
Header.From.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, RemoveS uffix, Normalization, Random From Pool |
Header.From.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.From.Name |
Add, remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.To |
|
Header.To.URL.User |
|
Http.Request.otherHeader |
Add, Remove, Modify |
Header.To.URL.Host |
|
Header.To.Name |
|
Header.P-Asserted-Identity |
Add, Remove, Modify, Normalization |
Header.P-Asserted-Identity.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
Header.P-Asserted-Identity.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.P-Asserted-Identity.Name |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.P-Asserted-Identity.TelNumber |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.P-Preferred-Identity |
Add, Remove, Modify, Normalization |
Header.P-Preferred-Identity.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
Header.P-Preferred-Identity.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.P-Preferred-Identity.Name |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.Diversion |
Add, Remove, Modify, Normalization |
Header.Diversion.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
Header.Diversion.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.Diversion.Name |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.Referred-By |
Add, Remove, Modify, Normalization |
Header.Referred-By.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
Header.Referred-By.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.Referred-By.Name |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.Refer-To |
Add, Remove, Modify, Normalization |
Header.Refer-To.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
Header.Refer-To.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.Refer-To.Name |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.History-Info |
Add, Remove, Modify, Normalization |
Header.Request-URI |
Modify, Normalization |
Header.Request-URI.URL.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
Header.Request-URI.URL.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Header.otherHeader |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Tags.TAG_1 |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Tags.TAG_2 |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
Tags.TAG_3 |
Add, Remove, Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
SourceUri.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
SourceUri.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
DestUri.User |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization, Random From Pool |
DestUri.Host |
Modify, Add Prefix, Add Suffix, Remove Prefix, Remove Suffix, Normalization |
The following headers cannot be changed:
● | Via |
● | Call-ID |
● | CSeq |
● | Contact |
For example, the action Modify action is not valid for "Header.Contact" subject.
The ARM GUI provides an auto completion wizard to configure the SIP Manipulation.
Auto Completion Manipulation
Example 1
The following SIP Manipulation Adds ‘1212’ as prefix to the Tel Number of P-Asserted-Identity header:
Tel Number
Example 2
The following SIP Manipulation runs a SIP Condition before manipulating the Dest URI User.
If Tag1 exists, its value will be stored in the Dest URI User.
Run Tag Condition Before Manipulation
Example 3
The following SIP Manipulation replaces the Source URI User with a random number from a Prefix Group (pool of numbers).
Pool
Example 4
The SIP Manipulation Group shown in the figure below:
■ | Prepares and sends the HTTP Request (uppermost section indicated in the figure below) |
● | Sends HTTP request with the 'sampleHttpHeader' taking SourceUri.User as the value of this header. |
● | Using 'custom_local' web service it sends a POST request, with the suffix and body shown in the figure below. |
■ | Uses the HTTP response (lowermost section indicated in the figure below) |
● | If there is a 'name' field in the response body (first-level JSON searching is currently supported), its value will be inserted to 'SourceUri.User' |
● | Using the regex executed in the condition 'c1', if there was a match, take the first group and put it inside 'SourceUri.Host' |
Example 5
The following SIP Manipulation runs a SIP Condition before creating new header called X_ SLXSCORE.
If Param.SecureLogix.Score exists, its value will be stored in the X_ SLXSCORE header.