Update from cgr_supplier to cgr_route for Kamailio and Asterisk

This commit is contained in:
TeoV
2020-07-22 15:20:04 +03:00
committed by Dan Christian Bogos
parent e7ecc05c73
commit 648aa5f3c4
19 changed files with 75 additions and 72 deletions

View File

@@ -2,7 +2,7 @@
exten => _1XXX,1,NoOp()
same => n,Set(CGRMaxSessionTime=0); use it to disconnect automatically the call if CGRateS is not active
same => n,DumpChan()
same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_supplier=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*routes,*thresholds")
same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_route=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*routes,*thresholds")
same => n,Dial(PJSIP/${EXTEN},30,L(${CGRMaxSessionTime}))
same => n,Hangup()

View File

@@ -140,8 +140,8 @@ route[CGR_SESSIONAUTH_REPLY] {
json_get_field("$evapi(msg)", "MaxUsage", "$var(MaxUsage)");
$var(cgrMaxUsage) = $(var(MaxUsage){s.int});
json_get_field("$evapi(msg)", "Suppliers", "$var(cgrSuppliers)");
$var($var(cgrSuppliers)) = $(var(cgrSuppliers){s.rm,"});
json_get_field("$evapi(msg)", "Routes", "$var(cgrRoutes)");
$var($var(cgrRoutes)) = $(var(cgrRoutes){s.rm,"});
json_get_field("$evapi(msg)", "Error", "$var(cgrError)");
$var(cgrError) = $(var(cgrError){s.rm,"});

View File

@@ -225,8 +225,8 @@ route[CGRATES_SESSIONAUTH_REPLY] {
exit;
}
if $var(cgrSuppliers) != "" { # Enforce the supplier variable to the first one received from CGRateS, here more for demo purposes
$dlg_var(cgrSupplier) = $(var(cgrSuppliers){s.select,0,,});
if $var(cgrRoutes) != "" { # Enforce the route variable to the first one received from CGRateS, here more for demo purposes
$dlg_var(cgrRoutes) = $(var(cgrRoutes){s.select,0,,});
}
# user location service