Setting up Zaptel/Asterisk on Alpine

From Alpine Linux
Jump to: navigation, search

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


We used Alpine version 1.1.3-beta8


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 => “” 

is loaded before other modules

Make asterisk run at bootup:

$ rc_add asterisk


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:

$vi /etc/modules.conf


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.


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

$ grep asterisk /etc/group


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

$ vi /etc/conf.d/asterisk

And set:


See also 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.


$ 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 =>

; Asterisk configuration file
; Module Loader configuration file


load =>

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.


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

  • 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]
  • Playing Asterisk .gsm files, [Part 5]
  • Creating our own custom prompts and greetings, [Part 6]

See also