Saturday, September 5, 2009

pfSense with Freeswitch for SIP Trunks to sipXecs

Ok, so here's a bit of a new twist. I was toying with the thought of trying to get OpenSBC running on pfSense firewall. Long story short, I couldn't get the developer version of pfSense running in a virtual on my machine so I decided to give the FreeSwitch pfSense package a go.

What do you know... I actually got it going as a bridge pretty easily. So I figured I'd document it for others who follow...

The purpose of this exercise was to have pfSense with FreeSwitch register to my Gizmo account and forward calls in to sipXecs. This is just a starting point but shows great promise as a way to front-end a sipXecs server.

1. In pfSense install the FreeSwitch package (System -> Packages - FreeSwitch) (I picked the Dev version to run on my pfSense 1.2.3 rc1 install).

2. Once installed, go to Services -> FreeSwitch.

3. Click on the Gateways tab and then the + sign on the right to add a new gateway.

4. At the top of the Gateway Setup form is a handy hyperlink to examples for different SIP Providers. Here is my Gizmo configuration:
  • Gateway: gizmo
  • Username: 1747xxxxxxx
  • Password: xxxxxxxx
  • From-user: 1747xxxxxxx
  • From-domain: proxy01.sipphone.com
  • Proxy: proxy01.sipphone.com
  • Expire-seconds: 3600
  • Register: true
  • Retry-seconds: 3600
  • Caller-id-in-from: false
  • Enabled: true
  • Gateway Description: Gateway to gizmo account
5. Click the Save button at the bottom of the page.

6. Click on the Public tab at the top of the page.

7. Click on the + sign over on the right hand side of the Public table to create a new extension.

8. Create the following extension:
  • Extension Name: sipXecs
  • Enabled: true
  • Order: 000
  • Description: Transfer to internal spiXecs Server
9. Add the following conditions and actions at the bottom of this page (hit the + sign to add each one).
  • Tag: condition
  • Type: destination_number
  • Data: 1747xxxxxxx
  • Order: 000
  • Tag: action
  • Type: bridge
  • Data: sofia/lan/100@ip.addr.of.sipxecs (what sipXecs extension to route it to)
  • Order: 001

10. On the Status tab, click the 'reloadxml' button. You should see your gateway in the 'sofia status' section as 'REGED' if you have done things properly.

11. Create 2 firewall rules in pfSense (Firewall -> Rules):
  • Action: Pass
  • Interface: WAN
  • Protocol: UDP
  • Source: any
  • Destination: WAN address
  • Destination port range: 5080

  • Action: Pass
  • Interface: WAN
  • Protocol: UDP
  • Source: any
  • Destination: WAN address
  • Destination port range: 10000 – 35000 (* - I haven’t tried narrowing this down…)

12. Try dialing your Gizmo number and your sipXecs server should answer the call!

Tip, if you get a Google Voice account you can make it ring inbound to your Gizmo account and have free inbound calling.

Wednesday, August 19, 2009

Tale of an old sipXecs install...

So, I had a customer with an old sipXecs install... version 3.8 on Fedora 6 to be exact (I've still got one out there with 3.4 but that will be a complete re-do).

My plan was to upgrade in-place to 3.10.2, get a backup, install 3.10.2 on CentOS from ISO, do a restore, upgrade to 3.10.3 in place, upgrade to 4.0.1 in-place and see where I sat.

This would have been much easier if Yum was cooperating. Seems as though Yum from Fedora Core 6 had some issues. It would bomb with a header error on the large sipX files.

So smart me figures I'd just go update Yum... not so easy. All of the Fedora files are now archived and my .repo files were out of date. Thus begins the odyssey... I had to do a little mixing and matching of Fedora 6 and 7 yum repos to resolve all of the dependency issues.

I'm posting my .repo files here in hopes of helping somebody else... Keep in mind that I'm no Linux expert and there might be a much simpler way to make this work!

fedora-core.repo
[core]
name=Fedora Core $releasever - $basearch
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/core/$releasever/$basearch/os/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[core-debuginfo]
name=Fedora Core $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY


[core-source]
name=Fedora Core $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY


fedora-core6.repo
[core6]
name=Fedora Core $releasever - $basearch
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/os/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[core6-debuginfo]
name=Fedora Core $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[core6-source]
name=Fedora Core $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

fedora-everything.repo
[everything]
name=Fedora Everything $releasever - $basearch
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/7/Everything/i386/os/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-$releasever&arch=$basearch
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=0

[everything-debuginfo]
name=Fedora Everything $releasever - $basearch - Debug
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/7/Everything/i386/debug/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-debug-$releasever&arch=$basearch
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=0

[everything-source]
name=Fedora Everything $releasever - Source
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/7/Everything/source/SRPMS/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-source-$releasever&arch=$basearch
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=0



fedora-extras.repo
[extras]
name=Fedora Extras $releasever - $basearch
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/extras/6/i386/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-$releasever&arch=$basearch
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1

[extras-debuginfo]
name=Fedora Extras $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-debug-$releasever&arch=$basearch
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1

[extras-source]
name=Fedora Extras $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-source-$releasever&arch=$basearch
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1


fedora-updates.repo
[updates]
name=Fedora Core $releasever - $basearch - Updates
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/updates/7/i386/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

[updates-debuginfo]
name=Fedora Core $releasever - $basearch - Updates - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-fc$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

[updates-source]
name=Fedora Core $releasever - Updates Source
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/updates/7/SRPMS/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-fc$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

fedora-updates6.repo
[updates6]
name=Fedora Core 6 $releasever - $basearch - Updates
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/i386/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

[updates-debuginfo]
name=Fedora Core $releasever - $basearch - Updates - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-fc$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

[updates-source]
name=Fedora Core $releasever - Updates Source
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/updates/7/SRPMS/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-fc$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

Once you have all the repos in place in the /etc/yum.repos.d folder you'll still need to remove a couple packages that complain...

rpm -e authconfig firstboot-tui-1.4.23-1.noarch

And then you should be able to do a:

yum update yum

After that completes yum should work properly, remove the repos from the /etc/yum.repos.d folder and create sipxecs-stable-fc.repo (nano /etc/yum.repos.d/sipxecs-stable-fc.repo) with the following information:

[sipxecs-stable]
name=SIPfoundry sipXecs pbx - latest stable version
baseurl=http://sipxecssw.org/pub/sipXecs/3.10.3/FC/6/i386/RPM/
gpgcheck=0
gpgkey=https://secure2.pingtel.com/RPM-GPG-KEY-pingtel
enabled=1

Friday, August 7, 2009

SIP Trunking Gotcha with pfsense & m0n0wall

Jonathan Peterson from Ontra ran into some trouble with SIP Trunking and sipXecs that was actually being introduced by pfsense & m0n0wall.

I thought I'd just document it here for future reference (mine as well as others)...

It seems that some firewalls will randomize outbound ports. This can mess up certain protocols such as SIP. With SIP, if the source port for the REGISTER does not match the source port for the INVITE you may get an SIP error 403.

The solution is to statically map the ports for the NAT traversal. The solution to the problem is documented here.

Thanks to Jonathan for putting in the hard work!

sipXecs Version 4.2 Roadmap

Development is pushing on with sipXecs despite the turmoil going on with Nortel. Looks like the group working on the SCS / sipXecs project will end up heading to Avaya if all goes well. I'm hoping that Avaya can keep the ball rolling with this project as it has really become one of the top options out there for Open Source systems.

For version 4.2 the developers are working on a bunch of new or enhanced features. The complete list is here, but this is my take on the additions:

Openfire Integration - This will bring the ability to sync your availability with many different IM systems. I'm not a huge IM user so to me this will probably have limited usefulness.

Dimdim Integration - Dimdim is an open source web conferencing solution. Due to the distributed nature of many sipXecs installations, the integration of Dimdim project with sipXecs will be a great benefit to many.

New Voicemail System - I think the current Voicemail System works pretty well in most cases. It does fall down a bit with the dial by name directory so hopefully this will be addressed.

Branch Office Survivable Solution - I'm on the fence about this one. I've been setting up most customers with individual PBX's at each site. This simplifies the installation quite a bit. Each time I have to upgrade a HA installation I dread it because something always breaks. It sounds great to have a single system that is managed centrally, but in my book simplicity breeds reliability.

Bridged Line Appearances - This will be great for those small offices that just need to know "What line is that call on?".

Auto Attendant Improvements - Again, the AA is pretty good now. It just lacks the ability to have a live operator during the day. I usually end up routing calls to a Phantom user and have it do some time of day routing for how I want the calls to actually ring.

Call Detail Record Improvements - These can only get better. What is in the system now is not overly usable to an administrator.

Improved User Portal - The current user portal is pretty drab. While that is fine for administering the system, the user needs a little more pizazz. Here are some ideas that are being tossed around. Maybe users will actually use the portal if it is a little slicker!

Enhanced Directory Services - How about making it sync with Outlook or my Google Contacts? That would be pretty sweet.

Multiple ACD Servers in a Cluster - I wish they would just rip out the present ACD and put in one that works. The current ACD is junk mostly because it doesn't like it when you transfer calls out of Queue. Who cares about multiple ACD servers that still are useless.

E911 Notification by SMS - This will be a cool add-on to the detection of 911 dialing. When a user dials 911 in addition to being able to send an e-mail (as the system does now), the system will be able to send an SMS message.


Friday, July 17, 2009

Microsoft Kills Response Point

A blog post at TMC by Tom Keating is indicating that Response Point is dead.

Personally I never thought this product would go much of anywhere... although I must admit I was keeping a weary eye on it. If MS makes up their mind to go after something it can do it. I think MS realized that the customers who might deploy this type of solution don't want to put more reliance in MS products... And the vendors who might choose to install this type of product might not understand it and do poor jobs implementing it.

I think it had some potential but Microsoft has a real muddied message here with Response Point and Office Communications Server. Personally, I'm not thinking that OCS is going to go anywhere either.




Thursday, July 2, 2009

sipXecs 3.10.x to 4.0.1 upgrade update...

Looks like the method documented in the sipXecs Wiki works properly. I haven't done it on a production system yet but on my demo box things are clean.

Upgrade instructions: http://sipx-wiki.calivia.com/index.php/SipXecs_4.0.1_Upgrade

Friday, June 26, 2009

Upgrading from 3.10.x to 4.0.1

There still seem to be some bugs in upgrading from 3.10.x to 4.0.1.

Some thing is just going wrong and I'm not sure where the problem lies.  Here's how I have gotten around the problem:

First - BACKUP your 3.10.x system, copy the backups to your local PC and make sure you have the Install CD for your existing version in case you need to go back.

Copy new stable repo file to pbx:

 - Login as root to PBX.

 - cd /etc/yum.repos.d

 - wget http://sipxecssw.org/pub/sipXecs/sipxecs-stable-centos.repo

Perform yum update:

 - yum update

Reboot:

 - reboot

sipXecs won't start up properly.  Install sipxsupervisor with yum:

 - yum install sipxsupervisor

Restart sipXecs services:

 - service sipxecs restart

Login to PBXadministration web console as superadmin.

Perform backup and download configuration / voicemail backups to local PC.

Make sure you know your IP addressing, host name, SIP domain, DNS & DHCP server settings.

Install 4.0.1 fresh from ISO (this will format your hard drive so if you didn't get that backup off the PBX, do it again or you will be SOL).

Restore the 4.0.1 backup to the freshly installed 4.0.1 PBX.

It seems like the long way around to get it done but it works and preserves your configuration. I haven't tried upgrading an HA install yet... 

Thursday, June 25, 2009

Tip for Uploading Voicemail Prompts

So, uploading voicemail prompts still isn't available in the web GUI for sipXecs... here's where to copy pre-recorded prompts though.

For AA prompts:

/var/sipxdata/mediaserver/data/prompts

For USER greetings:

/var/sipxdata/mediaserver/data/mailstore/ (where line is the extension, like "200")

The filenames for user greetings at present are: standard.wav, extendedabsence.wav, outofoffice.wav

Monday, June 22, 2009

Release 4.0.1 posted as stable

sipXecs Version 4.0.1 has been posted to the stable repository.

There were a lot of fixes from the 4.0.0 release (110 to be exact).

Reportedly the upgrade from 3.10.x is working also now but I have yet to test it.

.

Saturday, May 23, 2009

New sipXecs Book available!

The cat is finally out of the bag... I've been working with Packt Publishing on a book on sipXecs 4.0 (that's why this blog has been a little sparse).

The book is now available in pre-release (what Packt calls Raw) format.

The book title is Building Enterprise Ready Telephony Systems with sipXecs 4.0.

It is available for purchase/download by clicking on the above link.

Thanks!

Mike