Sending audio file to Hikvision camera

14 views Asked by At

I am trying to send a .wav file to a Hikvision camera to make alert voice at camera. The camera is activated for twowayaudio as below.

atic@ubuntu:~$ curl --digest -X PUT admin:[email protected]/ISAPI/System/TwoWayAudio/channels/1/open

Twoway audio is activated with ourputs as below

<?xml version="1.0" encoding="UTF-8" ?>
<TwoWayAudioSession version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<sessionId>27e09003</sessionId>
</TwoWayAudioSession>

Then when I send audio file

atic@ubuntu:~$ curl -H "application/binary" -X PUT -d @alert1.wav admin:[email protected]/ISAPI/System/TwoWayAudio/channels/1/audioData

<!DOCTYPE html>
<head>
    <title>Unauthorized</title>
    <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
</head>
<body>
<h2>Access Error: 401 -- Unauthorized</h2>
<pre></pre>
</body>
</html>

Why there is Unauthorized error?

0

There are 0 answers