mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 23:58:44 +05:00
Almost finish calls test
This commit is contained in:
committed by
Dan Christian Bogos
parent
6ba175dbec
commit
4a4303443d
@@ -25,22 +25,29 @@
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": [
|
||||
{"address": "*internal"}
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"stats_conns": [
|
||||
{"address": "*internal"}
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"pubsubs_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"attributes_conns": [
|
||||
{"address": "*internal"}
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"sessions_conns": [
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"stats_conns": [
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"sessions_cost_retries": 5,
|
||||
},
|
||||
|
||||
|
||||
@@ -62,6 +69,12 @@
|
||||
"attributes_conns": [
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"stats_conns": [
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"thresholds_conns": [
|
||||
{"address": "127.0.0.1:2012", "transport": "*json"}
|
||||
],
|
||||
"debit_interval": "10s",
|
||||
},
|
||||
|
||||
@@ -73,6 +86,7 @@
|
||||
|
||||
"attributes": {
|
||||
"enabled": true,
|
||||
"string_indexed_fields": ["Account"],
|
||||
},
|
||||
|
||||
|
||||
@@ -81,6 +95,8 @@
|
||||
"thresholds_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"string_indexed_fields": ["Account"],
|
||||
"prefix_indexed_fields": ["Destination"],
|
||||
},
|
||||
|
||||
|
||||
@@ -89,11 +105,13 @@
|
||||
"thresholds_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"string_indexed_fields": ["Account"],
|
||||
},
|
||||
|
||||
|
||||
"thresholds": {
|
||||
"enabled": true,
|
||||
"string_indexed_fields": ["Account"],
|
||||
},
|
||||
|
||||
|
||||
@@ -108,6 +126,8 @@
|
||||
"stats_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"string_indexed_fields": ["Account"],
|
||||
"prefix_indexed_fields": ["Destination"],
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,10 @@ children=4
|
||||
|
||||
auto_aliases=no
|
||||
|
||||
listen=udp:192.168.56.203:5060 ### CUSTOMIZE ME
|
||||
listen=udp:eth0:5060
|
||||
listen=udp:127.0.0.1:5080
|
||||
listen=udp:127.0.0.1:5060
|
||||
listen=udp:eth0:5080
|
||||
|
||||
|
||||
|
||||
@@ -200,18 +203,26 @@ route{
|
||||
}
|
||||
|
||||
# check auth with CGRateS
|
||||
if (!async(cgrates_auth("$fU", "$rU"), resume_cgr_auth)) {
|
||||
sl_send_reply("503", "Service Unavailable");
|
||||
exit;
|
||||
}
|
||||
$cgr_opt(GetMaxUsage) = 1; # also retrieve the max usage
|
||||
$cgr_opt(GetAttributes) = 1;
|
||||
$cgr_opt(GetSuppliers) = 1;
|
||||
$cgr_opt(AuthorizeResources) = 1;
|
||||
$cgr_opt(ProcessThresholds) = 1;
|
||||
$cgr_opt(ProcessStatQueues) = 1;
|
||||
$cgr(RequestType) = "*prepaid";
|
||||
|
||||
if (!async(cgrates_auth("$fU", "$rU"), resume_cgr_auth)) {
|
||||
sl_send_reply("503", "Service Unavailable");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
route [resume_cgr_auth] {
|
||||
if ($rc < 0) {
|
||||
xlog("Call not authorized: code=$cgrret!\n");
|
||||
send_reply("403", "Forbidden");
|
||||
exit;
|
||||
}
|
||||
if ($rc == 0) {
|
||||
xlog("Call not authorized: code=$cgrret!\n");
|
||||
send_reply("403", "Forbidden");
|
||||
exit;
|
||||
}
|
||||
$var(idx) = 0;
|
||||
while ($(cgr_ret(AttributesDigest){s.select,$var(idx),,}) != NULL) {
|
||||
$avp($(cgr_ret(AttributesDigest){s.select,$var(idx),,}{s.select,0,:}))
|
||||
|
||||
Reference in New Issue
Block a user