Hello,<br><br>it is up to you how you want it, could be better to do it if save() succeeds, for consistency, but then the replicated one may fail on the second server.<br><br>There is no drawback from kamailio instance point of view, in any of the cases.<br>
<br>Cheers,<br>Daniel<br><br><div class="gmail_quote">On Wed, Mar 7, 2012 at 3:48 PM, Asgaroth <span dir="ltr">&lt;<a href="mailto:00asgaroth00@gmail.com">00asgaroth00@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Guru&#39;s,<br>
<br>
I&#39;d just like some advice on t_replace and its placement in the routing script.<br>
<br>
A lot of examples show the following setup:<br>
<br>
save(&quot;location&quot;);<br>
t_replicate(&quot;backup_server&quot;);<br>
<br>
Would it not be wiser to have something like:<br>
<br>
if (save(&quot;location&quot;)) {<br>
  t_replcate(&quot;backup_server&quot;);<br>
}<br>
<br>
Would there be any scenario where you would want to t_replicate if save(&quot;location&quot;) fails for some reason? The configuration I refer to is if the location database is in memory. I suspect you may want to replicate all if location is going to db core in case of external failure. But would it matter on the placement if the location was in memory?<br>

<br>
Thanks<br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Daniel-Constantin Mierla<br>  <a href="http://www.asipto.com">http://www.asipto.com</a><br>