call-setup-rules

This command configures the Call Setup Rules table, which lets you define Call Setup rules. Call Setup rules define various sequences that are run upon the receipt of an incoming call (dialog) at call setup, before the device routes the call to its destination.

Syntax

(config-voip)# message call-setup-rules <Index>
(call-setup-rules-<Index>)# 

Command

Description

Index

Defines the table row index.

action-subject

Defines the element (e.g., SIP header, SIP parameter, SIP body, or Dial Plan tag) upon which you want to perform the action if the condition, configured in the 'Condition' parameter (see above) is met.

action-type {add|add-prefix|add-suffix|exit|modify|none|remove|remove-prefix|remove-suffix|run-rules-set}

Defines the type of action to perform.

action-value

Defines a value that you want to use in the action.

attr-to-get

Defines the Attributes of the queried LDAP record that the device must handle (e.g., retrieve value).

request-key

Defines the key to query.

condition

Defines the condition that must exist for the device to perform the action.

request-target

Defines the request target.

request-type {dial-plan|enum|http-get|http-post-notify| http-post-query|ldap|none}

Defines the type of request.

row-role {use-current-condition|use-previous-condition}

Determines which condition must be met for this rule to be performed.

rules-set-id

Defines a Set ID for the rule.

rules-set-name

Defines an arbitrary name to easily identify the row.

Command Mode

Privileged User

Example

This example replaces (manipulates) the incoming call's source number with a number retrieved from the AD by an LDAP query. The device queries the AD server for the attribute record, "telephoneNumber" whose value is the same as the received source number (e.g., "telephoneNumber =4064"). If such an Attribute exists, the device retrieves the number of the Attribute record, "alternateNumber" and uses this number as the source number:

(config-voip)# message call-setup-rules 0
(call-setup-rules-0)# query-type ldap
(call-setup-rules-0)# query-target LDAP-DC-CORP
(call-setup-rules-0)# attr-to-query ‘telephoneNumber=’ + param.call.src.user
(call-setup-rules-0)# attr-to-get alternateNumber
(call-setup-rules-0)# row-role use-current-condition
(call-setup-rules-0)# condition ldap.attr. alternateNumber exists
(call-setup-rules-0)# action-subject param.call.src.user
(call-setup-rules-0)# action-type modify
(call-setup-rules-0)# action-value ldap.attr. alternateNumber
(call-setup-rules-0)# activate