View or modify dialing rules
Available in 14 starting with 14.10
Resource URI: /rules/{ruleId}
Default Resource Properties:
The resource is represented by the following properties when the GET request is performed:
Property | Description |
id | |
name | |
enabeled | |
type | Each dial plan type can be created using proper type field: |
description | |
permissions | |
hatewayAware | |
authorizationChecked | |
internal | |
pstnPrefixOptional | |
longDistancePrefixOptional | |
externalLen | |
optionalPrefix | |
emergencyNumber | |
afterHoursAttendantEnabled | |
enableLiveAttendant |
Specific Response Codes: N/A
HTTP Method: GET
View the description for the specified schedule ID.
Example: XML format
<Rules>
<Rule>
<id>1</id>
<name>Emergency</name>
<enabled>false</enabled>
<type>Emergency</type>
<description>Emergency dialing plan</description>
<permissions />
<gatewayAware>true</gatewayAware>
<authorizationChecked>true</authorizationChecked>
<internal>false</internal>
<pstnPrefixOptional>false</pstnPrefixOptional>
<longDistancePrefixOptional>false</longDistancePrefixOptional>
<externalLen>0</externalLen>
<optionalPrefix>9</optionalPrefix>
<emergencyNumber>911</emergencyNumber>
<afterHoursAttendantEnabled>false</afterHoursAttendantEnabled>
<enableLiveAttendant>false</enableLiveAttendant>
</Rule>
<Rule>
<id>2</id>
<name>International</name>
<enabled>false</enabled>
<type>Long_Distance</type>
<description>International dialing</description>
<permissions />
<gatewayAware>true</gatewayAware>
<authorizationChecked>true</authorizationChecked>
<internal>false</internal>
<pstnPrefix />
<pstnPrefixOptional>false</pstnPrefixOptional>
<longDistancePrefix>011</longDistancePrefix>
<longDistancePrefixOptional>false</longDistancePrefixOptional>
<areaCodes />
<externalLen>-1</externalLen>
<afterHoursAttendantEnabled>false</afterHoursAttendantEnabled>
<enableLiveAttendant>false</enableLiveAttendant>
</Rule>
</Rules>
JSON format
{
rules: [8]
0: {
id: 1
name: "Emergency"
enabled: false
type: "Emergency"
description: "Emergency dialing plan"
scheduleId: null
permissions: {
names: [0]
}-
gatewayAware: true
authorizationChecked: true
internal: false
mediaServerHostname: null
mediaServerType: null
dialPatterns: null
callPattern: null
pstnPrefix: null
pstnPrefixOptional: false
longDistancePrefix: null
longDistancePrefixOptional: false
areaCodes: null
externalLen: 0
optionalPrefix: "9"
emergencyNumber: "911"
afterHoursAttendant: null
afterHoursAttendantEnabled: false
holidayAttendant: null
workingTimeAttendant: null
holidayAttendantPeriods: null
workingTimeAttendantPeriods: null
extension: null
attendantAliases: null
did: null
enableLiveAttendant: false
}-
1: {
id: 2
name: "International"
enabled: false
type: "Long_Distance"
description: "International dialing"
scheduleId: null
permissions: {
names: [0]
}-
gatewayAware: true
authorizationChecked: true
internal: false
mediaServerHostname: null
mediaServerType: null
dialPatterns: null
callPattern: null
pstnPrefix: ""
pstnPrefixOptional: false
longDistancePrefix: "011"
longDistancePrefixOptional: false
areaCodes: ""
externalLen: -1
optionalPrefix: null
emergencyNumber: null
afterHoursAttendant: null
afterHoursAttendantEnabled: false
holidayAttendant: null
workingTimeAttendant: null
holidayAttendantPeriods: null
workingTimeAttendantPeriods: null
extension: null
attendantAliases: null
did: null
enableLiveAttendant: false
}-
2: {
id: 3
name: "Local"
enabled: false
type: "Long_Distance"
description: "Local dialing"
scheduleId: null
permissions: {
names: [0]
}-
gatewayAware: true
authorizationChecked: true
internal: false
mediaServerHostname: null
mediaServerType: null
dialPatterns: null
callPattern: null
pstnPrefix: "9"
pstnPrefixOptional: false
longDistancePrefix: ""
longDistancePrefixOptional: true
areaCodes: ""
externalLen: 7
optionalPrefix: null
emergencyNumber: null
afterHoursAttendant: null
afterHoursAttendantEnabled: false
holidayAttendant: null
workingTimeAttendant: null
holidayAttendantPeriods: null
workingTimeAttendantPeriods: null
extension: null
attendantAliases: null
did: null
enableLiveAttendant: false
}
}
HTTP Method: PUT
Update the description for the specified rule.
HTTP Method: POST
Create a new rule.
{ "type":"Attendant",
"name":"Attedant-2",
"enabled":true,
"description":"didianara",
"scheduleId":null,
"permissions":{ "names":[
]
},
"gatewayAware":false,
"authorizationChecked":true,
"internal":true,
"mediaServerHostname":null,
"mediaServerType":null,
"dialPatterns":null,
"callPattern":null,
"pstnPrefix":null,
"pstnPrefixOptional":false,
"longDistancePrefix":null,
"longDistancePrefixOptional":false,
"areaCodes":null,
"externalLen":0,
"optionalPrefix":null,
"emergencyNumber":null,
"afterHoursAttendant":null,
"holidayAttendant":"After hours",
"workingTimeAttendant":"After hours",
"holidayAttendantPeriods":{ "holidayPeriods":[ { "startDate":1407877200000,
"endDate":1407963600000
}
]
},
"workingTimeAttendantPeriods":{ "workingHours":[ { "enabled":true,
"start":32400000,
"stop":64800000,
"scheduledDay":"Monday"
},
{ "enabled":false,
"start":32400000,
"stop":64800000,
"scheduledDay":"Tuesday"
},
{ "enabled":true,
"start":32400000,
"stop":64800000,
"scheduledDay":"Wednesday"
},
{ "enabled":false,
"start":32400000,
"stop":64800000,
"scheduledDay":"Thursday"
},
{ "enabled":false,
"start":32400000,
"stop":64800000,
"scheduledDay":"Friday"
},
{ "enabled":false,
"start":32400000,
"stop":64800000,
"scheduledDay":"Saturday"
},
{ "enabled":false,
"start":32400000,
"stop":64800000,
"scheduledDay":"Sunday"
}
]
},
"extension":"1002",
"attendantAliases":"zzzz2",
"did":null,
"enableLiveAttendant":true
}
HTTP Method: DELETE
Delete the specified rule.
Unsupported HTTP Method: N/A