Archive

Archive for the ‘VoIP’ Category

IPCOP traffic shaping for simple, effective qos

August 4, 2009 Leave a comment

Using the default traffic shaper works really well for simple qos needs. Set your defined rtp ports (e.g. udp 3000 and 3001) and udp 5060 and udp 4569 as high priority. Add any offending traffic (e.g. gotomeeting at udp 8200) as low or medium. Takes about 5 minutes and works like a charm!

Categories: Asterisk, ipcop, networking, VoIP

1:1 NAT (SNAT) with IPCop or other IPTables firewalls.

November 27, 2007 Leave a comment

This could be needed for any number of reasons, but I needed to do this to have two trixbox Pro servers live next to each other on the same LAN behind an IPCop firewall. They were reporting back the same IP address to the hybrid hosting source, so inbound connections to both were routing to the one server. Normally this is remedied manually by changing the externip in sip.conf, but that is set automatically with trixbox pro, and not an option.

You need to log into the firewall at the console or via ssh. You need to comment out one line to disable masquerading, and add a few more in its place:

nano /etc/rc.d/rc.firewall

#Individual machine on GREEN
/sbin/iptables -t nat -A POSTROUTING -s 10.0.1.99 -j SNAT --to-source 1.2.3.5
#all other machines on GREEN
/sbin/iptables -t nat -A POSTROUTING -s 10.0.1.0/24 -j SNAT --to-source 1.2.3.4
#all other machines on ORANGE
/sbin/iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -j SNAT --to-source 1.2.3.4
#DISABLE MASQUERADE
# /sbin/iptables -t nat -A REDNAT -o $IFACE -j MASQUERADE

TFTP through IPCOP or other iptables firewalls

November 25, 2007 1 comment

TFTP uses UDP packets. The client connects from a random port to port 69, then the server connects back to the original port. This does not survive NAT (network address translation), possibly not on either end. trixbox pro and many other phone systems use TFTP for provisioning phones, so this is a problem for remote phones. Here is a fix that allows tftp traffic through an iptables based firewall (IPCop in this example).

You will need to enable ssh on the firewall and connect a session. IPCop uses non-standard port 222, and can usually only be connected to from the internal (green) network.

nano /etc/rc.d/rc.network

add these two lines:
modprobe ip_conntrack_tftp
modprobe ip_nat_tftp

Save and exit.

For immediate effect, repeat the two lines at the command prompt, or reboot the firewall. I had to repeat this on both firewalls, as IPCop firewalls were on both ends.

If using trixbox pro, you also need to make a few minor changes to the configuration files for the phones in order for the phone to try the correct server. Change the sNNNN.trixbox.fonality.com settings to sNNNNx.trixbox.fonality.com where NNNN is your server number. I modified the file itself. Fonality recommends modifying the phone config on the phone once it is initially configured.

Phone headset adapter for Grandstream Phones

About my only problem with the Grandstream BT-101 IP phone (other than the dreadful speaker phone) is the odd sized port for the headset. After looking pretty hard for an affordable adapter solution I finally find one at the local Radio Shack. It works just fine for $3.99.

Part # 274-0397

Categories: Asterisk, VoIP

gnudialer

January 31, 2007 Leave a comment

At SSG we’ve recently implemented their first outbound call center. It is based on Gnudialer, an asterisk based outbound dialing system. Gnudialer is a little tricky to set up initially, but works very well, and the developers are quite helpful via their irc channel. The trick is to read all the readme files, and read them again.
The system runs on flat mySQL tables, which makes it pretty easy to report on. It also includes a rudimentary crm that does the trick. You can customize the script the agents see, including updatable data from the crm.

The initial trial was successful, and they will be ramping up to 60 agents within the next few months.

Categories: Asterisk, Clients, VoIP

Automatic Asterisk startup on Debian

October 20, 2006 Leave a comment

Getting asterisk to start properly on Debian is pretty simple. I had a hard time with various methods described elsewhere, though.
In a terminal session:
sudo nano /etc/rc.local
# add the following BEFORE the last line (exit 0):

mkdir /var/run/asterisk
chown asterisk:asterisk /var/run/asterisk
/usr/sbin/amportal start

Exact configuration details: Ubuntu 6.06 (kernel 2.6.15-26-server) within VMWare server on Xeon hardware. Asterisk 1.2.9.1 Freepbx 2.1.3

Categories: Asterisk, DIY, Software, ubuntu, VoIP

Polycom phones and NAT

October 11, 2006 Leave a comment

I have seen complaints that Polycom SoundPoint IP phones do not work well with NAT. The problem is the port used for RTP gets closed on the firewall after a while and the phone doesn’t know about it. Then calls go through, but the user gets dead air. A relatively harmless workaround is to have the phone re-register every 30 seconds. Then the port refreshes at an interval low enough that the firewall never closes it.

I found a reference to a very simple fix and have had success with it: Simply edit the .cfg file for the phone (assuming the phone is getting its settings from TFTP or FTP) and change the following value: reg.1.server.1.expires=”" to reg.1.server.1.expires=”30″

If you have other configured lines, then you’ll also need to change reg.2.server.1.expires, reg.3.server.1.expires, etc.

I’ve also had problems with the RTP ports being used falling outside of the range specified on the firewall’s port mapping, which caused the same symptoms. The phone started at port 16844. I just just adjusted the firewall, but there are also settings on the phone to force the RTP port or port range used.

This worked for a Polycom 501, but should be the same for any of the SoundPoint IP models: 300, 301, 500, 501, 600, 601.

Categories: Asterisk, networking, VoIP

Upgrading Trixbox

August 13, 2006 Leave a comment

First of all, upgrading Trixbox is so easy to do it is amazing. To update from Trixbox 1.0 to 1.1.1 you go to an ssh terminal window and type the following:

rpm -del zaptel-modules-2.6.9-34.EL
rpm -del zaptel-modules-2.6.9-35.EL
yum -y update
trixbox-update.sh
trixbox-update.sh update
reboot
rebuild_zaptel
modprobe wcfxo [if you have zaptel hardware]
modprobe wcfxs [if you have zaptel hardware]
genzaptelconf
reboot

That being said, I have run into a few problems during upgrades.

  1. Music on hold. This is pretty minor, and based on a customization I did, so I am not surprised. The config file got replaced with the default one, so my high quality music was reverted back to the default MP3s. It had to be changed back to the custom version. No big deal.
  2. Content / Virus Filter. If you have a firewall based filter that screens out .sh files (those files can be dangerous), then this method will not work. When the trixbox-update.sh script runs, it first updates itself, and that part can be broken by the filter. Make sure the asterisk machine is exempt from this kind of filtering.
  3. Zaptel and unused T1 card. This one drove me crazy for a few hours. I followed the nerdvittles guide and rebuilt zaptel after running a yum update. Everything seemed fine, until test calls revealed there was no audio. It turns out an unused T1 card caused a configuration problem that ended up with no timing source for calls. I had to disable the drivers in zapata.cong and run genzaptelconf again. Then it was happy. Whew.
Categories: Asterisk, VoIP

Linksys SPA-901: Solid, simple IP phone

June 28, 2006 Leave a comment

SPA-901Yesterday I tested a Linksys SPA-901 IP phone with Asterisk. It has a solidity to it that reminds me of old ma-bell type phones (It could be used as a weapon like in Casino). The exterior of the phone is pretty spartan, not even an LCD display at all. It is fully functioning, though, with a large bright message light that works perfectly with my asterisk system. Importantly: it sounds as good as any phone I’ve used – that means better than 99% of them. It uses the g.711u codec by default but does include many other codecs including g.729. It also supports call waiting with asterisk and has an intuitive status light that indicates a call on hold.

My only complaint is the lack of documentation for provisioning. If I were to deploy a bunch of these for a client, I would want to use a tftp or ftp server for configuration. The data sheet on this says that is an option, but I could not find any examples or instructions anywhere. Granted the internal web server configuration is a snap and the thing boots up very quickly, so it is not a show stopper, for now anyway.

To quickly get to the web page in configure it, make sure you have DHCP working on your network. Then plug in the ethernet cable, and power it up. After a a few seconds it will be booted up. The status indicator light should not be flashing. If it is double-flashing red, there is a problem with the network or cable (from experience with a bad cable).

Pick up the handset and type in ****, then 110. A robot will tell you the phone’s IP address. You can then put that address in your web browser and configure it. You can easily dial in the SIP settings, change the ring tone and volume, codec, etc. Surpringly you can view a call history with callerid in a nicer format than any little LCD display.

Overall I’d have to say I’m very impressed with it.

Categories: Asterisk, VoIP

Music on Hold with Signate Server

April 13, 2006 Leave a comment

We got the new big iron server from Signate running today, and in testing found it still suffers when playing MOH to > 20 calls using MP3 files. Signate uses a database based configuration instead of the normal asterisk flat config files, so I had to change the procedure a bit to get native sound files working.

In SigMAN, Click on “PBX Configuration”, then on “Manual Editor”
Select “MusicOnHold.conf from the popup
Comment out what is in that file, and add:
[default]
mode = files
directory = /var/lib/asterisk/moh-default
random=yes

Hit the update button at the bottom of the window.

You need to clear out the old mp3 files and populate new directory
from a terminal:

rm /var/lib/asterisk/mohmp3/*.mp3
mkdir /var/lib/asterisk/moh-default
(copy transcoded files to that directory)
asterisk -r
restart now
moh show classes
moh show files

You should see the new files and the default class, and the music should be working.
This is really just a slight variation on what is covered here.

Categories: Asterisk, DIY, VoIP
Follow

Get every new post delivered to your Inbox.