v1

latestOpenAPI 3.1.02026-07-24317911.4 MB
Dialrule

Update a dial rule by ID in a dial plan

put/domains/{domain}/dialplans/{dialplan}/dialrules/{dialrule}

Path parameters

domainstring required

This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. Then using in path for GET you can set to "~" to use the domain name linked to your token/key instead of the domain name itself when reading for your own domain.

Example:example.com
dialplanstring required
dialrulestring required

Request body

dial-rule-matching-to-uristring required

This is the main digit string match for the dial translation.

dialrulestring required

This is the dialrule id that will be given with each read action that will be needed to read back individual value, update specific rules or delete rules. If wanting to programatically generate the dial rule id is a base64 encoding of the concatination with "||" of the following fields in order, dail-rule-matching-to-uri, dail-rule-matching-from-uri, dail-rule-matching-day-of-week, dail-rule-matching-start-date, dail-rule-matching-end-date, dail-rule-matching-start-time, dail-rule-matching-end-time

enabled'yes' | 'no'
dial-rule-matching-from-uristring

This is a source match that would allow for a specific dial rule match based on the caller as well as the forward destination of dial-rule-matching-to-uri.

dial-rule-matching-day-of-weekstring

This is a field that will control the DOW (day of week) match for this rule. Default is * or to match all the time, but valid format will allow any single day of the week 0-6 (sunday-saturday) or a range in square brackets like [0-6]

dial-rule-matching-start-datestring date

This is the start of a the valid date range for this rule. Keep to * if you do not want to use date range for this rule.

dial-rule-matching-end-datestring date

This is the end of a the valid date range for this rule. Keep to * if you do not want to use date range for this rule.

dial-rule-matching-start-timestring

This is the start of a the valid time range for this rule. Keep to * if you do not want to use time range for this rule. The format is a valid HH:MM format from 00:00 to 23:59. The timezone would be the user's timezone if passing through a user already.

dial-rule-matching-end-timestring

This is the end of a the valid time range for this rule. Keep to * if you do not want to use time range for this rule. The format is a valid HH:MM format from 00:00 to 23:59. The timezone would be the user's timezone if passing through a user already.

dial-rule-application'available-number' | 'to-voicemail-residential' | 'to-callqueue' | 'to-callqueue-announce-count-callers-ahead' | 'to-callqueue-announce-expected-wait-time' | 'to-connection' | 'to-connection-or-user-no-failover' | 'to-single-device' | 'to-user' | 'to-user-residential' | 'to-voicemail' | 'spam-screening' | 'to-connection-block-caller-id' | 'to-connection-no-timeout' | 'to-connection-add-header-force-caller-id' | 'to-connection-add-header-no-timeout' | 'to-connection-add-header' | 'to-single-device-add-header-allow-voicemail' | 'to-single-device-add-header-allow-voicemail-residential' | 'to-single-device-add-header' | 'to-user-add-header' | 'to-user-residential-add-header' | 'to-user-notify-of-recording' | 'hangup' | 'to-user-answer-and-fake-ringback' | 'toggle-timeframe'

This is the application that the call will be routed using. It works in partnership with dial-rule-translation-destination-user and dial-rule-translation-destination-host to forward to a next destination.

dial-rule-parameterstring

This is the application parameter field that can be used for additional settings based on the dial-rule-application. Default is empty string.

dial-rule-translation-destination-scheme'[*]' | 'sip:' | '<Null>'

This setting controls the "sip schema" on the destination, in most all case setting to "[*]" is correct.

dial-rule-translation-destination-userstring required

This is the forward destination the call will be sent to in partnership with the application (dial-rule-application) and host (dial-rule-translation-destination-host). This might be a user, queue or offnet number depending on the application.

dial-rule-translation-destination-hoststring

This is the forward destination host the call will be sent to in partnership with the application (dial-rule-application) and user (dial-rule-translation-destination-user). This might be the domain name or a connection name if trying to route offnet.

dial-rule-translation-source-namestring

This field will allow customization of the source "name" often used for the caller id name or the the descriptive quoted value outside of the sip uri. Defaults to [] but you can add a prefix for example with something like this, sales_[]

dial-rule-translation-source-scheme'[*]' | 'sip:' | '<Null>'

This setting controls the "sip schema" on the destination, in most all case setting to "[*]" is correct.

dial-rule-translation-source-userstring

This field will allow customization of the source "user" which is often the caller id number or the value before the @ in then SIP uri. Defaults to [] but you can modify and include [] as the previous value. An example would be using a token like <OwnCidNmbr> to replace with a user's caller id number.

dial-rule-translation-source-hoststring

This field will allow customization of the source "host" which is the value after the @ in then SIP uri. Defaults to [] but you can modify and include [] as the previous value. An example would be using a token like <OwnDomain> to replace with a user's domain

dial-rule-descriptionstring

This is a description of the number/rule that can be used for defintion or tracking purposes.

Example request

{
  "dial-rule-matching-to-uri": "sip:611@*",
  "dial-rule-matching-from-uri": "sip:????@*",
  "dial-rule-matching-day-of-week": "[1-5]",
  "dial-rule-matching-start-date": "2023-09-15",
  "dial-rule-matching-end-date": "2023-09-16",
  "dial-rule-matching-start-time": "02:00",
  "dial-rule-matching-end-time": "23:59",
  "dial-rule-translation-destination-user": "1000",
  "dial-rule-translation-destination-host": "example.com",
  "dial-rule-translation-source-name": "sales_[*]",
  "dial-rule-translation-source-user": "<OwnCidNmbr>",
  "dial-rule-translation-source-host": "<OwnDomain>"
}

Response

codeinteger required
messagestring required