{"action":"created","comment":{"url":"https://api.github.com/repos/2600hz/kazoo/pulls/comments/135117512","pull_request_review_id":58495004,"id":135117512,"diff_hunk":"@@ -562,6 +566,150 @@ owned_by_query(ViewOptions, Call, ViewKey) ->\n     end.\n \n %%-----------------------------------------------------------------------------\n+%% @public\n+%% @doc\n+%% @end\n+%%-----------------------------------------------------------------------------\n+-spec get_flags(kz_json:object(), kapps_call:call()) -> api_binaries().\n+get_flags(ApplicationName, Call) ->\n+    Routines = [fun maybe_get_endpoint_static_flags/3\n+               ,fun get_account_static_flags/3\n+               ,fun get_config_static_flags/3\n+               ,fun maybe_get_endpoint_dynamic_flags/3\n+               ,fun get_account_dynamic_flags/3\n+               ,fun get_config_dynamic_flags/3\n+               ],\n+    Flags = lists:foldl(fun(F, A) -> F(ApplicationName, Call, A) end, [], Routines),\n+    sets:to_list(sets:from_list(Flags)).\n+\n+-spec maybe_get_endpoint_static_flags(ne_binary(), kapps_call:call(), ne_binaries()) ->\n+                                             ne_binaries().\n+maybe_get_endpoint_static_flags(_, Call, Flags) ->\n+    case kz_endpoint:get(Call) of\n+        {'error', _R} -> Flags;\n+        {'ok', Endpoint} ->\n+            get_endpoint_static_flags(Flags, Endpoint)\n+    end.\n+\n+-spec get_endpoint_static_flags(ne_binaries(), kz_json:object()) ->\n+                                       ne_binaries().\n+get_endpoint_static_flags(Flags, Endpoint) ->\n+    case kz_device:outbound_static_flags(Endpoint) of\n+        [] -> Flags;\n+        EndpointFlags -> EndpointFlags ++ Flags\n+    end.\n+\n+-spec get_account_static_flags(ne_binary(), kapps_call:call(), ne_binaries()) ->\n+                                      ne_binaries().\n+get_account_static_flags(_, Call, Flags) ->\n+    AccountId = kapps_call:account_id(Call),\n+    case kz_account:fetch(AccountId) of\n+        {'ok', AccountJObj} -> kz_device:outbound_static_flags(AccountJObj) ++ Flags;","path":"core/kazoo_endpoint/src/kz_attributes.erl","position":50,"original_position":53,"commit_id":"0826b2c48a007bef7f1718e1540d1dd3ea261a1f","original_commit_id":"7f9a43fa7c0ed8d923812cbaa33995403e2a7613","user":{"login":"fenollp","id":278727,"avatar_url":"https://avatars3.githubusercontent.com/u/278727?v=4","gravatar_id":"","url":"https://api.github.com/users/fenollp","html_url":"https://github.com/fenollp","followers_url":"https://api.github.com/users/fenollp/followers","following_url":"https://api.github.com/users/fenollp/following{/other_user}","gists_url":"https://api.github.com/users/fenollp/gists{/gist_id}","starred_url":"https://api.github.com/users/fenollp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenollp/subscriptions","organizations_url":"https://api.github.com/users/fenollp/orgs","repos_url":"https://api.github.com/users/fenollp/repos","events_url":"https://api.github.com/users/fenollp/events{/privacy}","received_events_url":"https://api.github.com/users/fenollp/received_events","type":"User","site_admin":false},"body":"turns out it's ok","created_at":"2017-08-24T20:09:29Z","updated_at":"2017-08-24T20:09:29Z","html_url":"https://github.com/2600hz/kazoo/pull/4088#discussion_r135117512","pull_request_url":"https://api.github.com/repos/2600hz/kazoo/pulls/4088","_links":{"self":{"href":"https://api.github.com/repos/2600hz/kazoo/pulls/comments/135117512"},"html":{"href":"https://github.com/2600hz/kazoo/pull/4088#discussion_r135117512"},"pull_request":{"href":"https://api.github.com/repos/2600hz/kazoo/pulls/4088"}}},"pull_request":{"url":"https://api.github.com/repos/2600hz/kazoo/pulls/4088","id":137104887,"html_url":"https://github.com/2600hz/kazoo/pull/4088","diff_url":"https://github.com/2600hz/kazoo/pull/4088.diff","patch_url":"https://github.com/2600hz/kazoo/pull/4088.patch","issue_url":"https://api.github.com/repos/2600hz/kazoo/issues/4088","number":4088,"state":"open","locked":false,"title":"Prod 154 master","user":{"login":"k-anderson","id":742778,"avatar_url":"https://avatars0.githubusercontent.com/u/742778?v=4","gravatar_id":"","url":"https://api.github.com/users/k-anderson","html_url":"https://github.com/k-anderson","followers_url":"https://api.github.com/users/k-anderson/followers","following_url":"https://api.github.com/users/k-anderson/following{/other_user}","gists_url":"https://api.github.com/users/k-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/k-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-anderson/subscriptions","organizations_url":"https://api.github.com/users/k-anderson/orgs","repos_url":"https://api.github.com/users/k-anderson/repos","events_url":"https://api.github.com/users/k-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/k-anderson/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-23T00:03:10Z","updated_at":"2017-08-24T20:09:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"608efd591e86ed263944b9f7b3b2fbaf590a3067","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/2600hz/kazoo/pulls/4088/commits","review_comments_url":"https://api.github.com/repos/2600hz/kazoo/pulls/4088/comments","review_comment_url":"https://api.github.com/repos/2600hz/kazoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/2600hz/kazoo/issues/4088/comments","statuses_url":"https://api.github.com/repos/2600hz/kazoo/statuses/0826b2c48a007bef7f1718e1540d1dd3ea261a1f","head":{"label":"2600hz:PROD-154-master","ref":"PROD-154-master","sha":"0826b2c48a007bef7f1718e1540d1dd3ea261a1f","user":{"login":"2600hz","id":408801,"avatar_url":"https://avatars3.githubusercontent.com/u/408801?v=4","gravatar_id":"","url":"https://api.github.com/users/2600hz","html_url":"https://github.com/2600hz","followers_url":"https://api.github.com/users/2600hz/followers","following_url":"https://api.github.com/users/2600hz/following{/other_user}","gists_url":"https://api.github.com/users/2600hz/gists{/gist_id}","starred_url":"https://api.github.com/users/2600hz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2600hz/subscriptions","organizations_url":"https://api.github.com/users/2600hz/orgs","repos_url":"https://api.github.com/users/2600hz/repos","events_url":"https://api.github.com/users/2600hz/events{/privacy}","received_events_url":"https://api.github.com/users/2600hz/received_events","type":"Organization","site_admin":false},"repo":{"id":2966241,"name":"kazoo","full_name":"2600hz/kazoo","owner":{"login":"2600hz","id":408801,"avatar_url":"https://avatars3.githubusercontent.com/u/408801?v=4","gravatar_id":"","url":"https://api.github.com/users/2600hz","html_url":"https://github.com/2600hz","followers_url":"https://api.github.com/users/2600hz/followers","following_url":"https://api.github.com/users/2600hz/following{/other_user}","gists_url":"https://api.github.com/users/2600hz/gists{/gist_id}","starred_url":"https://api.github.com/users/2600hz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2600hz/subscriptions","organizations_url":"https://api.github.com/users/2600hz/orgs","repos_url":"https://api.github.com/users/2600hz/repos","events_url":"https://api.github.com/users/2600hz/events{/privacy}","received_events_url":"https://api.github.com/users/2600hz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2600hz/kazoo","description":"The core of an open-source, distributed, highly scalable platform designed to provide robust telecom services","fork":false,"url":"https://api.github.com/repos/2600hz/kazoo","forks_url":"https://api.github.com/repos/2600hz/kazoo/forks","keys_url":"https://api.github.com/repos/2600hz/kazoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2600hz/kazoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2600hz/kazoo/teams","hooks_url":"https://api.github.com/repos/2600hz/kazoo/hooks","issue_events_url":"https://api.github.com/repos/2600hz/kazoo/issues/events{/number}","events_url":"https://api.github.com/repos/2600hz/kazoo/events","assignees_url":"https://api.github.com/repos/2600hz/kazoo/assignees{/user}","branches_url":"https://api.github.com/repos/2600hz/kazoo/branches{/branch}","tags_url":"https://api.github.com/repos/2600hz/kazoo/tags","blobs_url":"https://api.github.com/repos/2600hz/kazoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2600hz/kazoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2600hz/kazoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/2600hz/kazoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2600hz/kazoo/statuses/{sha}","languages_url":"https://api.github.com/repos/2600hz/kazoo/languages","stargazers_url":"https://api.github.com/repos/2600hz/kazoo/stargazers","contributors_url":"https://api.github.com/repos/2600hz/kazoo/contributors","subscribers_url":"https://api.github.com/repos/2600hz/kazoo/subscribers","subscription_url":"https://api.github.com/repos/2600hz/kazoo/subscription","commits_url":"https://api.github.com/repos/2600hz/kazoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/2600hz/kazoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/2600hz/kazoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/2600hz/kazoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/2600hz/kazoo/contents/{+path}","compare_url":"https://api.github.com/repos/2600hz/kazoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2600hz/kazoo/merges","archive_url":"https://api.github.com/repos/2600hz/kazoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2600hz/kazoo/downloads","issues_url":"https://api.github.com/repos/2600hz/kazoo/issues{/number}","pulls_url":"https://api.github.com/repos/2600hz/kazoo/pulls{/number}","milestones_url":"https://api.github.com/repos/2600hz/kazoo/milestones{/number}","notifications_url":"https://api.github.com/repos/2600hz/kazoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2600hz/kazoo/labels{/name}","releases_url":"https://api.github.com/repos/2600hz/kazoo/releases{/id}","deployments_url":"https://api.github.com/repos/2600hz/kazoo/deployments","created_at":"2011-12-12T18:08:02Z","updated_at":"2017-08-24T16:41:56Z","pushed_at":"2017-08-24T20:07:49Z","git_url":"git://github.com/2600hz/kazoo.git","ssh_url":"git@github.com:2600hz/kazoo.git","clone_url":"https://github.com/2600hz/kazoo.git","svn_url":"https://github.com/2600hz/kazoo","homepage":"http://www.2600hz.org/","size":352909,"stargazers_count":494,"watchers_count":494,"language":"Erlang","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":264,"mirror_url":null,"open_issues_count":12,"forks":264,"open_issues":12,"watchers":494,"default_branch":"master"}},"base":{"label":"2600hz:master","ref":"master","sha":"c0fbed968a9c0bdc2bb160b676518b253c62725e","user":{"login":"2600hz","id":408801,"avatar_url":"https://avatars3.githubusercontent.com/u/408801?v=4","gravatar_id":"","url":"https://api.github.com/users/2600hz","html_url":"https://github.com/2600hz","followers_url":"https://api.github.com/users/2600hz/followers","following_url":"https://api.github.com/users/2600hz/following{/other_user}","gists_url":"https://api.github.com/users/2600hz/gists{/gist_id}","starred_url":"https://api.github.com/users/2600hz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2600hz/subscriptions","organizations_url":"https://api.github.com/users/2600hz/orgs","repos_url":"https://api.github.com/users/2600hz/repos","events_url":"https://api.github.com/users/2600hz/events{/privacy}","received_events_url":"https://api.github.com/users/2600hz/received_events","type":"Organization","site_admin":false},"repo":{"id":2966241,"name":"kazoo","full_name":"2600hz/kazoo","owner":{"login":"2600hz","id":408801,"avatar_url":"https://avatars3.githubusercontent.com/u/408801?v=4","gravatar_id":"","url":"https://api.github.com/users/2600hz","html_url":"https://github.com/2600hz","followers_url":"https://api.github.com/users/2600hz/followers","following_url":"https://api.github.com/users/2600hz/following{/other_user}","gists_url":"https://api.github.com/users/2600hz/gists{/gist_id}","starred_url":"https://api.github.com/users/2600hz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2600hz/subscriptions","organizations_url":"https://api.github.com/users/2600hz/orgs","repos_url":"https://api.github.com/users/2600hz/repos","events_url":"https://api.github.com/users/2600hz/events{/privacy}","received_events_url":"https://api.github.com/users/2600hz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2600hz/kazoo","description":"The core of an open-source, distributed, highly scalable platform designed to provide robust telecom services","fork":false,"url":"https://api.github.com/repos/2600hz/kazoo","forks_url":"https://api.github.com/repos/2600hz/kazoo/forks","keys_url":"https://api.github.com/repos/2600hz/kazoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2600hz/kazoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2600hz/kazoo/teams","hooks_url":"https://api.github.com/repos/2600hz/kazoo/hooks","issue_events_url":"https://api.github.com/repos/2600hz/kazoo/issues/events{/number}","events_url":"https://api.github.com/repos/2600hz/kazoo/events","assignees_url":"https://api.github.com/repos/2600hz/kazoo/assignees{/user}","branches_url":"https://api.github.com/repos/2600hz/kazoo/branches{/branch}","tags_url":"https://api.github.com/repos/2600hz/kazoo/tags","blobs_url":"https://api.github.com/repos/2600hz/kazoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2600hz/kazoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2600hz/kazoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/2600hz/kazoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2600hz/kazoo/statuses/{sha}","languages_url":"https://api.github.com/repos/2600hz/kazoo/languages","stargazers_url":"https://api.github.com/repos/2600hz/kazoo/stargazers","contributors_url":"https://api.github.com/repos/2600hz/kazoo/contributors","subscribers_url":"https://api.github.com/repos/2600hz/kazoo/subscribers","subscription_url":"https://api.github.com/repos/2600hz/kazoo/subscription","commits_url":"https://api.github.com/repos/2600hz/kazoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/2600hz/kazoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/2600hz/kazoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/2600hz/kazoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/2600hz/kazoo/contents/{+path}","compare_url":"https://api.github.com/repos/2600hz/kazoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2600hz/kazoo/merges","archive_url":"https://api.github.com/repos/2600hz/kazoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2600hz/kazoo/downloads","issues_url":"https://api.github.com/repos/2600hz/kazoo/issues{/number}","pulls_url":"https://api.github.com/repos/2600hz/kazoo/pulls{/number}","milestones_url":"https://api.github.com/repos/2600hz/kazoo/milestones{/number}","notifications_url":"https://api.github.com/repos/2600hz/kazoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2600hz/kazoo/labels{/name}","releases_url":"https://api.github.com/repos/2600hz/kazoo/releases{/id}","deployments_url":"https://api.github.com/repos/2600hz/kazoo/deployments","created_at":"2011-12-12T18:08:02Z","updated_at":"2017-08-24T16:41:56Z","pushed_at":"2017-08-24T20:07:49Z","git_url":"git://github.com/2600hz/kazoo.git","ssh_url":"git@github.com:2600hz/kazoo.git","clone_url":"https://github.com/2600hz/kazoo.git","svn_url":"https://github.com/2600hz/kazoo","homepage":"http://www.2600hz.org/","size":352909,"stargazers_count":494,"watchers_count":494,"language":"Erlang","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":264,"mirror_url":null,"open_issues_count":12,"forks":264,"open_issues":12,"watchers":494,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/2600hz/kazoo/pulls/4088"},"html":{"href":"https://github.com/2600hz/kazoo/pull/4088"},"issue":{"href":"https://api.github.com/repos/2600hz/kazoo/issues/4088"},"comments":{"href":"https://api.github.com/repos/2600hz/kazoo/issues/4088/comments"},"review_comments":{"href":"https://api.github.com/repos/2600hz/kazoo/pulls/4088/comments"},"review_comment":{"href":"https://api.github.com/repos/2600hz/kazoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/2600hz/kazoo/pulls/4088/commits"},"statuses":{"href":"https://api.github.com/repos/2600hz/kazoo/statuses/0826b2c48a007bef7f1718e1540d1dd3ea261a1f"}}}}
{"actor":{"display_login":"fenollp"}}