[OpenSIPS-Users] Sqlops in opensips ?

Brett Nemeroff brett at nemeroff.com
Wed May 27 00:32:57 CEST 2009


I don't really agree with this assertion. You may as well go ahead and
also criticize the lack of variables and such.
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.

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.

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.

My $0.02..
-Brett


On Tue, May 26, 2009 at 4:52 PM, Alex Balashov <abalashov at evaristesys.com>wrote:

> Sure thing.
>
> Your question is a very good one.  The difficulty of custom database
> interaction has always been something that struck me as a curious oddity
> about the OpenSER stack;  it is one of the most obvious, most
> straightforward and commonly requested options and yet, until recently,
> one of the most obscure and difficult to perform.
>
> Hardly anyone uses SER/OpenSER/Kamailio/OpenSIPS without wanting to
> issue their own SQL queries for some application-specific purpose, yet
> before 'sqlops' there was no elegant and generally well-aired way of
> doing this.  Sure, avpops has avp_db_query(), but this has always struck
> me as something that was almost more of a hack - an afterthought - since
> it does not otherwise especially relate to the central purpose of the
> module or the theory behind AVPs.  I find it very ironic - yet wholly
> plausible - to think that avp_db_query() might amount to something of a
> historical accident.
>
> Its wealth of modules notwithstanding, this product is largely useless
> without the ability to interface with databases directly.  I would have
> thought something like sqlops would have come along before now.
>
> Sharath wrote:
>
> > Thanks a lot for the quick answer. Let me try the avp_db_query. thanks
> > again Alex.
> >
> > On Tue, May 26, 2009 at 2:46 PM, Alex Balashov
> > <abalashov at evaristesys.com <mailto:abalashov at evaristesys.com>> wrote:
> >
> >     No generic database operations module.  But you can use
> >     avp_db_query() from avpops, which is the traditional way to go for
> >     this problem.
> >
> >     Sharath wrote:
> >
> >         hello,
> >         Is there any module equivalent to sqlops of openser in opensips
> >         ? Basically I want to run sql queries from proprietary tables
> >         and use them in the route script file.
> >
> >         thank you
> >         -Sharath
> >
> >
> >
> ------------------------------------------------------------------------
> >
> >         _______________________________________________
> >         Users mailing list
> >         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> >         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> >
> >     --
> >     Alex Balashov
> >     Evariste Systems
> >     Web    : http://www.evaristesys.com/
> >     Tel    : (+1) (678) 954-0670
> >     Direct : (+1) (678) 954-0671
> >     Mobile : (+1) (678) 237-1775
> >
> >
> >
> >
> > --
> > --Sharath
> >
> >
> >
> > ==============================
> > Ping-pong & life are similar - both a quest for perfection.
> > ==============================
>
>
> --
> Alex Balashov
> Evariste Systems
> Web    : http://www.evaristesys.com/
> Tel    : (+1) (678) 954-0670
> Direct : (+1) (678) 954-0671
> Mobile : (+1) (678) 237-1775
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090526/7586a699/attachment.htm 


More information about the Users mailing list