<div dir="ltr">Being a bit dense here - the documentation says to set modparams like...<br><br><div>modparam("usrloc|auth_db", "db_url", "text:///tmp/opensipsdb")</div><div><br></div><div>...if I'm using a separate table with our specific info rather than, say, usrloc - what am I putting in as the module name?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 13 Nov 2020 at 16:39, Maxim Sobolev <<a href="mailto:sobomax@sippysoft.com">sobomax@sippysoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Who doubted it?! I personally think db_text is absolutely brilliant, cuts devtesting effort 10x easily.<div dir="auto"><br></div><div dir="auto">-Max</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri., Nov. 13, 2020, 7:31 a.m. johan, <<a href="mailto:johan@democon.be" target="_blank">johan@democon.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>And so is the usefulness of db_text proven :-)<br>
</p>
<div>On 13/11/2020 16:06, Ovidiu Sas wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">Take a look at db_text and sql_cacher modules!</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards,</div>
<div dir="auto">Ovidiu Sas </div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Nov 13, 2020 at
09:50 Mark Allen <<a href="mailto:mark@allenclan.co.uk" rel="noreferrer" target="_blank">mark@allenclan.co.uk</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Just would like to consult the hive mind. I
want to read the contents of a multi-line text file to be
used by my OpenSIPS config. Ideally, I'll get a key:value
CSV pair from the file and store each pair in memcache -
e.g.
<div><br>
</div>
<div>file contains:</div>
<div><br>
</div>
<div>a, 113</div>
<div>b, 214</div>
<div>c, 771</div>
<div><br>
</div>
<div>read it in line by line and cache_store() with the
letter as the attribute and the number as the value.</div>
<div><br>
</div>
<div>I was thinking that I could use exec() to 'cat' the
contents of the file, storing stdout in an AVP, and then
work through that array splitting letter and number with
a string transformation ready for cache_store().
However, if I do this the full file contents are stored
as a single string in the first value with "#012" added
in place of the new lines. </div>
<div><br>
</div>
<div>Obviously, I can use a string transform s.select{}
using #012 as a delimiter in an intermediary step, but
am I just doing this the hard way? Is there a better way
to achieve this?</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" rel="noreferrer" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
</div>
-- <br>
<div dir="ltr">VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a></div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" rel="noreferrer" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" rel="noreferrer" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>