Dahua VTH, VTO and Asterisk SIP - one way audio

ondra.lie

n3wb
Sep 12, 2019
3
0
Prague
Hi,

I have problem with VTH dahua monitor and Asterisk as a server.

192.168.230.253 - Asterisk FreePBX on RPi4
192.168.230.241 - Dahua VTO4202 FW 4.500 (ext 8001)
192.168.230.197 - VTH2421 FW 4.500 (ext 1006)
192.168.230.199 - Another VTH2421 FW 4.500 (ext 1001)

When calling from VTO to VTH devices everything working ok (I got audio and video stream two way)
When calling from VTH to VTO i got just one way audio without video (audio from VTH to VTO)
When calling from VTO to another VTO i got just one way audio too

I am tried many combinations as FW of devices, router settings, change devices but without success.
I read many posts ... but I did not found solution.


Can anyone help me pls?

I am sending dump of communication for WireShark and asterisk log.
 

Attachments

I don't know much about that system, but a quick look at the documentation makes it look like the Dahua system is designed to be self-sufficient. Have you tried to set up the VTO and VTN without the FreePBX server? I think I would start there and get the Dahua equipment working as expected before I would add the FreePBX system. By adding the FreePBX system in first, it may be having issues with which SIP server it is suppose to be communicating with.
 
Yes I already tried it.
Everything working if I am using VTO device like SIP server but I would like to use some special scenarios.
I have VTO with keypad and my idea is that when I will call special number (not VTH device).
It will run script to open garage door or armed our house or something like that :).
 
Again, I am not familiar with this system, so I am just making some guesses here.

Is it possible to add an extension to the VTO/VTN system that is actually a SIP extension on the FreePBX server? In other words, try to keep the two systems separated and only tie them together with a single SIP extension. This way you could call the FreePBX extension from the Dahua system to kick off scripts like you desire.
 
It is not bad idea ... maybe it is possible but VTO as Server does not work on two subnets. Now I have just one subnet but after that every VTH device will be in extra subnet. So that is another reason to use freepbx.
 
Hi ondra.lie,

did you know: DahuaEventHandler.php
It loggs all VTO-Events and can run on your RPi4. Maybe you could easily use this script, to open the garage door or arm the security system.
Unfortunatelly I do not have the keypad for my VTO4202F. I do only have the RFID-cardreader, fingerprint-sensor and 2 buttons to ring 2 bells - so I am not able to test, which events occur, when using the keypad or calling a number.

The eventhandler tells me for example
  • which button has been pressed
  • which ID the RFID-card has
  • which fingerprint was recognized
  • ...and many more things, like VideoMotion (to save a snapshot)
The script can easily be modified. (I modified it, to switch off PoE-Powersupply and disable the VTO-Port, if an IntruderAlert is send.)

------------------

How did you manage to have video when calling from VTO to VTH?
I also have Dahua VTO4202 FW 4.500 + VTH2421 FW 4.500 + Asterisk on RPi4 (without FreePBX) - but I do never see the video: not when the VTH is ringing and not, when the VTH answers the call.
(It only works when I use the VTO-SIP-Server - but not with Asterisk.)
So you are doing something much better than me.
May I please have a look at your
  • /etc/asterisk/sip.conf
  • /etc/asterisk/extensions.conf
    and maybe
  • /etc/asterisk/rtp.conf
  • /etc/asterisk/features.conf
    (if there is anything important in it)
to figure out, what I am doing wrong? I've really got no idea, why it does not work...
 
I run a similar setup with my VDP devices - only difference: I still use chan_sip instead of pjsip.
Can you give it a try with chan_sip?
If you still have problems, pls. prepare a tcpdump trace at the affected device.