Kamevapi sample config for extra fields and enabling *suppliers

This commit is contained in:
DanB
2018-05-16 15:23:12 +02:00
parent 6e8a0235f1
commit c26d21ce40
4 changed files with 5 additions and 3 deletions

View File

@@ -81,7 +81,7 @@
"kamailio_agent": {
"enabled": true,
"evapi_conns":[ // instantiate connections to multiple Kamailio servers
{"address": "127.0.0.1:8448", "reconnects": 5}
{"address": "192.168.56.102:8448", "reconnects": 5}
],
"sessions_conns": [
{"address": "*internal"} // connection towards session service: <*internal>

View File

@@ -104,7 +104,7 @@ route[CGRATES_SESSIONAUTH_REQUEST] {
evapi_async_relay("{\"event\":\"CGR_AUTH_REQUEST\",
\"tr_index\":\"$T(id_index)\",
\"tr_label\":\"$T(id_label)\",
\"cgr_subsystems\":\"*attributes;*accounts\",
\"cgr_subsystems\":\"*attributes;*accounts;*suppliers\",
\"reply_route\":\"CGR_SESSIONAUTH_REPLY\",
\"Account\":\"$fU\",
\"Destination\":\"$rU\",
@@ -175,6 +175,7 @@ route[CGR_CALL_END] {
\"Account\":\"$dlg_var(cgrAccount)\",
\"Destination\":\"$dlg_var(cgrDestination)\",
\"AnswerTime\":\"$dlg(start_ts)\",
\"PaypalAccount\":\"$dlg_var(paypalAccount)\",
\"Usage\":\"$var(callDur)\"}");
}

View File

@@ -209,6 +209,7 @@ route[CGRATES_SESSIONAUTH_REPLY] {
$dlg_var(cgrReqType) = $avp(RequestType);
$dlg_var(cgrAccount) = $fU;
$dlg_var(cgrDestination) = $rU;
$dlg_var(paypalAccount) = $avp(PaypalAccount);
if $var(cgrMaxUsage) != -1 {
if $var(cgrMaxUsage) == 0 { // Not enough balance, do not allow the call to go through