Hikvision Doorbell / Videointercom integration

Ok - a bit of google:

This part of trunk config

context=default

need changing to:

context=from-trunk

I then setup a new ring group - 10000000005 - and added my hard phone extension to it.

All working! :slight_smile:

Thanks for the pointers, and of course your work in putting this all together

great, yeah the context is indeed different in freepbx … i have made it very simple in asterisk…

1 question, when you abort/stop the script, normally in ivms you still see 10000000005 registered for again 900 seconds, can you try then Freepbx to register? maybe it then works, and the script is only needed once … if that works, then you can maybe setup the script to run at boot, just once, instead of background

Sorry, not understanding your request.

If I terminate the script, after 15 minutes iVMS shows as Unregistered, and the “Asterisk” contact on the KH6320 disappears and the script needs to be run again.

Are you suggesting to run the script once, then configure pjsip_custom.conf as per option 1 and see if panel remains registered? Sure, I can give this a go.

yes indeed, just run the script once, then try indeed option 1
Maybe if the state is “registered” already, you dont receive the 404 error anymore … (not sure)

The trunk configuration works, (the same errors about registration posted above) but after 15 minutes the registration is lost and script needs to be re-run.

Ok , too bad, then the script is indeed needed for older devices… Untill pyVoip comes out, then it can be used as alternative… Maybe HA can be used a sip server …

Why using freepbx btw, and not plain asterisk?

Was thinking this was a newer device - only bought recently as part of kit ds-kis603-p-c

Actually using RasPBX which is FreePBX ported to RaspberryPi, as that’s that hardware I had to hand when I originally built it.

That indoor is indeed old…

But since you are running HA… you can also just use the Asterisk Addon, its already preconfigured to also use lovelace SIP card

Hi Arno, I have exactly the same setup as you and I will try it in the next days. Are you still having issues with the ring events?

With the standalone installation and to configure two doorbells what is the change needed in the json environment variables?

env:
        # JSON string with the list of doorbells
        DOORBELLS: '[{"name":"outdoor", "ip": "192.168.0.1", "username": "user", "password": "password"}]'
        
        # Connection to the MQTT broker
        MQTT__HOST: <hostname_of_broker>
        # Optionals
        MQTT__USERNAME: <broker_username>
        MQTT__PASSWORD: <broker_password>
        
        # To help diagnose problems
        SYSTEM__LOG_LEVEL: DEBUG
        SYSTEM__SDK_LOG_LEVEL: DEBUG

And one more question please, what is the latest image that should be used?

ghcr.io/pergolafabio/hikvision-doorbell:???

Seems to be 3.0.0-beta.19 , right?

Thank you!

Indeed , beta 19, the first Json, the doorbells, that’s a list, there you can define multiple doorbells

1 Like

So like this?

DOORBELLS: '[{"name":"outdoor", "ip": "192.168.0.1", "username": "user", "password": "password"}, {"name":"indoor", "ip": "192.168.0.2", "username": "user", "password": "password"}]'

Sorry to ask but the square brackets are confusing me!

correct!! :slight_smile:

1 Like

So have been playing with this and had a few thoughts. I’ve managed to register a 2nd raspberry pi to the indoor station (changed the serial number and extn details in the code) and the doorbell will now ring both asterisk and this 2nd raspberry pi directly. I can see using the --debug arg the incoming invite.

Somewhat off-topic for here, but is it possible to have this 2nd pi answer the call, play a predefined audio file then hangup? I’ve tried using the PyVOIP example, but this fails as it’s trying to register itself again.

To be clear, my use-case is to bypass asterisk completely. In time I’m thinking having a number of buttons connected that would each send a different message to the door station - i.e “on my way”, “I’m not here”, “please go away” etc. and a local speaker that would ring.

Yeah , that should work , asterisk is indeed not needed, but I still think you need to use the script, to register… Then use pyVoip for incoming call, all though, never tried pyVoip … I think it will be easier when 2.1 comes out, then you can use pyVoip to register directly without the script…

Not sure if you can setup pyVoip now as only listen mode

Can your script be used to answer the call? I can see you have an answer_call function, but not called from anywhere?

It can indeed listen for incoming calls, and then trigger an API, but there is no actually answer…

The purpose of the script was only Intended to send a custom registration with that specific XML… The same I requested to be native in pyVoip

I’ll dig a bit deeper into PyVoip. Not even having any luck just registering it to asterisk to test…

Never used pyVoip before, I wait for the release I want :slight_smile:

@pergola.fabio I have the container created but when start imediatly stop and here is the log:

I have a server port configured which is different from 8000, do I have a away to change this through an enviromental variable?
Thank you for your support.