Home Tools AudioCodes Message Manipulation

AudioCodes Message Manipulation builder & interpreter

Comprehensive tooling for AudioCodes SBC & Media Gateway message manipulation rules. Builder (form → rule), Interpreter (rule → plain English), 18 recipes covering Teams Direct Routing, ITSP integration, P-Asserted-Identity, Diversion, Privacy, SDP m-line, and more, plus a searchable syntax reference for every Action Subject, Action Type, Message Type, Function, and Variable in the official Ver. 7.4 reference guide.

This tool is provided as-is, for educational and planning purposes only. Based on AudioCodes' SIP Message Manipulation Syntax Reference Guide Ver. 7.4. Test every rule against a representative trace before production rollout — message manipulation runs in the SIP signalling path and a bad rule can break calls. The Tech Space makes no warranty and accepts no liability. Full disclaimer →

1. Rule Builder

Build a syntactically-valid message manipulation rule by picking each field. Output is shown in two forms: a Web UI table row (paste into Configuration → Message Manipulation → Message Manipulations) and the ini-file / CLI command (paste into configurationFile.ini or the CLI configure voip session).

How the rule reads end-to-end For each SIP message matching the Message Type, if the Condition is true (or empty), apply the Action Type to the Action Subject using the Action Value. Multiple rows with the same Manipulation Set ID chain together top-to-bottom; bind a Manipulation Set ID to an IP Group via its Inbound or Outbound Message Manipulation Set parameter.

2. Rule Interpreter

Paste an existing rule (single row or full ini-file MessageManipulations block) and the tool breaks it down field by field with plain-English explanations. Accepts both the ini format and the CLI configure voip / manipulations output.

3. Recipe Library

18 pre-built rules covering the patterns you hit most often integrating an AudioCodes SBC. Click any card to load it into the Rule Builder above.

4. Syntax Reference

Every Action Subject, Action Type, Message Type, function, and variable from the AudioCodes Ver. 7.4 Reference Guide. Use the search box to filter; tabs filter by category.

TokenCategoryDescription

5. Pre-Parsing Manipulation

Pre-Parsing Manipulation rules run before the SBC parses the SIP message — they operate on the raw text. Use when you need to fix malformed messages (a peer sending illegal characters in a header, an extra blank line in the body, a missing CRLF) that would otherwise be rejected by the SIP parser.

Pre-parsing vs message-manipulation Pre-parsing fires on the raw text BEFORE parsing; message-manipulation fires on the parsed object model AFTER parsing. Use pre-parsing only for malformed-message fix-ups — for normal header / URI / body changes use regular message manipulation (Section 1).

Table fields

FieldDescription
IndexRow number, 0–9 typical (Pre-Parsing Manipulation Sets are a much smaller table than regular MM).
Manipulation Set IDBinds the rule set to an IP Group via the IP Group's Inbound Pre-Parsing Manipulation Set field.
Message TypeSame syntax as regular MM (invite.request, any.response, etc.).
Match RegexA regex matched against the raw message body. Capture groups ($1, $2) referenced in Replace-With.
Replace WithReplacement text. Supports $1 backrefs, + concatenation, the Func.* string functions, and \\ to insert a newline.

Example: strip illegal char from a vendor's Contact header

PreParsingMM 0 = 0, Invite.Request, Contact:\\s*<sip:(.*)\\|(.*)@, Contact: <sip:$1$2@

Some legacy CISCO CUCM trunks insert a | character mid-user-part. The pre-parsing regex strips it before the SBC parser would otherwise reject the message with a 400 Bad Request.

6. Call Setup Rules

Call Setup Rules run during the call setup phase (before routing) and can query external sources — LDAP, HTTP REST APIs, internal user databases — to populate variables and modify routing. Common use: lookup the caller in Active Directory and route based on department.

Table fields

FieldDescription
Index / Rules Set IDA Rules Set ID groups rows; bind the set to an IP Group / SIP Interface / IP-to-IP Routing rule via its Call Setup Rules Set field.
Request TypeLDAP, HTTP-GET, HTTP-POST, or None (just condition-check).
Request TargetFor LDAP: server name. For HTTP: a URL with placeholders.
Request KeyThe lookup key (e.g. (&(samaccountname=$1)) for LDAP). Supports message references like header.from.url.user.
ConditionOptional condition that gates whether the row runs. References return values (ldap.attr.X, http.response.body).
Action Subject / Type / ValueSame syntax as regular MM. Common pattern: set a var.call.dst.Department from ldap.attr.department so downstream routing rules can match on it.
Row RoleSame semantics as MM — 0 / 1 / 2.

Example: LDAP department lookup

CallSetupRules 0 = 1, LDAP, ad.contoso.com, '(&(samaccountname='+header.from.url.user+'))', , var.call.dst.Department, 2, ldap.attr.department, 0;

Looks up the From-header user in AD, copies the department attribute into var.call.dst.Department. A subsequent IP-to-IP Routing rule can then match on var.call.dst.Department == 'Sales' and route to the sales hunt group.

7. HTTP POST / GET Requests

Trigger an outbound HTTP request from a Call Setup Rule or a regular Message Manipulation rule. Useful for webhook notifications (e.g. a Slack ping when a call to the CEO comes in) or for posting CDR-style data to an external CRM.

HTTP-POST

CallSetupRules 0 = 1, HTTP-POST, https://hooks.example.com/incoming, '{"from":"'+header.from.url.user+'","to":"'+header.to.url.user+'"}', , , , , 0;

HTTP-GET

CallSetupRules 0 = 1, HTTP-GET, https://api.example.com/lookup?n='+header.from.url.user, , , var.call.dst.Profile, 2, http.response.body, 0;
Reading the HTTP response For HTTP-GET, the response body is exposed as http.response.body (full string), http.response.code (status), and http.response.header.X (any response header). Combine with Func.SubString() to slice JSON or with a regex condition to gate the subsequent row.