Comments (50)
FuriousGeorge from Newark
#1 | Friday, May 30, 2008 1:31 AM
The only thinking stopping me is FUD. I would hate to spend all that time learning a new paradigm, only to find that in terms of reliability / stability / predictability I have the same old problems.
Anthony Minessale from Milwaukee / WI / USA
#2 | Friday, May 30, 2008 8:11 AM
Hi,
I'm Anthony Minessale, Author of FreeSWITCH.
I just wanted to take the time to defend our use of XML if I can. =D
Originally, FreeSWITCH used the same .ini format that Asterisk uses in all of it's config. Actually the interface to parse .ini still exists and a module writer is able to use it if he pleases. The reasoning for XMLizing what we chose to XMLize becomes more clear when you begin to scale the system. FreeSWITCH parses it's XML registry when it first starts and keeps it in memory. This is one big entity that can be navigated similar to a file system. There are top level major sections: configuration, dialplan, directory and phrases. All of the bits and pieces of these sections are exploded out onto the disk in the default arrangement so you can edit the portion of the document you need and it also allows you to insert small XML representations of a single entity such as a SIP UA, a user on the system, the configuration for what modules you want to load. All of these files will be concatenated in the end into 1 big XML document that the entire core and its modules can access with a common API that gives you the entities as a tangible object that can be extended without more code. Now for the interesting part. It's possible to bind callback functions to certain sections of the XML registry so that when code tries to access a particular section your handler can conjure the XML on-demand any way it wants and deliver it back in place of whatever is in the default document. For instance, you can bind your dialplan and user directory sections to mod_xml_curl, A callback that translates XML lookups to and from a nearby HTTP server. When the call hits the XML dialplan the cURL handler kicks in and posts a request to a custom CGI. The CGI gets post data that is identical to a web form being posted with a few dozen facts about the channel that you can use to determine where the call was intended to go and who's calling etc. The CGI then creates a small snippet of XML that will satisfy the request and returns it to FreeSWITCH who will parse it as if it was part of the static config. The same can be done when someone registers to SIP or tries to check their voicemail or when the config is called up during load.
Trust me. I am far from XML's biggest fan, but I do feel it's actual uses are lost in a sea of contrived forced solutions that give it a bad name. To serialize complex objects to and from a text format and to make markup that is easily parsed and generated are the real strengths of XML. The best used XML is XML nobody ever realizes is even there. Certainly that is not true completely with FreeSWITCH today but as we scale and more GUI's and config apps are made, the curve will be in our favor and most people besides only the truly advanced users will ever have to see the XML again.
Caveat: We do have mod_dialplan_asterisk in tree that will allow your dialplan to look and feel more like the asterisk extensions.conf (using .ini) for a sort of cross-over feel.
Anders from RTP
#3 | Friday, May 30, 2008 8:15 AM
FuriousGeorge: That's a good point. Clearly you will be trading one set of problems for another in some way. I guess nothing but time with FreeSWITCH in your environment will clear that up though. There seems to be a bit of anecdotal evidence suggesting that FreeSWITCH vastly outperforms Asterisk but that usually comes from stripped down test data - like 3,000 concurrent channels doing what? Playing hold music? Presumably acting more like a real PBX those numbers wouldn't be so high. That said though, I would still argue that it vastly outperforms the 250 concurrent channels I get with Asterisk playing hold music. Give it a try in your environment and let us know what your experiences are.
Thanks for the comment.
Irshad from India
#4 | Friday, May 30, 2008 8:32 AM
I am also a newbie to XML. I really felt in the same lines seeing at the free-form nature of XML at first. But when complex applications surface in future, most of the applications would have web GUIs or so where user needn't bother about the complexities involved at the back end.
I can say XML is a more beautiful tradeoff than any other formats.
Anders from RTP
#5 | Friday, May 30, 2008 8:46 AM
Anthony: Thanks for the explanation. The XML decision does make sense for the internals of FreeSWITCH. I guess my gripe with it centers around how easy FreeSWITCH is to get going for the first-time implementers. Maybe this could be solved with a simpler XML example but a pile of XML files that can be named just about anything seems daunting at the outset. Sort of adds potential confusion for first-time users.
That said though, this is a tiny gripe in the face of the overwhelmingly positive experience I've had with FreeSWITCH. Thanks for putting together a stellar project.
Abdoulaye Siby from Ottawa / Ontario / Canada
#6 | Monday, June 2, 2008 1:04 AM
I have done a lot of PHP programming for Asterisk AGI applications. When I first looked at the embedded programming languages, I am admit that I have been particularly seduced by the SpiderMonkey Javascript. However, is there a way of calling external application built with other non-embedded programming languages like PHP, C++, Ruby, etc. or even a binary application?
I am also curious about the embedded javascript. Usually, javascript is seen as a client-side script and its speed and performance basically come down to the processing power of the client's computer and the browser used. This is the very first time that I even think about creating or adapting a VoIP application with an `embedded` javascript. Also, I have no reference point whatsoever about its execution speed compared to other languages like PHP or Perl for instance. Does the use of the freeswitch embedded javascript for huge applications affect in any way the performance?
Cheers
Anders from RTP
#7 | Monday, June 2, 2008 10:25 AM
Abdoulaye: Yes, you can call arbitrary executables though you wouldn't have any call control. The best you could do would be to control FreeSwitch through the event socket on port 8021. (not very interesting)
It does add overhead to be using JavaScript on every call though you get the interpreter in memory already so you don't have executable startup time. I'm in the middle of testing this out but clearly the more JavaScript there is to precompile, the more processing has to be done with each call. As far as I know, there is no way to precompile the JavaScript though I'm sure someone will add that eventually.
Abdoulaye Siby from Ottawa / Ontario / Canada
#8 | Monday, June 2, 2008 4:45 PM
Thank you for answering so quickly.
Rest assured that I will never use the event socket. I don't even like the Asterisk's AMI. I prefer to have a direct control over things instead of using a socket connection unless absolutely necessary.
About the overhead, I know that there is going to be one when using any programming language. And even though PHP is most of the time interpreted instead of being precompile, it seemed not bad at all for AGI applications.
I am thinking about building a billing/routing software for Freeswitch. I am currently using A2Billing and it is pretty good, but not compatible with freeswitch. And considering the higher performance of Freeswitch, I am willing to loose some asterisk features.
I would like to know in which order would you classify the following embedded languages when it comes to the overhead that they add: Javascript, Python, Perl, Lua.
Cheers
Anders from RTP
#9 | Monday, June 2, 2008 5:22 PM
Abdoulaye: I don't have a good feel for that yet. I have fairly good experience with JavaScript and will be running some heavy load testing this week so I might have some real figures as far as JavaScript is concerned but nothing in relation to the other languages. The FreeSWITCH guys like LUA which is easily the lightest interpreter of the ones you mention but you are still stuck with the time taken interpreting the script.<br />
<br />
Another option would be to use Mono or Java. Both can be pre-compiled and will stay resident in a VM even when no call is processing. There are also ways to use Mono to run precompiled JavaScript and other languages. As always, your mileage will vary but if you are interested in a performant option, a higher level language that runs in a virtual machine might be the way to go.
Michael Giagnocavo from Denver CO
#10 | Monday, June 2, 2008 5:44 PM
LUA has the lowest overhead of any scripting language -- something like 250K or so?
However, there is mod_mono, which will use the Mono runtime, allowing you to use any number of languages (over 20, maybe as many as 50?).
mod_mono also allows near full access to the entire FS C API, so you can do more than just use the simple App API (although, that's there too).
Mono will JIT your code, so raw performance is excellent. The memory footprint is a big bigger (mod_mono and mod_mono_managed are around 800K) because almost every function is wrapped (so we need an interop function in native code, plus the prototype/interop in managed code).
If you can take the memory hit, I'd be surprised if anything comes close to it in performance. (In fact, with a bit of work, I'd be willing to bet you can get performance nearing a native C app.)
Diego Viola from Asuncion, Paraguay
#11 | Sunday, June 15, 2008 2:10 PM
FreeSWITCH rocks, can't wait to switch from Asterisk.
voip from kelowna/Canada
#12 | Thursday, June 19, 2008 9:51 PM
http://www.cliconnect.com/ is installing FreeSwitch in a couple of servers to check its performance. We'll post the results in our Blog
Diego Viola from
#13 | Monday, June 30, 2008 7:03 PM
There is YAML support now on FreeSWITCH trough mod_yaml.
So, for those who don't like XML that much, you can write dialplans in a more friendly way, like this:
In XML:
<open source="AmazingTeam" on="FreeSwitch">
<projectowner>Anthony</projectowner>
<development>Mike</development>
<qa>Brian</qa>
</open>
In YAML:
AmazingTeam:
project : FreeSwitch
projectowner: Anthony
projectlead: Mike
qa: Brian
Diego Viola from
#14 | Monday, June 30, 2008 7:39 PM
Read more about YAML here:
http://en.wikipedia.org/wiki/YAML
Ron from Amsterdam, The Netherlands
#15 | Friday, July 4, 2008 5:08 PM
Well,
what's holding me back is lack of G.729 support...
Ron
Anders from RTP
#16 | Saturday, July 5, 2008 7:13 AM
Ron: G.729 carries licensing issues. G.729 can be passed through so technically you can use it. The code it out there so it could be incorporated in FreeSWITCH although it hasn't yet because of the licensing nightmare.
Wasim from Lahore, Punjab, Pakistan
#17 | Wednesday, July 23, 2008 8:18 AM
I've personally experienced a 10x increase in the call throughput capacity between asterisk and freeswitch, same hardware, same application, SIP, media handling, call routing.
Ron, I've heard G729 is in the works, so wait for good news soon ...
I concur on the XML, hideous to work with on a text browser, and you get lost in a flurry of < /> but I do see why anthm chose it and as more and more configurators (gui, web based or otherwise) get built, the choice is becoming more and obvious, a painful but wise decision.
The only reason I'm stuck with tens of asterisk installations are due to the lack of SS7 support on fs, otherwise, most everything else has been shifted, and much more happily so ...
SwK from Huntsville, AL
#18 | Wednesday, July 23, 2008 8:40 PM
Anders: I'm actually one of the guys doing the 3000 calls routinely on FreeSwitch... While we arent doing PBX functionality, we are doing Extensive Least Cost Routing with some pretty cool features that have allowed us to reduce our over all termination costs and maintenance costs by going with FS... One thing I dont miss is screwing with openser config files... another thing I dont miss is only being able to run about 250 calls on a single box...
Not to put a quantitative number on the things Using off the Shelf Dell 1950 with Dual 2Ghz Quad Core CPUs, 4G Ram and whatever they have on the low end for HDDs using a custom written C module that replaces the dial plan (yes you can do this and its quite easy... for a good example of how to do this look at mod_enum) the application uses all the information available to you same as the stock xml dialplan and fires queries off to a PostgreSQL Cluster for doing route lookups and costing. this information is then returned to FreeSwith and freeswitch uses it and other state information from the cluster to determine which is the best and most cost effective carrier to send the call to. It also does things like determine if (based on customer profile) there is the possiblity of NAT so we'll proxy the media. (If we know there is no nat in the loop between the last media proxy and the termination media gateways we dont even have to bring the media to FreeSwitch it bypasses quite nicely reducing media processing overhead on the box (and quite nicely reducing network load)
Bipin from UAE
#19 | Sunday, July 27, 2008 4:34 AM
i was waiting for something like freeswitch from quiet some time but XML confuses me as i have no past experience in it and secondly i was wondering if there was a good frontend for it but aimed totally towards a softswitch similar to voipswitch etc which has features lke calling card config rather than extensions, IVR specific for calling card purpose etc etc with CDR and tarrif config
Michael S. Collins from Fresno, CA
#20 | Saturday, August 2, 2008 1:04 AM
Anders: Nice article and thanks for following up on the various issues and questions that the commenters have posted here. My only request would be a follow up article from you since it has been over 2 months since the original article was written. Anthony Minessale is pretty talented and in 2 months he and Mike Jerris have add LOTS to FS. Ask Diego Viola about what led up to Anthony creating mod_yaml in just 3 hours! It's quite a story and it is proof not only that FS is incredibly flexible but that the devs and community are top notch. FS will continue to make inroads into the telecom arena and not just at the expense of Asterisk. It will start displacing carrier class switches once it gets some traction. Exciting times are on the horizon!
-MC
Diego Viola from
#21 | Saturday, August 2, 2008 12:48 PM
I didn't liked the idea of XML at first, but once I tried I found that it was very easy and I actually like it now.
You only have to use XML for the SIP profiles, for the users profiles, and for the dialplan, it's plain simple. It's just parameters/variables and values, with a <> on it.
You can use any other language you want for loading them in the dialplan as your IVR, etc. It's really simple and very useful/powerful.
If you don't like the idea of XML, I think you can use YAML too for the dialplan, there is a mod_yaml already.
Diego Viola from
#22 | Saturday, August 2, 2008 12:51 PM
@Michael S. Collins:
Indeed, anthm == best programmer ever =D
Olavo from Canada
#23 | Tuesday, August 5, 2008 3:14 PM
There is a gui development tool. http://wikipbx.org/
Diego Viola from
#24 | Wednesday, August 6, 2008 11:47 AM
Some things that FreeSWITCH lacks/needs:
1- a "-r" option in the freeswitch binary, to re-connect to the freeswitch socket. I know there is fs.pl, but it would be nicer if FS has an -r option in the binary itself, more handy, practical and useful, it doesn't make it less simple, it makes it functional.
2- an easy way to dial out from conferences, from ANY phone.
3- the ability to set timeout per-bridge/leg, along with global timeout.
4- Complete IAX stack that supports registration, trunking and everything.
5- "sip show peer <peer>" replacement, to see the user's settings from the console.
Diego Viola from
#25 | Wednesday, August 6, 2008 4:24 PM
Forget about what I said in the first option of adding the -r parameter. FreeSWITCH is nicer the way it is now as a server only and the functionality is already in mod_event_socket.
fs.pl is good enough for me =D
dimas from world
#26 | Wednesday, August 6, 2008 11:18 PM
Just curious if FS has anything like Asterisk's DUNDi. We have multiple sites, users registers with (both SIP and IAX) as well as some services provided by each site. And the lookup (to which PBX particular request should be routed to) is done using DUNDi. There is no single point of failure - each site can live even loosing connectivity to others (providing dialing to local users and local services). Can I do the same with FS?
Anders from RTP
#27 | Thursday, August 7, 2008 8:34 AM
Dimas: No there isn't DUNDi support in FreeSWITCH though you could do the same thing by backing all of your FreeSWITCH instances with a distributed database. FreeSWITCH can use external SQL databases to store registrations as well as other data so you could even register with one server and send a call (which requires registration) to another server. You could do a DNS based load balancing with SRV records with this as well, increasing redundancy.
Diego Viola from
#28 | Friday, August 8, 2008 4:42 PM
Yeah why use DUNDi when you can use standards in FS that works much better =D
Simon Shaw from
#29 | Monday, August 11, 2008 12:44 AM
Hi, SwK from Huntsville were you using OpenSER or Asterisk before you moved to FS?
Anders from RTP
#30 | Monday, August 11, 2008 7:51 AM
SwK: I have both OpenSER and Asterisk currently in production. However, while I use Asterisk as a media server and a VoIP to TDM gateway, I'll be using FreeSWITCH more like a PBX.
Undrhil from Alabama
#31 | Monday, August 11, 2008 10:04 PM
Hey. What codecs are supported in FreeSwitch? Is there support for Speex? While g.729 is a nice one, the licensing is a pain. Speex is a little more *beta-y* but the amount of bandwidth used is phenomenal.
Anders from RTP
#32 | Monday, August 11, 2008 11:53 PM
Undrhil: FreeSWITCH supports Speex as well as a number of other codecs. Here's the list as of the current version: (v1.0.1)
* G.711u/G.711a
* G.722
* G.723.1 (passthrough)
* G.726
* G.729 (passthrough now - full support soon)
* GSM 6.10 FR
* amr (only for license holders - full support soon)
* H26X signed linear
* ILBC
* L.16 (slinear) - raw audio
* lpc 10
* Speex
I spoke with Anthony at ClueCON about G.729 support. They are working on a deal that would supply G.729 support similar to the way it is supplied with Asterisk.
Diego Viola from
#33 | Thursday, August 14, 2008 3:41 PM
Here is an article I have written for the company where I work. It's about my experience with Asterisk and FreeSWITCH. I though you might find it interesting.
Santosh from India
#34 | Tuesday, April 21, 2009 11:09 PM
I am new to SIP Servers.I want to use FreeSwitch but My only concern is I have a billing system in windows.So how do I intergrate this windows billing system with linux based FreeSwitch SIP server?
Anders from RTP
#35 | Wednesday, April 22, 2009 5:38 AM
Santosh: You would have to look into what API or other external access your Windows billing system supports and build something custom to use that. It might be possible to manually import the call detail records from FreeSWITCH into your Windows application.
azdog from arizona from cornville/arizona/us
#36 | Wednesday, June 17, 2009 9:47 PM
Hello All,
I am absolutely new to IP communications, but I hope I can get some answers here for a project. I am trying to get voice communication in a LTSP thin serve/client system. Specifically I would like for a teacher sitting at a server in a gnome environment to be able to establish voice communication with any connected client. Currently I am using K12LTSP 5EL (Centos5) for my thin client system and utilize fl_teachertool to monitor all connected clients.
Also, I need the system to remain fully self-contained with out the need for any outside voip service provider. Do you think that this is possible with FreeSwitch? Is FreeSwitch overkill for my project? Am I barking up the wrong tree?
Any help would be appreciated!
Regards,
Murrah Boswell
Anders from RTP
#37 | Thursday, June 18, 2009 8:50 PM
@Murrah: I think the simple answer here is that FreeSWITCH (or any VoIP switch for that matter) can function as it's own self-contained system. There is no need for an external connection to the traditional phone network. As to the question if FreeSWITCH is the correct choice, if running a VoIP client on your thin client is an option, then that would be easy to do. It is fairly trivial to make a number of extensions all call eachother.
Hope this helps!
Deepak from Sterling Heights, MI, USA
#38 | Thursday, November 26, 2009 11:21 PM
I think FreeSwitch is awesome ! I've been using it for a few months and configuring and using it is incredibly easy and I am starting to dig into the code and library to write my own applications and extensions. Thank you Anthony M., from a grateful user.
rockinon from Potsdam/NY/USA
#39 | Thursday, March 11, 2010 1:50 PM
Very interesting read here. Has anyone gotten a billing system to integrate with Freeswitch yet that doesn't cost thousands?
Anders from Cambridge, MA
#40 | Thursday, March 11, 2010 1:59 PM
There are a bunch of billing system integrations out there but of course it depends on the one you have. Give a shout over to the FreeSWITCH guys on their mailing list or on IRC. Also check out the wiki at http://wiki.freeswitch.org/.
Diego Viola from
#41 | Monday, May 10, 2010 10:26 PM
ASTPP already has FreeSWITCH support, check mod_nibblebill also.
It isn't hard also to import the CDR to the database and then rate your calls there... but I agree that a more mature/complete solution would be nice.
Oh, and FreeSWITCH already has G.729 (transcoding) support :D
Conference Star ! from
#42 | Saturday, June 26, 2010 12:56 AM
We build a scalable Conference Bridge, very happy with FS. Check it www.constar.com
Malik from Lahore Punjab Pakistan
#43 | Saturday, June 4, 2011 1:59 AM
Dear Xperts,
I want to learn Freeswitch from secrach level, Please help me to find good source here in Pakistan or abroad.
Thank you,
Anders from Cambridge, MA
#44 | Saturday, June 4, 2011 3:36 AM
Malik: Just download and dive in - the code is open sourced.
Lisandro Damián Nicanor Pérez Meyer from Bahía Blanca, Buenos Aires, Argentina
#45 | Thursday, June 16, 2011 3:34 PM
My only issue would be to be able to use an OpenVox's G400P. It already gave much much of a headache to make it work properly...
mimin from Chennai/TN/India
#46 | Thursday, March 29, 2012 5:58 PM
Hi, Can anyone give mi full details on how to configure OpenVox G400P to work wit Freeswitch..... pliz.....
Nikhitha from Hyd
#47 | Sunday, January 6, 2013 11:35 PM
How to use the classes of freeswitch in a java program??I've used them but getting error as Unsatisfied link error..
Marcelo from Brazil
#48 | Thursday, February 28, 2013 7:56 PM
Hi! Can I build an inbound callcenter with freeswitch?
Thanks
Anders from Cambridge, MA
#49 | Thursday, February 28, 2013 8:22 PM
@Marcelo: Sure, that is something FreeSWITCH would be good for. Lots of examples out there - Google around for some.
Fred from NY
#50 | Saturday, March 30, 2013 6:38 AM
Anthony, I'm with you on this. How you implemented the XML config is fantastic. Yes if you come from Asterisk and first look at it, it could be a turn off but let me tell you freeswitch's performance and stability is incredible. We have freeswitch system's up and running for 3 years without a second of downtime. That may change soon so we can upgrade. Freeswitch is rock solid, very high performance and handles system resources very efficiently. Thanks Anthony no complaints here. -Fred