Db client
From Yate Documentation
javascript.conf
[general] scripts_dir=/your/dir/where/js/files/ .... [scripts] init=init.js
If you use MySql edit mysqldb.conf
[general] priority=100 [yate_my] host=localhost port=3306 database=database_name user=database_user password=yourpass123
If you use PostgreSql edit pgsqldb.conf
[general] priority=100 [yate_pg] host=localhost port=5432 database=database_name user=database_user password=yourpass123
init.js
#require "db_client.class.js"
// db_client('use account name', 'database module, default pgsql'); var db = new db_client('yate_my', 'mysql'); or var db = new db_client('yate_pg', 'pgsql');
db.query('INSERT INTO extension (extension,password) VALUES ($,$)', ['100','100']);