Connecting to Dahua VTO (server) from Linux

danniel

n3wb
May 27, 2026
2
0
Armenia
Hi,

So, my building has a Dahua VTO (VTO6521K-S2) that acts as the SIP server for ~60 apartments. They're pushing their Dahua VTHs and the Dahua remote app, which the intercom installer is used to, sets up in seconds with Dahua's proprietary protocols.

However, I have my smart home (Home Assistant), my own Crestron TSW-1060 panels, and my own ecosystem that I'd like to integrate their intercom into. And I don't want another mobile app or 1-function screen.

My end goal: Have a SIP client endpoint on my home server that registers to the building's VTO, and then from that local SIP client be able to forward the call to my Home Assistant app, the Crestron panels, etc.

I know people have gotten Asterisk to work as the SIP server connecting different Dahua VTOs and VTHs, but I can't find anything about connecting to the VTO (server) from an Asterisk client.

I bought a Dahua VTO to test things out and see if I can set it up (to then run the building guys through what I need). What I've tried:
  • All internal networking, bridges, firewall rules, etc. for VMs set up
  • Asterisk (HA add-on via SIP-HASS) installed and running
  • Apartment created in VTO (type VTH, room 9901, Public registration, user/pass)
  • Set up pjsip configs and extensions. These are successfully loaded (checked), and I included them below.
  • When I pjsip send register vto-trunk-reg, it registers successfully (200 OK) and stays registered (from Asterisk's viewpoint)
However, it never shows up as "Online" in the Dahua web admin, and when I try to place a call (from the VTO to Asterisk) it tells me it's disconnected. Is there some kind of handshake or heartbeat or something needed to keep the connection alive?

What should I be looking at? How would you debug the problem? If there's a "simpler" test setup (eg. Asterisk as standalone, not as HA add-on), I could try that too. I'm happy to share logs and mess around with the system :)

Thanks so much! I've been banging my head against the wall for 2 weeks trying to figure this out. Searched everywhere, can't seem to find a solution that works. Hopefully this learned and experienced community can point out some obvious mistake I'm making

custom/pjsip_custom.conf:
YAML:
; ─── Outbound registration to the VTO acting as SIP server ──────────────
[vto-trunk-reg]
type = registration
outbound_auth = vto-trunk-auth
server_uri = sip:192.168.33.211
client_uri = sip:9901@192.168.33.211
retry_interval = 60
forbidden_retry_interval = 30
expiration = 300

[vto-trunk-auth]
type = auth
auth_type = userpass
username = 9901
password = <VTO_PASS>

; ─── AOR — where to send outbound INVITEs on this trunk ─────────────────
[vto-trunk]
type = aor
contact = sip:192.168.33.211

; ─── Endpoint — defines codecs + which dialplan context inbound calls
;     from the VTO land in ────────────────────────────────────────────────
[vto-trunk]
type = endpoint
context = from-vto
disallow = all
allow = ulaw
allow = alaw
allow = h264
outbound_auth = vto-trunk-auth
aors = vto-trunk
direct_media = no
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
dtmf_mode = rfc4733

; ─── Identify inbound traffic from the VTO IP as this endpoint ──────────
[vto-trunk]
type = identify
endpoint = vto-trunk
match = 192.168.33.211

custom/extensions_custom.conf:
YAML:
; Inbound calls from the VTO trunk land here. The VTO will send INVITE to
; 9901 (the apartment number). For now, ring a single hardcoded local
; extension — Phase 3 will replace this with multi-endpoint forking.
[from-vto]
exten => 9901,1,NoOp(Incoming call from VTO to apartment 9901)
 same => n,Dial(PJSIP/100,30)
 same => n,Hangup()

; Fallback — catch any other inbound dial number from the trunk
exten => _X.,1,NoOp(Unhandled VTO inbound: ${EXTEN})
 same => n,Hangup()
 
Hi,

So, my building has a Dahua VTO (VTO6521K-S2) that acts as the SIP server for ~60 apartments. They're pushing their Dahua VTHs and the Dahua remote app, which the intercom installer is used to, sets up in seconds with Dahua's proprietary protocols.

However, I have my smart home (Home Assistant), my own Crestron TSW-1060 panels, and my own ecosystem that I'd like to integrate their intercom into. And I don't want another mobile app or 1-function screen.

My end goal: Have a SIP client endpoint on my home server that registers to the building's VTO, and then from that local SIP client be able to forward the call to my Home Assistant app, the Crestron panels, etc.

I know people have gotten Asterisk to work as the SIP server connecting different Dahua VTOs and VTHs, but I can't find anything about connecting to the VTO (server) from an Asterisk client.

I bought a Dahua VTO to test things out and see if I can set it up (to then run the building guys through what I need). What I've tried:
  • All internal networking, bridges, firewall rules, etc. for VMs set up
  • Asterisk (HA add-on via SIP-HASS) installed and running
  • Apartment created in VTO (type VTH, room 9901, Public registration, user/pass)
  • Set up pjsip configs and extensions. These are successfully loaded (checked), and I included them below.
  • When I pjsip send register vto-trunk-reg, it registers successfully (200 OK) and stays registered (from Asterisk's viewpoint)
However, it never shows up as "Online" in the Dahua web admin, and when I try to place a call (from the VTO to Asterisk) it tells me it's disconnected. Is there some kind of handshake or heartbeat or something needed to keep the connection alive?
Speed Stars
What should I be looking at? How would you debug the problem? If there's a "simpler" test setup (eg. Asterisk as standalone, not as HA add-on), I could try that too. I'm happy to share logs and mess around with the system :)

Thanks so much! I've been banging my head against the wall for 2 weeks trying to figure this out. Searched everywhere, can't seem to find a solution that works. Hopefully this learned and experienced community can point out some obvious mistake I'm making
It sounds like the SIP registration itself is working, but the Dahua VTO probably expects additional keepalive or heartbeat behavior before marking the endpoint as fully online. I would start by enabling full SIP debug and checking whether the VTO sends OPTIONS requests or expects periodic responses after registration. Testing with a standalone Asterisk install instead of the HA add-on is also a good idea because it helps rule out Docker or networking issues. You should also verify transport type, codecs, Contact headers, and User-Agent settings since Dahua devices can sometimes be very picky about SIP compatibility.
 
It sounds like the SIP registration itself is working, but the Dahua VTO probably expects additional keepalive or heartbeat behavior before marking the endpoint as fully online. I would start by enabling full SIP debug and checking whether the VTO sends OPTIONS requests or expects periodic responses after registration. Testing with a standalone Asterisk install instead of the HA add-on is also a good idea because it helps rule out Docker or networking issues. You should also verify transport type, codecs, Contact headers, and User-Agent settings since Dahua devices can sometimes be very picky about SIP compatibility.
Thanks for the response!

Yeah, I'm getting the impression already that these Dahua devices have implemented SIP in a unnecessarily unique and obtuse way.

The SIP debug makes sense. I was monitoring tcpdump. Is there a better way?

When you say "verify translort type, codecs, headers, user-agent settings", is there a way you'd do this experimentally? Because I still haven't found anything about those in any Dahua documentation, and reaching out to their support was likewise ineffective.

I'll run these later today and share the logs if anything doesn't make sense, hopefully you can spot something :)