An IVR campaign is an autodialer: the switch calls each number of a list and plays a recorded prompt when the call is answered, for example a payment reminder or a service announcement. Create the prompt with addIVRPrompt, the campaign with addIVRCampaign, then add the numbers to call with addCampaignPhone. The calls are placed on behalf of an account and billed to it.
Adds a prompt, the recording a campaign plays.
Name
Type
Required
Description
name
string
yes
Short name of the prompt
data
string
yes
URL the switch downloads the recording from. The file is 8 kHz signed linear audio (.sln)
Name
Type
Description
result
string
OK
i_ivr_prompt
int
ID of the new prompt
" name " : " Payment reminder " ,
" data " : " https://files.example.com/prompts/payment-reminder.sln " ,
{ " result " : " OK " , " i_ivr_prompt " : 21 }
Creates a campaign.
Name
Type
Required
Description
name
string
yes
Short name of the campaign
i_ivr_prompt
int
yes
ID of the prompt to play
authname
string
yes
Authentication name of the account the calls are made from
description
string
no
Longer description of the campaign
paused
boolean
no
True stops the campaign temporarily
cli
string
no
Number to present as CLI on the calls. Default: the called number
i_schedule
int
no
Schedule that limits when the campaign calls
max_concurrent_calls
int
no
Maximum calls of the campaign at the same time. Default: 20
max_attempts
int
no
Maximum attempts per number. Default: 3
timeout_sec
int
no
Seconds to wait for an answer. Default: 300
backoff_sec
int
no
Seconds to wait after a failed attempt before the next one. Default: 600
threshold_msec
int
no
Milliseconds the prompt must play for the call to count as successful. Default: 3000
Name
Type
Description
result
string
OK
i_campaign
int
ID of the new campaign
" name " : " January reminders " ,
" authname " : " acme-dialer " ,
" max_concurrent_calls " : 10 ,
{ " result " : " OK " , " i_campaign " : 5 }
Adds a number to a campaign.
Name
Type
Required
Description
i_campaign
int
yes
ID of the campaign
cld
string
yes
Number to call
finished
boolean
no
True marks the number as done, so it is not called
expires
dateTime
no
Until when the number may be called, in UTC. Empty while the number has not been processed
next_call
dateTime
no
When to make the next attempt, in UTC. Empty means as soon as possible
Name
Type
Description
result
string
OK
i_campaign_phone
int
ID of the new number record
for number in [ " 447700900123 " , " 447700900456 " ] :
call ( " addCampaignPhone " , { " i_campaign " : 5 , " cld " : number} )
{ " result " : " OK " , " i_campaign_phone " : 1874 }