Setting up Zaptel/Asterisk on Alpine: Difference between revisions

From Alpine Linux
m (Amended style; added See also: FaxServer using Asterisk)
m (→‎Resources: Article links updated. Now point to four still-extant articles of the original six-part series)
Line 123: Line 123:
= Resources =
= Resources =


A very nice series of articles called "VoIPowering Your Office with Asterisk: SOHO VoIP" can be found here:
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, [[http://www.voipplanet.com/backgrounders/article.php/3619986 part 1]]
* Intro, How to connect an Asterisk server to legacy phones and phone service, [[https://www.smallbusinesscomputing.com/software/voipowering-your-office-with-asterisk-soho-voip/ Part 1]]
* Set up a connection to the outside world and set up internal extensions, [[http://www.voipplanet.com/backgrounders/article.php/3622036 part 2]]
* Set up a connection to the outside world and set up internal extensions, [[https://www.smallbusinesscomputing.com/hardware/voipowering-your-office-with-asterisk-soho-voip-part-2/ Part 2]]
* Configure outbound calling, [[http://www.voipplanet.com/backgrounders/article.php/3623521 Part 3]]
* Configure outbound calling, [[https://www.smallbusinesscomputing.com/software/voipowering-your-office-with-asterisk-soho-voip-part-3/ Part 3]]
* Voicemail, [[http://www.voipplanet.com/backgrounders/article.php/3624946 Part 4]]
* Voicemail, [[https://www.smallbusinesscomputing.com/networking/voipowering-your-office-with-asterisk-soho-voip-part-4/ Part 4]]
* Playing Asterisk .gsm files, [[http://www.voipplanet.com/backgrounders/article.php/3625916 Part 5]]
* Creating our own custom prompts and greetings, [[http://www.voipplanet.com/backgrounders/article.php/3626661 Part 6]]


= See also =
= See also =

Revision as of 10:46, 1 March 2022

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