Planet Collab

πŸ”’
❌ About FreshRSS
There are new available articles, click to refresh the page.
Before yesterdayPSU VoIP

Guarding your productivity sweet spot

Get to know your work habits and soon you'll know that time of day that is your productivity sweet spot.

Mine is 10:00a.m.

Coincidentally, the majority of meetings to which I am invited happen right around this time of day. Unfortunately, meetings aren't typically where work gets done. They are where work gets talked about. The actual work gets done outside the meetings.

From now on, the meetings I schedule will be in the afternoon.

Skype for Asterisk using FreeSWITCH, for hackers

Some time ago I explored FreeSWITCH's mod_skypopen. The module works great and cleanly connects FreeSWITCH to a normal Skype account. In that posting, I noted that there's a simple script you can run to set it all up. But the script only works if you are using a mostly default FreeSWITCH install with all the configs in place. If, on the other hand, you have a minimal FreeSWITCH install as a Google Voice gateway to Asterisk, like I do, the script won't work.Β 

Below is the step-by-step method to configuring mod_skypopen on FreeSWITCH if you're using it only as a gateway/connector. I had thought that no one would want this and had forgotten about it, until PSU VoIP reader Ranga asked about it. Major thanks to Ranga for testing out the following procedure and providing helpful feedback! I admit, it's still pretty laborious--not an easy how-to by any definition. But it works as a reliable method of connecting Skype to your Asterisk server.

The procedure: Start here

Log in to your system's command line interface and perform all the steps as root unless otherwise instructed.

If any step results in an error where the command is not found, you may need to install the program using yum (yum install program name) or build the program from sources on the web. You can find Git at http://git-scm.com/.

cd /usr/local/src
git clone git://git.freeswitch.org/freeswitch.git

Refer to the FreeSWITCH installation wiki for installing FS from Git: http://wiki.freeswitch.org/wiki/Installation_Guide to install from Git

These are the basic instructions for doing so, but be sure to follow the wiki.

cd freeswitch
./bootstrap.sh
./configure

Edit modules.conf and uncomment endpoints/mod_skypopen because we want to build it.

Make sure kernel sources are installed (yum install kernel-devel on CentOS)

Also make sure there are no sound modules already loaded in the kernel. lsmod | grep snd

If there are any, they should be removed prior to performing the next steps.

cd src/mod/endpoints/mod_skypopen/oss
make clean; make; insmod ./skypopen.ko; mknod /dev/dsp c 14 3

If no errors appear, this verifies that the kernel module installs OK.

Add all the prerequisite components from yum (listed in the wiki for your distro) - for Amazon Linux I added:

yum -y install autoconf automake gcc-c++ git-core libjpeg-devel libtool \
make ncurses-devel unixODBC-devel openssl-devel gnutls-devel libogg-devel \
libvorbis-devel curl-devel libtiff-devel libjpeg-devel subversion autoconf \
automake libtool gcc-c++ ncurses-devel make libX11-devel Xvfb alsa-utils \
libXv libXScrnSaver xorg-x11-fonts* alsa-lib libXScrnSaver libtiff-devel \
libjpeg-devel kernel-devel git \
alsa-lib.i686Β  fontconfig.i686Β  freetype.i686Β  glibc.i686Β  libgcc.i686Β  \
libICE.i686Β  libSM.i686 libstdc++.i686Β  libX11.i686Β  libXau.i686 libxcb.i686 \
libXcursor.i686Β  libXext.i686 libXfixes.i686Β  libXi.i686Β  libXinerama.i686 \
libXrandr.i686Β  libXrender.i686 libXScrnSaver.i686Β  libXv.i686

yum install xauth

but you should use the list provided in the wiki for your own distro. Refer to http://wiki.freeswitch.org/wiki/Mod_skypopen

Back to freeswitch source dir: cd /usr/local/src/freeswitch

make
make install

mv /usr/local/src/freeswitch/src/mod/endpoints/mod_skypopen/oss/skypopen.ko /usr/local/lib


New - March 2012:Β the archives at kernel.org/archlinux have been repackaged with "xz". So first install the xz tool: yum install xz Β Then perform the following steps.

Go to the root (/) directory to install Skype binaries:
cd /
wget "http://mirrors.kernel.org/archlinux/community/os/i686/skype-oss-2.0.0.72-3-i686.pkg.tar.xz"
xzcat skype-oss-2.0.0.72-3-i686.pkg.tar.xz | tar xv


Start and login to Skype as regular user through X. This may be tricky. I use SSH tunneling and on my workstation (Mac) I have X11 available to display X programs. If you want to do it at your server console you'll need to install X11.org or maybe just use vncserver. There are a few options here. Setting up a way to run X programs = exercise left for the reader.

Log out of Skype after successfully logging in once.Β The Skype config is in /home/username/.Skype .

Copy it to /root (so that you have /root/.Skype). If you just ran Skype as root, the config is already in the right place.

Edit the /root/.Skype/SKYPEUSERNAME/config.xml file and add the bolded lines in before the Reminders tag at the bottom:

Β Β Β  <UI>
Β Β Β Β Β  <API>
Β Β Β Β Β Β Β  <Authorizations>skypopen</Authorizations>
Β Β Β Β Β Β Β  <BlockedPrograms></BlockedPrograms>
Β Β Β Β Β  </API>

Β Β Β Β Β  <Reminders>
Β Β Β Β Β Β Β  <BirthdaysSeen></BirthdaysSeen>
Β Β Β Β Β  </Reminders>
Β Β Β  </UI>

Now start the phony X server, Xvfb: (as root)

/usr/bin/Xvfb :101 -ac -nolisten tcp -screen 0 640x480x8 &

Start Skype as root:

su root -c "/bin/echo 'SKYPEUSERNAME SKYPEPASSWORD'| DISPLAY=:101Β  skype --pipelogin &"

Skype is now running in the background on the phony X server and should be logged in to your account.

Put the following extremely simplified freeswitch.xml file in place in /usr/local/freeswitch/conf (overwrite what is there):

Simplified Skype-to-Asterisk-via-FreeSWITCH config

Change all occurrences of SKYPEUSERNAME in the XML file with your Skype user name.

Now start Freeswitch:

ulimit -s 240
/usr/local/freeswitch/bin/freeswitch -c


See what scrolls by. The Skypopen module should find your logged in Skype user. Test with "sk list"

Once you see that it is working you can configure the kernel sound driver, the phony X server, skype, and Freeswitch to all start at boot time using rc.local:

Put at the bottom of /etc/rc.local:

# freeswitch
# Skype driver insmod /usr/local/lib/skypopen.ko mknod /dev/dsp c 14 3 # Skype /usr/bin/Xvfb :101 -ac -nolisten tcp -screen 0 640x480x8 & sleep 3 su root -c "/bin/echo 'SKYPEUSERNAME SKYPEPASSWORD'| DISPLAY=:101 /usr/bin/skype --pipelogin &" # Freeswitch main ulimit -s 240 /usr/local/freeswitch/bin/freeswitch -nc ###

Now you have FreeSWITCH connected to Skype and Skype is logged in. It is time to configure Asterisk.

Incoming Skype calls will ring sip:75973@127.0.0.1, so asterisk needs to be listening on 127.0.0.1 (it does by default) and have a route for number 75973. If you write your own Asterisk config files, add some dialplan in extensions.conf to route 75973 to wherever you want. For FreePBX, set up an Inbound Route for DID 75973 and route it where you'd like your incoming Skype calls to go.

Outgoing calls should be sent to num-or-skype-name@127.0.0.1:5050 from Asterisk. If you edit configs by hand, set up extension routing to SIP/${exten}@127.0.0.1:5050 as appropriate or if you use FreePBX, create a Trunk - SIP with host=127.0.0.1 and port 5050 or just create a custom trunk as SIP/$OUTNUM$@127.0.0.1:5050.

If you configured NAT on Asterisk, be sure to exclude 127.0.0.1 from the NAT. (localnet=127.0.0.0/255.0.0.0 in sip.conf or configured through the FreePBX GUI).

That's it! If you've hacked through all this, congratulations. I have found the FreeSWITCH-Skype connector to be extremely reliable and you probably will, too.

Asterisk 10 and SCF

Today's final session of Astricon was an update on Asterisk 10, Asterisk SCF and DAHDI, the Digium hardware driver.

SCF, the scalable distributed framework, will go beta in November or December. The Digium folks pointed the audience to the Asterisk project wiki for more information, so I will do the same and point you to it: Asterisk SCF Home (wiki). SCF was announced at last year's Astricon and my take on it is that it will make Asterisk enterprise- and carrier-grade.

Asterisk 10 has some great improvements related to media handling, conferencing, and FAX. Digium's Steve Sokol gave a great interview to TMC blogger Tom Keating: Asterisk 10 - The Inside Story.

Astricon update

Astricon has been a great mix of training, product information, case studies, and networking. Some of the sessions, such as one on how to program using the Asterisk Manager Interface, are clearly Asterisk-specific. Others have dealt with more general topics such as load-balancing VoIP services using a SIP proxy like Open{SER|SIPS}|Kamailio and tying in some cloud services, such as those from Voxeo (I'm a fan), to add voice features or logic. Like last year, the Astricon presentations are being recorded and will be accessible on astricon.net.

Denver is a nice city but has some unusual weather:

denver-fall-before.jpg denver-fall-after.jpg
Before: Monday afternoon, high 70s, beautiful fall colors After: Wednesday morning, about 30 degrees, several inches of snow!

I'm all about wikis, forums, and blogs when it comes to learning about Asterisk, but I'm excited to have the official paperback books on the subject:

asteriskbooks.jpg
Thanks, Digium!

To Astricon '11

There has hardly been a moment to blog in the past few weeks.

I have some posts planned, including notes on a manual Skype-FreeSWITCH integration. Next week, I might have a bit to share from Astricon. This will be my first time attending the conference. To my fellow open-source VoIP enthusiasts: see some of you there!

A system administrator's entry to Voice

This is the flip side of the coin--the other half of IP telephony and the systems administration dilemma. It's for the guys like me who enter the arena knowing how to configure, operate and administer a server, with some server-level operating system on it, and who are handy with the tools of that OS. We are adept at building open-source software from the C source files and issuing commands to run the software. It's for those of us who arrogantly look at software like Asterisk or FreeSWITCH and think, "Piece of cake. Install the build tools, configure, make, edit a config file and done! I've done it a million times!"

Not so fast. What the systems administrator has before him or her at that point is software that may run, but not do anything useful. And to make it work in a sensible way, it seems like you have to understand

  • the whole realm of telephony hardware, including endpoints and interfaces to analog and digital telephone networks;Β 
  • networking protocols, including some fairly complicated quality-of-service configurations and NAT/firewall workarounds if you're in such an environment;Β 
  • phone company lingo, so that you can order the right service from a provider to connect you to the outside world;Β 
  • technical voice services areas like call routing and dial plans, so that your phone system is actually usable (by your business or family);
  • business functions, so that you can get the call records into the hands of the people who are going to charge the users for their usage.
And, because I am sure I am forgetting a number of other areas, I'll tack on "and much more."Β 

I personally have found these areas much harder to learn than server and operating systems administration. When it comes to voice, I know what I know, and more importantly, I know what I don't know, which is quite a lot! But the real stumper is when I don't know what I don't know. (You know?) In situations like that, Google doesn't help much because I don't have the right terminology in the search. It's time to find the voice gurus out there, the ones who have been through the various iterations of PBXes.

I suspect that it's easier to add server and OS administration to a full and rich voice services skill set than it is to take a systems administrator and make him/her into a competent voice person. Any commenters care to share opinions on this?

Open-source IP telephony and the systems administration dilemma

To effectively set up, operate, and customize an open-source phone system like Asterisk or FreeSWITCH, you need to be competent at Linux systems administration.

When Asterisk and FreeSWITCH first came about, this was clear, because to go though the process of building the software and running it on your server, you had to decipher and successfully follow compiling instructions and use systems administration skills to get it to work.

Enter the Asterisk+FreePBX "distro." There are several of them out there now, and their promise is big: insert this CD or flash drive, boot your server, and out comes a working phone system with a configuration GUI. The installers even do a decent job of making the system secure, so that you're not the victim of the first script kiddie to happen upon your server's IP address.

Linux is pretty good at figuring out hardware configurations and installing drivers and setting up automatically. So, chances are, when the installer is done, you really do have a working system.

At this point, the person maintaining the phone system has to hope that all problems can be effectively diagnosed and solved through the GUI, that nothing interesting happens with the underlying hardware or operating system that would require troubleshooting, that all logging is available through the GUI, and that the security of the GUI's web server (typically Apache, firewalled by iptables) is correct.Β 

What if you are running Asterisk+FreePBX and have a SIP communications issue with a provider? You can't turn on SIP debugging in FreePBX. You can use the Asterisk Logs module to get some log information but you'd do much better with command line tools such as grep. The truth is, inability to navigate Linux and the Asterisk command line is crippling.

Taking advantage of the open-source system's openness to customize and add new features, such as Google Voice integration, means getting into the nuts and bolts. Or wait for someone else to write a (probably buggy) GUI module for you.

The fact is, if you want to be hands-off with systems administration, you need to get an appliance-like system such as SwitchVox or the big name brand small business PBXes. You have to pay for these. With your money you will get professional support to operate the low-level controls when an error appears, and you'll get full GUI access (probably) to everything you should have access to. If it's not in the GUI, you don't have access to it.

If you want free, you need to learn systems administration so that you can be your own support person. The forums of FreePBX and various distros are full of questions like, "My phone doesn't work, what do I do?" Ask them what appears in the logs and they have no idea what you are talking about. It just doesn't work like that.

This is the dilemma. Free and customizable, with the cost of learning systems administration (and maybe some scripting/programming) skills, or hands-off with the cost of paying the vendor for the software and support?

To be a little more specific about what I am calling systems administration skills, here are the things I believe a person needs to know in order to competently install and maintain an open-source phone system, with or without a GUI, and whether from a CD-installed distro or from RPM packages or from source (not an exhaustive list):

  • ability to navigate the Linux filesystem comfortably and know where certain kinds of files typically are (logs are in /var/log, config files are in /etc, executables in /usr/bin and so on)
  • ability to use a text editor
  • handiness with find, grep
  • ability to correctly configure a firewall or packet filter such as iptables
  • ability to read syslogs and follow clues to solve a problem
  • familiarity with the operating system's package system (such as yum/RPM with CentOS) so that he/she can easily load necessary tools
  • some familiarity with development tools such as make, gcc, configure scripts, cvs and svn, and the ability to decipher output they produce
  • ability to configure user accounts and passwords
  • some familiarity with network diagnostic tools like netstat and tcpdump
  • for FreePBX, familiarity with command-line MySQL for database troubleshooting
  • for Asterisk's mail needs (voicemail or fax to e-mail), ability to configure some mail sender
Is it a tall order? Yes, there is a learning curve. It's not Windows 7. But, like learning a foreign language, when you go into the foreign land (Linux console) and can speak the language, you are empowered.

Asterisk on Amazon EC2 cloud; Google Voice update

Some quick updates on interesting topics featured on this blog.

A blog reader recently introduced me to Amazon's Free Tier offering of their cloud infrastructure service. The gist: get a free year of a virtual server, within the limits of 10GB storage, 613MB RAM, and low CPU usage with some "bursting" as needed. That's good enough for a test box, certainly.

I have been running Asterisk and FreePBX on the Rackspace Cloud since October 2010. It works great there, and if it weren't for Amazon offering something for free, I would say that RS Cloud is still the better deal. (You can see the numbers for yourself if you calculate the price of Rackspace's lowest-configuration cloud server and compare with Amazon's. At only 256MB, the Rackspace server is a bit slim on memory, but more than adequate for development and testing and even running a few calls at a time in production.) But I'm into saving pennies and decided to move my test system to Amazon's cloud, at least for the twelve months they'll let me use it for free.

In short, it works according to my previous instructions for installing Asterisk and FreePBX on the Rackspace Cloud Server. Hackers who have set it up on RS Cloud can do the same on EC2 by selecting an instance within the Free Tier; use the Amazon Linux 64-bit image with 8GB disk. Use Elastic IP to give yourself a consistent (but not "static," really) IP address. And note that your server is actually behind Amazon's NAT, so you'll need to configure SIP NAT settings as if you were behind a home router. Tip: use 10.0.0.0/8 for the localnet. Lastly, the firewall is configured on Amazon's EC2 console, not in iptables. Enjoy!

Google Voice update

An unofficial, unsupported, much discussed Google Voice module for FreePBX made the rounds recently. In fact, the original author commented here on this blog advertising his module, but apparently no longer maintains it. I recommend sticking to the manual-configuration method documented here (hit the link just referenced and scroll all the way up). Unfortunately, Google Voice integration with Asterisk is still pretty flaky. Outbound calls will work perfectly, but inbound calls are hit-and-miss. I have seen this in my testing and so have others. (Note: don't cross Michigan Telephone! Hi, MT!) Get a DID to forward to, use FreeSWITCH or an OBi ATA box for better success.

A crash course in Perl

Found in a posting on the unofficial Penn State intranet (Yammer):


for those who already know the basic building blocks of programming or scripting (statements, blocks, conditionals, variables, operations, and so on).

Perl is always in my toolbox. Real programming languages are for Real Programmers. Perl is for systems administrators and hackers. You can do anything with it; it will probably just take longer to run (but if you don't care about that, it will probably be quicker to write).

VoIP news roundup

Some interesting VoIP-related news I read this week:

TAC to FCC: Set a Date Certain for the End of the PSTN - and the proposed year is 2018. The big concern seems to be maintenance of infrastructure when traditional landline subscribers are dropping off rapidly. I think that infrastructure still has a lot of value to it, but not necessarily for traditional telephone service. What could the utilities or private enterprise do with a copper grid and switching infrastructure that reaches even the most rural parts of the United States?

From the VoIP and Gadgets blog: How Skype Works With Facebook - an interesting interview about how Skype put their technology in the web browser for Facebook video chat. It's basically the Skype client condensed down to a browser plugin.

Meanwhile, Google is doing it their own way with XMPP: Announcing Google+ Hangouts - Google keeps working at the XMPP extensions to make the protocol media-rich, and now they have group video chat. I don't have a Google+ account and haven't tried it out yet.

Google's offering is standards-based: "To support Hangouts, we built an all-new standards-based cloud video conferencing platform." And those standards are "XMPP, Jingle, RTP, ICE, STUN, SRTP" and "HTTPS + SRTP". Some folks would say that it's not "standards-based" unless SIP is doing the signaling. I think the only thing standard means today is that your work is published for others to use and some technical group of people reviews it. XMPP has that. SIP's technical body is the IETF and H.323's technical body is the ITU. Who's more standard?

The standard with the most implementations wins (Betamax, anyone?) and Google has the weight to tip the end-user-connectivity scales toward XMPP/Jingle. SIP is firmly in place as the current IP trunking standard but might soon be falling behind when it comes to connecting the end-users.

Cisco's Mobile Connect is useful; worth the two license units

Recently I decided to explore Cisco Unified Communication Manager's Mobile Connect feature. This used to be called Single Number Reach and is exactly what you would expect: one number rings multiple phones--your VoIP set and an off-system number. It is straightforward to set up; follow this helpful guide on the Cisco Learning Network.

The nice thing about Mobile Connect is that it isn't simply a multi-ring scheme; rather, it's effectively a shared line appearance with your cell phone or other remote number. Communications Manager maintains supervision of the line, even if you take the call on your remote line (mobile phone), which allows you to easily switch between the remote and the desk phone. I believe, though I have not tested it, that this configuration would also allow the Mobile Connect line to participate in a hunt group.

In CUCM 7.x, you can configure an on-hook screen Mobility softkey to enable or disable Mobile Connect. This way, it does not have to be an always-on feature.

Enabling a Mobile Connect number consumes two additional device license units (DLUs) if you are licensing devices a la carte. The functionality is very nice and probably worth the licensing cost for those who want to use it.

xinetd as a poor man's web server for issuing redirects

Set up a profile in /etc/xinetd.d called http:

# default: off
# description: Poor man's http server that simply issues redirects.
service http
{
Β  Β  Β  Β  flags Β  Β  Β  Β  Β  = REUSE
Β  Β  Β  Β  socket_type Β  Β  = stream
Β  Β  Β  Β  wait Β  Β  Β  Β  Β  Β = no
Β  Β  Β  Β  user Β  Β  Β  Β  Β  Β = root
Β  Β  Β  Β  server Β  Β  Β  Β  Β = /bin/echo
Β  Β  Β  Β  server_args Β  Β  = -e HTTP/1.1 301 Moved Permanently\r\nLocation: https://somewhere:8443\r\n
Β  Β  Β  Β  disable Β  Β  Β  Β  = no
}

(Re-)Start xinetd and now you have a simple redirect server - no httpd or other web server required.

Current softphone choices

For handheld device or tablet: Linphone

For desktop: Jitsi

Both are free, updated frequently, fully functional and have very complete feature sets.

GTalk shared status/invisible for Asterisk 11

PSU VoIP blog reader Oskar contributed an updated patch for GTalk shared status/invisible in Asterisk 11. You may recall that I hacked this functionality in to Asterisk 1.8. Oskar's updates work the same way, now part of res_xmpp instead of the deprecated res_jabber. Thanks, Oskar!

From the Asterisk CLI:

xmpp set invisible [off|on] client_name

Astricon 2012 recap

Time to dust off the blog.

Last week I had the privilege once again of attending Astricon, this time in Atlanta. It was the biggest Astricon yet, showing that Asterisk is continuing to gain users and momentum. As a finale to the show, Digium released Asterisk 11, the latest long-term support (LTS) version. Asterisk 11 includes WebRTC support, ICE/STUN/TURN for NAT traversal, new encryption methods and a reworked Jingle/Google Talk/Google Voice driver set (now called chan_motif).

Digium was heavily promoting their IP phone hardware, giving away D40 sets as quickly as other vendors at the show gave away T-shirts and pens. The phones are solid and feature-full, akin to current models of Polycom and Cisco-Linksys. When integrated with Asterisk or Switchvox, provisioning is incredibly simple, taking advantage of mDNS (Bonjour) for discovery and configuration.

Speaking of Switchvox, I got my first real look at the user interface and slick API that are part of Digium's SMB turn-key solution. If I just wanted to plunk down some money and get a sophisticated, polished and powerful PBX for a small or medium business, I'd buy it.Β 

I attended a session on controlling Asterisk with HTML5 and Node.js, and another on the Adhearsion platform for controlling Asterisk. Both sessions were inspiring, but I know neither Javascript (for HTML5/Node programming) nor Ruby (for Adhearsion). The only question in my mind is which of these I should learn first.

Refs:

❌