1.1. Routing Setting by the Destination SIP URI
Ex 1. Routing all calls to sip:user@host
Matching Patterns | Deploy Patterns |
$request = ^INVITE |
To = sip:user@host |
Ex 2. Routing a call to sip:user@host if the callee’s name is “admin”
Matching Patterns | Deploy Patterns |
$request = ^INVITE To = sip:admin@ |
To = sip:user@host |
Ex 3. Routing a call to sip:user@host if the callee’s SIP URI is sip:admin@server
Matching Patterns | Deploy Patterns |
$request = ^INVITE $geturi(To) = sip:admin@server |
To = sip:user@host |
Ex 4. Routing a call to “host” with the same username if the callee’s name prefix is “9”
Matching Patterns | Deploy Patterns |
$request = ^INVITE To = sip:(9.+)@ |
To = sip:%1@host |
Ex 5. Routing a call to “host” without the prefix if the callee’s name prefix is “9”
Matching Patterns | Deploy Patterns |
$request = ^INVITE To = sip:9(.+)@ |
To = sip:%1@host |
Ex 6. Routing a call to “host” with the prefix “8” if the callee’s name prefix is “9”
Matching Patterns | Deploy Patterns |
$request = ^INVITE To = sip:(9.+)@ |
To = sip:8%1@host |
Ex 7. Routing a call to sip:user@host if the callee isn’t registered
Matching Patterns | Deploy Patterns |
$request = ^INVITE $registered = false |
To = sip:user@host |
Ex 8. Routing a call to sip:user@host if the caller’s name is “admin”
Matching Patterns | Deploy Patterns |
$request = ^INVITE From = sip:admin@ |
To = sip:user@host |
Ex 9. Routing a call to sip:user@host if the caller isn’t registered
Matching Patterns | Deploy Patterns |
$request = ^INVITE $registered( From ) = false |
To = sip:user@host |
Ex 10. Routing a call to sip:user@host if the call is from 192.168.0.1
Matching Patterns | Deploy Patterns |
$request = ^INVITE $addr = 192\.168\.0\.1$ |
To = sip:user@host |