<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="">Ah, ok. &nbsp;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. &nbsp;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). &nbsp;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. &nbsp;Depending on your requirements, that may be ok. &nbsp;(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. &nbsp;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><div class="">On Dec 1, 2015, at 10:47 AM, Avi Marcus &lt;<a href="mailto:avi@avimarcus.net" class="">avi@avimarcus.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think what&nbsp;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="">&lt;<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>&gt;</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?&nbsp; Or the proxy running on a multi-homed host that has two different IPs? &nbsp;(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.&nbsp; 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.&nbsp; 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 &lt;<a href="mailto:regis.freeswitch.org@tornad.net" target="_blank" class="">regis.freeswitch.org@tornad.net</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class="">What I need is to have &nbsp;a frontal proxy with same config available on 2 differents IPs.&nbsp;<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&nbsp;<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="">&lt;<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>&gt;</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).&nbsp; 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.&nbsp; 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 &lt;<a href="mailto:regis.freeswitch.org@tornad.net" target="_blank" class="">regis.freeswitch.org@tornad.net</a>&gt; 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="">&lt;<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>&gt;</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.&nbsp; 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 &lt;<a href="mailto:vipkilla@gmail.com" target="_blank" class="">vipkilla@gmail.com</a>&gt; 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="">&lt;<a href="mailto:dave@dchorton.com" target="_blank" class="">dave@dchorton.com</a>&gt;</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.&nbsp; 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="">
&nbsp; &nbsp;...<br class="">
&nbsp; &nbsp; req.proxy({<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;remainInDialog: false,<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;handleRedirects: true,<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;provisionalTimeout: '1s',<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;destination: targets<br class="">
&nbsp; &nbsp; }, function(err) {<br class="">
&nbsp; &nbsp; &nbsp; if( err ) {<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; console.error('Error proxying request: ', err) ;<br class="">
&nbsp; &nbsp; &nbsp; }<br class="">
&nbsp; &nbsp;}) ;<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="">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>