{"action":"created","issue":{"url":"https://api.github.com/repos/cgrates/cgrates/issues/225","labels_url":"https://api.github.com/repos/cgrates/cgrates/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/cgrates/cgrates/issues/225/comments","events_url":"https://api.github.com/repos/cgrates/cgrates/issues/225/events","html_url":"https://github.com/cgrates/cgrates/issues/225","id":109333118,"number":225,"title":"Empty \"Account\" field in PubSubs post requests","user":{"login":"ezgektor","id":10644254,"avatar_url":"https://avatars.githubusercontent.com/u/10644254?v=3","gravatar_id":"","url":"https://api.github.com/users/ezgektor","html_url":"https://github.com/ezgektor","followers_url":"https://api.github.com/users/ezgektor/followers","following_url":"https://api.github.com/users/ezgektor/following{/other_user}","gists_url":"https://api.github.com/users/ezgektor/gists{/gist_id}","starred_url":"https://api.github.com/users/ezgektor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezgektor/subscriptions","organizations_url":"https://api.github.com/users/ezgektor/orgs","repos_url":"https://api.github.com/users/ezgektor/repos","events_url":"https://api.github.com/users/ezgektor/events{/privacy}","received_events_url":"https://api.github.com/users/ezgektor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cgrates/cgrates/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/cgrates/cgrates/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"rif","id":461577,"avatar_url":"https://avatars.githubusercontent.com/u/461577?v=3","gravatar_id":"","url":"https://api.github.com/users/rif","html_url":"https://github.com/rif","followers_url":"https://api.github.com/users/rif/followers","following_url":"https://api.github.com/users/rif/following{/other_user}","gists_url":"https://api.github.com/users/rif/gists{/gist_id}","starred_url":"https://api.github.com/users/rif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rif/subscriptions","organizations_url":"https://api.github.com/users/rif/orgs","repos_url":"https://api.github.com/users/rif/repos","events_url":"https://api.github.com/users/rif/events{/privacy}","received_events_url":"https://api.github.com/users/rif/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2015-10-01T16:12:39Z","updated_at":"2015-10-21T11:10:37Z","closed_at":null,"body":"After enabling PubSubs service and subscribing endpoint to receive post requests from it, i received next requests: \r\n\r\nPOST /api/warn-point HTTP/1.1.\r\nHost: 172.x.x.x:80.\r\nUser-Agent: Go 1.1 package http.\r\nContent-Length: 319.\r\nContent-Type: application/json.\r\nAccept-Encoding: gzip.\r\n.\r\n{\"Account\":\"\",\"AccountAllowNegative\":\"\",\"AccountDisabled\":\"\",\"Category\":\"\",\"DestinationIds\":\"*any\",\"EventName\":\"ACCOUNT_BALANCE_MODIFIED\",\"ExpirationDate\":\"0001-01-01 00:00:00 +0000 UTC\",\"Id\":\"\",\"RatingSubject\":\"\",\"SharedGroup\":\"\",\"TimingIDs\":\"\",\"Uuid\":\"39e71000-6446-43db-a573-50360104bc64\",\"Value\":\"-1\",\"Weight\":\"10\"}\r\n\r\nPOST /api/warn-point HTTP/1.1.\r\nHost: 172.x.x.x:80.\r\nUser-Agent: Go 1.1 package http.\r\nContent-Length: 321.\r\nContent-Type: application/json.\r\nAccept-Encoding: gzip.\r\n.\r\n{\"Account\":\"\",\"AccountAllowNegative\":\"\",\"AccountDisabled\":\"\",\"Category\":\"\",\"DestinationIds\":\"*any\",\"EventName\":\"ACCOUNT_BALANCE_MODIFIED\",\"ExpirationDate\":\"0001-01-01 00:00:00 +0000 UTC\",\"Id\":\"\",\"RatingSubject\":\"\",\"SharedGroup\":\"\",\"TimingIDs\":\"\",\"Uuid\":\"8f5745f6-82a4-4be3-beee-b46e1772fb94\",\"Value\":\"62.8\",\"Weight\":\"10\"}\r\n\r\nI received them after I added 1 EUR to balance with Uuid from the second request.\r\nBut the problem is, that there is no data for the field \"Account\".\r\n\r\nAnd also, can you please, explain, why there are two requests? What do the first one mean? Its \"Value\" equals the sum I added to the balance, which Uuid we can see in the second request."},"comment":{"url":"https://api.github.com/repos/cgrates/cgrates/issues/comments/149857678","html_url":"https://github.com/cgrates/cgrates/issues/225#issuecomment-149857678","issue_url":"https://api.github.com/repos/cgrates/cgrates/issues/225","id":149857678,"user":{"login":"ezgektor","id":10644254,"avatar_url":"https://avatars.githubusercontent.com/u/10644254?v=3","gravatar_id":"","url":"https://api.github.com/users/ezgektor","html_url":"https://github.com/ezgektor","followers_url":"https://api.github.com/users/ezgektor/followers","following_url":"https://api.github.com/users/ezgektor/following{/other_user}","gists_url":"https://api.github.com/users/ezgektor/gists{/gist_id}","starred_url":"https://api.github.com/users/ezgektor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezgektor/subscriptions","organizations_url":"https://api.github.com/users/ezgektor/orgs","repos_url":"https://api.github.com/users/ezgektor/repos","events_url":"https://api.github.com/users/ezgektor/events{/privacy}","received_events_url":"https://api.github.com/users/ezgektor/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T11:10:37Z","updated_at":"2015-10-21T11:10:37Z","body":"Hello @rif \r\n\r\nCall duration was 34 secs.\r\n\r\nHere is the rate:\r\n\r\n```\r\n{\"TPid\":\"DEFAULT\",\"RateId\":\"VOICE_0.15_0.05_60_1_0\",\r\n\"RateSlots\":[{\"ConnectFee\":0.15,\"Rate\":0.05,\"RateUnit\":\"60s\",\"RateIncrement\":\"1s\",\"GroupIntervalStart\":\"0s\"}]}\r\n```\r\n\r\nAnd call cost log:\r\n\r\n```\r\n{\"Direction\":\"*out\",\"Category\":\"call\",\"Tenant\":\"tenant.mobi\",\"Subject\":\"34680000000\",\"Account\":\"34680000000\",\"Destination\":\"34690000000\",\"TOR\":\"*voice\",\"Cost\":0.1786,\"Timespans\":[{\"TimeStart\":\"2015-10-16T17:00:40Z\",\"TimeEnd\":\"2015-10-16T17:00:50Z\",\"Cost\":0.008400000000000001,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":4,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":10000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.00084,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"34d6ae83-1541-4ced-bcad-064de230caf1\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":10}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"},{\"TimeStart\":\"2015-10-16T17:00:50Z\",\"TimeEnd\":\"2015-10-16T17:01:00Z\",\"Cost\":0.008400000000000001,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":4,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":20000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.00084,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"34d6ae83-1541-4ced-bcad-064de230caf1\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":10}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"},{\"TimeStart\":\"2015-10-16T17:01:00Z\",\"TimeEnd\":\"2015-10-16T17:01:10Z\",\"Cost\":0.008400000000000001,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":4,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":30000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.00084,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"34d6ae83-1541-4ced-bcad-064de230caf1\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":10}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"},{\"TimeStart\":\"2015-10-16T17:01:10Z\",\"TimeEnd\":\"2015-10-16T17:01:14Z\",\"Cost\":0.008400000000000001,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":4,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":34000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.00084,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"34d6ae83-1541-4ced-bcad-064de230caf1\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":4}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"}]}\r\n```\r\n"}}