Presentation is loading. Please wait.

Presentation is loading. Please wait.

Connecting FreeSWITCH

Similar presentations


Presentation on theme: "Connecting FreeSWITCH"— Presentation transcript:

1 Connecting FreeSWITCH
to the Skype Network with mod_skypopen: Scalability Issues CHICAGO, USA, September 2011 Giovanni Maruzzelli

2 AGENDA Overview How it Works Skype Client on Linux Scalability Knobs Tools of the Trade Scalability Strategies TODO Today's Performances Q&A

3 SKYPOPEN important information
Skypopen uses the Skype API but is not endorsed, certified or otherwise approved in any way by Skype, Ebay, Microsoft or any other company owning rights to the Skype technology Skypopen is not reverse engineering, it is a legitimate application of the Skype API, compliant with Skype policies

4 WHAT is SKYPOPEN ? Skypopen is an endpoint (channel driver) that uses the Skype client as an interface to the Skype network, and allows incoming and outgoing Skype calls to/from FreeSWITCH (calls can be bridged, originated, answered, etc. as in all other endpoints, e.g. sofia/SIP). Skypopen works in FreeSWITCH (FS) on both Linux and Windows, native at 16khz (Skype client has 16khz audio I/O). Think of Skypopen as similar to FreeTDM for analog lines. For each channel you need an interface (a Skype client). So, for example, two concurrent calls would need two channels, and therefore two Skype clients running on your FreeSWITCH server. Skypopen allows CHAT messaging, too. Same chatting interface as mod_dingaling and mod_sofia

5 SKYPOPEN Features Overview
Multiline (many concurrent different skypeusernames: “Alice”, “Bob”, ... “Zukowski”) Multiline (many concurrent instances of the same skypeusername: “Alice”, “Alice”, .... “Alice”) Can make SkypeOut calls to PSTN and cellphones Easy integration into dialplan (like standard endpoints) Round Robin hunt for next available outbound channel Automatic selection of interface to answer incoming call CLI commands for statistics, debug, prototyping, control Easy interaction with the outside world through ESL or AMI

6 SKYPOPEN, how it works One Skype client instance running per each Skypopen interface (eg: 32 Skype concurrent calls, 32 Skypopen interfaces, 32 Skype clients running) Skypopen “remote controls” its own configured Skype client via Skype API Skypopen exchange audio to/from the Skype client via TCP/IP sockets (activated via Skype API)

7 SKYPE CLIENT, how it works on Linux with FreeSWITCH
Skype Client interfaces with: FreeSWITCH (via local TCP sockets) Fake Xserver (Xvfb, via local X protocol) Fake Soundcard (custom Driver, read/write syscalls) Kernel (timing got both from soundcard and from system calls) Skype Client is not very efficient, is a desktop app for single user Skype Client generates load on machine during call

8 INSTALL and CONFIGURE SKYPOPEN and FreeSWITCH (Linux)
Install pre-requisites (cut and paste your distro command line from skypopen wiki page), then make install FreeSWITCH (or just mod_skypopen) Make Custom Sound Driver (src/mod/endpoint/mod_skypopen/oss/) Run src/mod/endpoint/mod_skypopen/install/install.pl “install.pl” will ask questions, then download the correct Skype client, install it, and create all configurations and scripts needed for your own Skypopen operation. All in 70 SECONDS!

9 SKYPOPEN performances TODAY
64 and up concurrent Skype calls per (robust) machine The load on the server is generated by the Skype clients For large deployments, best is to dedicate a machine to just FS+Skype, and another to FS+Apps+etc, and have the two machines talking via SIP. More cores, the better On Linux, the best performances are with RHEL6, CentOS 6, and Scientific Linux 6 On Amazon, using Amazon Linux 64bit AMI, on an High CPU Xtra Large instance ($0.68/hour) more than 64 concurrent calls (maybe 128? not tested more than 64). On Large instance ($0.34/hour) 16 and up (to 32)

10 SKYPOPEN SCALABITY STRATEGIES (over 64 concurrent calls) (1)
Multiple usernames (lower load) (many concurrent different skypeusernames: “Alice”, “Bob”, ... “Zukowski”) If you need outbound to be from one only username, then Transfer calls Single username (higher load) (many concurrent instances of the same skypeusername: “Alice”, “Alice”, .... “Alice”)

11 SKYPOPEN SCALABITY STRATEGIES (over 64 concurrent calls) (2)
Cores ! If you need MANY skyperusernames (eg: acmesupport001...acmesupport999) use Skype Business Manager to create them CentOS 6, RHEL6, SL6 or Amazon AMI

12 SKYPOPEN SCALABILITY DEVELOPMENT KNOBS (1)
mod_skypopen: Async signaling (via X), break the loops, have it blocking TCP send/receive to Skype Client, balance between context switches and real time via packet size Delay: adjust via losing packets, but not too much

13 SKYPOPEN SCALABILITY DEVELOPMENT KNOBS (2)
OSS Driver: read/write frequency, tune syscalls and context switches via size (timing) High resolution timers, one for each channel or just one for all channels? (kernel scheduler)

14 “Houston, we’ve got an holistic problem”
TOOLS of the TRADE “Houston, we’ve got an holistic problem” Lots of moving parts, heavy threading, strace and gprof are almost useless We need to keep tab on Kernel, FreeSWITCH, and on a black box deliberately obfuscated: the Skype Client OPROFILE SYSTEMTAP:

15 SKYPOPEN TODO Add a Transfer API command (CLI and ESL)
Add a “is_chief” property to pvt “chief” will automatically xfer an incoming call Add a “xfer_in” property to pvt Add a “xfer_to” linked list to globals No more interfaces (pvt) marked “dead”. They'll be eliminated No more fail because one interface (Skype Client) is not available (because of crash, because not online, because no auth, etc). Just emits an ERROR

16 Thank you for your attention! Questions?
for more info: Giovanni Maruzzelli


Download ppt "Connecting FreeSWITCH"

Similar presentations


Ads by Google