Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

Goto page 1, 2  Next
 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
ajlong at worldlink.net
Guest





PostPosted: Mon Feb 02, 2009 10:09 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Hi Guys,

I’ve been working at setting up a couple of FreeSwitch nodes as a topology hiding SBCs that handles both ingress traffic from my
providers/peers and pass traffic up to an openser router that then routes call across the cluster of SBCs through which they reach the destination.

I have OpenSIPS/SER setup doing DB route lookups and ENUM with LCR/Serial forking etc.

My question is what would be the best way to send a call out to a destination choosen by the OpenSER router?

For example:
SIP Provider -- > SBC --- > OpenSER ---- ( route lookup returns 123.123.123.4 as dest ) -- > SBC --- > 123.123.123.4

I was thinking something along the lines of adding a “X-Route-To: +1NXXNXXXXXX@ ([email]+1NXXNXXXXXX@[/email])123.123.123.4” with openser
and then something like this in the SBC…

<context name="from-sipcore">
<extension name="outboundroute">
<action application="bridge" data="sofia/external/${sip_h_X-Route-To}" />
</extension>
</context>

Is this a wise approach, is there anything I could do to do this better?
I’d like to keep the logic in the SBCs as simple as possible.

I am pretty familiar with SIP but my knowledge fades when it gets into the nitty gritty of routing… ie the Contact: and Via: headers
and all that good stuff.

I should also state I have two profiles defined one for the internal/private “core” network and one for the outside “external” network.

Any thoughts on this at all would be greatly appreciated.
Am I missing something in the SIP spec that would allow for this is a standardized way?

Regards,
-Adam
Back to top
krice at freeswitch.org
Guest





PostPosted: Mon Feb 02, 2009 11:28 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Yes you can do that, but there is nothing that says you cant have FreeSWITCH just do those lookups and ENUM (FS Supports ENUM out of the box) and do the exact same thing so it would work like Provider -> ingress SBC -> egress SBC/Registration Server -> customer

Loosing a whole hop in the process

From: Adam Long <ajlong@worldlink.net>
Reply-To: <freeswitch-users@lists.freeswitch.org>
Date: Mon, 2 Feb 2009 22:05:17 -0500
To: <freeswitch-users@lists.freeswitch.org>
Subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

Hi Guys,

I’ve been working at setting up a couple of FreeSwitch nodes as a topology hiding SBCs that handles both ingress traffic from my
providers/peers and pass traffic up to an openser router that then routes call across the cluster of SBCs through which they reach the destination.

I have OpenSIPS/SER setup doing DB route lookups and ENUM with LCR/Serial forking etc.

My question is what would be the best way to send a call out to a destination choosen by the OpenSER router?

For example:
SIP Provider -- > SBC --- > OpenSER ---- ( route lookup returns 123.123.123.4 as dest ) -- > SBC --- > 123.123.123.4

I was thinking something along the lines of adding a “X-Route-To: +1NXXNXXXXXX@123.123.123.4” with openser
and then something like this in the SBC…

<context name="from-sipcore">
<extension name="outboundroute">
<action application="bridge" data="sofia/external/${sip_h_X-Route-To}" />
</extension>
</context>

Is this a wise approach, is there anything I could do to do this better?
I’d like to keep the logic in the SBCs as simple as possible.

I am pretty familiar with SIP but my knowledge fades when it gets into the nitty gritty of routing… ie the Contact: and Via: headers
and all that good stuff.

I should also state I have two profiles defined one for the internal/private “core” network and one for the outside “external” network.

Any thoughts on this at all would be greatly appreciated.
Am I missing something in the SIP spec that would allow for this is a standardized way?

Regards,
-Adam

_______________________________________________
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
Back to top
kawarod at laposte.net
Guest





PostPosted: Tue Feb 03, 2009 1:38 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Hi Adam,

I'm in the process of using FS as a SBC. For the route lookup, I do it
using OpenSER carrierroute, without having to flow through
SBC---Openser---SBC. I'm using carrierroute at this time cause I need
more than 200 000 routing entries and carrierroute has been tested with
twice this number.

Here is the setup:

- install openser and carrierroute and make openser listening on
127.0.0.1:5062 (for example) on your SBC
- populate carrierroute table

What I do to use carrierroute module from FS is to use a specific
X-header (X-LOOKUP).

In the dialplan, in the default context, I have something like this:
<extension name="LOOKUP_ROUTE">
<condition field="destination_number" expression="(\d+)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="export" data="sip_h_X-ROUTE=LOOKUP"/>
<action application="bridge"
data="sofia/internal/${sip_req_user}@127.0.0.1:5062"/>
<action application="export"
data="sip_h_X-ROUTE=${sip_redirect_contact_host_0}"/>
<action application="transfer" data="${destination_number} XML ROUTING"/>
</condition>
</extension>

The process is simple:
the export "sip_h_X-ROUTE=LOOKUP" had a sip header X-ROUTE=LOOKUP
then I bridge the call to 127.0.0.1:5062 (openser process)

In openser I have a route block that checks the presence of header
LOOKUP and openser sends a "604: unable to route call" if the prefix is
not found, or a "302: with the IP of the gateway found"

In FS, you can get the IP using the variable
"${sip_redirect_contact_host_0}". Then I transfer this to the context
ROUTING, where the check condition is based on the LOOKUP header that
has been rewritten with this variable.

I will document all this setup (installation of openser/carrierroute and
config file of FS and openser) on a wiki page I start writing yesterday,
so please be indulgent and patient.
The next step is to test the scalability of this.

I'm a very bad programmer, so that's the only way for me to contribute
to FS, and as I see many people interested for an SBC setup, I think it
could be great if we share our work/knowlegde.

The wiki page is there:
http://wiki.freeswitch.org/wiki/SBC_Setup

regards,
rod.





Adam Long wrote:
Quote:

Hi Guys,

I’ve been working at setting up a couple of FreeSwitch nodes as a
topology hiding SBCs that handles both ingress traffic from my

providers/peers and pass traffic up to an openser router that then
routes call across the cluster of SBCs through which they reach the
destination.

I have OpenSIPS/SER setup doing DB route lookups and ENUM with
LCR/Serial forking etc.

My question is what would be the best way to send a call out to a
destination choosen by the OpenSER router?

For example:

SIP Provider -- > SBC --- > OpenSER ---- ( route lookup returns
123.123.123.4 as dest ) -- > SBC --- > 123.123.123.4

I was thinking something along the lines of adding a “X-Route-To:
+1NXXNXXXXXX@ <mailto:+1NXXNXXXXXX@>123.123.123.4” with openser

and then something like this in the SBC…

<context name="from-sipcore">

<extension name="outboundroute">

<action application="bridge" data="sofia/external/${sip_h_X-Route-To}" />

</extension>

</context>

Is this a wise approach, is there anything I could do to do this better?

I’d like to keep the logic in the SBCs as simple as possible.

I am pretty familiar with SIP but my knowledge fades when it gets into
the nitty gritty of routing… ie the Contact: and Via: headers

and all that good stuff.

I should also state I have two profiles defined one for the
internal/private “core” network and one for the outside “external”
network.

Any thoughts on this at all would be greatly appreciated.

Am I missing something in the SIP spec that would allow for this is a
standardized way?

Regards,

-Adam

------------------------------------------------------------------------

_______________________________________________
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 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
Back to top
ajlong at worldlink.net
Guest





PostPosted: Tue Feb 03, 2009 1:50 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Hi Rod,

Great info, Thanks!
Glad to see others are interested in the same concept.
My reasons for SER as routing core and implementation is slightly different
yet similar.

I like your Redirect model, with that you are truly using your Kamailio as
route server only. I would imagine very scalable.
- Are you able to do any round robin, serial or parallel forking
with this?
- I wonder if multiple Contacts in the 302 response maybe with some
logic in FreeSwitch dialplan?
If so I think your design is a bit more efficient than mine as it keeps SER
out of the call path.

My design is little different.. it is more of a "Stateful" setup. With SER
staying in call path and FreeSwitch at Edge.
I do this to enable Serial Forking to a series of SBCs (FreeSwitch) geo
distributed, when one of the branches is congested it
forks to the next SBC (route).

The FreeSwitch guys are probably right tho... with mod_easyroute and mod_lcr
we could probably implement all of this in FreeSwitch without SER.
I would be curious to know if anyone is doing something similar at high
volumes and what sort of concurrency and cps they
are able to achieve.

I am a Perl and C# guy, I thought about implementing a mod_manged_lcr with
memcached support.
Memcache support would prob boost the scalability by a factor of 10 at
least.

I will let you know if I end up developing a high performance FreeSwitch
route module.
Right now I use memcache in a OpenSIPS perl script for my route caching and
its incredibly fast
and clusters well.

It actually might be easier to add memcached support to mod_lcr and
mod_easyroute but im not real strong in C/C++

I'll jump on IRC later and chat with some of the experts on this as I know
memcache has been discussed before.
I'd be curious to know if any progress has been made there already.


Regards,
-Adam

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of rod
Sent: Tuesday, February 03, 2009 1:33 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

Hi Adam,

I'm in the process of using FS as a SBC. For the route lookup, I do it
using OpenSER carrierroute, without having to flow through
SBC---Openser---SBC. I'm using carrierroute at this time cause I need
more than 200 000 routing entries and carrierroute has been tested with
twice this number.

Here is the setup:

- install openser and carrierroute and make openser listening on
127.0.0.1:5062 (for example) on your SBC
- populate carrierroute table

What I do to use carrierroute module from FS is to use a specific
X-header (X-LOOKUP).

In the dialplan, in the default context, I have something like this:
<extension name="LOOKUP_ROUTE">
<condition field="destination_number" expression="(\d+)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="export" data="sip_h_X-ROUTE=LOOKUP"/>
<action application="bridge"
data="sofia/internal/${sip_req_user}@127.0.0.1:5062"/>
<action application="export"
data="sip_h_X-ROUTE=${sip_redirect_contact_host_0}"/>
<action application="transfer" data="${destination_number} XML ROUTING"/>
</condition>
</extension>

The process is simple:
the export "sip_h_X-ROUTE=LOOKUP" had a sip header X-ROUTE=LOOKUP
then I bridge the call to 127.0.0.1:5062 (openser process)

In openser I have a route block that checks the presence of header
LOOKUP and openser sends a "604: unable to route call" if the prefix is
not found, or a "302: with the IP of the gateway found"

In FS, you can get the IP using the variable
"${sip_redirect_contact_host_0}". Then I transfer this to the context
ROUTING, where the check condition is based on the LOOKUP header that
has been rewritten with this variable.

I will document all this setup (installation of openser/carrierroute and
config file of FS and openser) on a wiki page I start writing yesterday,
so please be indulgent and patient.
The next step is to test the scalability of this.

I'm a very bad programmer, so that's the only way for me to contribute
to FS, and as I see many people interested for an SBC setup, I think it
could be great if we share our work/knowlegde.

The wiki page is there:
http://wiki.freeswitch.org/wiki/SBC_Setup

regards,
rod.





Adam Long wrote:
Quote:

Hi Guys,

I've been working at setting up a couple of FreeSwitch nodes as a
topology hiding SBCs that handles both ingress traffic from my

providers/peers and pass traffic up to an openser router that then
routes call across the cluster of SBCs through which they reach the
destination.

I have OpenSIPS/SER setup doing DB route lookups and ENUM with
LCR/Serial forking etc.

My question is what would be the best way to send a call out to a
destination choosen by the OpenSER router?

For example:

SIP Provider -- > SBC --- > OpenSER ---- ( route lookup returns
123.123.123.4 as dest ) -- > SBC --- > 123.123.123.4

I was thinking something along the lines of adding a "X-Route-To:
+1NXXNXXXXXX@ <mailto:+1NXXNXXXXXX@>123.123.123.4" with openser

and then something like this in the SBC.

<context name="from-sipcore">

<extension name="outboundroute">

<action application="bridge" data="sofia/external/${sip_h_X-Route-To}" />

</extension>

</context>

Is this a wise approach, is there anything I could do to do this better?

I'd like to keep the logic in the SBCs as simple as possible.

I am pretty familiar with SIP but my knowledge fades when it gets into
the nitty gritty of routing. ie the Contact: and Via: headers

and all that good stuff.

I should also state I have two profiles defined one for the
internal/private "core" network and one for the outside "external"
network.

Any thoughts on this at all would be greatly appreciated.

Am I missing something in the SIP spec that would allow for this is a
standardized way?

Regards,

-Adam

------------------------------------------------------------------------

_______________________________________________
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 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 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
Back to top
krice at freeswitch.org
Guest





PostPosted: Tue Feb 03, 2009 3:29 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Actually I currently deploy FreeSWITCH for high volume usage using
FreeSWITCH + mod_easyroute (I'm the author) and an advanced LCR module that
does things like load balancing across multiple media gateways, auto route
advance, and a few other nifty things... (this LCR module uses a proprietary
algorithm so its not open source but it is licensable)

With these things we do run OpenSER but only as a proxy to aggregate traffic
heading upstream toward certain carriers (like L3 who make any IP changes a
royal pain)

Now to get down to some hard numbers that we have experience

Equipment:

DB Servers: Dell 2650 RAID 3+1 or 0+1 depending on number of Spindles, Dual
3GHz XEON (single code old slow FSB ones), 4G RAM, running Centos 5.2 and
PostgreSQL 8.3

SIP Servers: Dell 1950 Dual Quad Core 2Ghz (E5335 part), 4 to 8G of RAM,
GIG-E ethernet, whatever hard drive was cheap at time of order. Nothing
really lives on these boxes but FreeSWITCH with mod_easyroute, mod_lcr_adv,
and some CDR processing stuff

DB servers feed all the route information... (yes we do the route lookups
from the DB in real-time, the problem with most LCRs in doing this is an
algorithm

Call Rates Sustained, 500 avg cps, > 2000 calls (that's 2 legs not 1), avg
invite delay 115ms (INVITE in to INVITE out measured with 'ngrep -q -t
INVITE' - Note this is not a true picture of PDD as a number of other
factors affect that, this is a picture of how much time we are adding on box
in delaying an INVITE message)

On Registrations we have experienced Registration/second rates exceeding 150
registrations per second using mod_xml_curl to feed the users directory. I
suspect, this number can be greatly increased if we were to feed directory
with something that cut out the apache and php over head

K


Quote:
From: Adam Long <ajlong@worldlink.net>
Reply-To: <freeswitch-users@lists.freeswitch.org>
Date: Tue, 3 Feb 2009 13:47:59 -0500
To: <freeswitch-users@lists.freeswitch.org>
Subject: Re: [Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

The FreeSwitch guys are probably right tho... with mod_easyroute and mod_lcr
we could probably implement all of this in FreeSwitch without SER.
I would be curious to know if anyone is doing something similar at high
volumes and what sort of concurrency and cps they
are able to achieve.



_______________________________________________
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
Back to top
kokoska.rokoska at pos...
Guest





PostPosted: Tue Feb 03, 2009 5:12 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates exceeding 150
registrations per second using mod_xml_curl to feed the users directory. I
suspect, this number can be greatly increased if we were to feed directory
with something that cut out the apache and php over head


If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented out Smile
2. Directory is served through lighttpd and simple "C" binary doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat performance boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back) and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska

_______________________________________________
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
Back to top
anthony.minessale at g...
Guest





PostPosted: Tue Feb 03, 2009 5:36 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

What does it look like if you serve the directory from the static xml file out of curiosity.


On Tue, Feb 3, 2009 at 4:11 PM, kokoska.rokoska <kokoska.rokoska@post.cz (kokoska.rokoska@post.cz)> wrote:
Quote:
Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates exceeding 150
registrations per second using mod_xml_curl to feed the users directory. I
suspect, this number can be greatly increased if we were to feed directory
with something that cut out the apache and php over head



If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented out Smile
2. Directory is served through lighttpd and simple "C" binary doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat performance boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back) and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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





--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
kokoska.rokoska at pos...
Guest





PostPosted: Tue Feb 03, 2009 5:51 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Anthony Minessale napsal(a):
Quote:
What does it look like if you serve the directory from the static xml
file out of curiosity.


Good question Smile
I have never thing about it, becasue I need "dynamic" users.
But it should show up very impressive number Smile I'll try it tommorow
(here is midnight) and let you know.

BTW: I try to find some another server in colocation with higher
performace. With mentioned P4 I'm affraid have no chance to stress FS
with static xml directory...

Thank you for your interest, Anthony!

Best regards,

kokoska.rokoska



Quote:
On Tue, Feb 3, 2009 at 4:11 PM, kokoska.rokoska <kokoska.rokoska@post.cz
<mailto:kokoska.rokoska@post.cz>> wrote:

Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates
exceeding 150
Quote:
registrations per second using mod_xml_curl to feed the users
directory. I
Quote:
suspect, this number can be greatly increased if we were to feed
directory
Quote:
with something that cut out the apache and php over head


If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented
out Smile
2. Directory is served through lighttpd and simple "C" binary doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat performance
boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back) and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
<mailto: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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
<mailto:MSN%3Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
<mailto:PAYPAL%3Aanthony.minessale@gmail.com>
IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
<mailto:sip%3A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888
<http://iax:guest@conference.freeswitch.org/888>
googletalk:conf+888@conference.freeswitch.org
<mailto:googletalk%3Aconf%2B888@conference.freeswitch.org>
pstn:213-799-1400


------------------------------------------------------------------------

_______________________________________________
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 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
Back to top
krice at freeswitch.org
Guest





PostPosted: Tue Feb 03, 2009 5:56 pm    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Never tried hah...


From: Anthony Minessale <anthony.minessale@gmail.com>
Reply-To: <freeswitch-users@lists.freeswitch.org>
Date: Tue, 3 Feb 2009 16:34:38 -0600
To: <freeswitch-users@lists.freeswitch.org>
Subject: Re: [Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

What does it look like if you serve the directory from the static xml file out of curiosity.


On Tue, Feb 3, 2009 at 4:11 PM, kokoska.rokoska <kokoska.rokoska@post.cz> wrote:
Quote:
Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates exceeding 150
registrations per second using mod_xml_curl to feed the users directory. I
suspect, this number can be greatly increased if we were to feed directory
with something that cut out the apache and php over head


If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented out Smile
2. Directory is served through lighttpd and simple "C" binary doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat performance boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back) and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska

_______________________________________________
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



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888>
googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
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
Back to top
kawarod at laposte.net
Guest





PostPosted: Wed Feb 04, 2009 1:40 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

I did the test when I start looking at FS.
With 10 000 files in conf/directory/default mounted as a ramdisk (if not
in Ramdisk, the IO are too high) and an intel quad core q9550 (2.83Ghz)
with 4GB RAM and the db also in Ramdisk, I was stuck at approx 150cps
with a very high CPU usage. The version I used was 1.0.1, but not sure.


Anthony Minessale wrote:
Quote:
What does it look like if you serve the directory from the static xml
file out of curiosity.


On Tue, Feb 3, 2009 at 4:11 PM, kokoska.rokoska
<kokoska.rokoska@post.cz <mailto:kokoska.rokoska@post.cz>> wrote:

Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates
exceeding 150
Quote:
registrations per second using mod_xml_curl to feed the users
directory. I
Quote:
suspect, this number can be greatly increased if we were to feed
directory
Quote:
with something that cut out the apache and php over head


If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented
out Smile
2. Directory is served through lighttpd and simple "C" binary
doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat
performance boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy
overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back)
and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users
to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
<mailto: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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
<mailto:MSN%3Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
<mailto:PAYPAL%3Aanthony.minessale@gmail.com>
IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
<mailto:sip%3A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888
<http://iax:guest@conference.freeswitch.org/888>
googletalk:conf+888@conference.freeswitch.org
<mailto:googletalk%3Aconf%2B888@conference.freeswitch.org>
pstn:213-799-1400
------------------------------------------------------------------------

_______________________________________________
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 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
Back to top
kawarod at laposte.net
Guest





PostPosted: Wed Feb 04, 2009 2:03 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Hi Adam,

I detailed a bit more my previous mail on this page:
http://wiki.freeswitch.org/wiki/SBC_Setup

Round robin is managed by the carrierroute module. Carrierroute will
reply based on the probability you defined for a route, so if you define
0.3 and 0.7 for the same prefix, your traffic will point to 2 different
gateways with a probability of 30% for one and 70% for the others (If I
understood well the behaviour of carrierroute).

For forking, what I do is that carrierroute replies with a code and not
an IP address.
This code, is then used as a condition in FS and the dialplan matched
could then propose serial or parallel forking (in the wiki, I detailed
serial forking).

The idea is that you could define many combination of GWs, eg:
- code01: try IP_A then IP_B (serial)
- code02: try IP_B then IP_A (serial)
- code03: try IP_A and IP_C (parallel)

this setup is working for me as I do not have 1000 of GWs but I need a
big routing table (approx 160000). I'm sure it could be possible to use
the failure route functionnality of carrierroute to define a new route
when the first one failed without having to define code.
The drawback of this method is that you can't define metrics/properties
for a route (quality, cost, fax compliance...) in realtime, and this is
where using/enhancing the native FS module mod_lcr could be better (I
have no idea on how mod_lcr performs, I will give it a try).

rod


Adam Long wrote:
Quote:
Hi Rod,

Great info, Thanks!
Glad to see others are interested in the same concept.
My reasons for SER as routing core and implementation is slightly different
yet similar.

I like your Redirect model, with that you are truly using your Kamailio as
route server only. I would imagine very scalable.
- Are you able to do any round robin, serial or parallel forking
with this?
- I wonder if multiple Contacts in the 302 response maybe with some
logic in FreeSwitch dialplan?
If so I think your design is a bit more efficient than mine as it keeps SER
out of the call path.

My design is little different.. it is more of a "Stateful" setup. With SER
staying in call path and FreeSwitch at Edge.
I do this to enable Serial Forking to a series of SBCs (FreeSwitch) geo
distributed, when one of the branches is congested it
forks to the next SBC (route).

The FreeSwitch guys are probably right tho... with mod_easyroute and mod_lcr
we could probably implement all of this in FreeSwitch without SER.
I would be curious to know if anyone is doing something similar at high
volumes and what sort of concurrency and cps they
are able to achieve.

I am a Perl and C# guy, I thought about implementing a mod_manged_lcr with
memcached support.
Memcache support would prob boost the scalability by a factor of 10 at
least.

I will let you know if I end up developing a high performance FreeSwitch
route module.
Right now I use memcache in a OpenSIPS perl script for my route caching and
its incredibly fast
and clusters well.

It actually might be easier to add memcached support to mod_lcr and
mod_easyroute but im not real strong in C/C++

I'll jump on IRC later and chat with some of the experts on this as I know
memcache has been discussed before.
I'd be curious to know if any progress has been made there already.


Regards,
-Adam

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of rod
Sent: Tuesday, February 03, 2009 1:33 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

Hi Adam,

I'm in the process of using FS as a SBC. For the route lookup, I do it
using OpenSER carrierroute, without having to flow through
SBC---Openser---SBC. I'm using carrierroute at this time cause I need
more than 200 000 routing entries and carrierroute has been tested with
twice this number.

Here is the setup:

- install openser and carrierroute and make openser listening on
127.0.0.1:5062 (for example) on your SBC
- populate carrierroute table

What I do to use carrierroute module from FS is to use a specific
X-header (X-LOOKUP).

In the dialplan, in the default context, I have something like this:
<extension name="LOOKUP_ROUTE">
<condition field="destination_number" expression="(\d+)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="export" data="sip_h_X-ROUTE=LOOKUP"/>
<action application="bridge"
data="sofia/internal/${sip_req_user}@127.0.0.1:5062"/>
<action application="export"
data="sip_h_X-ROUTE=${sip_redirect_contact_host_0}"/>
<action application="transfer" data="${destination_number} XML ROUTING"/>
</condition>
</extension>

The process is simple:
the export "sip_h_X-ROUTE=LOOKUP" had a sip header X-ROUTE=LOOKUP
then I bridge the call to 127.0.0.1:5062 (openser process)

In openser I have a route block that checks the presence of header
LOOKUP and openser sends a "604: unable to route call" if the prefix is
not found, or a "302: with the IP of the gateway found"

In FS, you can get the IP using the variable
"${sip_redirect_contact_host_0}". Then I transfer this to the context
ROUTING, where the check condition is based on the LOOKUP header that
has been rewritten with this variable.

I will document all this setup (installation of openser/carrierroute and
config file of FS and openser) on a wiki page I start writing yesterday,
so please be indulgent and patient.
The next step is to test the scalability of this.

I'm a very bad programmer, so that's the only way for me to contribute
to FS, and as I see many people interested for an SBC setup, I think it
could be great if we share our work/knowlegde.

The wiki page is there:
http://wiki.freeswitch.org/wiki/SBC_Setup

regards,
rod.





Adam Long wrote:

Quote:
Hi Guys,

I've been working at setting up a couple of FreeSwitch nodes as a
topology hiding SBCs that handles both ingress traffic from my

providers/peers and pass traffic up to an openser router that then
routes call across the cluster of SBCs through which they reach the
destination.

I have OpenSIPS/SER setup doing DB route lookups and ENUM with
LCR/Serial forking etc.

My question is what would be the best way to send a call out to a
destination choosen by the OpenSER router?

For example:

SIP Provider -- > SBC --- > OpenSER ---- ( route lookup returns
123.123.123.4 as dest ) -- > SBC --- > 123.123.123.4

I was thinking something along the lines of adding a "X-Route-To:
+1NXXNXXXXXX@ <mailto:+1NXXNXXXXXX@>123.123.123.4" with openser

and then something like this in the SBC.

<context name="from-sipcore">

<extension name="outboundroute">

<action application="bridge" data="sofia/external/${sip_h_X-Route-To}" />

</extension>

</context>

Is this a wise approach, is there anything I could do to do this better?

I'd like to keep the logic in the SBCs as simple as possible.

I am pretty familiar with SIP but my knowledge fades when it gets into
the nitty gritty of routing. ie the Contact: and Via: headers

and all that good stuff.

I should also state I have two profiles defined one for the
internal/private "core" network and one for the outside "external"
network.

Any thoughts on this at all would be greatly appreciated.

Am I missing something in the SIP spec that would allow for this is a
standardized way?

Regards,

-Adam

------------------------------------------------------------------------

_______________________________________________
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 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 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 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
Back to top
kawarod at laposte.net
Guest





PostPosted: Wed Feb 04, 2009 2:14 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

One more thing,

I worked on a setup like yours:
- Kamailio as a registrar that do the routing decision
- FS as a SBC

What you have to do is just append an header with Kamailio and send the
invite to your FS server using something like that (use of pseudo
variables in Kamailio):

#-------------------------------------------
# PREPARE ROUTING USING REWRITING OF DOMAIN
#-------------------------------------------
if (is_method("INVITE") && from_uri==myself && src_ip!=10.10.10.254){
if(!cr_route("default", "0", "$rU", "$rU", "call_id")){
xlog("$ci CALLEE ROUTING FAILED: no route found");
sl_send_reply("604", "Unable to route this call");
exit;
} else {
xlog("$ci Route found for $rU via $rd");
}
}

# -----------------------------------------------------------------
# Route to FREESWITCH using domain rewriting applied above for LCR
# -----------------------------------------------------------------
xlog("$ci ROUTE: $rd");
append_hf("X-ROUTE: $rd\r\n");

rewritehostport("10.10.10.254:5062"); # there you have to distribute the
invite to your FS servers, take a look at the dispatcher module

Using that, the FS server receiving the Invite, just need to parse the
X-ROUTE header and route the call, without having to resend the call to
a Kamailio server.

I think you can adapt this scenario to your perl script using variable
exportation and append_hf function.

rod.


Adam Long wrote:
Quote:
Hi Rod,

Great info, Thanks!
Glad to see others are interested in the same concept.
My reasons for SER as routing core and implementation is slightly different
yet similar.

I like your Redirect model, with that you are truly using your Kamailio as
route server only. I would imagine very scalable.
- Are you able to do any round robin, serial or parallel forking
with this?
- I wonder if multiple Contacts in the 302 response maybe with some
logic in FreeSwitch dialplan?
If so I think your design is a bit more efficient than mine as it keeps SER
out of the call path.

My design is little different.. it is more of a "Stateful" setup. With SER
staying in call path and FreeSwitch at Edge.
I do this to enable Serial Forking to a series of SBCs (FreeSwitch) geo
distributed, when one of the branches is congested it
forks to the next SBC (route).

The FreeSwitch guys are probably right tho... with mod_easyroute and mod_lcr
we could probably implement all of this in FreeSwitch without SER.
I would be curious to know if anyone is doing something similar at high
volumes and what sort of concurrency and cps they
are able to achieve.

I am a Perl and C# guy, I thought about implementing a mod_manged_lcr with
memcached support.
Memcache support would prob boost the scalability by a factor of 10 at
least.

I will let you know if I end up developing a high performance FreeSwitch
route module.
Right now I use memcache in a OpenSIPS perl script for my route caching and
its incredibly fast
and clusters well.

It actually might be easier to add memcached support to mod_lcr and
mod_easyroute but im not real strong in C/C++

I'll jump on IRC later and chat with some of the experts on this as I know
memcache has been discussed before.
I'd be curious to know if any progress has been made there already.


Regards,
-Adam

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of rod
Sent: Tuesday, February 03, 2009 1:33 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] FreeSwitch setup as a "Dumb" SBC

Hi Adam,

I'm in the process of using FS as a SBC. For the route lookup, I do it
using OpenSER carrierroute, without having to flow through
SBC---Openser---SBC. I'm using carrierroute at this time cause I need
more than 200 000 routing entries and carrierroute has been tested with
twice this number.

Here is the setup:

- install openser and carrierroute and make openser listening on
127.0.0.1:5062 (for example) on your SBC
- populate carrierroute table

What I do to use carrierroute module from FS is to use a specific
X-header (X-LOOKUP).

In the dialplan, in the default context, I have something like this:
<extension name="LOOKUP_ROUTE">
<condition field="destination_number" expression="(\d+)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="export" data="sip_h_X-ROUTE=LOOKUP"/>
<action application="bridge"
data="sofia/internal/${sip_req_user}@127.0.0.1:5062"/>
<action application="export"
data="sip_h_X-ROUTE=${sip_redirect_contact_host_0}"/>
<action application="transfer" data="${destination_number} XML ROUTING"/>
</condition>
</extension>

The process is simple:
the export "sip_h_X-ROUTE=LOOKUP" had a sip header X-ROUTE=LOOKUP
then I bridge the call to 127.0.0.1:5062 (openser process)

In openser I have a route block that checks the presence of header
LOOKUP and openser sends a "604: unable to route call" if the prefix is
not found, or a "302: with the IP of the gateway found"

In FS, you can get the IP using the variable
"${sip_redirect_contact_host_0}". Then I transfer this to the context
ROUTING, where the check condition is based on the LOOKUP header that
has been rewritten with this variable.

I will document all this setup (installation of openser/carrierroute and
config file of FS and openser) on a wiki page I start writing yesterday,
so please be indulgent and patient.
The next step is to test the scalability of this.

I'm a very bad programmer, so that's the only way for me to contribute
to FS, and as I see many people interested for an SBC setup, I think it
could be great if we share our work/knowlegde.

The wiki page is there:
http://wiki.freeswitch.org/wiki/SBC_Setup

regards,
rod.





Adam Long wrote:

Quote:
Hi Guys,

I've been working at setting up a couple of FreeSwitch nodes as a
topology hiding SBCs that handles both ingress traffic from my

providers/peers and pass traffic up to an openser router that then
routes call across the cluster of SBCs through which they reach the
destination.

I have OpenSIPS/SER setup doing DB route lookups and ENUM with
LCR/Serial forking etc.

My question is what would be the best way to send a call out to a
destination choosen by the OpenSER router?

For example:

SIP Provider -- > SBC --- > OpenSER ---- ( route lookup returns
123.123.123.4 as dest ) -- > SBC --- > 123.123.123.4

I was thinking something along the lines of adding a "X-Route-To:
+1NXXNXXXXXX@ <mailto:+1NXXNXXXXXX@>123.123.123.4" with openser

and then something like this in the SBC.

<context name="from-sipcore">

<extension name="outboundroute">

<action application="bridge" data="sofia/external/${sip_h_X-Route-To}" />

</extension>

</context>

Is this a wise approach, is there anything I could do to do this better?

I'd like to keep the logic in the SBCs as simple as possible.

I am pretty familiar with SIP but my knowledge fades when it gets into
the nitty gritty of routing. ie the Contact: and Via: headers

and all that good stuff.

I should also state I have two profiles defined one for the
internal/private "core" network and one for the outside "external"
network.

Any thoughts on this at all would be greatly appreciated.

Am I missing something in the SIP spec that would allow for this is a
standardized way?

Regards,

-Adam

------------------------------------------------------------------------

_______________________________________________
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 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 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 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
Back to top
kokoska.rokoska at pos...
Guest





PostPosted: Wed Feb 04, 2009 5:36 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Anthony Minessale napsal(a):
Quote:
What does it look like if you serve the directory from the static xml
file out of curiosity.


Well, I write all user infos into static xml files loaded at startup Smile

For the first try (without "tuning", see below) I can't go beyond 220
reg/s - it is just about 10-12 % higher rate then with "lighty" etc.
BTW: Lighty alone can serve about 2600-2700 "dynamic directory xml files
from DB" per second - tested with "ab".

The only difference (but big one Smile is that CPU utilization is below
15% on all cores and load is about 0.2, so machine is idle Smile

It tells me, that somthing is wron with my setup Smile


The only optimizations done are:

1. No logging
2. FS in "high priority" mode
3. "ulimits" applied

Next (today evenings - tommorow mornings, don't know) I try to "tune" FS
for better preformance - as I did with previous test last month:

1. Move FS internal SQL light to ramdisk - I'm not sure if it helps,
because OS caches all HDD reads/writes, but if SQL light forces sync
after every DB update/insert it can make sense - I try it.
May be I move all FS dir to ramdisk.

2. Slightly change mod_sofia to disable NAT ping loop (unnecessary DB
operations) and, mainly, disable retrieving and sending of NOTIFY
messages containing VM info.
I'll look into my notes to see what I have done before and do the same...


Be patient please, as soon as I have the results, I post them here Smile


Best regards,

kokoska.rokoska


Quote:
On Tue, Feb 3, 2009 at 4:11 PM, kokoska.rokoska <kokoska.rokoska@post.cz
<mailto:kokoska.rokoska@post.cz>> wrote:

Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates
exceeding 150
Quote:
registrations per second using mod_xml_curl to feed the users
directory. I
Quote:
suspect, this number can be greatly increased if we were to feed
directory
Quote:
with something that cut out the apache and php over head


If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented
out Smile
2. Directory is served through lighttpd and simple "C" binary doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat performance
boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back) and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
<mailto: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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
<mailto:MSN%3Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
<mailto:PAYPAL%3Aanthony.minessale@gmail.com>
IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
<mailto:sip%3A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888
<http://iax:guest@conference.freeswitch.org/888>
googletalk:conf+888@conference.freeswitch.org
<mailto:googletalk%3Aconf%2B888@conference.freeswitch.org>
pstn:213-799-1400


------------------------------------------------------------------------

_______________________________________________
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 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
Back to top
kawarod at laposte.net
Guest





PostPosted: Thu Feb 05, 2009 3:28 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

Hi,

how many static xml files did you create for your test ?

rod.

kokoska rokoska wrote:
Quote:
Anthony Minessale napsal(a):

Quote:
What does it look like if you serve the directory from the static xml
file out of curiosity.



Well, I write all user infos into static xml files loaded at startup Smile

For the first try (without "tuning", see below) I can't go beyond 220
reg/s - it is just about 10-12 % higher rate then with "lighty" etc.
BTW: Lighty alone can serve about 2600-2700 "dynamic directory xml files
from DB" per second - tested with "ab".

The only difference (but big one Smile is that CPU utilization is below
15% on all cores and load is about 0.2, so machine is idle Smile

It tells me, that somthing is wron with my setup Smile


The only optimizations done are:

1. No logging
2. FS in "high priority" mode
3. "ulimits" applied

Next (today evenings - tommorow mornings, don't know) I try to "tune" FS
for better preformance - as I did with previous test last month:

1. Move FS internal SQL light to ramdisk - I'm not sure if it helps,
because OS caches all HDD reads/writes, but if SQL light forces sync
after every DB update/insert it can make sense - I try it.
May be I move all FS dir to ramdisk.

2. Slightly change mod_sofia to disable NAT ping loop (unnecessary DB
operations) and, mainly, disable retrieving and sending of NOTIFY
messages containing VM info.
I'll look into my notes to see what I have done before and do the same...


Be patient please, as soon as I have the results, I post them here Smile


Best regards,

kokoska.rokoska



Quote:
On Tue, Feb 3, 2009 at 4:11 PM, kokoska.rokoska <kokoska.rokoska@post.cz
<mailto:kokoska.rokoska@post.cz>> wrote:

Ken Rice napsal(a):
...

Quote:
On Registrations we have experienced Registration/second rates
exceeding 150
Quote:
registrations per second using mod_xml_curl to feed the users
directory. I
Quote:
suspect, this number can be greatly increased if we were to feed
directory
Quote:
with something that cut out the apache and php over head


If someone interested I have few numbers on Registrar performance:

DB server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64, MySQL 5.0

Registrar server:
2x Quad core E5345 @ 2.33GHz, 16 GiB RAM
Centos 5 x86_64

Tested using sipp with 10.000 and 30.000 "users".


FreeSWITCH as registrar - current trunk:
1. FreeSwitch si simply modified (code doing NAT-ping is commented
out Smile
2. Directory is served through lighttpd and simple "C" binary doing one
trivial select. Lighttpd runs on the same machine as FS. When I move
lighhtpd to another machine, I cannot see any significat performance
boost.

Result: I can go up to the 470-500 reg/s. and FS is heavy overloaded and
retransmissions occurs.


Kamailio as registrar - 1.4.3. no TLS:
1. Kamailio runs with usrloc db_mode 3 (no caching)

Result: I can go up to the 3500-3700 reg/s. and Kamailio server is at
0.3 load and all 8 cores are bellow 15 %. Without retransmissions. The
limit is DB throughput.
Just for "curiosity" I switched userloc to db_mode 2 (write back) and at
5000 regs/s I stopped the sipp test, because I saw the bottle neck
becomes the server runnig sipp (very old P4 box).


Conclusion:
While I see amazing FreeSWITCH performance on INVITEs per seconds and
concurrent calls (another galaxy from * point of view Smile, if you have
to handle lots of registrations per second, it is IMO better to use
Kamailio/OpenSIPS/SER as separate registrar and "propagate" users to FS
through SQL view.

Hope this helps someone...

Best regards,

kokoska.rokoska

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
<mailto: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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
<mailto:MSN%3Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
<mailto:PAYPAL%3Aanthony.minessale@gmail.com>
IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
<mailto:sip%3A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888
<http://iax:guest@conference.freeswitch.org/888>
googletalk:conf+888@conference.freeswitch.org
<mailto:googletalk%3Aconf%2B888@conference.freeswitch.org>
pstn:213-799-1400


------------------------------------------------------------------------

_______________________________________________
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 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 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
Back to top
kokoska.rokoska at pos...
Guest





PostPosted: Thu Feb 05, 2009 3:52 am    Post subject: [Freeswitch-users] FreeSwitch setup as a "Dumb" SB Reply with quote

rod napsal(a):
Quote:
Hi,

how many static xml files did you create for your test ?

rod.


Hi rod,

I created 10.000 files xml directory files, but all of them were
"included" into main FreeSWITCH xml config (using preprocessor). So I
hope => no disk reads, all in memory (freeswitch.xml.fsxml is memory
mapped)...

Best regards,

kokoska.rokoska


_______________________________________________
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services