Author's posts

Asterisk 13/DAHDI: Setting up an FXO Channel

With DAHDI, this turns out not to be so bad. Once you add the physical hardware, There is just a few DAHDI related commands to run, and a small section of extensions.conf to change. Note: Throughout I use the parameter -vvvvv to indicate as much as verboseness as possible. I use all 5 v’s from …

Continue reading

Ubuntu 14.04+ and Asterisk 13: Rotating Logs

After a while, Asterisk can spit out a lot of logging, which eventually will take up a large amount of room. Thankfully Ubuntu already has a program installed by default to help get a handle on logs called “logrotate.” This makes it really simple to add more logs to be rotated. Simply create the file …

Continue reading

Ubuntu 14.04/Asterisk 13: CDR Reporting to MySQL

On Linux, I am familiar with MySQL, and for me it’s the easiest to get going. Asterisk used to include support for MySQL directly (and the config is still there, but not compiled into Asterisk by default anymore), but has since moved to a ODBC structure which offloads the database handling, making it database server …

Continue reading

Ubuntu 14.04+/Asterisk 13: Securing Asterisk

A default Asterisk install works, but is pretty insecure, leaving it up to the administrator to decided how to secure it that works for them. Below are some suggestions (and things I have done) to secure Asterisk. Fail2Ban: This is a pretty simple implementation, and can be done quickly. I have already setup an email …

Continue reading

Ubuntu 14.04+: Set up Postfix to Send to Local Network Relay

I have an internal SMTP mail relay set up on one server, and I have other servers send emails to that relay. I have a pretty simple setup as there is no security to send emails to the relay from inside. This makes the setup on other servers easier (although it’s not as good as …

Continue reading

Asterisk 13: Set Up Local SIP Channels

First, we will create the user/phone account in sip.conf: [phone1] type=friend context=from-internal defaultusername=phone1 secret=password1111 ;; *change this!* host=dynamic qualify=yes ;; keep NAT open canreinvite=no mailbox=20 ;; voicemail boxl This creates a SIP phone called “phone1”, with the username “phone1”, using the password “password1111”. This also links it to the from-internal context in extensions.conf where I …

Continue reading

Ubuntu 14.04+ and Asterisk 13: Setting Up DAHDI

If you have added new hardware to your Asterisk box like FXO/FXS cards, there are a few configuration steps. Note: If you didn’t compile Asterisk with DAHDI, you will need to do those first. SeeĀ Ubuntu 14.04 Server: Install Asterisk 13 (opens in new tab/window) for Installing Asterisk, and just do the steps for compiling DAHDI …

Continue reading

Ubuntu 14.04+ Server: Install Asterisk 13

Updated: 2017/08/20 – Fixed a few typos, changed apt-get instructions to apt, re-did the recommendations section, and removed Google Voice prerequisite section (since it’s been broken a lot lately, it will be a new separate post when I get it to work). These instructions are a modification of my earlier FreePBX instructions. I ended up …

Continue reading

FreePBX/Asterisk DAHDI_ATTACH_ECHOCAN failed on channel 1

  DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument (22) Currently, on a new install of the latest FreePBX, the DAHDI module has some problems with echo cancellation on FXO/FXS cards. This will cause the module to not load correctly. This may be fixed in the future. First and foremost, reboot. I’ve had it to where …

Continue reading

Raspbian: VIM Syntax Highlighting

I always install VIM, it’s easier to use than VI, however for some reason in Raspbian, syntax highlighting is not enabled by default. It’s such a useful feature I don’t know who wouldn’t want it on. Anyway, to enable it: sudo vim /etc/vim/vimrc Remove the quotes from the line: “syntax on Write and Quit, done!