Set up a profile in /etc/xinetd.d called http:
Set up a profile in /etc/xinetd.d called http:
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!
Time to dust off the blog.
Get to know your work habits and soon you’ll know that time of day that is your productivity sweet spot.
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 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.
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).
Today’s final session of Astricon was an update on Asterisk 10, Asterisk SCF and DAHDI, the Digium hardware driver.
Before: Monday afternoon, high 70s, beautiful fall colors | After: Wednesday morning, about 30 degrees, several inches of snow! |
There has hardly been a moment to blog in the past few weeks.
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!”
And, because I am sure I am forgetting a number of other areas, I’ll tack on “and much more.”