I just tested the save_memory() function and it works as I suspected.<br>
<br>
The only bug in my example is that save_memory() should be save_memory(&quot;location&quot;)<br>
<br>
Regards,<br>
Paul<br><br><div><span class="gmail_quote">On Apr 6, 2005 9:28 AM, <b class="gmail_sendername">AJ Grinnell</b> &lt;<a href="mailto:ajgrinnell@gmail.com">ajgrinnell@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That is exactly what I would need.<br><br>On Apr 6, 2005 9:05 AM, Java Rockx &lt;<a href="mailto:javarockx@gmail.com">javarockx@gmail.com</a>&gt; wrote:<br>&gt; Has anyone ever seen the save_memory() function in the registrar module?<br>&gt;<br>&gt;&nbsp;&nbsp;I'm wondering exactly what this does. Assuming I have two (2) SER servers<br>&gt; connected to the __same__ MySQL server, it seems like something like this<br>&gt; should be legal:<br>&gt;<br>&gt;&nbsp;&nbsp;listen=<a href="http://10.255.15.1">10.255.15.1</a><br>&gt;&nbsp;&nbsp;modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)<br>&gt;<br>&gt;&nbsp;&nbsp;route {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method==&quot;REGISTER&quot;) {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (src_ip==<a href="http://10.255.15.1">10.255.15.1</a>) {&nbsp;&nbsp;# ip of peer SER proxy<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;save_memory();<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;save(&quot;location&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t_replicate(&quot;<a href="http://10.255.15.2">10.255.15.2</a>&quot;,
5060);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br>&gt;&nbsp;&nbsp;}<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;What I don't know, however, is will <a href="http://10.255.15.2">10.255.15.2</a> attempt to write to the<br>&gt; location table.<br>&gt;<br>&gt;&nbsp;&nbsp;Does anyone know about this?<br>&gt;<br>&gt;&nbsp;&nbsp;Regards,<br>&gt;&nbsp;&nbsp;Paul<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Apr 6, 2005 1:55 AM, Greger V. Teigre &lt;<a href="mailto:greger@teigre.com">greger@teigre.com</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; You have a cluster and you want to do replication in SER?&nbsp;&nbsp;Do your SER<br>&gt; &gt; servers have one or several databases in mysql? You cannot do both<br>&gt; &gt; replication and have one DB.&nbsp;&nbsp;The problem of using a cluster is that SER<br>&gt; &gt; will write back everything to the database, but there is no &quot;refresh&quot; when<br>&gt; &gt; looking up a location, so you cannot be sure that SER B will pick up what<br>&gt; &gt; SER A stored.<br>&gt; &gt; g-)<br>&gt; &gt;<br>&gt; &gt; AJ Grinnell wrote:<br>&gt; &gt; &gt; So I can get replication working, but I constantly am getting errors<br>&gt; &gt; &gt; about receiving SERs usrloc not being able to insert into the<br>&gt; &gt; &gt; database. My guess is because the contact is already there by the<br>&gt; &gt; &gt; originating SER. I have a MySQL cluster that both SERs are using. My<br>&gt; &gt; &gt; question is this, how can I save the contact in the SER that is<br>&gt; &gt; &gt; receiving the contact, without SER trying to write the contact to the<br>&gt; &gt; &gt; DB?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; Serusers mailing list<br>&gt; &gt; &gt; <a href="mailto:Serusers@iptel.org">serusers@lists.iptel.org</a><br>&gt; &gt; &gt; <a href="http://mail.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a><br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Serusers mailing list<br>&gt; &gt; <a href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</a><br>&gt; &gt; <a href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a><br>&gt; &gt;<br>&gt;<br>&gt;<br></blockquote></div><br>