I don't really agree with this assertion. You may as well go ahead and also criticize the lack of variables and such.<div><br></div><div>The original intent was to be a fast, scalable SIP router. Having runtime queries against your database didn't fit into that model. Not only that there were no variables. So there was no way to manipulate or otherwise really use the resultant data.</div>
<div><br></div><div>I agree that this stuffed into the AVP module seems odd, but given the AVP module gives the scripting language it's variable capabilities, it makes sense. </div><div><br></div><div>Before AVPs, you did routing based on module logic and there wasn't anyway to customize it without writing your own modules by hand. As much odd as the avpops module integrates arbitrary database interactions, I'm not sure how I'd change it rather than a typical kind of prepare / execute/ fetch kind of loop. But that isn't an efficient design for a real-time switch. I rather like how it is today.</div>
<div><br></div><div>My $0.02..</div><div>-Brett</div><div><br></div><div><br><div class="gmail_quote">On Tue, May 26, 2009 at 4:52 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Sure thing.<br>
<br>
Your question is a very good one. The difficulty of custom database<br>
interaction has always been something that struck me as a curious oddity<br>
about the OpenSER stack; it is one of the most obvious, most<br>
straightforward and commonly requested options and yet, until recently,<br>
one of the most obscure and difficult to perform.<br>
<br>
Hardly anyone uses SER/OpenSER/Kamailio/OpenSIPS without wanting to<br>
issue their own SQL queries for some application-specific purpose, yet<br>
before 'sqlops' there was no elegant and generally well-aired way of<br>
doing this. Sure, avpops has avp_db_query(), but this has always struck<br>
me as something that was almost more of a hack - an afterthought - since<br>
it does not otherwise especially relate to the central purpose of the<br>
module or the theory behind AVPs. I find it very ironic - yet wholly<br>
plausible - to think that avp_db_query() might amount to something of a<br>
historical accident.<br>
<br>
Its wealth of modules notwithstanding, this product is largely useless<br>
without the ability to interface with databases directly. I would have<br>
thought something like sqlops would have come along before now.<br>
<br>
Sharath wrote:<br>
<br>
> Thanks a lot for the quick answer. Let me try the avp_db_query. thanks<br>
> again Alex.<br>
<div class="im">><br>
> On Tue, May 26, 2009 at 2:46 PM, Alex Balashov<br>
> <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a> <mailto:<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>>> wrote:<br>
><br>
> No generic database operations module. But you can use<br>
> avp_db_query() from avpops, which is the traditional way to go for<br>
> this problem.<br>
><br>
> Sharath wrote:<br>
><br>
> hello,<br>
> Is there any module equivalent to sqlops of openser in opensips<br>
> ? Basically I want to run sql queries from proprietary tables<br>
> and use them in the route script file.<br>
><br>
> thank you<br>
> -Sharath<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
</div>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div class="im">> <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>
><br>
><br>
> --<br>
> Alex Balashov<br>
> Evariste Systems<br>
> Web : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
> Tel : (+1) (678) 954-0670<br>
> Direct : (+1) (678) 954-0671<br>
> Mobile : (+1) (678) 237-1775<br>
><br>
><br>
><br>
><br>
</div>> --<br>
> --Sharath<br>
><br>
><br>
><br>
> ==============================<br>
> Ping-pong & life are similar - both a quest for perfection.<br>
> ==============================<br>
<div><div></div><div class="h5"><br>
<br>
--<br>
Alex Balashov<br>
Evariste Systems<br>
Web : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
Tel : (+1) (678) 954-0670<br>
Direct : (+1) (678) 954-0671<br>
Mobile : (+1) (678) 237-1775<br>
<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>
</div></div></blockquote></div><br></div>