- TODO LIST
- Version
- Authentication
- Access Token (Oauth - Username/Password)
- API Key (Machine 2 Machine)
- JWT (JSON Web Token)
- Event Subscriptions
- Resellers
- Domains
- Phone Numbers
- Users
- Devices
- Phones/Macs
- Sites
- Call Center
- Answer Rules
- Call Blocking
- Auto Attendant
- Media
- Voicemail
- Greetings
- Read Greetings for User
- Read Specific Greeting for User
- Delete Specific Greeting for User
- Create a new Greeting from TTS
- Update Greeting with TTS script
- Create a new Greeting from Upload (JSON + Base64 File)
- Update Greeting from Upload (JSON + Base64 File)
- Create a new Greeting from Upload (Multipart/Mixed Post)
- Update Greeting from Upload (Multipart/Mixed Post)
- Music on Hold
- Domain
- Read MOH for Domain
- Create a new MOH for Domain from TTS
- Update MOH for Domain from TTS
- Create a new MOH for Domain from Upload (JSON + Base64 File)
- Update MOH for Domain from Upload (JSON + Base64 File)
- Create a new MOH for Domain from Upload (Multipart/Mixed Post)
- Update MOH for Domain from Upload (Multipart/Mixed Post)
- Delete MOH for Domain
- User
- Read MOH for User
- Create a new MOH for Domain from TTS
- Create a new MOH for User from Upload (JSON + Base64 File)
- Update MOH for User from Upload (JSON + Base64 File)
- Update MOH for Domain from TTS
- Create a new MOH for User from Upload (Multipart/Mixed Post)
- Update a MOH for User from Upload (Multipart/Mixed Post)
- Delete MOH for User
- Domain
- Hold Messages
- Text to Speech
- CDR (Call History)
- Transcriptions & Sentiment
- Call Traces & Cradle to Grave
- Calls (live/active calls)
- Contacts
- Addresses
- Get Addresses for Domain
- Validate Address
- Create Address for Domain
- Update Address for Domain
- Update Address for User
- Update Address Endpoint
- Create Address for User
- Delete Address For User
- Delete Address Endpoint
- Delete Address For Domain
- Create Address Endpoint
- Get Address Endpoints for a Domain
- Get Addresses Count for Domain
- Get Addresses for User
- Get Address Using Address ID
- Voicemail Reminders
- Dialrule
- Messages
- Get Messagesessions for Domain
- Start a new Message Session
- Get Messagesessions for User
- Get Messages for Messagesession
- Send a message (Chat)
- Send a message (Group Chat)
- Send a message (Media Chat)
- Send a message (SMS)
- Send a message (Group SMS)
- Send a message (MMS)
- Update Messagesession (Participants)
- Update Messagesession (Session Name)
- Update Messagesession (Leave)
- Delete Messagesession
- SMS Numbers
- Recordings
- Email
- Connections
- Routes
- Meetings
- Event Logs
- Iotum
- Read Iotum Video Domain Resellers
- Read Iotum Video Host
- Read All Iotum Video Hosts in a Domain
- Read Iotum Video Host Conferences
- Read Iotum Video Host Contacts
- Read Iotum Video Company
- Read Iotum Video Company Products
- Read Iotum Video Available Products
- Create a Host
- Create Host Contacts
- Create Iotum Video Subscription
- Update Domain's Iotum Company
- Update Domain's Iotum Subscriptions
- Update User's Iotum Host
- Delete Iotum Video Subscription
- Delete a Host
- Create Iotum Video Company
- Create a Ad-hoc Conference
- Delete a Video Company
- Create a Meeting with Id
- Create a Meeting
- Read Meeting
- Count Domains Meetings
- Count Meeting
- Register Meeting
- Update a Meeting
- Delete a Meeting
- Request a Meeting ID
- Read Meetings for User
- Backup & Restore
- Configs
- Images
- Templates
- Timeframes
- Domain (Shared)
- User
- Holiday Information
- Firebase
- SSL Certificates
Add a new dial rule into a dial plan
POST
/domains/{domain}/dialplans/{dialplan}/dialrules
Last modified:2024-12-17 19:12:16
OperationId:CreateDialrule
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
domain
stringÂ
required
dialplan
stringÂ
required
Body Params application/json
synchronous
enum<string>Â
write-onlyrequired
Allowed values:
yesno
Default:
no
dail-rule-matching-to-uri
stringÂ
required
Examples:
sip:611@*sip:1??????????@*
enabled
enum<string>Â
optional
Allowed values:
yesno
Default:
yes
dail-rule-matching-from-uri
stringÂ
optional
Default:
*
Examples:
sip:????@**
dial-rule-matching-day-of-week
stringÂ
optional
Default:
*
Examples:
[1-5]1
dial-rule-matching-start-date
string <date>
optional
Default:
*
Examples:
2023-09-15*
dial-rule-matching-end-date
string <date>
optional
Default:
*
Examples:
2023-09-16*
dial-rule-matching-start-time
stringÂ
optional
Default:
*
Examples:
02:00*
dial-rule-matching-end-time
stringÂ
optional
Default:
*
Examples:
23:59*
dial-rule-application
enum<string>Â
optional
Allowed values:
available-numberto-voicemail-residentialto-callqueueto-callqueue-announce-count-callers-aheadto-callqueue-announce-expected-wait-timeto-connectionto-connection-or-user-no-failoverto-single-deviceto-userto-user-residentialto-voicemailspam-screeningto-connection-block-caller-idto-connection-no-timeoutto-connection-add-header-force-caller-idto-connection-add-header-no-timeoutto-connection-add-headerto-single-device-add-header-allow-voicemailto-single-device-add-header-allow-voicemail-residentialto-single-device-add-headerto-user-add-headerto-user-residential-add-headerto-user-notify-of-recordinghangupto-user-answer-and-fake-ringbacktoggle-timeframe
dial-rule-parameter
stringÂ
optional
dial-rule-translation-destination-scheme
enum<string>Â
optional
Allowed values:
[*]sip:<Null>
Default:
[*]
dial-rule-translation-destination-user
stringÂ
required
Examples:
1000250018005551234
dial-rule-translation-destination-host
stringÂ
optional
Default:
[*]
Examples:
example.com<OwnDomain>
dial-rule-translation-source-name
stringÂ
optional
Default:
[*]
Examples:
sales_[*][*]<OwnCidName>
dial-rule-translation-source-scheme
enum<string>Â
optional
Allowed values:
[*]sip:<Null>
Default:
[*]
dial-rule-translation-source-user
stringÂ
optional
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 to replace with a user's caller id number.
Default:
[*]
Examples:
<OwnCidNmbr>[*]
dial-rule-translation-source-host
stringÂ
optional
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 to replace with a user's domain
Default:
[*]
Examples:
<OwnDomain>[*]
dial-rule-description
stringÂ
optional
Example
{
"synchronous": "yes",
"dail-rule-matching-to-uri": "sip:611@*",
"dail-rule-matching-from-uri": "*",
"enabled": "yes",
"dial-rule-translation-source-name": "611 - [*]",
"dial-rule-translation-source-user": "[*]",
"dial-rule-translation-source-host": "[*]",
"dial-rule-application": "to-callqueue",
"dial-rule-translation-destination-user": "{{queue}}",
"dial-rule-translation-destination-host": "{{domain}}",
"dial-rule-description": "611 - Customer Service Direct Dial"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://awqacore01.crexendocloud.com/ns-api/v2/domains//dialplans//dialrules' \
--header 'Content-Type: application/json' \
--data-raw '{
"synchronous": "yes",
"dail-rule-matching-to-uri": "sip:611@*",
"dail-rule-matching-from-uri": "*",
"enabled": "yes",
"dial-rule-translation-source-name": "611 - [*]",
"dial-rule-translation-source-user": "[*]",
"dial-rule-translation-source-host": "[*]",
"dial-rule-application": "to-callqueue",
"dial-rule-translation-destination-user": "{{queue}}",
"dial-rule-translation-destination-host": "{{domain}}",
"dial-rule-description": "611 - Customer Service Direct Dial"
}'
Responses
🟢202Accepted
application/json
Body
code
integerÂ
required
message
stringÂ
required
Example
{
"code": 0,
"message": "string"
}
🟢200OK
🟠404Record not found
🟠400Bad Request
🟠401Authentication Required
Modified at 2024-12-17 19:12:16