pre-parsing-manip-rules

This command configures the Pre-Parsing Manipulation Rules table, which lets you define Pre-Parsing Manipulation rules. The table is a child of the Pre-Parsing Manipulation Set table.

Syntax

(config-voip)# message pre-parsing-manip-sets <Index>
(pre-parsing-manip-sets-<Index>)# pre-parsing-manip-rules <Index>
(pre-parsing-manip-rules-<Index>/<Index>)# 

Command

Description

Index

Defines the table row index.

message-type

Defines the SIP message type to which you want to apply the rule.

pattern

Defines a pattern, based on regex, to search for (match) in the incoming message.

replace-with

Defines a pattern, based on regex, to replace the matched pattern.

Command Mode

Privileged User

Example

This example replaces the user part (if exists) in the From header URL with "1000", for INVITE messages:

(config-voip)# message pre-parsing-manip-sets 0
(pre-parsing-manip-sets-0)# pre-parsing-manip-rules 1
(pre-parsing-manip-rules-0/1)# message-type invite.request
(pre-parsing-manip-rules-0/1)# pattern From: *<sip:([^@]+)(@\S*)
(pre-parsing-manip-rules-0/1)# replace-with ‘From: <sip:’ + ‘1000’ + $2
(pre-parsing-manip-rules-0/1)# activate