Can someone post/link to some examples of how to use avp module to write/read data to/from MySQL tables? The openser.org docs are reeeeealy bad.
Doug.
On 05/10/2006 01:38 AM, Douglas Garstang wrote:
Can someone post/link to some examples of how to use avp module to write/read data to/from MySQL tables?
maybe the new avp_db_query() is more straightforward, but it is only on development version.
http://openser.org/docs/modules/1.1.x/avpops.html#AEN268
The openser.org docs are reeeeealy bad.
Then try to improve them.
Daniel
Doug.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Douglas Garstang wrote:
Can someone post/link to some examples of how to use avp module to write/read data to/from MySQL tables? The openser.org docs are reeeeealy bad.
(old 1.0.0 AVP syntax)
The AVP alias cansipuri hold the canoncial SIP URI (after lookup("aliases"). We use this as uri identifier to laod from the DB.
We load the AVP from voicemail_extension in the alias AVP nums_id_extensions.
This fetches the voicemail extension for a certain user from DB.
# load voicemail extension for local destination avp_db_load("$cansipuri/uri","$nums_id_extension/voicemail_extension");
I did this long time ago, thus I can not remember each detail. regards klaus
SELECT * from voicemail_extension; username | domain | value | type |attribute ------------------+-----------------------+---------+------+----------- klaus.darilion | xxxx.at43.at | 1234567 | 2 | 105 john.public | xxxx.at43.at | 1234568 | 2 | 105