Posting Audio Using HTTP API to a VTO Doorbell

Joined
Dec 23, 2021
Messages
3
Reaction score
1
Location
AU
I am having issues using the HTTP API from Dahua to post an audio file to DHI-VTO2202F-P. Whatever I do, I always get 400 Bad Request from the doorbell.

Based on the outdated API specifications for Amcrest/Dahua, a POST request like that should do the trick:

POST /cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 HTTP/1.1 Content-Type: Audio/G.711A
Content-Length: 9999999

I am not able to make a POST request with that Content-Length since it has to match the actual file size so I do a request like that:

curl --digest -verbose --request POST --url '' --header 'content-type: Audio/G.711A' --data-binary @DoorBell.wav

The "Content-Length" header is automatically added by curl and I always get 400 Bad Request from my doorbell.

I have attached the file I am trying to post. Can anyone try the same file with a Dahua doorbell (could be a different model) and share some ideas?
 

Attachments

MC1987

Pulling my weight
Joined
Apr 5, 2018
Messages
179
Reaction score
112
Have you turned security mode off in the VTO?
 
Joined
Dec 23, 2021
Messages
3
Reaction score
1
Location
AU
Have you turned security mode off in the VTO?
Yes, I have tried disabling the security mode in the doorbell Web UI. Makes no difference unfortunately.

All other API requests (the ones that I tried) work fine.
 

zaqik

n3wb
Joined
Jun 15, 2022
Messages
20
Reaction score
3
Location
eet
Is there any way to extract default ringtones from the VTO?
 
Top