You give away too much. :P<div>-Brett</div><div><br><br><div class="gmail_quote">On Mon, Jun 21, 2010 at 9:22 AM, Brad Bendy <span dir="ltr"><<a href="mailto:brad.bendy@benganetworks.com">brad.bendy@benganetworks.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
String function would be nice, but with Brett's suggested work around I got it working, might even be faster then if we had string functions?<br>
<br>
I think as more people want to make custom LCR implementations and various things these type of functions will come up more im sure. I think with the addition of db_http this will start coming up more, I know myself and few others were even thinking of using that for a LCR base. We ended up making a custom memcached program to do all our LCR and return data to OpenSIPS which in turn is a CSV.<br>
<br>
All of the ones Brett listed im sure would great features to add!<br><font color="#888888">
<br>
-Brad</font><div><div></div><div class="h5"><br>
<br>
On Mon, 2010-06-21 at 08:26 -0500, Brett Nemeroff wrote:<br>
<blockquote type="CITE">
<font color="#000000">Bogdan,</font>
</blockquote>
<blockquote type="CITE">
<font color="#000000">Brad's AVP is a single AVP with CSV. He'd like to count the elements in the CSV.</font>
</blockquote>
<blockquote type="CITE">
<br>
<br>
</blockquote>
<blockquote type="CITE">
<font color="#000000">Some string array functions would be nice. :D</font>
</blockquote>
<blockquote type="CITE">
<font color="#000000">-Brett</font>
</blockquote>
<blockquote type="CITE">
<br>
<br>
</blockquote>
<blockquote type="CITE">
<br>
</blockquote>
<blockquote type="CITE">
<font color="#000000">On Mon, Jun 21, 2010 at 6:46 AM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> wrote:</font><br>
<blockquote>
<font color="#000000">Hi Brad,</font><br>
<br>
<font color="#000000">I guess you are looking for the set_count() function:</font><br>
<br>
<font color="#000000"><a href="http://www.opensips.org/html/docs/modules/1.6.x/cfgutils.html#id228574" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/cfgutils.html#id228574</a></font>
</blockquote>
</blockquote>
<blockquote type="CITE">
<blockquote>
<br>
<font color="#000000">Regards,</font><br>
<font color="#000000">Bogdan</font><br>
<br>
<br>
<font color="#000000">--</font><br>
<font color="#000000">Bogdan-Andrei Iancu</font><br>
<font color="#000000">OpenSIPS Bootcamp</font><br>
<font color="#000000">20 - 24 September 2010, Frankfurt, Germany</font><br>
<font color="#000000"><a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a></font><br>
<br>
<br>
<br>
<br>
</blockquote>
</blockquote>
<blockquote type="CITE">
<blockquote>
<br>
</blockquote>
</blockquote>
<blockquote type="CITE">
<blockquote>
<font color="#000000">Brad Bendy wrote:</font><br>
<font color="#000000">> Brett,</font><br>
<font color="#000000">></font><br>
<font color="#000000">> I figured as much, but I thought I would try anyways.</font><br>
<font color="#000000">></font><br>
<font color="#000000">> I think adding the "count" to the front the string is going to be</font><br>
<font color="#000000">> easiest method and use the select functions, much more simpler!</font><br>
<font color="#000000">></font><br>
<font color="#000000">> Thanks for the advice.</font><br>
<font color="#000000">></font><br>
<font color="#000000">> On Sat, 2010-06-19 at 20:41 -0500, Brett Nemeroff wrote:</font><br>
<font color="#000000">></font><br>
<font color="#000000">>> Brad,</font><br>
<font color="#000000">>> param.count is for URI parameters and can't be used for any old</font><br>
<font color="#000000">>> format. If your string was in URI param format, I think it would then</font><br>
<font color="#000000">>> work:</font><br>
<font color="#000000">>> <a href="http://www.opensips.org/Resources/DocsCoreTran16#toc36" target="_blank">http://www.opensips.org/Resources/DocsCoreTran16#toc36</a></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> I haven't used this transformation, but it appears you'd take the</font><br>
<font color="#000000">>> params off a URI and then use the transformations on the params</font><br>
<font color="#000000">>> themselves.</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> I think what I do to find out if I'm at the end is to use the "select'</font><br>
<font color="#000000">>> transformation and check the value of the return.</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> Alternatively, you *could* make the first element in your list the</font><br>
<font color="#000000">>> number of values to expect. Not sure if that's even an option in your</font><br>
<font color="#000000">>> case..</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> -Brett</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> On Sat, Jun 19, 2010 at 8:34 PM, Brad Bendy</font><br>
<font color="#000000">>> <<a href="mailto:brad.bendy@benganetworks.com" target="_blank">brad.bendy@benganetworks.com</a>> wrote:</font><br>
<font color="#000000">>> Hi list,</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> Ive got a AVP that gets a value from a memcached store, it's a</font><br>
<font color="#000000">>> set of</font><br>
<font color="#000000">>> integers separated by commas , ex: 4,34,1,10</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> Is there a way to return the number of entries? In this case</font><br>
<font color="#000000">>> id like to</font><br>
<font color="#000000">>> have a 4 returned.</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> I cannot get {param.count} to work, but im not sure if it</font><br>
<font color="#000000">>> works like</font><br>
<font color="#000000">>> this or maybe im just not using is right.</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> Thanks for any help or suggestions</font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> _______________________________________________</font><br>
<font color="#000000">>> Users mailing list</font><br>
<font color="#000000">>> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a></font><br>
<font color="#000000">>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>></font><br>
<font color="#000000">>> _______________________________________________</font><br>
<font color="#000000">>> Users mailing list</font><br>
<font color="#000000">>> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a></font><br>
<font color="#000000">>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></font><br>
<font color="#000000">>></font><br>
<font color="#000000">></font><br>
<font color="#000000">></font><br>
<font color="#000000">> _______________________________________________</font><br>
<font color="#000000">> Users mailing list</font><br>
<font color="#000000">> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a></font><br>
<font color="#000000">> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></font><br>
<font color="#000000">></font><br>
<font color="#000000">></font><br>
<br>
<br>
<font color="#000000">_______________________________________________</font><br>
<font color="#000000">Users mailing list</font><br>
<font color="#000000"><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a></font><br>
<font color="#000000"><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></font><br>
<br>
</blockquote>
</blockquote>
<blockquote type="CITE">
<br>
<br>
</blockquote>
<blockquote type="CITE">
<pre><font color="#000000">_______________________________________________</font>
<font color="#000000">Users mailing list</font>
<font color="#000000"><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a></font>
<font color="#000000"><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></font>
</pre>
</blockquote>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody><tr>
<td>
<br>
</td>
</tr>
</tbody></table>
</div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>