mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 14:48:43 +05:00
Almost finish calls test
This commit is contained in:
committed by
Dan Christian Bogos
parent
6ba175dbec
commit
4a4303443d
@@ -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