FS as a REDIRECT server
I'm planning to have several FS in few regions and would like that each client will be able to register with the nearest FS in his current region location - regardless of the client's @domain (using multiple clients doamins). I would like to use the following registration procedure: 1. A client is turned ON (new location) and sends REGISTER request to the REDIRECT server at 'redirect.fs.com' (all clients will be provisioned with the same registrar url); 2. The REDIRECT server looks for the nearest FS server and sends 302-redirect to the client 3. The client receives the 302 and re-registers to the nearest FS server. 4. The targeted FS update the LOCATION DB with the current client FS server location for incoming call routing . Is it possible to setup a FS as a REDIRECT server? How? *if there is a better approch then please advise Regards Assaf -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-as-a-REDIRECT-server-tp7591... Sent from the freeswitch-users mailing list archive at Nabble.com.
Yes, this might work. You can see the usage here: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_redirect . It only looks elegant at first glance though. I don't see fs using or allowing redirect on REGISTER( correct me pls ) which means you would still be using a single register server.( i can think that you can leave auth-calls to false and have it redirect on register). Also device support is mostly sketchy on handling redirects and mainly the 300 which once you start building this will find very useful for failover. Resisting a temptation to solve your georouting with one shot is a hard deal. If you have a homogenous base of client devices and make sure they work, i would give it a go. Otherwise go with dnssrv records and rtp proxies. On Jun 4, 2013 12:37 PM, "adahary" <adahary@gmail.com> wrote:
I'm planning to have several FS in few regions and would like that each client will be able to register with the nearest FS in his current region location - regardless of the client's @domain (using multiple clients doamins).
I would like to use the following registration procedure: 1. A client is turned ON (new location) and sends REGISTER request to the REDIRECT server at 'redirect.fs.com' (all clients will be provisioned with the same registrar url); 2. The REDIRECT server looks for the nearest FS server and sends 302-redirect to the client 3. The client receives the 302 and re-registers to the nearest FS server. 4. The targeted FS update the LOCATION DB with the current client FS server location for incoming call routing .
Is it possible to setup a FS as a REDIRECT server? How?
*if there is a better approch then please advise
Regards
Assaf
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-as-a-REDIRECT-server-tp7591... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Note however that not all clients will follow 302 redirects. FreeSWITCH won't be default for example. The reason being it makes it easy to redirect a user along a premium rate route when they think they're on a cheap/free one. A SIP proxy or FS with bypass_media would work transparently, media would still go directly between the targetted FS server and the client so you get minimum lag. The SIP signalling is a much smaller amount of messages where lag doesn't matter as much that its going via that proxy node. The load on the proxy nodes is minimal since its only forwarding signalling not handling any media. Combine that with DNS SRV and you can have multiple sites providing the proxy nodes to spread load, and add them as needed. Or use load balancers. -Steve On Wednesday, June 5, 2013, Daniel Ivanov wrote:
Yes, this might work. You can see the usage here: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_redirect . It only looks elegant at first glance though. I don't see fs using or allowing redirect on REGISTER( correct me pls ) which means you would still be using a single register server.( i can think that you can leave auth-calls to false and have it redirect on register). Also device support is mostly sketchy on handling redirects and mainly the 300 which once you start building this will find very useful for failover. Resisting a temptation to solve your georouting with one shot is a hard deal. If you have a homogenous base of client devices and make sure they work, i would give it a go. Otherwise go with dnssrv records and rtp proxies. On Jun 4, 2013 12:37 PM, "adahary" <adahary@gmail.com <javascript:_e({}, 'cvml', 'adahary@gmail.com');>> wrote:
I'm planning to have several FS in few regions and would like that each client will be able to register with the nearest FS in his current region location - regardless of the client's @domain (using multiple clients doamins).
I would like to use the following registration procedure: 1. A client is turned ON (new location) and sends REGISTER request to the REDIRECT server at 'redirect.fs.com' (all clients will be provisioned with the same registrar url); 2. The REDIRECT server looks for the nearest FS server and sends 302-redirect to the client 3. The client receives the 302 and re-registers to the nearest FS server. 4. The targeted FS update the LOCATION DB with the current client FS server location for incoming call routing .
Is it possible to setup a FS as a REDIRECT server? How?
*if there is a better approch then please advise
Regards
Assaf
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-as-a-REDIRECT-server-tp7591... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e({}, 'cvml', 'consulting@freeswitch.org');> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e({}, 'cvml', '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
I understand your point about the 3xx redirct option, so I'm dumping it. I've considered also using Kamailio/OpenSips for REDIRECT&LoadBalance and RTPproxy and found it too complex and time consuming (I've already setup a working small network). I was researching the DNS-SRV geo-routing solution but then I got into a much simple and friendly solution which is the AWS-53 Latency Based Routing (LBR) service. The LBR replies to the client's DNS query with the nearest FS server by measuring the latency between the client and the nearest AWS region that host the targeted FS. The AWS-53 provides also other tools for failover, load balacing and monitoring so the global FS network can scale up easily. Once the client is ON the nearest FS then all the rest is based on the FS dialplan routing scheme. One centralized DB (with back up) will hold all the clients credentials and their current status location. Once the client make a call, the hosted FS will look up for the current location of the called client and route it to the remote FS (client 1 -> FS A ->LOOKUP -> FS B -> client 2). Both FS A&B will be setup with proxy_media mode for maintaining clients' NAT and RTP media transparency (end2end codec policy). I found this setup simple, scalable and cost effective. I would appreciate any advice/feedback on this setup plan. Regards Assaf -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-as-a-REDIRECT-server-tp7591... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi there, I'm interested in experimenting with the set up you recommend here and your clarifications to my questions below would help. Do you need to have your FS instances hosted by Amazon in order to benefit from the LBR? When you mean centralized DB, am I correct in assuming this being a PostgreSQL or MySQL set up? How do you store and use location based information for registrations? Thanks a bunch for any help you may provide. Regards, Emrah On Jun 5, 2013, at 5:16 AM, adahary <adahary@gmail.com> wrote:
I understand your point about the 3xx redirct option, so I'm dumping it. I've considered also using Kamailio/OpenSips for REDIRECT&LoadBalance and RTPproxy and found it too complex and time consuming (I've already setup a working small network).
I was researching the DNS-SRV geo-routing solution but then I got into a much simple and friendly solution which is the AWS-53 Latency Based Routing (LBR) service. The LBR replies to the client's DNS query with the nearest FS server by measuring the latency between the client and the nearest AWS region that host the targeted FS. The AWS-53 provides also other tools for failover, load balacing and monitoring so the global FS network can scale up easily.
Once the client is ON the nearest FS then all the rest is based on the FS dialplan routing scheme. One centralized DB (with back up) will hold all the clients credentials and their current status location. Once the client make a call, the hosted FS will look up for the current location of the called client and route it to the remote FS (client 1 -> FS A ->LOOKUP -> FS B -> client 2). Both FS A&B will be setup with proxy_media mode for maintaining clients' NAT and RTP media transparency (end2end codec policy).
I found this setup simple, scalable and cost effective.
I would appreciate any advice/feedback on this setup plan.
Regards
Assaf
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-as-a-REDIRECT-server-tp7591... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Hi Emrah , 1. You can use the AWS LBR with any other VPS you like - EC2 is not a must. Actually, I'm planning to have the first FS on each region with a regular VPS (cost effective for full month) and the 2nd FS with EC2 (I can turn on/off per load). 2. Yes, I'm using Mysql as my centralized DB. 3. In my centralized DB I've defined a customized LOCATION table which basically records username/FSserver pairs (and other info as well). When a sip client REGISTER with its neareast FS (LBR), then the FS update the centralized LOCATION table with its fs_id and sip_id. When the sip client disconnect from that FS (look for reg status) then the FS updates the LOCATION as well (clear/update record). Regards Assaf -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/FS-as-a-REDIRECT-server-tp7591... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (4)
-
adahary
-
Daniel Ivanov
-
Emrah
-
Steven Ayre