Sending audio file to Hikvision camera

nmn

n3wb
Joined
Apr 24, 2019
Messages
10
Reaction score
0
Location
singapore
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.

curl --digest -X PUT admin:pwd@xxx.xxx.1.64/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="谢生服装">
<sessionId>27e09003</sessionId>
</TwoWayAudioSession>
Then when I send audio file

atic@ubuntu:~$ curl -H "application/binary" -X PUT -d @alert1.wav admin:pwd@xxx.xxx.1.64/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?
 

nmn

n3wb
Joined
Apr 24, 2019
Messages
10
Reaction score
0
Location
singapore
This is the output for the command and no voice came out. Why voice didn't come out?
atic@ubuntu:~$ curl --digest -V "application/binary" -X PUT -d @alert1.wav admin:xxxx@xxx.xxx.1.64/ISAPI/System/TwoWayAudio/channels/1/audioData

curl 7.68.0 (aarch64-unknown-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
 
Top