Hello,
On 03/07/16 18:25, Alexander Rudenko wrote:
Hi,
Question about future config-engines.
Will it be possible to use connectors/drivers via the engine script
and is it a good Idea?
E.g. I have specific database and python driver for that database. May
I use simple 'import dbdriver', create connection to the db, use it
inside python engine script, etc?
In general, in case there is no kamailio connector module for
scpecific database, I would use python connector.
yes, you should be able to
connect to any database or other backend from
the script written in an embedded language. Even now it should be
possible using the old type of executing embedded language scripts (e.g.
with app_lua/python/mono).
However, this doesn't mean that Kamailio C modules (such as usrloc,
auth_db) will be able to use the connection you open from the embedded
language script.
But if you look to do db queries in the script, fetch the result in that
script and pass variables to Kamailio exported functions, then yes, it
is possible.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com -
http://www.kamailio.org
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda