Add sync session for kamailio

This commit is contained in:
TeoV
2018-06-20 10:10:09 -04:00
committed by Dan Christian Bogos
parent fd14eb6b93
commit cea2bbc3c3
8 changed files with 131 additions and 36 deletions

View File

@@ -74,7 +74,8 @@
"thresholds_conns": [
{"address": "127.0.0.1:2012", "transport": "*json"}
],
"debit_interval": "10s",
"debit_interval": "5s",
"channel_sync_interval":"7s",
},

View File

@@ -55,6 +55,16 @@ route[CGR_SESSION_DISCONNECT] {
#$jsonrpl($var(reply));
}
route[CGR_DLG_LIST] {
if $sht(cgrconn=>cgr) == $null {
sl_send_reply("503","Charging controller unreachable");
exit;
}
jsonrpc_exec('{"jsonrpc":"2.0","id":1, "method":"dlg.list","params":[]}');
evapi_relay("{\"event\":\"CGR_DLG_LIST_REPLY\",
\"jsonrpl_body\":$jsonrpl(body)}");
}
# Route to mainly query account password from CGRateS
route[CGRATES_SIMPLEAUTH_REQUEST] {

View File

@@ -15,6 +15,11 @@
debug=2
log_stderror=no
listen=udp:eth0:5060
listen=udp:127.0.0.1:5080
listen=udp:127.0.0.1:5060
listen=udp:eth0:5080
memdbg=5
memlog=5
log_facility=LOG_LOCAL0