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

@@ -1,6 +1,7 @@
#Tenant,ID,Contexts,FilterIDs,ActivationInterval,FieldName,Initial,Substitute,Append,Weight
cgrates.org,ATTR_1001_SIMPLEAUTH,simpleauth,*string:Account:1001,,Password,*any,CGRateS.org,true,20
cgrates.org,ATTR_1002_SIMPLEAUTH,simpleauth,*string:Account:1002,,Password,*any,CGRateS.org,true,20
cgrates.org,ATTR_1003_SIMPLEAUTH,simpleauth,*string:Account:1003,,Password,*any,CGRateS.org,true,20
cgrates.org,ATTR_1001_SESSIONAUTH,*sessions,*string:Account:1001,,Password,*any,CGRateS.org,true,10
cgrates.org,ATTR_1001_SESSIONAUTH,,,,RequestType,*any,*prepaid,true,
cgrates.org,ATTR_1001_SESSIONAUTH,,,,PaypalAccount,*any,cgrates@paypal.com,true,
1 #Tenant ID Contexts FilterIDs ActivationInterval FieldName Initial Substitute Append Weight
2 cgrates.org ATTR_1001_SIMPLEAUTH simpleauth *string:Account:1001 Password *any CGRateS.org true 20
3 cgrates.org ATTR_1002_SIMPLEAUTH simpleauth *string:Account:1002 Password *any CGRateS.org true 20
4 cgrates.org ATTR_1003_SIMPLEAUTH simpleauth *string:Account:1003 Password *any CGRateS.org true 20
5 cgrates.org ATTR_1001_SESSIONAUTH *sessions *string:Account:1001 Password *any CGRateS.org true 10
6 cgrates.org ATTR_1001_SESSIONAUTH RequestType *any *prepaid true
7 cgrates.org ATTR_1001_SESSIONAUTH PaypalAccount *any cgrates@paypal.com true

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