Permit inbound calls of a certain length while blocking all others on Session Agent
Hello,
I'm looking to block inbound calls on a Session Agent that are NOT five digits long with a 404 response back. About the only thing I can come up with is this but I don't think it's going to work. Suggestions are appreciated!
sip-manipulation
name PERMIT-5-REJECT-REST
description PERMIT-5-DIGIT-CALLS-REJECT-EVERYTHING-ELSE
split-headers
join-headers
header-rule
name rejRURI
header-name request-uri
action manipulate
comparison-type pattern-rule
msg-type request
methods INVITE
match-value
new-value
element-rule
name rejruri
parameter-name
type uri-user
action reject
match-val-type any
comparison-type pattern-rule
match-value ^(\d{5,5})$ (This captures Five digits, I would need one that matched on everything that is NOT five digits)
new-value 404:Not Found