Ich versuche das Kamailio-Wählplanmodul mit mongodb als Backend einzurichten. Die Konfiguration funktionierte mit mysql als Backend, und die anderen Module, die ich benutze (Subscriber, Location), funktionieren jetzt gut mit mongodb.Verwenden Sie das Kamailio-Wählplanmodul mit mongodb
Die entsprechende Konfiguration in kamailio.cfg:
#!define DBURL "mongodb://localhost/kamailio"
loadmodule "dialplan.so"
modparam("dialplan", "db_url", DBURL)
Und in der Hauptroute ich benutze:
if (dp_translate("100")) {
xlog("dialplan: translation succeeded\n");
}
else {
xlog("dialplan: translation failed\n");
}
In mongodb, ich habe:
> db.getCollection("version").find({"table_name":"dialplan"})
{ "_id" : ObjectId("589de6af3d305445959b19d9"), "table_name" : "dialplan", "table_version" : 2 }
> db.dialplan.find()
{ "_id" : ObjectId("589dec2f3d305445959b19db"), "dpid" : 100, "pr" : 50, "match_op" : 1, "match_exp" : "^003$", "match_len" : 0, "subst_exp" : "^003$", "repl_exp" : "11111", "attrs" : "abc" }
Aber das Modul versäumt es, dies anzuwenden. Zum Beispiel:
$kamcmd dialplan.dump 100
error: 500 - Dialplan ID not matched
Was mache ich falsch?