Re: [Freeswitch-users] Large number of destinations
On 11/13/09 6:58 PM, Eliot Gable wrote: Hi Eliot! Performance is not an issue. I clocked 300 calls per second on such a setup using a Dell R710 with two XEON X5570s and 32 GB RAM as the FreeSWITCH server and a Dell 2950 4-core system with 8 GB RAM as the app server. The app server was at 15% - 20% idle at that rate and the Haha, that should do the trick for me. Sounds realy good. I still prefer to use the internal ENUM system for all lookups, but if that's not possible then the mod_xml_curl method is the one for me I think. That takes all routing complexity away from the FS system. meant that I could only pull 160 calls per second, even though the app server was 55% - 60% idle at that rate, because the ODBC call took 1/160th of a second to complete and all the requests were serialized. OK, that's a problem. On the other hand 160 cps is still very good. If I keep an eye on where I use the limit app, it'll be OK. are storing / querying your data from your database system. Actually, I suppose you could just be a bad programmer and end up making it exponential, but I'm assuming you know how to write code and design your database in a way that avoids that. There's people in my department that know a few things about that, so I can always let my design get approved by them. :) I have been considering writing a hash cache for the XML dialplan so that lookups can become constant time, but I have no idea when or if I will find the time to do that. :) I know the feeling, working on three things at the same time. But it sounds really good all of this. Have to start thinking about the app server design, see how we can do that. It's always a balance, since in the beginning it will be a very small nr of routes. Having the xml_curl setup is a lot of overkill there. But I also know that when connected systems increases there's no time anymore to do it properly, so it's probably best to build the rocketship right from the start. :) /robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
On 11/13/09 2:49 AM, Eliot Gable wrote: Hi Eliot, Or, of course, there is always mod_xml_curl. Basically, XML dialplan on the fly. Call comes in, FreeSWITCH sends XML request via HTTP to a web application server, web application server responds with XML routing response, FreeSWITCH routes the call. Yeah, been looking at that one, really cool idea. Then I could build my routing database in any way I want. I'm just worried about performance and the extra delay it'll introduce. But technically with my complex routing demands this would be the right solution, instead of a mix of modules (which probably brings the same extra load on the machine). I'll fiddle a bit. :) /Robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
On 11/12/09 11:53 PM, Rupa Schomaker wrote: Hi, lcr is based on prefix, so the boundaries for which the range is assigned may not match a prefix. You may be better off either: OK, I think I can forget lcr, it's too far off what I want to do to make it work with some fixes. 1) denormalize your ranges and just insert all distinct #s 2) Modify mod_easyroute to support ranges Will look at this. When I come up with something interesting I'll put it on the wiki. In the meantime I've begun looking at xml_curl also, that might in the end really be the best one. I can then build a database+php that responds to stuff in whatever way we want. 3) talk to SWK (he is on irc here and there) about his (non free) fancier routing options If I can't get it like I want, I'll look for him. :) Thanks for all the pointers and help! /Robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
Performance is not an issue. I clocked 300 calls per second on such a setup using a Dell R710 with two XEON X5570s and 32 GB RAM as the FreeSWITCH server and a Dell 2950 4-core system with 8 GB RAM as the app server. The app server was at 15% - 20% idle at that rate and the Dell R710 was 65% - 70% idle. The main bottleneck I ran into was using the limit application with ODBC. A mutex lock around the ODBC calls meant that I could only pull 160 calls per second, even though the app server was 55% - 60% idle at that rate, because the ODBC call took 1/160th of a second to complete and all the requests were serialized. In theory, you should get better performance using mod_xml_curl because FreeSWITCH will not have to parse a large XML dial plan. One of the drawbacks of the XML dial plan is that any time it tries to locate a route element, it must perform an XML linear search until it finds the correct child (as can be seen in the source code). Thus, searching the XML dialplan is O(n) operation while mod_xml_curl is typically constant time, or at worst, O(log n), depending on how you are storing / querying your data from your database system. Actually, I suppose you could just be a bad programmer and end up making it exponential, but I'm assuming you know how to write code and design your database in a way that avoids that. I have been considering writing a hash cache for the XML dialplan so that lookups can become constant time, but I have no idea when or if I will find the time to do that. :) On Fri, Nov 13, 2009 at 5:23 AM, Robin Vleij vi...@fx-services.com wrote: On 11/13/09 2:49 AM, Eliot Gable wrote: Hi Eliot, Or, of course, there is always mod_xml_curl. Basically, XML dialplan on the fly. Call comes in, FreeSWITCH sends XML request via HTTP to a web application server, web application server responds with XML routing response, FreeSWITCH routes the call. Yeah, been looking at that one, really cool idea. Then I could build my routing database in any way I want. I'm just worried about performance and the extra delay it'll introduce. But technically with my complex routing demands this would be the right solution, instead of a mix of modules (which probably brings the same extra load on the machine). I'll fiddle a bit. :) /Robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- Eliot Gable We do not inherit the Earth from our ancestors: we borrow it from our children. ~David Brower I decided the words were too conservative for me. We're not borrowing from our children, we're stealing from them--and it's not even considered to be a crime. ~David Brower Esse oportet ut vivas, non vivere ut edas. (Thou shouldst eat to live; not live to eat.) ~Marcus Tullius Cicero ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
[Freeswitch-users] Large number of destinations
Hi all, I'm currently building a proof-of-concept box using Freeswitch. Coming from Asterisk/Kamalio/OpenSER it looks very cool so far, very complete. The plan is to make some sort of SIP router, some would call it an SBC I guess. There will be no PBX stuff, just gateways that talk to each other. PSTN Gateways or other operators or systems. If a system is locally connected (say a local voip platform or interconnected partner), traffic to those destinations should be routed directly to that system and not out to PSTN. I'm looking at a potentially large nr of destination nrs or ranges. Not all those destinations are in the local ENUM so I can't use that as a routing system. I'm thinking about mod_lcr, but it seems more suited for eh ... LCR routing, which is not what I want to do here. I just want to define which nrs or nr ranges are directly connected, so that when someone calls there from whatever way they come in (I'm running just one instance and thought about defining all gateways/systems as gateways in the SIP profile), they should end up there and not at PSTN. I think I have two ways of doing this: 1. Make a HUGE XML dialplan and use that to fall back to when internal ENUM lookup doesn't give a result back to where a nr is located 2. Use LCR and find out some kind of way to load all of these destinations into a LCR table and use it in the wrong way, ie no costs are involved, it should just be a way to know which nrs or ranges are to be sent to which gateway. Nr1 is probably best (anyone experience how many conditions one can have dialplan_xml?), but say that we would exchange traffic with an operator, it would really suck writing an XML dialplan with 5000 number ranges. :) Anyone experience with this or ideas how this can be solved? Since it's a proof-of-concept it's unclear how exactly those customers or systems are looking. They might be 6000 (un)ported individual nrs, or just a few large ranges. /Robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
Take a look at mod_easyroute. On Thu, Nov 12, 2009 at 1:14 PM, Robin Vleij vi...@fx-services.com wrote: Hi all, I'm currently building a proof-of-concept box using Freeswitch. Coming from Asterisk/Kamalio/OpenSER it looks very cool so far, very complete. The plan is to make some sort of SIP router, some would call it an SBC I guess. There will be no PBX stuff, just gateways that talk to each other. PSTN Gateways or other operators or systems. If a system is locally connected (say a local voip platform or interconnected partner), traffic to those destinations should be routed directly to that system and not out to PSTN. I'm looking at a potentially large nr of destination nrs or ranges. Not all those destinations are in the local ENUM so I can't use that as a routing system. I'm thinking about mod_lcr, but it seems more suited for eh ... LCR routing, which is not what I want to do here. I just want to define which nrs or nr ranges are directly connected, so that when someone calls there from whatever way they come in (I'm running just one instance and thought about defining all gateways/systems as gateways in the SIP profile), they should end up there and not at PSTN. I think I have two ways of doing this: 1. Make a HUGE XML dialplan and use that to fall back to when internal ENUM lookup doesn't give a result back to where a nr is located 2. Use LCR and find out some kind of way to load all of these destinations into a LCR table and use it in the wrong way, ie no costs are involved, it should just be a way to know which nrs or ranges are to be sent to which gateway. Nr1 is probably best (anyone experience how many conditions one can have dialplan_xml?), but say that we would exchange traffic with an operator, it would really suck writing an XML dialplan with 5000 number ranges. :) Anyone experience with this or ideas how this can be solved? Since it's a proof-of-concept it's unclear how exactly those customers or systems are looking. They might be 6000 (un)ported individual nrs, or just a few large ranges. /Robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
On 11/12/09 9:59 PM, Rupa Schomaker wrote: Hi! Take a look at mod_easyroute. Cool, I remember quick-reading about that module and thinking nah, not needed. Then when the plan changed and I needed the large amount of routes it didn't struck me that easyroute is what I need for what I want to do. Perfect. If I read it right, this is suited for complete nrs. So would I have a system connected with lots of DIDs, I would put them in easyroute. Then for systems with lots of number ranges, I would use mod_lcr. My dialplan context where I would handle inbound from anywhere would look like: 1. ENUM lookup to see if it's a ported nr to any directly connected system 2. mod_lcr lookup to see if it's any large nr range directly connected 3. mod_easyroute to see if it's any individual nr directly connected (via some gateway) 4. Give up :) Guess I'll get working on stuff in this order then. Thanks for the tip! /Robin ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
On Thu, Nov 12, 2009 at 4:32 PM, Robin Vleij vi...@fx-services.com wrote: On 11/12/09 9:59 PM, Rupa Schomaker wrote: If I read it right, this is suited for complete nrs. So would I have a system connected with lots of DIDs, I would put them in easyroute. Then for systems with lots of number ranges, I would use mod_lcr. lcr is based on prefix, so the boundaries for which the range is assigned may not match a prefix. You may be better off either: 1) denormalize your ranges and just insert all distinct #s 2) Modify mod_easyroute to support ranges 3) talk to SWK (he is on irc here and there) about his (non free) fancier routing options -- -Rupa ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Re: [Freeswitch-users] Large number of destinations
Or, of course, there is always mod_xml_curl. Basically, XML dialplan on the fly. Call comes in, FreeSWITCH sends XML request via HTTP to a web application server, web application server responds with XML routing response, FreeSWITCH routes the call. On Thu, Nov 12, 2009 at 5:53 PM, Rupa Schomaker r...@rupa.com wrote: On Thu, Nov 12, 2009 at 4:32 PM, Robin Vleij vi...@fx-services.com wrote: On 11/12/09 9:59 PM, Rupa Schomaker wrote: If I read it right, this is suited for complete nrs. So would I have a system connected with lots of DIDs, I would put them in easyroute. Then for systems with lots of number ranges, I would use mod_lcr. lcr is based on prefix, so the boundaries for which the range is assigned may not match a prefix. You may be better off either: 1) denormalize your ranges and just insert all distinct #s 2) Modify mod_easyroute to support ranges 3) talk to SWK (he is on irc here and there) about his (non free) fancier routing options -- -Rupa ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- Eliot Gable We do not inherit the Earth from our ancestors: we borrow it from our children. ~David Brower I decided the words were too conservative for me. We're not borrowing from our children, we're stealing from them--and it's not even considered to be a crime. ~David Brower Esse oportet ut vivas, non vivere ut edas. (Thou shouldst eat to live; not live to eat.) ~Marcus Tullius Cicero ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org