浏览代码

dialplan: export MI commands

- MI commands exported from mod_init
- MI API is now a library (lib/kmi), SR core does not call anymore
  register_mi_mod(...)
Daniel-Constantin Mierla 16 年之前
父节点
当前提交
0f229592a9
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      modules/dialplan/dialplan.c

+ 6 - 0
modules/dialplan/dialplan.c

@@ -118,6 +118,12 @@ struct module_exports exports= {
 
 static int mod_init(void)
 {
+	if(register_mi_mod(exports.name, mi_cmds)!=0)
+	{
+		LM_ERR("failed to register MI commands\n");
+		return -1;
+	}
+
 	dp_db_url.len = dp_db_url.s ? strlen(dp_db_url.s) : 0;
 	LM_DBG("db_url=%s/%d/%p\n", ZSW(dp_db_url.s), dp_db_url.len,dp_db_url.s);
 	dp_table_name.len   = strlen(dp_table_name.s);