Acme Packet (MOSC)

MOSC Banner

Trying to understand the correct regex format in a match-value

edited Nov 25, 2015 5:47PM in Acme Packet (MOSC) 2 commentsAnswered ✓

Hi there

I am on a 4500 SBC, using the sip-manipulation to create a whitelist of User-agents,

But the match-value string is not working as i expected in a sip-manipulation

There are 5 User-Agents headers i want to match with
1) User-Agent: Asterisk
2) User-Agent: Asterisk PBX
3) User-Agent: Asterisk PBX 1.8.26.1
4) User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1
5) User-Agent: Asterisk PBX SVN-branch-11-r384827

this is the header-rule
header-rule
   name                           storeUAAsteisk
   header-name                    User-Agent
   action                         store
   comparison-type                pattern-rule
   msg-type                       request
   methods                        INVITE,REGISTER
   match-value                    ^(Asterisk(\n|\sPBX(\n|\s(1\.8\.(26\.1|4\.4)|SVN-branch-11))))
   new-value

This is the match-value I come up with, using an on-line regex tool, all matched OK
match-value  ^(Asterisk(\n|\sPBX(\n|\s(1\.8\.(26\.1|4\.4)|SVN-branch-11))))

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center