HMR to match a Toll Free called number and add Diversion Header
Hello everyone,
This is my first time creating HMR's on my own. I was hoping to get some help with the following scenario.
I need to match any Toll Free called number in the "To" field in an INVITE (Prefix of 800, 855, 866, 877, 888) with or without a +1. I then need to add a Diversion header with a static 10-digit number and the Local IP. This is what I've come up with so far.
header-rule
name checkto
header-name request-uri
action store
comparison-type pattern-rule
msg-type out-of-dialog
methods INVITE
match-value ^\+1(800|888|877|866|855){10,11}$
new-value
header-rule
name add_diversion
header-name Diversion
action add
comparison-type case-sensitive
msg-type request
methods INVITE