Skip to content

Instantly share code, notes, and snippets.

@750
Created January 7, 2025 15:16
Show Gist options
  • Save 750/38f6e7753239f7d4ab99564a2364a1ea to your computer and use it in GitHub Desktop.
Save 750/38f6e7753239f7d4ab99564a2364a1ea to your computer and use it in GitHub Desktop.
{
"id": "2489654215",
"type": "IssueCommentEvent",
"actor": {
"id": 1806092,
"login": "cgrates",
"gravatar_id": "",
"url": "https://api.github.com/users/cgrates",
"avatar_url": "https://avatars.githubusercontent.com/u/1806092?"
},
"repo": {
"id": 3254877,
"name": "cgrates/cgrates",
"url": "https://api.github.com/repos/cgrates/cgrates"
},
"payload": {
"action": "created",
"issue": {
"url": "https://api.github.com/repos/cgrates/cgrates/issues/33",
"labels_url": "https://api.github.com/repos/cgrates/cgrates/issues/33/labels{/name}",
"comments_url": "https://api.github.com/repos/cgrates/cgrates/issues/33/comments",
"events_url": "https://api.github.com/repos/cgrates/cgrates/issues/33/events",
"html_url": "https://github.com/cgrates/cgrates/issues/33",
"id": 53185513,
"number": 33,
"title": "Dropped calls when rate_increment and group_interval_start set to 6",
"user": {
"login": "ewsamuels",
"id": 5496519,
"avatar_url": "https://avatars.githubusercontent.com/u/5496519?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/ewsamuels",
"html_url": "https://github.com/ewsamuels",
"followers_url": "https://api.github.com/users/ewsamuels/followers",
"following_url": "https://api.github.com/users/ewsamuels/following{/other_user}",
"gists_url": "https://api.github.com/users/ewsamuels/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ewsamuels/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ewsamuels/subscriptions",
"organizations_url": "https://api.github.com/users/ewsamuels/orgs",
"repos_url": "https://api.github.com/users/ewsamuels/repos",
"events_url": "https://api.github.com/users/ewsamuels/events{/privacy}",
"received_events_url": "https://api.github.com/users/ewsamuels/received_events",
"type": "User",
"site_admin": false
},
"labels": [],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 1,
"created_at": "2014-12-31T14:13:23Z",
"updated_at": "2015-01-01T15:06:50Z",
"closed_at": null,
"body": "Hello,\r\n\r\nI uploaded my A-Z rates and I was able to make calls to any international destination that I called however I noticed that whenever I made a call to the USA the call would drop as soon as it was answered. \r\n\r\nThere were no errors in the Freeswitch or CGRates logs but what I did realize was that all the international destinations I was calling the rate_increment and group_interval_start were both set to 1 whereas for the USA both the rate_increment and group_interval_start were both set to 6. \r\n\r\nI set both the rate_increment and group_interval_start were both set to 1 and was able to make calls to the USA then I set them back to 6 and the calls dropped again. \r\n\r\n#### GET CALL COST with rate_increment and group_interval_start set to 6\r\n cgr-console 'cost Direction=\"*out\" Category=\"call\" Tenant=\"sbc.mydomain.com\" Subject=\"2651797610\" Account=\"2651797610\" Destination=\"19173001321\" TimeStart=\"2014-12-31T14:00:00Z\" TimeEnd=\"2014-12-31T14:05:00Z\"'\r\n{\r\n \"Direction\": \"*out\",\r\n \"Category\": \"call\",\r\n \"Tenant\": \"sbc.mydomain.com\",\r\n \"Subject\": \"322181565\",\r\n \"Account\": \"322181565\",\r\n \"Destination\": \"19123001321\",\r\n \"TOR\": \"*voice\",\r\n \"Cost\": 6e+09,\r\n \"Timespans\": [\r\n {\r\n \"TimeStart\": \"2014-12-31T14:00:00Z\",\r\n \"TimeEnd\": \"2014-12-31T14:00:06Z\",\r\n \"Cost\": 6e+09,\r\n \"RateInterval\": {\r\n \"Timing\": {\r\n \"Years\": [],\r\n \"Months\": [],\r\n \"MonthDays\": [],\r\n \"WeekDays\": [],\r\n \"StartTime\": \"00:00:00\",\r\n \"EndTime\": \"\"\r\n },\r\n \"Rating\": {\r\n \"ConnectFee\": 0,\r\n \"RoundingMethod\": \"*middle\",\r\n \"RoundingDecimals\": 5,\r\n \"Rates\": [\r\n {\r\n \"GroupIntervalStart\": 6000000000,\r\n \"Value\": 0,\r\n \"RateIncrement\": 6000000000,\r\n \"RateUnit\": 60000000000\r\n }\r\n ]\r\n },\r\n \"Weight\": 10\r\n },\r\n \"DurationIndex\": 6000000000,\r\n \"Increments\": null,\r\n \"MatchedSubject\": \"*out:sbc.mydomain.com:call:*any\",\r\n \"MatchedPrefix\": \"1912\",\r\n \"MatchedDestId\": \"United_States\"\r\n },\r\n {\r\n \"TimeStart\": \"2014-12-31T14:00:06Z\",\r\n \"TimeEnd\": \"2014-12-31T14:05:00Z\",\r\n \"Cost\": 0,\r\n \"RateInterval\": {\r\n \"Timing\": {\r\n \"Years\": [],\r\n \"Months\": [],\r\n \"MonthDays\": [],\r\n \"WeekDays\": [],\r\n \"StartTime\": \"00:00:00\",\r\n \"EndTime\": \"\"\r\n },\r\n \"Rating\": {\r\n \"ConnectFee\": 0,\r\n \"RoundingMethod\": \"*middle\",\r\n \"RoundingDecimals\": 5,\r\n \"Rates\": [\r\n {\r\n \"GroupIntervalStart\": 6000000000,\r\n \"Value\": 0,\r\n \"RateIncrement\": 6000000000,\r\n \"RateUnit\": 60000000000\r\n }\r\n ]\r\n },\r\n \"Weight\": 10\r\n },\r\n \"DurationIndex\": 300000000000,\r\n \"Increments\": null,\r\n \"MatchedSubject\": \"*out:sbc.mydomain.com:call:*any\",\r\n \"MatchedPrefix\": \"1912\",\r\n \"MatchedDestId\": \"United_States\"\r\n }\r\n ]\r\n}\r\n#### GET CALL COST with rate_increment and group_interval_start set to 1\r\nroot@sbc:~# cgr-console 'cost Direction=\"*out\" Category=\"call\" Tenant=\"sbc.mydomain.com\" Subject=\"322181565\" Account=\"322181565\" Destination=\"19123001321\" TimeStart=\"2014-12-31T14:00:00Z\" TimeEnd=\"2014-12-31T14:05:00Z\"'\r\n{\r\n \"Direction\": \"*out\",\r\n \"Category\": \"call\",\r\n \"Tenant\": \"sbc.mydomain.com\",\r\n \"Subject\": \"322181565\",\r\n \"Account\": \"322181565\",\r\n \"Destination\": \"19123001321\",\r\n \"TOR\": \"*voice\",\r\n \"Cost\": 1e+09,\r\n \"Timespans\": [\r\n {\r\n \"TimeStart\": \"2014-12-31T14:00:00Z\",\r\n \"TimeEnd\": \"2014-12-31T14:00:01Z\",\r\n \"Cost\": 1e+09,\r\n \"RateInterval\": {\r\n \"Timing\": {\r\n \"Years\": [],\r\n \"Months\": [],\r\n \"MonthDays\": [],\r\n \"WeekDays\": [],\r\n \"StartTime\": \"00:00:00\",\r\n \"EndTime\": \"\"\r\n },\r\n \"Rating\": {\r\n \"ConnectFee\": 0,\r\n \"RoundingMethod\": \"*middle\",\r\n \"RoundingDecimals\": 5,\r\n \"Rates\": [\r\n {\r\n \"GroupIntervalStart\": 1000000000,\r\n \"Value\": 0,\r\n \"RateIncrement\": 1000000000,\r\n \"RateUnit\": 60000000000\r\n }\r\n ]\r\n },\r\n \"Weight\": 10\r\n },\r\n \"DurationIndex\": 1000000000,\r\n \"Increments\": null,\r\n \"MatchedSubject\": \"*out:sbc.mydomain.com:call:*any\",\r\n \"MatchedPrefix\": \"1912\",\r\n \"MatchedDestId\": \"United_States\"\r\n },\r\n {\r\n \"TimeStart\": \"2014-12-31T14:00:01Z\",\r\n \"TimeEnd\": \"2014-12-31T14:05:00Z\",\r\n \"Cost\": 0,\r\n \"RateInterval\": {\r\n \"Timing\": {\r\n \"Years\": [],\r\n \"Months\": [],\r\n \"MonthDays\": [],\r\n \"WeekDays\": [],\r\n \"StartTime\": \"00:00:00\",\r\n \"EndTime\": \"\"\r\n },\r\n \"Rating\": {\r\n \"ConnectFee\": 0,\r\n \"RoundingMethod\": \"*middle\",\r\n \"RoundingDecimals\": 5,\r\n \"Rates\": [\r\n {\r\n \"GroupIntervalStart\": 1000000000,\r\n \"Value\": 0,\r\n \"RateIncrement\": 1000000000,\r\n \"RateUnit\": 60000000000\r\n }\r\n ]\r\n },\r\n \"Weight\": 10\r\n },\r\n \"DurationIndex\": 300000000000,\r\n \"Increments\": null,\r\n \"MatchedSubject\": \"*out:sbc.mydomain.com:call:*any\",\r\n \"MatchedPrefix\": \"1912\",\r\n \"MatchedDestId\": \"United_States\"\r\n }\r\n ]\r\n}\r\n![tp_rates](https://cloud.githubusercontent.com/assets/5496519/5588044/dce73c9c-90f5-11e4-8eee-fb63667db4b8.png)\r\n\r\n![tp_rating_plan](https://cloud.githubusercontent.com/assets/5496519/5588055/2ae49fb6-90f6-11e4-9801-4a9b85b2807d.png)\r\n\r\n![tp_rating_profile](https://cloud.githubusercontent.com/assets/5496519/5588062/821cb2d2-90f6-11e4-81c8-e0ad30d3a325.png)\r\n\r\nI trust someone would be able to make some sense from this.\r\n\r\nHappy New Year to ALL!\r\n\r\nregards,\r\n\r\nErrol\r\n\r\n\r\n"
},
"comment": {
"url": "https://api.github.com/repos/cgrates/cgrates/issues/comments/68488612",
"html_url": "https://github.com/cgrates/cgrates/issues/33#issuecomment-68488612",
"issue_url": "https://api.github.com/repos/cgrates/cgrates/issues/33",
"id": 68488612,
"user": {
"login": "cgrates",
"id": 1806092,
"avatar_url": "https://avatars.githubusercontent.com/u/1806092?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/cgrates",
"html_url": "https://github.com/cgrates",
"followers_url": "https://api.github.com/users/cgrates/followers",
"following_url": "https://api.github.com/users/cgrates/following{/other_user}",
"gists_url": "https://api.github.com/users/cgrates/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cgrates/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cgrates/subscriptions",
"organizations_url": "https://api.github.com/users/cgrates/orgs",
"repos_url": "https://api.github.com/users/cgrates/repos",
"events_url": "https://api.github.com/users/cgrates/events{/privacy}",
"received_events_url": "https://api.github.com/users/cgrates/received_events",
"type": "User",
"site_admin": false
},
"created_at": "2015-01-01T15:06:50Z",
"updated_at": "2015-01-01T15:06:50Z",
"body": "Hi Errol,\n\nHappy New Year to you too!\n\nThe reason you get session disconnect is due to tariff plan error you \nhave inserted in your Rates.csv. If you set GroupIntervalStart to 6 the \nrater will not have a rate for the beginning of the interval (1-6) hence \ndropping the call. If you want to have the first 6 seconds of a call \nfree, you need to still define a GroupIntervalStart 0 with a \ncorresponding rate of 0. If you want to charge all but in increments of \n6 seconds, you need to define GroupIntervalStart to 0 and RateIncrement \nto 6.\n\nLet me know if clear enough.\n\nDanB\n\nOn 31.12.2014 16:13, ewsamuels wrote:\n>\n> Hello,\n>\n> I uploaded my A-Z rates and I was able to make calls to any \n> international destination that I called however I noticed that \n> whenever I made a call to the USA the call would drop as soon as it \n> was answered.\n>\n> There were no errors in the Freeswitch or CGRates logs but what I did \n> realize was that all the international destinations I was calling the \n> rate_increment and group_interval_start were both set to 1 whereas for \n> the USA both the rate_increment and group_interval_start were both set \n> to 6.\n>\n> I set both the rate_increment and group_interval_start were both set \n> to 1 and was able to make calls to the USA then I set them back to 6 \n> and the calls dropped again.\n>\n>\n> GET CALL COST with rate_increment and group_interval_start set\n> to 6\n>\n> cgr-console 'cost Direction=\"/out\" Category=\"call\" \n> Tenant=\"sbc.mydomain.com\" Subject=\"2651797610\" Account=\"2651797610\" \n> Destination=\"19173001321\" TimeStart=\"2014-12-31T14:00:00Z\" \n> TimeEnd=\"2014-12-31T14:05:00Z\"'\n> {\n> \"Direction\": \"/out\",\n> \"Category\": \"call\",\n> \"Tenant\": \"sbc.mydomain.com\",\n> \"Subject\": \"322181565\",\n> \"Account\": \"322181565\",\n> \"Destination\": \"19123001321\",\n> \"TOR\": \"/voice\",\n> \"Cost\": 6e+09,\n> \"Timespans\": [\n> {\n> \"TimeStart\": \"2014-12-31T14:00:00Z\",\n> \"TimeEnd\": \"2014-12-31T14:00:06Z\",\n> \"Cost\": 6e+09,\n> \"RateInterval\": {\n> \"Timing\": {\n> \"Years\": [],\n> \"Months\": [],\n> \"MonthDays\": [],\n> \"WeekDays\": [],\n> \"StartTime\": \"00:00:00\",\n> \"EndTime\": \"\"\n> },\n> \"Rating\": {\n> \"ConnectFee\": 0,\n> \"RoundingMethod\": \"/middle\",\n> \"RoundingDecimals\": 5,\n> \"Rates\": [\n> {\n> \"GroupIntervalStart\": 6000000000,\n> \"Value\": 0,\n> \"RateIncrement\": 6000000000,\n> \"RateUnit\": 60000000000\n> }\n> ]\n> },\n> \"Weight\": 10\n> },\n> \"DurationIndex\": 6000000000,\n> \"Increments\": null,\n> \"MatchedSubject\": \"/out:sbc.mydomain.com:call:/any\",\n> \"MatchedPrefix\": \"1912\",\n> \"MatchedDestId\": \"United_States\"\n> },\n> {\n> \"TimeStart\": \"2014-12-31T14:00:06Z\",\n> \"TimeEnd\": \"2014-12-31T14:05:00Z\",\n> \"Cost\": 0,\n> \"RateInterval\": {\n> \"Timing\": {\n> \"Years\": [],\n> \"Months\": [],\n> \"MonthDays\": [],\n> \"WeekDays\": [],\n> \"StartTime\": \"00:00:00\",\n> \"EndTime\": \"\"\n> },\n> \"Rating\": {\n> \"ConnectFee\": 0,\n> \"RoundingMethod\": \"/middle\",\n> \"RoundingDecimals\": 5,\n> \"Rates\": [\n> {\n> \"GroupIntervalStart\": 6000000000,\n> \"Value\": 0,\n> \"RateIncrement\": 6000000000,\n> \"RateUnit\": 60000000000\n> }\n> ]\n> },\n> \"Weight\": 10\n> },\n> \"DurationIndex\": 300000000000,\n> \"Increments\": null,\n> \"MatchedSubject\": \"/out:sbc.mydomain.com:call:*any\",\n> \"MatchedPrefix\": \"1912\",\n> \"MatchedDestId\": \"United_States\"\n> }\n> ]\n> }\n>\n>\n> GET CALL COST with rate_increment and group_interval_start set\n> to 1\n>\n> root@sbc:~# cgr-console 'cost Direction=\"/out\" Category=\"call\" \n> Tenant=\"sbc.mydomain.com\" Subject=\"322181565\" Account=\"322181565\" \n> Destination=\"19123001321\" TimeStart=\"2014-12-31T14:00:00Z\" \n> TimeEnd=\"2014-12-31T14:05:00Z\"'\n> {\n> \"Direction\": \"/out\",\n> \"Category\": \"call\",\n> \"Tenant\": \"sbc.mydomain.com\",\n> \"Subject\": \"322181565\",\n> \"Account\": \"322181565\",\n> \"Destination\": \"19123001321\",\n> \"TOR\": \"/voice\",\n> \"Cost\": 1e+09,\n> \"Timespans\": [\n> {\n> \"TimeStart\": \"2014-12-31T14:00:00Z\",\n> \"TimeEnd\": \"2014-12-31T14:00:01Z\",\n> \"Cost\": 1e+09,\n> \"RateInterval\": {\n> \"Timing\": {\n> \"Years\": [],\n> \"Months\": [],\n> \"MonthDays\": [],\n> \"WeekDays\": [],\n> \"StartTime\": \"00:00:00\",\n> \"EndTime\": \"\"\n> },\n> \"Rating\": {\n> \"ConnectFee\": 0,\n> \"RoundingMethod\": \"/middle\",\n> \"RoundingDecimals\": 5,\n> \"Rates\": [\n> {\n> \"GroupIntervalStart\": 1000000000,\n> \"Value\": 0,\n> \"RateIncrement\": 1000000000,\n> \"RateUnit\": 60000000000\n> }\n> ]\n> },\n> \"Weight\": 10\n> },\n> \"DurationIndex\": 1000000000,\n> \"Increments\": null,\n> \"MatchedSubject\": \"/out:sbc.mydomain.com:call:/any\",\n> \"MatchedPrefix\": \"1912\",\n> \"MatchedDestId\": \"United_States\"\n> },\n> {\n> \"TimeStart\": \"2014-12-31T14:00:01Z\",\n> \"TimeEnd\": \"2014-12-31T14:05:00Z\",\n> \"Cost\": 0,\n> \"RateInterval\": {\n> \"Timing\": {\n> \"Years\": [],\n> \"Months\": [],\n> \"MonthDays\": [],\n> \"WeekDays\": [],\n> \"StartTime\": \"00:00:00\",\n> \"EndTime\": \"\"\n> },\n> \"Rating\": {\n> \"ConnectFee\": 0,\n> \"RoundingMethod\": \"/middle\",\n> \"RoundingDecimals\": 5,\n> \"Rates\": [\n> {\n> \"GroupIntervalStart\": 1000000000,\n> \"Value\": 0,\n> \"RateIncrement\": 1000000000,\n> \"RateUnit\": 60000000000\n> }\n> ]\n> },\n> \"Weight\": 10\n> },\n> \"DurationIndex\": 300000000000,\n> \"Increments\": null,\n> \"MatchedSubject\": \"/out:sbc.mydomain.com:call:*any\",\n> \"MatchedPrefix\": \"1912\",\n> \"MatchedDestId\": \"United_States\"\n> }\n> ]\n> }\n> tp_rates \n> <https://cloud.githubusercontent.com/assets/5496519/5588044/dce73c9c-90f5-11e4-8eee-fb63667db4b8.png>\n>\n> tp_rating_plan \n> <https://cloud.githubusercontent.com/assets/5496519/5588055/2ae49fb6-90f6-11e4-9801-4a9b85b2807d.png>\n>\n> tp_rating_profile \n> <https://cloud.githubusercontent.com/assets/5496519/5588062/821cb2d2-90f6-11e4-81c8-e0ad30d3a325.png>\n>\n> I trust someone would be able to make some sense from this.\n>\n> Happy New Year to ALL!\n>\n> regards,\n>\n> Errol\n>\n> —\n> Reply to this email directly or view it on GitHub \n> <https://github.com/cgrates/cgrates/issues/33>.\n>"
}
},
"public": true,
"created_at": "2015-01-01T15:06:50Z"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment