Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Call from prepaid user 1001 to prepaid user 1002
- Problem statement: "MaxSessionTime":10800 is not reducing that means no deduction is being done in this call process..
- I made two test calls: ngrep trace is as below:
- Call: 1
- #
- T 2017/11/04 05:16:13.839355 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
- 246:{"event":"CGR_AUTH_REQUEST",
- .."tr_index":"17438",
- .."tr_label":"2032004023",
- .."cgr_reqtype":"*prepaid",
- .."cgr_tenant":"cgrates.org",
- .."cgr_account":"1001",
- .."cgr_destination":"1002",
- .."cgr_setuptime":"1509772573",
- .."cgr_computelcr":"true"},
- ##
- T 2017/11/04 05:16:14.210410 127.0.0.1:60381 -> 127.0.0.1:8448 [AP]
- 143:{"Event":"CGR_AUTH_REPLY","TransactionIndex":17438,"TransactionLabel":2032004023,"MaxSessionTime":10800,"Suppliers":"suppl2,suppl1","Error":""},
- ##
- T 2017/11/04 05:16:22.133113 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
- 321:{"event":"CGR_CALL_START",
- .."callid":"0ca310918213e4ca5937b7bd7232e323@0:0:0:0:0:0:0:0",
- .."from_tag":"1aaf49aa",
- .."h_entry":"1002",
- .."h_id":"3681",
- .."cgr_reqtype":"*prepaid",
- .."cgr_tenant":"cgrates.org",
- .."cgr_account":"1001",
- .."cgr_destination":"1002",
- .."cgr_answertime":"1509772582",
- .."cgr_supplier":"suppl2"},
- ##
- T 2017/11/04 05:17:00.634062 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
- 335:{"event":"CGR_CALL_END",
- .."callid":"0ca310918213e4ca5937b7bd7232e323@0:0:0:0:0:0:0:0",
- .."from_tag":"1aaf49aa",
- .."cgr_reqtype":"*prepaid",
- .."cgr_tenant":"cgrates.org",
- .."cgr_account":"1001",
- .."cgr_destination":"1002",
- .."cgr_answertime":"1509772582",
- .."cgr_duration":"38",
- .."cgr_supplier":"suppl2",
- .."cgr_disconnectcause":"0"},
- #
- Call: 2
- #
- T 2017/11/04 05:17:14.761692 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
- 245:{"event":"CGR_AUTH_REQUEST",
- .."tr_index":"26652",
- .."tr_label":"402081959",
- .."cgr_reqtype":"*prepaid",
- .."cgr_tenant":"cgrates.org",
- .."cgr_account":"1001",
- .."cgr_destination":"1002",
- .."cgr_setuptime":"1509772634",
- .."cgr_computelcr":"true"},
- ##
- T 2017/11/04 05:17:15.013786 127.0.0.1:60381 -> 127.0.0.1:8448 [AP]
- 142:{"Event":"CGR_AUTH_REPLY","TransactionIndex":26652,"TransactionLabel":402081959,"MaxSessionTime":10800,"Suppliers":"suppl2,suppl1","Error":""},
- ##
- T 2017/11/04 05:17:22.923802 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
- 321:{"event":"CGR_CALL_START",
- .."callid":"2d6a6ef78477969ee2344ec8ec37a81a@0:0:0:0:0:0:0:0",
- .."from_tag":"10ddda75",
- .."h_entry":"2024",
- .."h_id":"3187",
- .."cgr_reqtype":"*prepaid",
- .."cgr_tenant":"cgrates.org",
- .."cgr_account":"1001",
- .."cgr_destination":"1002",
- .."cgr_answertime":"1509772642",
- .."cgr_supplier":"suppl2"},
- ##
- T 2017/11/04 05:17:36.561046 127.0.0.1:8448 -> 127.0.0.1:60381 [AP]
- 335:{"event":"CGR_CALL_END",
- .."callid":"2d6a6ef78477969ee2344ec8ec37a81a@0:0:0:0:0:0:0:0",
- .."from_tag":"10ddda75",
- .."cgr_reqtype":"*prepaid",
- .."cgr_tenant":"cgrates.org",
- .."cgr_account":"1001",
- .."cgr_destination":"1002",
- .."cgr_answertime":"1509772642",
- .."cgr_duration":"14",
- .."cgr_supplier":"suppl2",
- .."cgr_disconnectcause":"0"},
- #
- #exported CDRs:
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- #Later for CDR stats:
- # cgr-console cdrstats_queueids
- [
- "CDRST_1001",
- "CDRST_1003",
- "CDRST1",
- "CDRST_1002",
- "STATS_SUPPL1",
- "STATS_SUPPL2"
- ]
- For user 1001 CDR stats
- # cgr-console 'cdrstats_metrics StatsQueueId="CDRST_1001"'
- {
- "ACC": -1,
- "ACD": -1,
- "ASR": -1
- }
- and for Supplier2 CDR stats because it was involved in the call completion
- # cgr-console 'cdrstats_metrics StatsQueueId="STATS_SUPPL2"'
- {
- "ACC": 0.26375,
- "ACD": 20,
- "ASR": 100,
- "TCC": 2.11,
- "TCD": 160
- }
- #check why that last call was charged that way
- # cgr-console 'cost_details CgrID="7a1c4e6ea051eb6996ce231f34f538e53b2c2406" RunID="*default"'
- {
- "Direction": "*out",
- "Category": "call",
- "Tenant": "cgrates.org",
- "Subject": "1001",
- "Account": "1001",
- "Destination": "1002",
- "TOR": "*voice",
- "Cost": 0.3,
- "Timespans": [
- {
- "TimeStart": "2017-11-04T05:17:22Z",
- "TimeEnd": "2017-11-04T05:18:22Z",
- "Cost": 0.1,
- "RateInterval": {
- "Timing": {
- "Years": [],
- "Months": [],
- "MonthDays": [],
- "WeekDays": [
- 6,
- 0
- ],
- "StartTime": "00:00:00",
- "EndTime": ""
- },
- "Rating": {
- "ConnectFee": 0.2,
- "RoundingMethod": "*up",
- "RoundingDecimals": 4,
- "MaxCost": 0,
- "MaxCostStrategy": "",
- "Rates": [
- {
- "GroupIntervalStart": 0,
- "Value": 0.1,
- "RateIncrement": 60000000000,
- "RateUnit": 60000000000
- },
- {
- "GroupIntervalStart": 60000000000,
- "Value": 0.05,
- "RateIncrement": 1000000000,
- "RateUnit": 60000000000
- }
- ]
- },
- "Weight": 10
- },
- "DurationIndex": 60000000000,
- "Increments": [
- {
- "Duration": 60000000000,
- "Cost": 0.1,
- "BalanceInfo": {
- "UnitBalanceUuid": "",
- "MoneyBalanceUuid": "25a7d0d2-9910-4623-a48c-c38e3ade4c16",
- "AccountId": "*out:cgrates.org:1001"
- },
- "BalanceRateInterval": null,
- "UnitInfo": null,
- "CompressFactor": 1
- }
- ],
- "MatchedSubject": "*out:cgrates.org:call:1001",
- "MatchedPrefix": "1002",
- "MatchedDestId": "DST_1002",
- "RatingPlanId": "RP_RETAIL2"
- }
- ]
- }
Add Comment
Please, Sign In to add comment