Category Archives: Trixbox

Trixbox Asterisk distribution

Monitoring your Peers (Asterisk extensions) and Trunks

As an admin for a telephone system, possibly one of the most useful things you can do is monitoring your peers and trunks. There are 2 great reasons you should do so:

1. You can respond to and resolve issues with your system before your users know about it, and you can be in the know if someone reports “none of the phones are working” when in fact only 1 or 2 are not working

2. You can actually know when there is a problem with the system – where you otherwise might not know there is a problem until someone calls on your mobile to say your office number is not working

 

I have 2 scripts running every 15 minutes to email me with the details of any down extensions and trunks. This is done in Crontab with the line:

*/15 8-18 * * Mon-Fri /usr/Peermonitor.sh

and similar for Trunkmonitor.sh. This line says to run every 15 minutes between 08:00 and 18:00 every Monday-Friday

Continue reading

CDR Reports AKA PHP programming 101

So you want to create a customised report from your sysadminman VPS, to email you some call stats maybe once per week? You may find this info invaluable.

Setup: Asterisk 1.8, FreePBX 2.9, sysadminman VPS

Goal: some call stats via email

Originally I had wanted to install something like CDRstats or asternic but this is now a critical VPS and my backups aren’t what they should be… so yes I was scared partly and also when I installed CDRstats on a test system I couldn’t really get it to work properly. So I wrote my own, following on from the very basic database querying I started with in this post.

So I will assume some basic knowledge of programming or at least the ability to copy/paste/edit. Familiarity with HTML would be useful.

I like Notepad++ because I use Windows, and so using WinSCP to connect to the box and then right-click to edit my PHP script was very handy rather than editing in an SSH console via nano. Also the MySQL Workbench allows connection via an SSH tunnel to your MySQL database, so you can check that your MySQL queries are going to work.

Create your script in /var/www/html/admin
Mine is called Weekly-call-stats.php

Continue reading

FreePBX, Elastix, Trixbox secure access via SSH tunnel

One of the most insecure parts of an online PBX is the management web GUI. Restricting access to this is highly desirable and protects you from unpublished vulnerabilities.

One way is to use IPTables to limit certain IP addresses (http://sysadminman.net/blog/2011/restricting-web-interface-access-with-iptables-2156) but this relies on you having a fixed IP address.

Another, more flexible way, is to block all access via ports 80/443 (http/https) and access the system through a secure SSH tunnel using Putty.

If you have a SysAdminMan VPS and would like this setting up please get in touch.

First we need to block access to port 443/80. Do this be logging on as root and then running the iptables command to identify the rules allowing access. You may only see rules for port 80 or 443 depending on your system setup –

Continue reading

Aastra 55i and Trixbox – Call Pickup / BLF

In the previous post here we looked at getting Endpoint Manager in Trixbox working with a couple of Aastra phones.

In this series of posts I’m going to look at some different scenarios and programming the softkeys.

For my test setup I have the following configured –

x1001 – Boss
x1002 – Secretary
Inbound UK DDI which is routed to the Boss’s extension 1001

Continue reading

Using Aastra phones with Trixbox and Endpoint Manager

Below is a guide for getting Aastra phones up and running with a SysAdminMan Trixbox VPS using Endpoint Manager (You can always configure the phones manually instead of using Endpoint Manager). This guide uses 2 Aastra 55i’s and Trixbox 2.8 CE. This guide could also be used for configuring Endpoint Manager on other distributions.

Firstly you will need to allow access to the TFTP configuration files from your public IP address. You can see how to do this here – http://sysadminman.net/blog/2011/allowing-tftp-access-on-a-sysadminman-trixbox-server-2013

Continue reading

Poor audio or music on hold with Trixbox

If you are using Trixbox (or probably any Asterisk distribution) with SIP trunks and the Dahdi dummy driver and experiencing poor audio or music on hold then it may be worth changing the ‘internal_timing’ setting.

This can be set be editing the file – /etc/asterisk/asterisk.conf file and making sure that the following 2 lines are not commented out (they should not have a ; in front of them) –

[options]
internal_timing = yes

In some cases this can improve the audio quality dramatically.

Trixbox 2.6 passwords – Changing on a Sysadminman VPS

It’s definitely a good idea to change the default passwords you get with your Sysadminman hosted Asterisk server.

Here’s how to do it if you’re using Trixbox 2.6.

Changing the passwords should be pretty much the same as it would be on a regular Trixbox server.

First you need to SSH (a secure command line connection) to the server. If you use Windows on your desktop a good program for making SSH connections is Putty. It’s free and you can find it here – http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

For changing the server root password –

Use Putty, or another SSH client, to log into the server as the user root

Run the passwd command –

# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

For changing the Trixbox ‘maint’ password –

Use Putty, or another SSH client, to log into the server as the user root

Run the passwd-maint command –

# passwd-maint
------------------------------------------------
Set password for Admin section of trixbox CE GUI
User: maint
------------------------------------------------

New password:
Re-type new password:
Updating password for user maint

For changing the Voicemail ‘admin’ password –

Use Putty, or another SSH client, to log into the server as the user root

(Unfortunately there is no command for changing this password and you need to manually edit a file)

nano /var/www/html/recordings/includes/main.conf.php

Now find the line that contains (line 73) –

$ARI_ADMIN_PASSWORD ="old-password";

and change $ARI_ADMIN_PASSWORD to equal your required password. Now save the file.

For changing the WebMeetMe passwords –

WebMeetMe passwords can be changed through the WebMeetMe interface

What can you do with Trixbox in a couple of hours?

EDIT – these test numbers are no longer functional

As a quick demonstration of what you can achieve with Trixbox in a couple of hours I have put together a demonstration phone system.

Trixbox uses Asterisk and FreePBX to provide a richly featured phone system that you can do lots of interesting things with.

For the demonstration I created a phone system with DDI numbers in the London and New York. These phone numbers are provided by future-nine.com.

If you would like do give it a go you can call the system using the following regular telephone numbers –

  • UK  xxxxxxxxxxxx
  • US  xxxxxxxxxxxx

The system comprises an automated voice menu with the following options –

  • Press 1 – for some music.
  • Press 2 – for a speaking clock that reads the time in the UK.
  • Press 3 – for an echo test. This will echo back everything you say to it, giving you an idea of the delay on the line.
  • Press 4 – to leave a voicemail. This will then be e-mailed to me as an e-mail attachment.
  • Press 5 – for some current news. This is produced by downloading the latest rss news feed from Yahoo and then converting it to speech using software from Cepstral. It’s certainly not perfect but gives an idea of what is possible. The audio is updated automatically every hour. The main IVR menu speech was also created using Cepstral.

The whole process from ordering the phone numbers from future-nine, to having a functioning phone system, took only a couple of hours and the only part that is not possible to perform via the web gui was downloading and converting the news feed.

As FreePBX forms the basis of most of the Asterisk distributions is just as easy to do the same with Trixbox, Elastix or PBX in a Flash.

Please give it a go and add a comment below to let me know how you get on.

If you’d like more information about virtual PBXs from Sysadminman then click here

Trixbox, Elastix and Asterisk videos

There are some great videos around to give you an idea about what you can do with Asterisk and FreePBX.

Here are a selection –

Kerry Garrison, the senior product manager of Trixbox gives a quick tour of the installation and setup of Trixbox 2.2. The first half of this video concentrates on installing Trixbox but if you have a Trixbox VPS the hard work is done for you. Trixbox is now on version 2.4

Trixbox features. A nice run through of some of the features in FreePBX/Trixbox.

A good (and pretty long!) explanation of what you can do with Asterisk. This doesn’t include any information about FreePBX, the web based GUI.