{"id":16399040,"url":"https://github.com/schmupu/iobroker.asterisk","last_synced_at":"2026-03-04T12:31:59.001Z","repository":{"id":47272130,"uuid":"156507939","full_name":"schmupu/ioBroker.asterisk","owner":"schmupu","description":"Asterisk VoIP Adapter","archived":false,"fork":false,"pushed_at":"2025-03-07T17:28:16.000Z","size":6592,"stargazers_count":18,"open_issues_count":8,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T20:01:50.546Z","etag":null,"topics":["asterisk","iobroker","sip","voice","voip"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schmupu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-11-07T07:37:12.000Z","updated_at":"2025-02-21T05:23:45.000Z","dependencies_parsed_at":"2024-10-28T09:16:12.820Z","dependency_job_id":"4f202965-7775-459e-b283-e2d2503c4600","html_url":"https://github.com/schmupu/ioBroker.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/schmupu%2FioBroker.asterisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmupu%2FioBroker.asterisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmupu%2FioBroker.asterisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmupu%2FioBroker.asterisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schmupu","download_url":"https://codeload.github.com/schmupu/ioBroker.asterisk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244725627,"owners_count":20499639,"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":["asterisk","iobroker","sip","voice","voip"],"created_at":"2024-10-11T05:14:35.034Z","updated_at":"2025-03-21T02:32:40.402Z","avatar_url":"https://github.com/schmupu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](admin/asterisk.png)\n\n# ioBroker Asterisk VoIP Adapter\n\n[![Travis CI Build Status](https://travis-ci.org/schmupu/ioBroker.asterisk.svg?branch=master)](https://travis-ci.org/schmupu/ioBroker.asterisk)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/schmupu/ioBroker.asterisk?branch=master\u0026svg=true)](https://ci.appveyor.com/project/schmupu/ioBroker-asterisk/)\n![Number of Installations](http://iobroker.live/badges/asterisk-installed.svg) ![Number of Installations](http://iobroker.live/badges/asterisk-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.asterisk.svg)](https://www.npmjs.com/package/iobroker.asterisk)\n[![Downloads](https://img.shields.io/npm/dm/iobroker.asterisk.svg)](https://www.npmjs.com/package/iobroker.asterisk)\n\n[![NPM](https://nodei.co/npm/iobroker.asterisk.png?downloads=true)](https://nodei.co/npm/iobroker.asterisk/)\n\n[German manual / Deutsche Anleitung](README_DE.md)\n\nThe Asterisk adapter converts text messages to audio files and calls then over Asterisk by VoIP any telephone number you want and plays the audio message.\n\n## Install / Configurations\n\nAsterisk has to connect for outgoing calls with your voip provider like Telekom or Vodfone or with your FritzBox! Please follow one\nof these installation guides.\n\n### Linux Packages / ioBroker \u0026 asterisk running on same server with ffmpeg\n\n```sh\nsudo apt-get install ffmpeg\n# if asterisk package is missing, follow the instructions \"Install asterisk manual\"\nsudo apt-get install asterisk\n```\n\n### Linux Packages / ioBroker \u0026 asterisk running on same server with sox\n\nIf you have problems with transcoding with ffmpeg you can choose sox as transcoder. For that, you have to install following packages and choose sox in the adapter configuration.\n\n```sh\nsudo apt-get install lame\nsudo apt-get install sox\nsudo apt-get install libsox-fmt-mp3\n# if asterisk package is missing, follow the instructions \"Install asterisk manual\"\nsudo apt-get install asterisk\n```\n\n### Linux Packages / ioBroker \u0026 asterisk running on different server with ffmpeg\n\n```sh\n# ioBroker server\nsudo apt-get install ffmpeg\nsudo apt install openssh-client\n```\n\n```sh\n# asterisk server\n# if asterisk package is missing, follow the instructions \"Install asterisk manual\"\nsudo apt-get install asterisk\nsudo apt-get install openssh-server\n```\n\n### Linux Packages / ioBroker \u0026 asterisk running on different server with sox\n\nIf you have problems with transcoding with ffmpeg you can choose sox as transcoder. For that, you have to install following packages and choose sox in the adapter configuration.\n\n```sh\nsudo apt-get install lame\nsudo apt-get install sox\nsudo apt-get install libsox-fmt-mp3\n```\n\n```sh\n# asterisk server\n# if asterisk package is missing, follow the instructions \"Install asterisk manual\"\nsudo apt-get install asterisk\nsudo apt-get install openssh-server\n```\n\n### Install asterix manual\n\nif the apt package asterisk is missing, you can install asterisk manual:\n\n```sh\nsudo apt install git vim curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev\n\ncd /usr/src/\nsudo wget https://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-16.30.1.tar.gz\nsudo tar xvf asterisk-16*.tar.gz\ncd asterisk-16*/\nsudo contrib/scripts/get_mp3_source.sh\nsudo contrib/scripts/install_prereq install\nsudo ./configure\nsudo make menuselect\n\n# Choose following packages in the menu:\n## Add-ons: chan_ooh323 \u0026 format_mp3\n## Core Sound Packages: Audio packets CORE-SOUNDS-EN-*\n## Music On Hold: MOH-OPSOUND-WAV bis MOH-G729\n## Extra Sound: EXTRA-SOUNDS-EN-WAV bis EXTRA-SOUNDS-EN-G729\n## Applications: app_macro\n## Exit with \"Save\u0026Exit\".\n\nsudo make\nsudo make install\nsudo make progdocs # (optional documentation)\nsudo make samples\nsudo make config\nsudo ldconfig\n\nsudo groupadd asterisk\nsudo useradd -r -d /var/lib/asterisk -g asterisk asterisk\nsudo usermod -aG audio,dialout asterisk\nsudo chown -R asterisk:asterisk /etc/asterisk\nsudo chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk\nsudo chown -R asterisk:asterisk /usr/lib/asterisk\n\n# asterisk as default user for asterisk\nsudo nano /etc/default/asterisk\nAST_USER=\"asterisk\"\nAST_GROUP=\"asterisk\"\n\n# Insert/ replae follwoing in the config file /etc/asterisk/asterisk.conf\nsudo nano /etc/asterisk/asterisk.conf\nrunuser = asterisk ; The user to run as.\nrungroup = asterisk ; The group to run as\n\nsudo ufw allow proto tcp from any to any port 5060,5061 # (optional open Firewall, if activ)\n\nsudo systemctl restart asterisk\nsudo systemctl enable asterisk\n\n# Check state of asterisk\nsudo systemctl status asterisk\nsudo asterisk -rvv\n```\n\n### Configuration of asterisk\n\nThe following documents describe detailed how to configure asterisk.\n\n- Configuration [Asterisk via SIP with the FritzBox](docs/SIP_FRITZBOX.md) (the easiest way)\n- Configuration [Asterisk via PJSIP with the FriztBox](docs/PJSIP_FRITZBOX.md) (pjsip is more modern as sip)\n- Configuration [Asterisk via PJSIP with Telekom as provider](docs/PJSIP_TELEKOM.md)\n- Configuration [Asterisk via PJSIP with Sipgate as provider](docs/PJSIP_SIPGATE.md)\n\n### Configuration using SSH\n\nIf iobroker and asterisk is installed on differnet user, you need on the asterisk server an user with access from the iobroker server to login by ssh.\nThe user must have the unix user rights to write files which can read by asterisk.\nYou create on the asterisk server the directory with the name you configured in the iobroker asterisk adapter configuration under the name _'Path for temporary audio files'_. The path must be accessible and authorized for asterisk and ssh, because iobroker sends the generated audiofile (your text message), by scp to the asterisk server and save it in the 'Path for temporary audio files'.\nAfter that ioBroker will send by the AMI api a message to asterisk to dial an play the generated audiofile saved in the given path.\n\n![ssh](docs/iobroker_ssh.png)\n\n## Using Asterisk\n\n### Using Asterisk with objects / states for dialing out\n\nThe easiest way to use asterisk is through the ioBroker objects page. There, fill the following values under dialout parameter:\n\n- call: push button to initiate a call\n- callerid: telephonenumber which will be shown the callee\n- dtmf: the callee pressed numbers on the keypad\n- telnr: the number to be dialed\n- text: the text that will be played to the callee\n- language: text will be converted to audio in this language\n\n![iobroker_dialout](docs/iobroker_dialout.png)\n\n### Using Asterisk with objects / states for dialing in\n\nIf you configured your SIP Provider (for example Fritzbox, Sipgate, ...) and the Asterisk Configuration to allow dialin calls you can set following parameter\n\n- callerid: telephonenumber which called asteriks\n- dtmf: callers pressed numbers on the keypad\n- text: the text that will be played to the caller\n- language: text will be converted to audio in this language\n\n![iobroker_dialin](docs/iobroker_dialin.png)\n\n### Using Asterisk with javascript or blocky for dialing out\n\nNow you can use the adapter in your javascript or blocky programms.\n\n```sh\nconst number   = '040 666-7766';\nconst callerid = '040 123 999'; // optional, if not set anonymous call\nconst msg      = 'Hello, this textmessage will be converted to audio';\n\n// call telephone nummber 040 666-7766 and play text message as audio\nsendTo('asterisk.0', 'dial', { telnr: number, callerid: callerid, text:  msg},  (res) =\u003e {\n      console.log(`Result: ${JSON.stringify(res)}`);\n});\n\n// call telephone nummber 040 666-7766 and play mp3 audio file\n// mp3 file has to exist on asterix server\nsendTo('asterisk.0', 'dial', { telnr: number, callerid: callerid, aufiofile: '/tmp/audio.mp3'},  (res) =\u003e {\n      console.log(`Result: ${JSON.stringify(res)}`);\n});\n\n// call telephone nummber 040 666-7766 and play gsm audio file\n// gsm file has to exist on asterix server\nsendTo('asterisk.0', 'dial', { telnr: number, callerid: callerid, aufiofile: '/tmp/audio.gsm'},  (res) =\u003e {\n      console.log(`Result: ${JSON.stringify(res)}`);\n});\n\n// create dial in message\nsendTo('asterisk.0', 'dial', { text:  'Please enter PIN after hashtag.' },  (res) =\u003e {\n      console.log(`Result: ${JSON.stringify(res)}`);\n});\n\n// Show entered DTMF code\non({ id: 'asterisk.0.dialin.dtmf'/*DTMF Code*/ },  (obj) =\u003e {\n    const dtmf = obj.state.val;\n    console.log(`DTMF: ${dtmf}`);\n});\n\n// Show entered DTMF code\non({ id: 'asterisk.0.dialout.dtmf'/*DTMF Code*/ },  (obj) =\u003e {\n    const dtmf = obj.state.val;\n    console.log(`DTMF: ${dtmf}`);\n});\n\n```\n\n\u003e You can use following parameter in the sendTo dial statement:\n\u003e\n\u003e - **language:** language take for text to speech (tts) function. (allowed values: 'DE', 'EN', ... Default is the ioBroker system language)\n\u003e - **repeat:** how many times shall the audio message repeated (allowed values 1 to n, default 5)\n\u003e - **priority:** if you send parallel many sendTo dial statements, the messages with a smallest priority will be send first (allowed values 1 to n, default 1)\n\u003e - **text:** text message that will be send as audio\n\u003e - **timeout:** Timeout in milliseconds waiting for connection to be happen (defaults to 60000 ms)\n\u003e - **async:** Allows multiple calls to be generated without waiting for a response (allowed values: false/true, default false)\n\u003e - **audiofile:** if you using the text parameter. The converted text to audio will be saved in audiofile. If the audiofile exist, it will be overwritten. If you do not use the parameter text, the audiofile will be played.\n\u003e - **callerid:** Defines the identifier (your sender telephone number) . If callerid is missing the transferred telephone number will be anonymous\n\u003e - **telnr:** telephone number to dial.\n\n## Resolving problems\n\nIf you have problems with asterisk, you can try to find something in the logfiles under /var/log/asterisk. After you started asterisk you can call asterisk with asterisk -rvvvvvv on the comand shell for debugging. After you started asterisk -rvvvvvv you can initialize a call by iobroker and see what happens.\n\n## Changelog\n\n### **WORK IN PROGRESS**\n\n- (Stübi) Bugfixing in sendto function\n- (Stübi) Add Object repeat\n- (Stübi) Fixing @iobroker/adapter-dev 1.0.1 specified. 1.3.0 is required as minimum, 1.3.0 is recommended (Issue #57)\n- (Stübi) Fixing dependency (Issue #58)\n\n### 2.0.2 (2025-02-01)\n\n- (Stübi) Add Create Directory\n- (Stübi) Add translation for configuration\n- (Stübi) Bugfixing\n\n### 2.0.1 (2025-01-24)\n\n- (Stübi) Fix error by using asterisk and iobroker on the same server\n- (Stübi) Add action command for send messages\n- (Stübi) Add dial in command for send messages\n- (Stübi) Add create butteon for create dial in file\n\n### 2.0.0 (2025-01-24)\n\n- (Stübi) Redesign of Asterisk\n- (Stübi) Switching from Javascript to Typescript\n- (Stübi) Nodes 20 and 22 are now supported\n- (Stübi) js controllers in versions 6 and 7 are supported\n- (Stübi) Attention: Passwords must be re-entered from this version!\n- (Stübi) Language object added\n- (Stübi) Revision of the reconnect if Asterisk is restarted once\n- (Stübi) Fixing errors from repository checker (Issue #51)\n- (Stübi) Add documentation how to install asterisk manual (Issue #33)\n\n### 1.0.6 ((2019-02-27)\n\n- (Stübi) Update documentation and templates\n- (Stübi) Asterisk adapter can create now asterisk configuration files. You have to rename and move them afterwards to the /etc/asterisk directory\n- (Stübi) a new documentation for using Sipgate as provide.\n- (Stübi) Now you can call internal fritzbox numbers. You must change your extensions.ael if you install the version 1.0.4! (replace **10 =\u003e { ... }** with **\\_. =\u003e { ... }**)\n- (Stübi) You can install asterisk on a different server and use scp to transfer audio files from ioBroker to asterisk.\n- (Stübi) You can use the service PJSIP instead of SIP now.\n- (Stübi) Support js-controller compact mode\n- (Stübi) Calling without extension, if you do not use the fritzbox for example (leave sip.conf username in adapter config empty)\n- (Stübi) Instead of ffmpeg you can use now sox too\n- (Stübi) Update with languages\n- (Stübi) Add Callerid to dialin states\n- (Stübi) A lot of new features. Now you can call ioBroker / Asterisk by telephone number and enter a DTMF Code.\n- (Stübi) You can enter a DTMF Code if you get called by ioBroker / Asterisk\n- (Stübi) Bugfixing and password will be saved encrypted and text message size can be unlimited\n- (Stübi) First Version\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2025 Thorsten Stueben \u003cthorsten@stueben.de\u003e / \u003chttps://github.com/schmupu\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmupu%2Fiobroker.asterisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschmupu%2Fiobroker.asterisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmupu%2Fiobroker.asterisk/lists"}