Cisco ASA 5505 User Manual

Page 931

Advertising
background image

44-21

Cisco ASA 5500 Series Configuration Guide using the CLI

Chapter 44 Configuring Inspection for Voice and Video Protocols

SIP Inspection

Step 2

(Optional) Create one or more regular expression class maps to group regular expressions according to
the

“Creating a Regular Expression Class Map” section on page 13-15

.s

Step 3

(Optional) Create a SIP inspection class map by performing the following steps.

A class map groups multiple traffic matches. Traffic must match all of the match commands to match
the class map. You can alternatively identify match commands directly in the policy map. The difference
between creating a class map and defining the traffic match directly in the inspection policy map is that
the class map lets you create more complex match criteria, and you can reuse class maps.

To specify traffic that should not match the class map, use the match not command. For example, if the
match not command specifies the string “example.com,” then any traffic that includes “example.com”
does not match the class map.

For the traffic that you identify in this class map, you can specify actions such as drop-connection, reset,
and/or log the connection in the inspection policy map.

If you want to perform different actions for each match command, you should identify the traffic directly
in the policy map.

a.

Create the class map by entering the following command:

hostname(config)# class-map type inspect sip [match-all | match-any] class_map_name

hostname(config-cmap)#

Where the class_map_name is the name of the class map. The match-all keyword is the default, and
specifies that traffic must match all criteria to match the class map. The match-any keyword
specifies that the traffic matches the class map if it matches at leX( The CLI enters class-map
configuration mode, where you can enter one or more match commands.

b.

(Optional) To add a description to the class map, enter the following command:

hostname(config-cmap)# description string

Where string is the description of the class map (up to 200 characters).

c.

(Optional) To match a called party, as specified in the To header, enter the following command:

hostname(config-cmap)# match [not] called-party regex {class class_name | regex_name}

Where the regex regex_name argument is the regular expression you created in

Step 1

. The class

regex_class_name is the regular expression class map you created in

Step 2

.

d.

(Optional) To match a calling party, as specified in the From header, enter the following command:

hostname(config-cmap)# match [not] calling-party regex {class class_name | regex_name}

Where the regex regex_name argument is the regular expression you created in

Step 1

. The class

regex_class_name is the regular expression class map you created in

Step 2

.

e.

(Optional) To match a content length in the SIP header, enter the following command:

hostname(config-cmap)# match [not] content length gt length

Where length is the number of bytes the content length is greater than. 0 to 65536.

f.

(Optional) To match an SDP content type or regular expression, enter the following command:

hostname(config-cmap)# match [not] content type {sdp | regex {class class_name |

regex_name}}

Where the regex regex_name argument is the regular expression you created in

Step 1

. The class

regex_class_name is the regular expression class map you created in

Step 2

.

g.

(Optional) To match a SIP IM subscriber, enter the following command:

hostname(config-cmap)# match [not] im-subscriber regex {class class_name | regex_name}

Advertising