Answer the question
In order to leave comments, you need to log in
How to reset a call in Zadarma telephony?
All exhausted already by this question, technical support answers not at all what you ask.
Essence:
There is a webhook to which the operator sends a signal about the beginning of the call:
if (isset($_GET['zd_echo'])) exit($_GET['zd_echo']);
if ($_POST['event'] == 'NOTIFY_START'){
sendTelegram(
'sendMessage',
array(
'chat_id' => '251203ХХХ',
'text' => 'Звонок от '.$_POST['caller_id']
)
);
};
For NOTIFY_START and NOTIFY_IVR requests, you can change the script for the current call on the fly by sending one of the following options in response:
{
"hangup": 1,
}
Answer the question
In order to leave comments, you need to log in
Something like this:
header('Content-Type: application/json');
echo json_encode(['hangup' => 1, ]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question