[Users] Database AVP

Klaus Darilion klaus.mailinglists at pernau.at
Wed May 10 10:43:24 CEST 2006


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






More information about the sr-users mailing list