{"id":18266403,"url":"https://github.com/captainerd/dahua_vto_asterisk","last_synced_at":"2025-04-09T02:20:31.152Z","repository":{"id":154148209,"uuid":"622750963","full_name":"captainerd/dahua_VTO_Asterisk","owner":"captainerd","description":"How to connect a VTO of Dahua to Asterisk","archived":false,"fork":false,"pushed_at":"2023-04-03T02:18:09.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T20:40:38.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/captainerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-03T01:40:24.000Z","updated_at":"2023-04-03T01:43:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"62f3e711-f1ba-439f-905d-45c487c1bdc3","html_url":"https://github.com/captainerd/dahua_VTO_Asterisk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainerd%2Fdahua_VTO_Asterisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainerd%2Fdahua_VTO_Asterisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainerd%2Fdahua_VTO_Asterisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainerd%2Fdahua_VTO_Asterisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/captainerd","download_url":"https://codeload.github.com/captainerd/dahua_VTO_Asterisk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247962911,"owners_count":21024920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:23:13.401Z","updated_at":"2025-04-09T02:20:31.125Z","avatar_url":"https://github.com/captainerd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dahua_VTO_Asterisk\nHow to connect a VTO of Dahua to Asterisk\n\nIn order to be able to succesfully use DAHUA's VTH monitors AND at the same time use FreePBX / Asterisk and reach full compatibility where all VTH's works with VTO\nrfid tags, etc etc.. and at the same time phones that are connected into Asterisk. You need to set VTO as a \"server\" ignore that asterisk exists in your \nconfiguration and just make sure ext numbers doesn't conflict. connect all VTH's monitors etc.. directly to VTO as you normaly would.. set up everything\n\nThen back to Asterisk you create a PJSIP Trunk and the appropiate inbound/outbound routes. In Dahua web you add your \"Trunk\" as a VTS with your password, for example 1011 \n\n![image](https://user-images.githubusercontent.com/58100748/229393915-75d5d4c2-0455-4a89-be24-6a300234be60.png)\n\nThen you add a Trunk into Asterisk for VTO IP's in the PJSIP Advanced settings you set the following: DTMF Mode = info, contact user = Your VTS number. Message Context: 1011\neg 1011 you will use that later in inbound routes as the DID number in order to create the route.\n\n![image](https://user-images.githubusercontent.com/58100748/229394191-f3fb6c22-a49d-4867-a606-dd937c365714.png)\n\n![image](https://user-images.githubusercontent.com/58100748/229394401-b200e3fc-cf13-4824-8db2-efd2748cea3a.png)\n\nThis way setting in VTO web as \"Villa call no:\" the Trunk no, or adding it into Group call. it will be routed through your Trunk. However you won't be able to call VTO\nfrom Asterisk unless you run the node proxy i uploaded here, in that case your trunks ip will be the proxy's IP. this way you can both outgoing calls from asterisk to VTO\nwhere you can talk to VTO or incoming calls from VTO To you. \n\nYou need to run \"node dahua_proxy.js\"  proxy script as a background service or something in that case, to ensure it will always be running with asterisk. dahua_proxy.js just take cares Asterisk won't be dropping outgoing calls from your route by taking care of the compatible codec offering order.\n\n#Secondly:\n\nI provide you for Asterisk/FreeBPX an example of sets AGI-script + dialplan, on how to create an \"unlock\" phone number for asterisk, \nwhere you call that no, and it unlocks the door.\n\nThats all folks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainerd%2Fdahua_vto_asterisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptainerd%2Fdahua_vto_asterisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainerd%2Fdahua_vto_asterisk/lists"}