$dialer.getDialSchedule
This method returns the current phone number dial schedule.
caution
The method works only when the call was created using the Calls API with a custom schedule of allowed call time intervals.
Syntax
The method is called without arguments:
$dialer.getDialSchedule();
The method returns an object with two properties, allowedDays
and allowedTime
.
tip
See the Calls API
POST /addPhones
method specification for the description of allowedDays
and allowedTime
value formats.Example
Suppose a phone number was added to an existing campaign using the following request:
curl --request POST 'https://platform.tovie.ai/api/calls/campaign/8231.7056.1b131df1/addPhones' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"phone": 16500000000,
"allowedDays": [
"sat",
"sun"
],
"allowedTime": {
"sat": [
{
"localTimeFrom": "12:30",
"localTimeTo": "15:00"
}
],
"sun": [
{
"localTimeFrom": "10:00",
"localTimeTo": "18:00"
}
]
}
}]'
When called from the script during this campaign, the method will return the following object:
{
"allowedDays": [
"sat",
"sun"
],
"allowedTime": {
"sat": [
{
"localTimeFrom": "12:30",
"localTimeTo": "15:00"
}
],
"sun": [
{
"localTimeFrom": "10:00",
"localTimeTo": "18:00"
}
]
}
}