Skip to content

KAZOO Support Channels

This documentation is curated by 2600Hz as part of the KAZOO open source project. Join our community forums here for peer support. Only features in the docs.2600hz.com/supported space are included as part of our 2600Hz Support Services plan.

Rules fields#

Example resource document:

{
   "_id": "some_resource_id",
   "_rev": "2-9cde8aaf05b398fa8eb463fc5a943ca7",
   "name": "Resource 1",
   "enabled": true,
   "flags": [
   ],
   "weight_cost": 30,
   "rules": [
       "^\\+7(\\d{10})$"
   ],
   "rules_test": [
       "^\\+{0,1}(933)$"
   ],
   "cid_rules": [
       "^(\\+749[59]\\d{7})$"
   ],
   "gateways": [
       {
            ...
       }
   ],
   "pvt_type": "resource"
}

Dialed number rules ("rules" field)#

A list of regular expressions for matching E.164-formatted (+12223334444) DIDs. A sample regex to match all Russian E.164 numbers:

"^\\+7(\\d{10})$"

You can obviously add regexps for specific area codes, toll-free, E911, and international numbers. The first capture group is what is used to pass in the bridge URI (in the example, the 10-digit number will be passed to the gateways).

CallerID number rules ("cid_rules" field)#

Like "rules" field, but capture groups don't modify outgoing CallerID number. If you want modify CallerID number - use "formatters".

("rules_test" field)#

The rules_test object defines an array of regular expressions for test patterns of the given resource.

For example, if the resource handles emergency routes in North America, defining 933 as a test route, will inform teletype this emergency call is a test and will be reflected as such in the notification.