Skip to main content

SkypeIn - Skype to SIP or SIP to Skype Gateway configuration using siptosis

This article will guide you through installation and configuration of SipToSis Skype gateway which will enable you to forward Skype calls to SIP URI or receive calls from SIP phones, clients or gateways to be dailled through Skype.

Create a user account for skypein
sudo adduser skypein
Select anything you wish for account details including password of your choice

Download SipToSis - Sip to Skype integration software
Go to http://www.mhspot.com/sts/siptosis_download.php and download following
"SipToSis_20110310.zip Sip to Skype integration software"

Download Jave JRE v6 or above
Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html
Select the latest JRE Download
Select appropriate download such as "Linux x86 - Compressed Binary"

Go to http://www.java.com from a Linux based browser and select Downloads which will take you to
http://java.com/en/download/linux_manual.jsp?locale=en
Select Linux (self-extracting file) filesize: 20.6 MB
This will download jre-6u27-linux-i586.bin

cd /usr/src
sudo /bin/sh ~/Downloads/jre-6u27-linux-i586.bin
sudo ln -s /usr/src/jre1.6.0_27/bin/java /usr/bin/java

cd ~/Downloads
wget http://www.skype.com/go/getskype-linux-beta-static
If the downloaded file doesn't have any extension rename it
mv getskype-linux-beta-static skype_static-2.2.0.35.tar.bz2

bunzip2 skype_static-2.2.0.35.tar.bz2
cd /usr/src
tar -xvf ~/Downloads/skype-2.1.0.81.tar
sudo ln -s /usr/src/skype_static-2.2.0.35/ /usr/src/skypestatic
sudo ln -s /opt/skypestatic /usr/share/skypestatic
sudo ln -s /opt/skypestatic/skype /usr/bin/skypestatic


Verify any liberary dependencies
cd /tmp
wget http://frozenfox.freehostia.com/cappy/getlibs-all.deb
sudo dpkg -i /tmp/getlibs-all.deb
 
cd /usr/src/skype_static-2.2.0.35/
sudo getlibs skype
You should expect to see "This application isn't missing any dependencies"

Configure VNC Session with Skype to run on start
sudo su - skypein
vncserver :2
Enter password of your choice
vi ~/.vnc/xstartup
Add following and comment out default window manager
fluxbox &
skypestatic &
# x-window-manager &

Restart VNC Server
vncserver -kill :2 && vncserver :2

sudo su - skypein
mkdir ~/sip2sis
cd ~/siptosis
unzip /tmp/SipToSis_20110310.zip
chmod +x SipToSis_linux

Restart VNC Server
vncserver -kill :2 && vncserver :2

Connect to VNC Session using vncviewer :2
Accept Skype Agreement
Login to Skype client using the Skypein username and password and save it to login when it starts.
If skype is not configured or running in VNC xstartup run it using "skypestatic &"
~/sip2sis/SipToSis_linux
accept API request and Remember it.
Now go to Skype Options and within Public API you should see Skype4Java

Add Sip to Sis to your VNC Startup config
vi ~/.vnc/xstartup
xterm -geometry 100x50+1+1 -e ~/sip2sis/SipToSis_linux &
vncserver -kill :2 && vncserver :2

Configuring call routing for Skype to accept SIP calls and forward calls to SIP addresses.
Anything with a number in front of ip address on SIP port configured will initiate a SkypeOut call using Skype client. e.g. 0044208123456789@localhost:5070. However you can define shortcuts to call other Skype buddies or skypeout numbers.
You can also define the Country and Area code in this file so that trailing country or city codes are automatically added to local number that you dial.

vi ~/sip2sis/SkypeOutDialingRules.props

# ^([1-9][0-9]{6})$:+1561$1^M
# ^([1-9][0-9]{9})$:+1$1^M
# ^([0-9]{7,})$:+$1^M
^([1-9][0-9]{6})$:+44208$1^M
^([1-9][0-9]{9})$:+1$1^M
^([0-9]{7,})$:+$1^M
^11:echo123
^12:my-work-skype-id
^13:my-kids-skype-id
^77:my-mobile-skype-id
^15:my-best-friend-id
^10:0033123456789

Port used for calls from SIP to Skype
vi ~/sip2sis/siptosis.cfg
host_port=5070
This will take any calls from SIP for a SIP URI to skypeidorno@localhost:5070 which will then dial skype id or number using skype client.

Stun Server configuration - add as many as you can for resilience
stunServer=stun.xten.net:3478,stunserver.org:3478,stun.ekiga.net,stun.ideasip.com,stun01.sipphone.com,stun.softjoys.com,stun.voipbuster.com,stun.voxgratia.org,stun.xten.com,stunserver.org,stun.sipgate.net:10000,numb.viagenie.ca,stun.ipshka.com

Audio Ports - May need to be changes in some cases
vi ~/sip2sis/siptosis.cfg
audio_port=63200
skype_audioportbase=64432
Modify Daily PSTN maximum call allowance
vi ~/siptosis/siptosis.cfg
# dailyPstnLimitMinutes=350
dailyPstnLimitMinutes=0

Foward all skype calls to SIP URI Addresses that accept anonymous/ forwarded sip calls
vi ~/SkypeToSipAuth.props
#*,play:clips/invalidDest.wav
*,sip:sipid@sipregistrar:5060
#For example if you wish to call your sip to skype gateway
#configured on same computer, you would use following. Uncomment
#below with for URI configured in  ~/sip2sis/SkypeToSipAuth.props
#*,sip:77@localhost:5080

Run Skype as a service or as a part of rc.local scripts using following url.
http://blog.kamranshah.com/2011/09/running-vnc-server-as-service-on-ubuntu.html

Configure ports to be forwarded to your server or host from Router. Also allow linux firewall to accept traffic on these ports.
sudo ufw allow 10000
sudo ufw allow 5070
sudo ufw allow 63200:63202/udp
sudo ufw allow 64432:64435/tcp


Popular posts from this blog

TrueCrypt on macOS X Mojave 10.14

If you have updated your macOS recently to Mojave otherwise known as verison 10.14 you may not be able to install the last version of Truecrypt in order to access your old volumes encrypted with Truecrypt software. This article will guide you to get this working on your MacOS v10.14 (Mjoave) . Download the package from  https://truecrypt.ch/downloads/  or  https://www.truecrypt71a.com/downloads/ . Find downloaded package using Finder in your HDD/Users/username/Downloads folder and will look like  TrueCrypt 7.1a Mac OS X.dmg . Open file location in Finder and open or double click on  TrueCrypt 7.1a Mac OS X.dmg . This will mount Truecrypt 7.1a and will have Truecrypt 7.1a.mpkg in it. Drag the package T rueCrypt 7.1a.mpkg and drop in your Downloads folder. From Locations in Finder you can eject your TrueCrypt mount. Now go to your Downloads location, find the file  TrueCrypt 7.1a.mpkg , right click and select Show Package Contents . Find the file Contents/distribution.di

Tools you need before you start using Terraform for orchestration infrastructure in cloud

Terraform one of the famous open source tool used for planning, deploying and maintaining infrastructure as a code and the beauty of this tool is that it works across various cloud service providers. Even though I personally like the AWS Cloudformation, it is AWS only and most probably it will always remain limited to Amazon Web Services. It has few advantages over other tools when using with AWS and will be the first to have new AWS features incorporated before other tools and APIs catch up. However if you are not limiting yourself to AWS only or have hybrid environment you may want to use a 3rd party tool compatible for all cloud infrastructures. Terraform being one of them is youngest client only tool and this article will help you setting up your desktop environment and give you understanding of how it works before you can start to code. Prerequisites: Computer running Windows, Linux, Solaris or MacOS operating system. Downloads: Download Terraform directly from the crea

Copy files and folders using SCP with spaces in path

Copying data from one system to other with file or folder names that contain spaces in path can be achieved using this guide. In this case I am copying data from Macbook to Windows 10 computer. In order to copy the data easily it is better to use bash commands. Windows computer can support WSL (Windows subsystem for Linux) and you can run one of few linux distributions to use shell commands. I have Ubuntu set up within my Windows 10 using WSL. If you do not have WSL, you can set it up using my guide here . The copy can be performed in two ways: 1) Using SCP Source (MacOs) path: /home/Users/username/Documents/data extract from 2020/ First of all you add escape sequence to the path so it will become:  /home/Users/me/Documents/data\ extract\ from\ 2020/ . While this works on local system for SCP you'll have to double the escape sequences by replacing \ with \\, as below. Figure out your source computer IP address using "ifconfig" command. Now using scp command on target syst