Tag Archives: freeswitch

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.

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.

A free, open-source SIP-H.323 gateway with video?

Has anyone implemented a video-capable SIP-H.323 gateway using free, open-source software?

If so, please comment.

Asterisk, FreeSWITCH and YATE all have some ability to connect SIP and H.323 endpoints to one another. Asterisk acts as a back-to-back user agent (B2BUA) and the other two act as proxies. All can switch audio calls. Video seems to be another story.

In theory, it should be straightforward. The difficult part is translating the signaling; the media streams are the same. Thus the interworking component (PBX, switch, or proxy) should be able to translate signaling and then proxy the media between the endpoints. If video is just another media stream, why doesn’t it work just the same as an audio-only call?

I’ve tested YATE (built-in modules), Asterisk’s chan_ooh323, a custom chan_ooh323 for Asterisk 1.4 that specifically enables video (but crashes/disconnects, and is definitely not supported unless you buy the unnamed company’s video IVR product, which I haven’t), FreeSWITCH’s mod_h323 and mod_opal. I never really got the FreeSWITCH mods working stably. YATE and Asterisk worked fine in audio mode. Neither would translate video (H.263 protocol, nothing fancy).

Additional reading: RFC 4123, Session Initiation Protocol (SIP)-H.323 Interworking Requirements

Skype gateway with FreeSWITCH’s mod_skypopen

There has been a lot of talk about Skype connectivity in the VoIP blogs lately. Digium announced that they will no longer be selling their Skype channel driver, and this news rekindled interest in free/DIY methods for connecting Skype to Asterisk. Nerd Vittles has a good writeup, specific to the PBX-in-a-Flash/Incredible PBX implementation. His method relies on the SipToSis gateway application (read the SipToSis how-to for more generic setup instructions).

If you are only wanting to receive Skype calls, you can transfer them to your PBX via Tropo developer account, free.

I decided to add Skype to my home PBX last weekend, and chose FreeSWITCH’s mod_skypopen as the connector.

Why?

  • The PBX is Asterisk 1.4, and I’m holding steady on this version until 1.8 becomes a bit more stable. Thus, because I want to use Google Voice,
  • FreeSWITCH is already in place, on the same machine, as a gateway to Google Voice. It has been working well in this role.
  • mod_skypopen requires only the FreeSWITCH module and Skype. No extra connector software is required.
  • It works and was easy to install!

Asterisk 1.4 continues to be a rock-solid choice and is supported (security patches will be provided) for another year. For me, the only killer feature that 1.8 provides is Google Voice connectivity. There are bunch of other new features too, but I don’t need them. Stick with that which works, until you need the features or the support is gone.

Back to mod_skypopen. There are basically two ways to install this to FreeSWITCH. The easy way, and the hard way.

Today, the easy way. If you visit the FreeSWITCH wiki page on mod_skypopen, you’ll find some notes on building and installing the module. If you’re running a fairly standard install of FreeSWITCH that utilizes the autoload_configs structure, you can follow through the wiki instructions to build the module and the fake audio driver and then run the Perl installer found in the source directory to automatically build out your configs, configure the Skype client(s) and set up a shell script to get everything going at startup.

If, like me, you have set up FreeSWITCH only to act as a feature gateway for Asterisk, and have aggressively minimized the configuration, you’ll want to avoid the installer script and perform the necessary steps by hand. More on that in the next posting: “the hard way.” (Not really that hard.)

Some recent projects for fun and work

I’ve had fun with a few personal and work-related VoIP projects lately. I’ll summarize them here, and if there’s any interest I’ll expand one or more of them into full how-to articles. 

speak2tweet
You may have heard about the Google/Twitter project called speak2tweet that was created over a weekend during the Egyptian protests, with the goal of allowing protesters whose Internet connectivity was cut to get their voices on to the web. Some folks on the PBX-in-a-Flash forum were talking about it and we realized it would not be hard to build, especially with the Tropo transcription service available to us.
Check out the first page of that thread for the dial-in numbers, and then try it out yourself. The code is posted on the forum for the first hack at it, which only does transcription. The current version includes links to the recordings, too, just like the original speak2tweet. I need to clean it up and post it. See and hear your spoken tweets at twitter.com/piafspeaktweet.
Fax
I have largely ignored fax over VoIP for a long time, because it’s not something I do. At PSU, we attach fax machines to analog lines; done. But recently, I was asked to assist with a quick-turnaround fax project: send a fax to 4,059 analog lines on campus, calls spaced one minute apart, and record the results, so that we can see how many fax machines are hooked up out there. Interesting. I tried Digium’s Free Fax for Asterisk module, but couldn’t get it to communicate. Next I built the soft-switch.org spandsp module, and told Asterisk to use it, and it worked right away. A Perl script using the excellent Asterisk::AMI module (referenced previously on this blog) drove the dialer, and standard Asterisk CDR with a few extra fields recorded the fax results. By the way, the faxes were sent in audio mode (not T.38) using SIP and G.711u over the Internet, and only 3 out of 4,059 calls failed.
FreeSWITCH revisited
Back when I wrote about using FreeSWITCH alongside Asterisk as a gateway to Google Voice, I determined that at some point I’d come back and dig into FreeSWITCH a little more just to understand it. I updated that article with a slightly better config, including lines that turn on comfort noise, which helps the FreeSWITCH-Asterisk bridge maintain synchronization on RTP. (See the FreeSWITCH wiki for more information on that.)

Asterisk 1.8+Google Voice broken; FreeSWITCH still works

As some folks commented, Google Voice seems to have stopped accepting outbound calls from Asterisk 1.8. There’s a bug report open with Asterisk on this issue, and several discussions in user forums.

I fired up FreeSWITCH again, without updating any code (still the source from mid-October, 1.0.head (git-dc40a77 2010-10-17 16-19-38 -0400)), and it works perfectly. Apparently, the FreeSWITCH guys are using a different method to make the Google Voice connection, or the Google folks are specifically filtering Asterisk or have made a change that affects Asterisk and to which FreeSWITCH is immune.

Using FreeSWITCH to add Google Voice to Asterisk

Michigan Telephone and I have been discussing using FreeSWITCH as an on-box adjunct to Asterisk to enable cutting-edge features, such as Google Voice integration, without having to use development-level Asterisk code. Here’s how to set up a very minimal FreeSWITCH on the same server as Asterisk for this very purpose.

References, at the top of the post to suggest that you read these first:

The steps:

FreeSWITCH

  1. Follow the installation guide to retrieve the development version of FreeSWITCH from the git repository. Warning! The Subversion repository is old, and so is the tarball, which claims to be a nightly snapshot. It is not. Only git will get you the current code.
  2. Build:
    • ./bootstrap.sh
    • Edit modules.conf in the source directory and uncomment endpoints/mod_dingaling. Later, once you see the minimal installation we’re producing, you may want to comment out other unused modules to save some build time.
    • ./configure, make, and make install. My Asterisk box already had most of the required libraries; only libtiff-devel was missing (needed for the spandsp module). I was able to retrieve libraries and headers with yum (yum install libtiff-devel for example). The make process will alert you of anything missing. Just install the requirements and then make again, and it will pick up where it left off.
  3. FreeSWITCH will now be installed in /usr/local/freeswitch and is contained within this directory and subdirectories. I noticed that it builds its own copy of iksemel, which I already have installed elsewhere for Asterisk’s use, but the custom libs are in /usr/local/freeswitch/lib so there is no interference.
  4. Delete the contents of /usr/local/freeswitch/conf. You can get them back later if you want by doing make samples from your FreeSWITCH source directory, but for this minimal installation, we can put all of the configuration in a single file and be sure nothing else is loading.
  5. I spent some time trying to optimize the FreeSWITCH config so that it contains just enough to act as a gateway between Asterisk (using SIP) and Google Voice. My freeswitch.xml config, appended to this post, should work for anyone following these steps. Copy it to the /usr/local/freeswitch/conf directory, editing the lines related to GMail login.

Asterisk

  1. If you’re set up for NAT, you may not (probably don’t) have the loopback network configured in your sip.conf as a local (non-NAT) network. Add localnet = 127.0.0.0/255.255.255.0 to [general] in sip.conf or the sip_nat.file if you’re using FreePBX. Otherwise, Asterisk will try to use NAT-traversal methods for the Asterisk-FreeSWITCH on-box trunk.
  2. Set up a new SIP trunk. In FreePBX, name the peer “freeswitch” and use these trunk details:

    host=127.0.0.1
    port=5050
    qualify=30000
    type=friend

    (FreePBX now sets up contexts appropriately within from-trunk, so the context line can be omitted here unless you wish to specify one.) The non-FreePBX method would be to create a [freeswitch] block in sip.conf with the aforementioned details and an appropriate context= line. That’s it. No registration, no usernames, nothing–we are authenticating by IP address and port only.

  3. Set up appropriate inbound and outbound routes in FreePBX or in your extensions.conf dialplan. This is outside the scope of this how-to.

Firewall

FreeSWITCH and/or the GTalk/Jingle protocol use more RTP ports than what I had previously configured in my router-firewall for Asterisk. So I updated my firewall to include UDP ports 10000-65000.

Google Voice and GMail

  1. Log into the GMail account with an associated Google Voice number, bring up the chat window and enable voice calling. Call a number and see that it works through your browser.
  2. Log into Google Voice and instruct it to route calls to Google Chat. According to the FreeSWITCH wiki, the FreeSWITCH integration only works when call screening is turned on. (Why?) So turn it on. Call your Google Voice number from any phone and see that it rings through to your browser. Then sign out of chat.

Get it started

With these settings in place, Asterisk should be listening to FreeSWITCH on 127.0.0.1 port 5060, and FreeSWITCH should be listening to Asterisk on 127.0.0.1 port 5050. Furthermore, FreeSWITCH should be able to navigate a NAT and talk to the Google Talk server and, using the latest FreeSWITCH code, send and receive calls on the Google Voice number.

Start FreeSWITCH. /usr/local/freeswitch/bin/freeswitch -c will give you a console and once you have worked out the bugs, you can run it in the background with -nc instead.

Does it work?

Let me know if you have followed these instructions and achieved success. I was able to send and receive calls with Google Voice, with working DTMF and mostly acceptable audio quality. 

Place test calls with dl_debug on in the FreeSWITCH console to see the XMPP messages. I spent a lot of time examining these and Wireshark captures to find RTP issues (solved in the config and with the firewall adjustments).

I was disappointed that the audio was sometimes jittery, which I never see with the Gizmo5 or PSTN Google Voice transports. I don’t know if it was from the Internet or from the server itself, but I can say that FreeSWITCH in this very minimal mode seems to add very little additional memory or CPU usage.

Appendix: the config 
My single-config-file freeswitch.xml. Cut, paste and use. Replace YOURUSERNAME, YOURPASSWORD, and YOURDID with your settings. A veteran FreeSWITCH user could help me optimize this even more.

<?xml version=”1.0″?>
<document type=”freeswitch/xml”>
        
  <include>
    <!– this is a good place to pre-define globals if you want –>
    <X-PRE-PROCESS cmd=”set” data=”global_codec_prefs=G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM”/>
  </include>
  <section name=”configuration” description=”Various Configuration”>
      
    <configuration name=”modules.conf” description=”Modules”>
      <modules>
        <load module=”mod_console”/>
        <load module=”mod_logfile”/>
        <load module=”mod_sofia”/>
        <load module=”mod_dingaling”/>
        <load module=”mod_commands”/>
        <load module=”mod_dptools”/>
        <load module=”mod_dialplan_xml”/>
      </modules>
    </configuration>
            
    <configuration name=”console.conf” description=”Console Logger”>
      <mappings>
        <map name=”all” value=”console,debug,info,notice,warning,err,crit,alert”/>
      </mappings>
      <settings>
        <param name=”colorize” value=”true”/>
        <param name=”loglevel” value=”info”/>
      </settings>
    </configuration>
      
    <configuration name=”switch.conf” description=”Core Configuration”>
      <cli-keybindings>
        <key name=”1″ value=”help”/>
        <key name=”2″ value=”status”/>
        <key name=”3″ value=”show channels”/>
        <key name=”4″ value=”show calls”/>
        <key name=”5″ value=”sofia status”/>
        <key name=”6″ value=”dingaling status”/>
        <key name=”7″ value=”reloadxml”/>
      </cli-keybindings> 
              
      <settings>
        <param name=”colorize-console” value=”true”/>
        <param name=”max-sessions” value=”1000″/>
        <param name=”sessions-per-second” value=”30″/>
        <param name=”loglevel” value=”debug”/>
        <param name=”dump-cores” value=”yes”/>
        <param name=”rtp-enable-zrtp” value=”false”/>
      </settings>
    </configuration>
    <configuration name=”logfile.conf” description=”File Logging”>
      <settings>
        <param name=”rotate-on-hup” value=”true”/>
      </settings>
      <profiles>
        <profile name=”default”>
          <settings>
            <param name=”rollover” value=”10485760″/>
          </settings>
          <mappings>
            <map name=”all” value=”debug,info,notice,warning,err,crit,alert”/>
          </mappings>
        </profile>
      </profiles>
    </configuration>
    <configuration name=”sofia.conf” description=”sofia Endpoint”>
      <global_settings>
        <param name=”log-level” value=”0″/>
        <param name=”debug-presence” value=”0″/>
      </global_settings>
      <profiles>
        <profile name=”freeswitch-sip”>
          <gateways>
            <gateway name=”asterisk-local”>
              <param name=”username” value=”freeswitch”/>
              <param name=”password” value=”0″/>
              <param name=”proxy” value=”127.0.0.1:5060″/>
              <param name=”register” value=”false”/>
              <param name=”retry-seconds” value=”30″/>
              <param name=”caller-id-in-from” value=”true”/>
            </gateway>
          </gateways>
          <domains>
            <domain name=”all” alias=”true” parse=”false”/>
          </domains>
          
          <settings>
            <param name=”debug” value=”0″/>
            <param name=”sip-trace” value=”no”/>
            <param name=”log-auth-failures” value=”false”/>
            <param name=”forward-unsolicited-mwi-notify” value=”false”/>
            <param name=”context” value=”asterisk”/>
            <param name=”rfc2833-pt” value=”101″/>
            <param name=”sip-port” value=”5050″/>
            <param name=”dialplan” value=”XML”/>
            <param name=”dtmf-type” value=”info”/>
            <param name=”inbound-codec-prefs” value=”$${global_codec_prefs}”/>
            <param name=”outbound-codec-prefs” value=”$${global_codec_prefs}”/>
            <param name=”use-rtp-timer” value=”true”/>
            <param name=”rtp-timer-name” value=”soft”/>
            <param name=”vad” value=”none”/>
            <param name=”rtp-ip” value=”127.0.0.1″/>
            <param name=”sip-ip” value=”127.0.0.1″/>
            <param name=”inbound-codec-negotiation” value=”generous”/>
            <param name=”tls” value=”false”/>
            <param name=”nonce-ttl” value=”60″/>
            <!–<param name=”disable-transcoding” value=”true”/>–>
            <param name=”auth-calls” value=”false”/>
            <param name=”auth-all-packets” value=”false”/>
            
            <param name=”ext-rtp-ip” value=”127.0.0.1″/>
            <param name=”ext-sip-ip” value=”127.0.0.1″/>
        
            <param name=”rtp-timeout-sec” value=”300″/>
            <param name=”rtp-hold-timeout-sec” value=”1800″/>
        
            <param name=”challenge-realm” value=”auto_from”/>
          </settings>
        </profile>
      </profiles>
    </configuration>
            
    <configuration name=”dingaling.conf” description=”XMPP Jingle Endpoint”>
      <settings>
        <param name=”debug” value=”0″/>
        <param name=”codec-prefs” value=”PCMU”/>
      </settings>
              
      <profile type=”client”>
        <param name=”name” value=”gtalk”/>
        <param name=”login” value=”YOURUSERNAME@gmail.com/freeswitch”/>
        <param name=”password” value=”YOURPASSWORD”/>
        <param name=”dialplan” value=”XML”/>
        <param name=”context” value=”gtalk”/>
        <param name=”message” value=”This is FreeSWITCH”/>
        <param name=”auto-reply” value=”This is an automated system for audio calls only. Please do not chat.”/>
        <param name=”rtp-ip” value=”auto”/>
        <param name=”candidate-acl” value=”wan.auto”/>
        <param name=”local-network-acl” value=”localnet.auto”/>
        <param name=”ext-rtp-ip” value=”stun:stun.freeswitch.org”/>
        <param name=”auto-login” value=”true”/>
        <param name=”sasl” value=”plain”/>
        <param name=”server” value=”talk.google.com”/>
        <param name=”tls” value=”true”/>
        <!– disable to trade async for more calls –>
        <param name=”use-rtp-timer” value=”false”/>
        <!– default extension (if one cannot be determined) –>
        <param name=”exten” value=”gtalk-in”/>
      </profile>
    </configuration>
    <configuration name=”post_load_modules.conf” description=”Post-load modules” />
  </section>
  <section name=”dialplan” description=”Regex/XML Dialplan”>
    <context name=”asterisk”>
      <extension name=”asterisk-outbound”>
        <condition field=”destination_number” expression=”^(.*)$”>
          <action application=”ring_ready” />
          <action application=”set” data=”hangup_after_bridge=true”/>
          <action application=”set” data=”bridge_generate_comfort_noise=true”/>
          <action application=”bridge” data=”dingaling/gtalk/+$1@voice.google.com”/>
        </condition>
      </extension>
    </context>
    <context name=”gtalk”>
      <extension name=”gtalk-in”>
        <condition field=”destination_number” expression=”^(.*)$”>
          <action application=”set” data=”hangup_after_bridge=true”/>
          <action application=”set” data=”effective_caller_id_name=${caller_id_number}”/>
          <action application=”set” data=”execute_on_answer=send_dtmf 1″/>
          <action application=”set” data=”bridge_generate_comfort_noise=true”/>
          <!– <action application=”answer” /> Add this to answer the call before bridge to * –>
          <!– <action application=”ring_ready” /> Or GV Voicemail will get it if you don’t ans. –>
          <!– <action application=”set” data=”ringback=%(2000, 4000, 440.0, 480.0)” /> –>
          <action application=”bridge” data=”sofia/gateway/asterisk-local/YOURDID” />
        </condition>
      </extension>
    </context>
  </section>
</document>

FreeSWITCH 1.0.0

I didn’t see any mention of this on the VoIP blogs I read, but it seems to be worth noting.

FreeSWITCH version 1.0.0 was released on May 26 after about three years of development. I would call it a cross between Asterisk and OpenSER. It’s robust like OpenSER but has more base features similar to what Asterisk provides. Makes sense, as the developer is a former Asterisk developer.

Interesting blog post: How does FreeSWITCH compare to Asterisk?

It’s designed as a soft-switch, not a PBX (see FAQ) but you can add the PBX features on to it that you want. I think this will be a real competitor to Asterisk, sipX and whoever else in the free/open-source world.

Junction Networks offers some cool services including hosted conference bridges, which they’re powering with FreeSWITCH.