Files
SnipitRepo/Linux/Docs/Setup-Asterisk-Server.md
Bram Prieshof 2e57050f06 Added following snippits about Asterisk
* A Basic Asterisk server for internal calling with IVR, curl triggers and message playback
* A Asterisk server to act as a bridge between a Bluetooth phone (as in/out bound route)
* A Node-Red Subflow to create a call between extensions using ARI
2024-01-07 21:51:57 +01:00

2.3 KiB

Asterisk basic sever

Features

  • Calling other connected/internal phones
  • Extension that plays an audio message
  • Extension that sends a http request (Node-Red for example) and plays an audio message
  • Extension that forwards the call the the Homeassistent 'Assistent'
  • Extension with a IVR menu that will send the chosen option as a http request (Node-Red for example) and plays an audio message

Installing Packages

Alpine Linux

apk add asterisk asterisk-curl asterisk-opus asterisk-sounds-en asterisk-sounds-moh asterisk-speex asterisk-tds

Configuring

(Re)move the default asterisk config (/etc/asterisk).
Download the config files from here Here and put them in the config directory /etc/asterisk.
Set the permissions chown -R asterisk: /etc/asterisk.
Edit the configuration files to suit your needs,
make sure to change the credentials, and check the module list

Alpine Linux

chown -R asterisk: /etc/asterisk
rc-update add asterisk
service asterisk start

Asterisk bluetooth bridge

Source
Features

  • Bridge a mobile phone to a voip phone/pbx

Installing Packages

Alpine Linux

apk add asterisk asterisk-opus asterisk-mobile udev bluez hidapi

Configuring

(Re)move the default asterisk config (/etc/asterisk).
Download the config files from here Here and put them in the config directory /etc/asterisk.
Set the permissions chown -R asterisk: /etc/asterisk.
Edit the credentials for your (soft)phone in /etc/asterisk/pjsip.conf
Pair the phone using bluetoothctl Edit the phone and adapter bluethooth mac address in /etc/asterisk/chan_mobile.conf
(Re)start Asterisk Connect to Asterisk CLI asterisk -r
Make sure the phone is discoverable/in pairing mode
In Asterisk CLI run mobile search
Change the port to the port from mobile scan in /etc/asterisk/chan_mobile.conf
Restart Asterisk

Alpine Linux

chown -R asterisk: /etc/asterisk
modprobe btusb
modprobe uhid
rc-update add asterisk
rc-update add bluetooth
service asterisk start

bluetoothctl

#Open the bluetoothCLI
bluetoothctl
scan on
pair <Mac Of phone>