Skip to main content

Voicemail Add

This service is used for adding a voicemail box.

Parameters

DescriptionDefined DataExample DataRequired Parameters[**]/Optional[*]Parameters
Voicemail box name-test voicemail**name
Voicemail box number-999**number
Password-999**password
Email address--email
Password requestyes/nono*required_password
Allow password changeyes/nono*allow_change_password
Email sending statusyes/nono*send_email
Attach audio file to emailyes/nono*attach_file_email
Play busy messageyes/nono*play_busy
Play unavailable messageyes/nono*play_unavailable
Play welcome messageyes/nono*play_welcome
Play Caller IDyes/nono*Play_CID
Play envelope messageyes/nono*Play_Envelope
Delete voicemailyes/nono*Delete_Voicemail
Additional optionsyes/nono*more_options

Sample Invocation

Show Full Source Code PHP

	<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'http://192.168.51.20/api/v4/voicemails/voicemails/add',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name":"test voicemail",
"number":"999",
"password":"999",
"email":"",
"required_password":"no",
"allow_change_password":"no",
"send_email":"no",
"attach_file_email":"no",
"play_busy":"no",
"play_unavailable":"no",
"play_welcome":"no",
"Play_CID":"no",
"Play_Envelope":"no",
"Delete_Voicemail":"no",
"more_options":""
}',
CURLOPT_HTTPHEADER => array(
'X-APIKEY: vZKtIKWsld0egNlkzHo8i5LVBqLNBSWARCQsPOSgDjFmAHM3tG',
'Authorization: Basic dGVzdDpBYTEyMzQ1Ng==',
'Content-Type: application/json'
),
));

$response = curl_exec($curl);

if (!curl_errno($curl)) {
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
echo 'response code:'.$httpcode, '<br/>';
}

curl_close($curl);
echo $response;
?>