basitengr

Untitled

Nov 8th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.80 KB | None | 0 0
  1. Call from prepaid user 1001 to prepaid user 1002
  2. Problem statement: "MaxSessionTime":10800 is not reducing that means no deduction is being done in this call process..
  3. I made two test calls: ngrep trace is as below:
  4.  
  5. Call: 1
  6. #
  7. T 2017/11/04 05:16:13.839355 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
  8. 246:{"event":"CGR_AUTH_REQUEST",
  9. .."tr_index":"17438",
  10. .."tr_label":"2032004023",
  11. .."cgr_reqtype":"*prepaid",
  12. .."cgr_tenant":"cgrates.org",
  13. .."cgr_account":"1001",
  14. .."cgr_destination":"1002",
  15. .."cgr_setuptime":"1509772573",
  16. .."cgr_computelcr":"true"},
  17. ##
  18. T 2017/11/04 05:16:14.210410 127.0.0.1:60381 -> 127.0.0.1:8448 [AP]
  19. 143:{"Event":"CGR_AUTH_REPLY","TransactionIndex":17438,"TransactionLabel":2032004023,"MaxSessionTime":10800,"Suppliers":"suppl2,suppl1","Error":""},
  20. ##
  21. T 2017/11/04 05:16:22.133113 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
  22. 321:{"event":"CGR_CALL_START",
  23. .."callid":"0ca310918213e4ca5937b7bd7232e323@0:0:0:0:0:0:0:0",
  24. .."from_tag":"1aaf49aa",
  25. .."h_entry":"1002",
  26. .."h_id":"3681",
  27. .."cgr_reqtype":"*prepaid",
  28. .."cgr_tenant":"cgrates.org",
  29. .."cgr_account":"1001",
  30. .."cgr_destination":"1002",
  31. .."cgr_answertime":"1509772582",
  32. .."cgr_supplier":"suppl2"},
  33. ##
  34. T 2017/11/04 05:17:00.634062 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
  35. 335:{"event":"CGR_CALL_END",
  36. .."callid":"0ca310918213e4ca5937b7bd7232e323@0:0:0:0:0:0:0:0",
  37. .."from_tag":"1aaf49aa",
  38. .."cgr_reqtype":"*prepaid",
  39. .."cgr_tenant":"cgrates.org",
  40. .."cgr_account":"1001",
  41. .."cgr_destination":"1002",
  42. .."cgr_answertime":"1509772582",
  43. .."cgr_duration":"38",
  44. .."cgr_supplier":"suppl2",
  45. .."cgr_disconnectcause":"0"},
  46. #
  47.  
  48. Call: 2
  49. #
  50. T 2017/11/04 05:17:14.761692 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
  51. 245:{"event":"CGR_AUTH_REQUEST",
  52. .."tr_index":"26652",
  53. .."tr_label":"402081959",
  54. .."cgr_reqtype":"*prepaid",
  55. .."cgr_tenant":"cgrates.org",
  56. .."cgr_account":"1001",
  57. .."cgr_destination":"1002",
  58. .."cgr_setuptime":"1509772634",
  59. .."cgr_computelcr":"true"},
  60. ##
  61. T 2017/11/04 05:17:15.013786 127.0.0.1:60381 -> 127.0.0.1:8448 [AP]
  62. 142:{"Event":"CGR_AUTH_REPLY","TransactionIndex":26652,"TransactionLabel":402081959,"MaxSessionTime":10800,"Suppliers":"suppl2,suppl1","Error":""},
  63. ##
  64. T 2017/11/04 05:17:22.923802 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
  65. 321:{"event":"CGR_CALL_START",
  66. .."callid":"2d6a6ef78477969ee2344ec8ec37a81a@0:0:0:0:0:0:0:0",
  67. .."from_tag":"10ddda75",
  68. .."h_entry":"2024",
  69. .."h_id":"3187",
  70. .."cgr_reqtype":"*prepaid",
  71. .."cgr_tenant":"cgrates.org",
  72. .."cgr_account":"1001",
  73. .."cgr_destination":"1002",
  74. .."cgr_answertime":"1509772642",
  75. .."cgr_supplier":"suppl2"},
  76. ##
  77. T 2017/11/04 05:17:36.561046 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
  78. 335:{"event":"CGR_CALL_END",
  79. .."callid":"2d6a6ef78477969ee2344ec8ec37a81a@0:0:0:0:0:0:0:0",
  80. .."from_tag":"10ddda75",
  81. .."cgr_reqtype":"*prepaid",
  82. .."cgr_tenant":"cgrates.org",
  83. .."cgr_account":"1001",
  84. .."cgr_destination":"1002",
  85. .."cgr_answertime":"1509772642",
  86. .."cgr_duration":"14",
  87. .."cgr_supplier":"suppl2",
  88. .."cgr_disconnectcause":"0"},
  89. #
  90.  
  91. #exported CDRs:
  92.  
  93. a3794bf3cd3f1c6d718ab9317dc748773dae2622,*default,*voice,358e6f50243ef6c1a08183275885ebb2@0:0:0:0:0:0:0:0;89cf4708,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-03T23:10:46Z,2017-11-03T23:10:46Z,6,0.01
  94. a3794bf3cd3f1c6d718ab9317dc748773dae2622,derived_run1,*voice,358e6f50243ef6c1a08183275885ebb2@0:0:0:0:0:0:0:0;89cf4708,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-03T23:10:46Z,2017-11-03T23:10:46Z,6,0.3
  95. d759a2d98a60b24366565bc2e4c02b87ce3bb92e,*default,*voice,48aea6e47240d11f612369871cb33c5d@0:0:0:0:0:0:0:0;2155b5d3,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-03T23:13:47Z,2017-11-03T23:13:47Z,22,0.3
  96. d759a2d98a60b24366565bc2e4c02b87ce3bb92e,derived_run1,*voice,48aea6e47240d11f612369871cb33c5d@0:0:0:0:0:0:0:0;2155b5d3,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-03T23:13:47Z,2017-11-03T23:13:47Z,22,0.3
  97. 141547d0aba1122869b39d91dc91d14a49ce650d,*default,*voice,0ca310918213e4ca5937b7bd7232e323@0:0:0:0:0:0:0:0;1aaf49aa,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-04T05:16:22Z,2017-11-04T05:16:22Z,38,0.3
  98. 141547d0aba1122869b39d91dc91d14a49ce650d,derived_run1,*voice,0ca310918213e4ca5937b7bd7232e323@0:0:0:0:0:0:0:0;1aaf49aa,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-04T05:16:22Z,2017-11-04T05:16:22Z,38,0.3
  99. 7a1c4e6ea051eb6996ce231f34f538e53b2c2406,*default,*voice,2d6a6ef78477969ee2344ec8ec37a81a@0:0:0:0:0:0:0:0;10ddda75,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-04T05:17:22Z,2017-11-04T05:17:22Z,14,0.3
  100. 7a1c4e6ea051eb6996ce231f34f538e53b2c2406,derived_run1,*voice,2d6a6ef78477969ee2344ec8ec37a81a@0:0:0:0:0:0:0:0;10ddda75,*prepaid,*out,cgrates.org,call,1001,1001,1002,2017-11-04T05:17:22Z,2017-11-04T05:17:22Z,14,0.3
  101.  
  102. #Later for CDR stats:
  103. # cgr-console cdrstats_queueids
  104. [
  105.  "CDRST_1001",
  106.  "CDRST_1003",
  107.  "CDRST1",
  108.  "CDRST_1002",
  109.  "STATS_SUPPL1",
  110.  "STATS_SUPPL2"
  111. ]
  112.  
  113. For user 1001 CDR stats
  114. # cgr-console 'cdrstats_metrics StatsQueueId="CDRST_1001"'
  115. {
  116.  "ACC": -1,
  117.  "ACD": -1,
  118.  "ASR": -1
  119. }
  120.  
  121. and for Supplier2 CDR stats because it was involved in the call completion
  122. # cgr-console 'cdrstats_metrics StatsQueueId="STATS_SUPPL2"'
  123. {
  124.  "ACC": 0.26375,
  125.  "ACD": 20,
  126.  "ASR": 100,
  127.  "TCC": 2.11,
  128.  "TCD": 160
  129. }
  130.  
  131. #check why that last call was charged that way
  132. # cgr-console 'cost_details CgrID="7a1c4e6ea051eb6996ce231f34f538e53b2c2406" RunID="*default"'
  133. {
  134.  "Direction": "*out",
  135.  "Category": "call",
  136.  "Tenant": "cgrates.org",
  137.  "Subject": "1001",
  138.  "Account": "1001",
  139.  "Destination": "1002",
  140.  "TOR": "*voice",
  141.  "Cost": 0.3,
  142.  "Timespans": [
  143.   {
  144.    "TimeStart": "2017-11-04T05:17:22Z",
  145.    "TimeEnd": "2017-11-04T05:18:22Z",
  146.    "Cost": 0.1,
  147.    "RateInterval": {
  148.     "Timing": {
  149.      "Years": [],
  150.      "Months": [],
  151.      "MonthDays": [],
  152.      "WeekDays": [
  153.       6,
  154.       0
  155.      ],
  156.      "StartTime": "00:00:00",
  157.      "EndTime": ""
  158.     },
  159.     "Rating": {
  160.      "ConnectFee": 0.2,
  161.      "RoundingMethod": "*up",
  162.      "RoundingDecimals": 4,
  163.      "MaxCost": 0,
  164.      "MaxCostStrategy": "",
  165.      "Rates": [
  166.       {
  167.        "GroupIntervalStart": 0,
  168.        "Value": 0.1,
  169.        "RateIncrement": 60000000000,
  170.        "RateUnit": 60000000000
  171.       },
  172.       {
  173.        "GroupIntervalStart": 60000000000,
  174.        "Value": 0.05,
  175.        "RateIncrement": 1000000000,
  176.        "RateUnit": 60000000000
  177.       }
  178.      ]
  179.     },
  180.     "Weight": 10
  181.    },
  182.    "DurationIndex": 60000000000,
  183.    "Increments": [
  184.     {
  185.      "Duration": 60000000000,
  186.      "Cost": 0.1,
  187.      "BalanceInfo": {
  188.       "UnitBalanceUuid": "",
  189.       "MoneyBalanceUuid": "25a7d0d2-9910-4623-a48c-c38e3ade4c16",
  190.       "AccountId": "*out:cgrates.org:1001"
  191.      },
  192.      "BalanceRateInterval": null,
  193.      "UnitInfo": null,
  194.      "CompressFactor": 1
  195.     }
  196.    ],
  197.    "MatchedSubject": "*out:cgrates.org:call:1001",
  198.    "MatchedPrefix": "1002",
  199.    "MatchedDestId": "DST_1002",
  200.    "RatingPlanId": "RP_RETAIL2"
  201.   }
  202.  ]
  203. }
Add Comment
Please, Sign In to add comment