Trying to understand the correct regex format in a match-value
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))))