Leon de Rooij
leon at scarlet-internet.nl
Thu Jun 18 02:48:48 PDT 2009
I'd like to generate user directory xml directly in FS to bypass http
+php (or other scripting language) entirely. So I started writing a
module to do just that. It's still rough - I don't code c very often -
but it works.
Currently all queries are statically defined in the module so users
cannot deviate from the sql schema. Bkw suggested to have a look at
mod_lcr which look really cool, though I'm not really sure yet how to
get the same behavior in this module.
The sql schema (without indexes for readability) currently looks like
In the module, I'm doing 7 queries:
Q1: Get domain_id and user_id
Q2: Get domain_params
Q3: Get domain_variables
Q4: Get user_attrs
Q5: Get user_params
Q6: Get user_variables
Q7: Get groups
Where Q2-Q6 should return a list of name/value pairs.
To make things more configurable by the user of the module, I could
place all queries in the configuration file, like this:
Do you think that would be acceptable ?
Then I'd remove all code that automatically generates tables (which
would make the code a lot cleaner and I won't need to find out how to
set auto_increment as it's different for each database).
Are there any other things I should think about ?
Do you think this module could be accepted in FS ? :-)
Thanks for the input !
More information about the Freeswitch-dev