Hikvision DS-KD8003-IME - New video doorbell

Ahh got it. So my next question would be how do I get those Hikvision trunks to ring phones without a ring group?
Add 1 indoor station Trunk extension per FreePBX extension?

I'll try with that now.
 
1 trunk is enough as extension.. I used conference, you can invite as many extensions to the call, once you join, the ,8003 joins too...
I used that approach so I can originate the call from an custom app (rtsp for asterisk,) to have early video
 
Okay thats good i'll try with the conference approach.

I'm trying to register the PBX to the indoor station now. Not registering.

This is my pjsip_custom.conf am I missing something here?

type=auth
auth_type=Hiktrunk
password=XXXX
username=10000000005


type=aor
contact=sip:192.168.1.196:5065


type=registration
outbound_auth=Hiktrunk
server_uri=sip:192.168.1.196:5065
client_uri=sip:10000000005@192.168.1.196:5065
retry_interval=10
contact_user=10000000005
expiration=600


type=endpoint
context=default
disallow=all
allow=ulaw,alaw
allow=h264,vp8
outbound_auth=Hiktrunk
aors=mytrunk-aor
rewrite_contact=yes
from_domain=mydomain.com


type=identify
endpoint=Hiktrunk
match=192.168.1.196

1732775904313.png
 
Read again my GitHub, for all devices except 9310/9510 you need to run script too, needed to send the regxml part
 
I think I'm going to swap out the 6350 for the 9310/9510. I just got it today so I'm in the return window.

I'd rather have it running the simpler way and running that script is going to be beyond me haha.

I appreciate the help. Thank you. I'll update when I get the new Indoor station.
 
Ok, make sure you buy the B revision, the A revision doesn't work without script
Hey NoFate,

I got the 9510 Indoor station. I configured the trunk. Not sure how to configure freepbx to ring when the Doorphone is pressed.

I'd like the Hikvision door phone or indoorstation to call in to a ring group on FreePBX.
Would I use an inbound route? But what would be the DID number the indoor station would be using to ring Freepbx?

Right now it rings the screen and Hikconnect if it can for a second then hangs up. Doesnt ring PBX yet.

Thank you,
Al
 
Hey NoFate,

I got the 9510 Indoor station. I configured the trunk. Not sure how to configure freepbx to ring when the Doorphone is pressed.

I'd like the Hikvision door phone or indoorstation to call in to a ring group on FreePBX.
Would I use an inbound route? But what would be the DID number the indoor station would be using to ring Freepbx?

Right now it rings the screen and Hikconnect if it can for a second then hangs up. Doesnt ring PBX yet.

Thank you,
Al
No idea how freepbx works, I have a guide for asterisk, you can use ring groups there ... I did it with conference as a test
 
On my asterisk guide , I have an example how to forward the call from indoor to conference/group, use asterisk instead? I dont know how freepbx works
 
Yup trying to figure it out now with the asterisk guide. Freepbx is just a gui and some addons for asterisk. I can get in to the asterisk cli and add confs.
I have that setup with a custom trunk in the gui pointed to that conf.

Reading your guide it looks like the call will come in as 1000000005 to the PBX.

I think I would need to setup an inbound route with 1000000005 as the DID and have that route to a ring group.

I'd like to setup the conf bridge to have early video but for now ring group is fine.
I dont see how i can have a conf bridge ring all the extensions. Ext's can dial in but how does the conf dial out?
 
Yup trying to figure it out now with the asterisk guide. Freepbx is just a gui and some addons for asterisk. I can get in to the asterisk cli and add confs.
I have that setup with a custom trunk in the gui pointed to that conf.

Reading your guide it looks like the call will come in as 1000000005 to the PBX.

I think I would need to setup an inbound route with 1000000005 as the DID and have that route to a ring group.

I'd like to setup the conf bridge to have early video but for now ring group is fine.
I dont see how i can have a conf bridge ring all the extensions. Ext's can dial in but how does the conf dial out?
You can use originate command to invite multiple users in the conference, in my example I just call 1 users with the originate, but you can invite as many as you want... Indeed 100...5 is the trunk, that one will ring and the dialplan is based on that incoming call, Its the virtual indoor extension
 
On my asterisk guide , I have an example how to forward the call from indoor to conference/group, use asterisk instead? I dont know how freepbx works

You can use originate command to invite multiple users in the conference, in my example I just call 1 users with the originate, but you can invite as many as you want... Indeed 100...5 is the trunk, that one will ring and the dialplan is based on that incoming call, Its the virtual indoor extension
Okay I will try that. Might take a bit of tweaking to work between Freepbx and asterisk. I'm not running the full version of Freepbx either I have the RaspberryPI arm version its lacking some modules.
I might downgrade my version and try it with chan_sip. I can create a trunk with a conf file in the GUI using Chan_sip only. But the newer version im using doesnt have Chan_sip.

I will see if can have the trunk call to trunk direct instead of linphone. I have a trunk setup with two PBX's trunk to trunk I'm thinking I might be able to do the same with the indoor extension.
Or is an external call necessary?
 
Okay I will try that. Might take a bit of tweaking to work between Freepbx and asterisk. I'm not running the full version of Freepbx either I have the RaspberryPI arm version its lacking some modules.
I might downgrade my version and try it with chan_sip. I can create a trunk with a conf file in the GUI using Chan_sip only. But the newer version im using doesnt have Chan_sip.

I will see if can have the trunk call to trunk direct instead of linphone. I have a trunk setup with two PBX's trunk to trunk I'm thinking I might be able to do the same with the indoor extension.
Or is an external call necessary?
Try to avoid chansip, it's deprecated... You can call trunk to trunk .. in my guide linphone was just an example, you can call whatever you want... But you will miss early video... The only way to have early video is to use that rtsp-app , it's compiled as custom in asterisk , then use that AGI script... I think you can combine it as custom too for freepbx if you need it... But start simple first
 
Pressing Doorphone 1 will hit the PBX but I get an instant hang up on the indoor station PBX doesnt have a chance to ring,
Sometimes i'll hear a system message try to play for a split second. I think its the Goodbye message looking at the logs.


Connected to Asterisk 21.6.0 currently running on FreePBX (pid = 1932968)
-- Executing [10000000005@default:1] Playback("PJSIP/mytrunk-0000000d", "vm-goodbye") in new stack
-- <PJSIP/mytrunk-0000000d> Playing 'vm-goodbye.ulaw' (language 'en')
[2024-12-14 02:13:38] WARNING[2144085]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event as-feature-event from 402
[2024-12-14 02:13:38] WARNING[2144085]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event as-feature-event from 402
-- Executing [10000000005@default:2] NoOp("PJSIP/mytrunk-0000000d", "ERROR: FreePBX Does not use the [default] context, confguration error") in new stack
-- Executing [10000000005@default:3] Gosub("PJSIP/mytrunk-0000000d", "macro-hangupcall,s,1") in new stack
-- Executing [s@macro-hangupcall:1] Set("PJSIP/mytrunk-0000000d", "__MCVMSTATUS=") in new stack
-- Executing [s@macro-hangupcall:2] Gosub("PJSIP/mytrunk-0000000d", "app-missedcall-hangup,s,1()") in new stack
-- Executing [s@app-missedcall-hangup:1] NoOp("PJSIP/mytrunk-0000000d", "Dialed: s") in new stack
-- Executing [s@app-missedcall-hangup:2] NoOp("PJSIP/mytrunk-0000000d", "Caller: ") in new stack
-- Executing [s@app-missedcall-hangup:3] GotoIf("PJSIP/mytrunk-0000000d", "0?exit") in new stack
-- Executing [s@app-missedcall-hangup:4] Set("PJSIP/mytrunk-0000000d", "EXTENNUM=s") in new stack
-- Executing [s@app-missedcall-hangup:5] Set("PJSIP/mytrunk-0000000d", "FEXTENNUM=s") in new stack
-- Executing [s@app-missedcall-hangup:6] GotoIf("PJSIP/mytrunk-0000000d", "0?exit") in new stack
-- Executing [s@app-missedcall-hangup:7] AGI("PJSIP/mytrunk-0000000d", "agi:/127.0.0.1/missedcallnotify.php,s,,s,0,,PJSIP/mytrunk-0000000d,,,,") in new stack
-- <PJSIP/mytrunk-0000000d>AGI Script agi:/127.0.0.1/missedcallnotify.php completed, returning 0
-- Executing [s@app-missedcall-hangup:8] Return("PJSIP/mytrunk-0000000d", "") in new stack
-- Executing [s@macro-hangupcall:3] GotoIf("PJSIP/mytrunk-0000000d", "1?theend") in new stack
-- Goto (macro-hangupcall,s,5)
-- Executing [s@macro-hangupcall:5] ExecIf("PJSIP/mytrunk-0000000d", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:6] Hangup("PJSIP/mytrunk-0000000d", "") in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on 'PJSIP/mytrunk-0000000d'
[2024-12-14 02:13:48] WARNING[1967409]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event as-feature-event from 402
[2024-12-14 02:13:48] WARNING[1967409]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event as-feature-event from 402
FreePBX*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
root@FreePBX:~#

Looks like its dropping the 1 and 5 in the script

my,
pjsip_custom.conf

[mytrunk-auth]
type=auth
auth_type=userpass
password=xxxx
username=10000000005

[mytrunk-aor]
type=aor
contact=sip:192.168.1.232:5065

[mytrunk-registration]
type=registration
outbound_auth=mytrunk-auth
server_uri=sip:192.168.1.232:5065
client_uri=sip:10000000005@192.168.1.232:5065
retry_interval=10
contact_user=10000000005
expiration=600

[mytrunk]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw
allow=h264,vp8
outbound_auth=mytrunk-auth
aors=mytrunk-aor
rewrite_contact=yes
from_domain=192.168.1.232

[mytrunk-identify]
type=identify
endpoint=mytrunk
match=192.168.1.232
 
Last edited:
I think this is your issue, my guess you need to configure the dialplan NOT in the default context?

ERROR: FreePBX Does not use the [default] context, confguration error") in new stack
 
GOT IT!!!!
had to change context in custom_pjsip.conf to " context=from-pstn "

FYI
To pass the CID from each doorphone device name has to be set for CID on the doorphone config page.

Thank you!!!
 
  • Like
Reactions: NoFate
Our of interest, why are you doing this approach to forward the call from indoor? Why not use the SIP system itself on the devices?
 
Our of interest, why are you doing this approach to forward the call from indoor? Why not use the SIP system itself on the devices?
SIP on the 8003's will ring indoor extensions & hikconnect first. No answer then will call SIP phones. I need all at once or at least SIP first.
Now its perfect ALL at once.

Only trouble now is adding the 2nd doors station. on the 9310 it doesnt let me choose a main then a sub door station, it will only allow me to chose a main.

I have 5 door phones going on gates, doors and garage overhead.
I tried adding a sub door station from the main door stations page but it shows as offline.
 
Hmm, can't help with that, I only have one door station, not sure if that's even possible to have 1 main indoor station connected to multiple outdoor stations?
 
Hmm, can't help with that, I only have one door station, not sure if that's even possible to have 1 main indoor station connected to multiple outdoor stations?
On the older screens its possible. First selected is the main then addition selected become sub stations. Its not doing it on the 9510.
I have one set as "Doorphone" and one set as "Main Door station" both calling. But adding another 3. I'm sure I can figure it out.

No video from the doorphone to my video sip phone though early or in call. I have video turned on video calls work Cisco phone - Cisco phone.