Setting up Zaptel/Asterisk on Alpine: Difference between revisions

From Alpine Linux
m (→‎Resources: Article links updated. Now point to four still-extant articles of the original six-part series)
(use https links)
Line 116: Line 116:
Now your logs will be in ''/var/log/asterisk/cdr-csv/Master.csv''
Now your logs will be in ''/var/log/asterisk/cdr-csv/Master.csv''


For other forms of logging, see [[http://www.voip-info.org/wiki/view/Asterisk+billing here]]
For other forms of logging, see [[https://www.voip-info.org/wiki/view/Asterisk+billing here]]


This box is running the following services:
This box is running the following services:

Revision as of 20:19, 25 August 2023

Asterisk is an open-source voip server. It can be used both with sip-clients as with phones and/or phonesystems.

Note:

We used Alpine version 1.1.3-beta8


Installation

Booted from CD

Log in as root, no password needed

$ setup-alpine


Set hostname, network settngs and root-password

$ apk_add openssh asterisk

Make ssh run at bootup:

$ rc_add sshd

Configure asterisk, we copied settings from our previous install, on Debian Sarge. The only change we had to make to our previous asterisk config was:

$ vi modules.conf

under [modules], make sure

load => “res_musiconhold.so” 

is loaded before other modules

Make asterisk run at bootup:

$ rc_add asterisk

Zaptel

We use an isdn card to connect to our phone-center. It uses the zaptel driver. To load all the needed modules we had to make the following changes:

$ vi /etc/modules

Add the following modules:

zaphfc
zaptel
af_packet
$vi /etc/modules.conf

Add:

options torisa base=0xd0000
alias char-major-196 torisa
alias wctdm wcfxs
alias wct2xxp wct4xxp

Wrapping up

Commit to floppy

$ lbu co floppy

Reboot to make sure you made no mistakes, done.

I prefer to reboot staright after installation. If I made a mistake, I rather find out now then in a couple of monts, when I will for sure have forgotton how I set it all up.

Permissions

To run asterisk as user asterisk, we had to add asterisk to the dialout group:

$ grep asterisk /etc/group

dialout:x:20:root,asterisk


To be able to support sip dial-in clients, we run asterisk as root:

$ vi /etc/conf.d/asterisk

And set:

ASTERISK_USER="root:root"

See also issues

Issues

For sip clients to call in we had have to run Asterisk as root, this needs to be fixed. Asterisk on alpine runs as root out of the box.

Memory-usage

$ free
total used free shared buffers

Mem: 185824 51772 34052 0 184

Swap: 0 0 0

Total: 185824 51772 134052

Call logging

To log phonecalls to a csv-file, edit : /etc/asterisk/modules.conf

$ vi /etc/asterisk/modules.conf

And add load => cdr_csv.so:

;
; Asterisk configuration file
;
; Module Loader configuration file
;

[modules]
autoload=no

load => cdr_csv.so
etc

Now your logs will be in /var/log/asterisk/cdr-csv/Master.csv

For other forms of logging, see [here]

This box is running the following services: Ssh, asterisk, tinc and openvpn All this would fit in 64mb.

Resources

A very nice series of articles called "VoIPowering Your Office with Asterisk: SOHO VoIP" can be found below:

  • Intro, How to connect an Asterisk server to legacy phones and phone service, [Part 1]
  • Set up a connection to the outside world and set up internal extensions, [Part 2]
  • Configure outbound calling, [Part 3]
  • Voicemail, [Part 4]

See also