<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I realized I may not have been quite clear on something in my answer..<div class=""><br class=""></div><div class="">The sip proxy is transaction stateful, but not dialog-stateful. So, for instance, </div><div class="">if you configured the proxy to remain in the dialog (i.e., you wanted to receive BYE messages, etc during the dialog),</div><div class="">there will be no impact to calls of a failure mid-call (after dialog established)</div><div class="">since requests will be routed based on Record-Route header and</div><div class="">responses will be routed based on Via header.</div><div class=""><br class=""></div><div class="">The only impact, and it is minimal, is what I stated before: a new INVITE in</div><div class="">flight transaction will work, but with loss of the “crankback” feature if the </div><div class="">freeswitch selected returns a failure and you would have preferred to then </div><div class="">generate a new INVITE (from the proxy) to an alternative freeswitch.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><div class="">On Dec 1, 2015, at 10:58 AM, Dave Horton <<a href="mailto:dave@dchorton.com" class="">dave@dchorton.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ah, ok. Thanks for the clarification.<div class=""><br class=""></div><div class="">I don’t have a perfect solution matching that at the moment, since the SIP proxy is transaction stateful and that transaction state will be lost at the point of failover for a transaction in progress at that moment. However, the impact on transactions in progress may be minimal, because incoming responses back from freeswitch _will_ be properly routed back to the sender (based on the Via header). What you would lose for those transactions in flight would be the crankback to try a different freeswitch server if you got a failure response from one. Depending on your requirements, that may be ok. (For the “perfect” solution I would need to modify the underlying sip server to offload transaction state into redis or something like that so full transaction state would be available on failover, which is an idea I’ve been toying with).</div><div class=""><br class=""></div><div class="">Of course, running the proxy on two servers with a floating IP is simple, I use keepalived for that and could share my config if that is useful. I also modify the sysctl params to allow the offline node to bind to a non-local IP so that both SIP servers (online and offline) are running all of the time and there is no delay on startup/failover as the SIP stack is already running and ready for traffic.</div><div class=""><br class=""></div><div class="">Dave</div><div class=""><br class=""></div><div class=""><div class=""><div class="">On Dec 1, 2015, at 10:47 AM, Avi Marcus <<a href="mailto:avi@avimarcus.net" class="">avi@avimarcus.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think what Regis M wants to know -- and I'm curious -- is how to configure like so:<div class=""><br class=""></div><div class="">Set up your load balancer on two different machine, with a floating IP. When requests come in, it forwards them to the list of FS servers.<br class=""></div><div class=""><br class=""></div><div class="">The point of the statelessness is that if the floating IP is switched at <i class="">any </i>moment, you don't lose <i class="">any </i>calls since it's "stateless" and the SIP Dialog contains all the necessary information.</div><div class=""><br class=""></div><div class="">I'd really like to check this out since I am "all-in" to node.js and kamailio seems rather obscure to me.</div><div class=""><br class=""></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class="">-Avi Marcus</div></div></div>
<br class=""><div class="gmail_quote">On Tue, Dec 1, 2015 at 5:02 PM, Dave Horton <span dir="ltr" class=""><<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">I’m not sure I completely understand your desired setup — when you say “same config available on two different IPs”, are you talking about having two freeswitch servers available as potential targets on two different IPs? Or the proxy running on a multi-homed host that has two different IPs? (Or two instances of the proxy running on different IPs but with the same config?)<div class=""><br class=""></div><div class="">In any case, to be a load-balancing proxy really means that you need to be at least transaction stateful — so I don’t think you are actually looking for a stateless proxy.</div><div class=""><br class=""></div><div class="">To the extent you want to modify the proxy to change destinations at any time (i.e. to switch new calls to a different freeswitch without informing customers), this proxy will let you do that. You simply would update the configuration file to add your new freeswitch server IP address and associated information, and (if desired) remove the old one. You do not need to restart anything either — changes like that to the config file are automatically noticed and taken into affect immediately.</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div></font></span><div class=""><span class="HOEnZb"><font color="#888888" class="">Dave</font></span><div class=""><div class="h5"><br class=""><div class=""><div class="">On Dec 1, 2015, at 9:52 AM, Regis M <<a href="mailto:regis.freeswitch.org@tornad.net" target="_blank" class="">regis.freeswitch.org@tornad.net</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">What I need is to have a frontal proxy with same config available on 2 differents IPs. <div class=""><br class=""></div><div class="">Both of them send request to the same Freeswitch based on config rules.<br class=""></div><div class=""><br class=""></div><div class="">Then, if I change the config and reload both proxy, I could use another Freeswitch without informing customers.</div><div class=""><br class=""></div><div class="">The running calls could be lose.</div><div class=""><br class=""></div><div class="">IP failover with no proxy and 1 freeswitch is not an option for me..<br class=""><br class="">The proxy need to act as nginx for web... He choose destination based on request rules..</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">So for me I thnik I need a <span style="font-size:12.8px" class="">Stateless proxy. But I'm not interested by the call failover potential...</span><br class="">But Your first definition sounds good for me..</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2015-12-01 15:36 GMT+01:00 Dave Horton <span dir="ltr" class=""><<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">When people talk about stateful or stateless there can be different interpretations, so I will try to be specific:<div class=""><br class=""></div><div class="">Call stateful (or stateless): meaning whether the proxy remains in the dialog after a successful INVITE transaction (e.g. to receive subsequent BYE message, in order to do accounting etc). With this proxy, you have a choice of whether to be call stateful or not (depends on setting of the ‘remainInDialog’ property to the req.proxy method)</div><div class=""><br class=""></div><div class="">Stateless proxy: an entity that does not maintain transaction state of client or server SIP transactions, simply forwards request. This proxy is _not_ a stateless proxy, because it needs to maintain transaction state in order to do things like handle temporary failures from one freeswitch and then land the call on another.</div><span class=""><font color="#888888" class=""><div class=""><br class=""></div><div class="">Dave</div></font></span><div class=""><div class=""><div class=""><br class=""><div class=""><div class="">On Dec 1, 2015, at 9:14 AM, Regis M <<a href="mailto:regis.freeswitch.org@tornad.net" target="_blank" class="">regis.freeswitch.org@tornad.net</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Hi Dave,<div class=""><br class=""></div><div class="">Does your proxy could act as a stateless proxy or not ?</div><div class="">I'm looking for a stateless proxy, I had ever test your solution but haven't find the answer to this question during my test.</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2015-12-01 14:32 GMT+01:00 Dave Horton <span dir="ltr" class=""><<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">It is a proxy. I am using the sofia sip stack (specifically nta) which is capable of any type of sip processing, but this application uses it as a SIP proxy.<div class=""><div class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><div class="">On Dec 1, 2015, at 8:20 AM, Vik Killa <<a href="mailto:vipkilla@gmail.com" target="_blank" class="">vipkilla@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Hi,<div class="">I see this is described as a SIP Proxy but you are using the sofia SIP stack.</div><div class="">Is this technically a B2BUA or a Proxy?</div><div class="">Thanks,<br class="">/V</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Dec 1, 2015 at 8:14 AM, Dave Horton <span dir="ltr" class=""><<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I’ve developed a nodejs-based freeswitch load balancer that may be of interest to those who prefer Javascript to configuration file-driven routing. Even better if you are a nodejs developer familiar with expressjs or connect, then you may find the nuts of it to be very simple:<br class="">
<br class="">
<br class="">
app.invite( function(req, res) {<br class="">
...<br class="">
req.proxy({<br class="">
remainInDialog: false,<br class="">
handleRedirects: true,<br class="">
provisionalTimeout: '1s',<br class="">
destination: targets<br class="">
}, function(err) {<br class="">
if( err ) {<br class="">
console.error('Error proxying request: ', err) ;<br class="">
}<br class="">
}) ;<br class="">
}) ;<br class="">
<br class="">
<br class="">
Details here:<br class="">
<br class="">
<a href="http://davehorton.github.io/drachtio-fs-load-balancing-proxy/" rel="noreferrer" target="_blank" class="">http://davehorton.github.io/drachtio-fs-load-balancing-proxy/</a><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
_________________________________________________________________________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a></blockquote></div><br class=""></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class=""><a href="http://www.freeswitchsolutions.com/" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a><br class=""><a href="http://confluence.freeswitch.org/" target="_blank" class="">http://confluence.freeswitch.org</a><br class=""><a href="http://www.cluecon.com/" target="_blank" class="">http://www.cluecon.com</a><br class=""><br class="">FreeSWITCH-users mailing list<br class=""><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class=""><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a></div></div><br class=""></div></div></div></div><br class="">_________________________________________________________________________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class=""><a href="http://www.freeswitchsolutions.com/" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a><br class=""><a href="http://confluence.freeswitch.org/" target="_blank" class="">http://confluence.freeswitch.org</a><br class=""><a href="http://www.cluecon.com/" target="_blank" class="">http://www.cluecon.com</a><br class=""><br class="">FreeSWITCH-users mailing list<br class=""><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class=""><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a></div></div><br class=""></div></div></div></div><br class="">_________________________________________________________________________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" target="_blank" class="">consulting@freeswitch.org</a><br class=""><a href="http://www.freeswitchsolutions.com/" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a><br class=""><a href="http://confluence.freeswitch.org/" target="_blank" class="">http://confluence.freeswitch.org</a><br class=""><a href="http://www.cluecon.com/" target="_blank" class="">http://www.cluecon.com</a><br class=""><br class="">FreeSWITCH-users mailing list<br class=""><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class=""><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class=""><a href="http://www.freeswitch.org/" target="_blank" class="">http://www.freeswitch.org</a></div></div><br class=""></div></div></div></div><br class="">_________________________________________________________________________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""></div></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class=""><a href="http://www.freeswitchsolutions.com" class="">http://www.freeswitchsolutions.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></div><br class=""></div></div>_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></div><br class=""></div></body></html>