{"action":"created","comment":{"url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/comments/27757374","id":27757374,"diff_hunk":"@@ -189,96 +243,276 @@ function originateChannel(client, inbound, bridge, trunkData) {\n           unanswered.channel));\n       hangup();\n     });\n+    updateState(client, bridge.name, 'NOT_INUSE');\n     defer.reject(new customError.CustomError('InboundHungup',\n           'Inbound channel hungup'));\n   }\n-\n-  trunkData.getAllStations()\n-    .then(function (stations) {\n-      if (stations.length) {\n-        stations.forEach(function(station) {\n-          dialed.push({endpoint: station.endpoint, channel: client.Channel()});\n-        });\n-        dialed.forEach(function (object) {\n-          var originate = Q.denodeify(object.channel.originate.bind(\n-              object.channel));\n-          originate({endpoint: object.endpoint, app: 'sla',\n-              appArgs: 'dialed', timeout: 10})\n-            .catch(function (err) {\n-              defer.reject(err);\n+  var defer = Q.defer();","path":"lib/sla.js","position":218,"original_position":218,"commit_id":"ce46ec3b03f3704bd2c3c9c2dccdd2333a55a957","original_commit_id":"ce46ec3b03f3704bd2c3c9c2dccdd2333a55a957","user":{"login":"samuelg","id":21962,"avatar_url":"https://avatars.githubusercontent.com/u/21962?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelg","html_url":"https://github.com/samuelg","followers_url":"https://api.github.com/users/samuelg/followers","following_url":"https://api.github.com/users/samuelg/following{/other_user}","gists_url":"https://api.github.com/users/samuelg/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelg/subscriptions","organizations_url":"https://api.github.com/users/samuelg/orgs","repos_url":"https://api.github.com/users/samuelg/repos","events_url":"https://api.github.com/users/samuelg/events{/privacy}","received_events_url":"https://api.github.com/users/samuelg/received_events","type":"User","site_admin":false},"body":"You could use vertical spacing throughout this pull request to make the code more readable. This section is especially dense.","created_at":"2015-04-03T21:33:03Z","updated_at":"2015-04-03T21:33:03Z","html_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/16#discussion_r27757374","pull_request_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/comments/27757374"},"html":{"href":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/16#discussion_r27757374"},"pull_request":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16","id":32596136,"html_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/16","diff_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/16.diff","patch_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/16.patch","issue_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/16","number":16,"state":"open","locked":false,"title":"First real rough draft of outbound dialing","user":{"login":"wolfeman67","id":10468003,"avatar_url":"https://avatars.githubusercontent.com/u/10468003?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfeman67","html_url":"https://github.com/wolfeman67","followers_url":"https://api.github.com/users/wolfeman67/followers","following_url":"https://api.github.com/users/wolfeman67/following{/other_user}","gists_url":"https://api.github.com/users/wolfeman67/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfeman67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfeman67/subscriptions","organizations_url":"https://api.github.com/users/wolfeman67/orgs","repos_url":"https://api.github.com/users/wolfeman67/repos","events_url":"https://api.github.com/users/wolfeman67/events{/privacy}","received_events_url":"https://api.github.com/users/wolfeman67/received_events","type":"User","site_admin":false},"body":"Allows a station to outbound dial, and also allows stations to\r\njoin a call if there is one in progress.  Kicks out additional\r\noutside channels if one attempts to call the extension when a\r\ncall is in progress.  Checks device states to see if entry is\r\nallowed.","created_at":"2015-04-03T15:38:28Z","updated_at":"2015-04-03T21:33:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0628e550571f2e57ab49a5d2e7bf1f3f795fd0d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16/commits","review_comments_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16/comments","review_comment_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/16/comments","statuses_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/statuses/ce46ec3b03f3704bd2c3c9c2dccdd2333a55a957","head":{"label":"wolfeman67:outbackSteakhouse","ref":"outbackSteakhouse","sha":"ce46ec3b03f3704bd2c3c9c2dccdd2333a55a957","user":{"login":"wolfeman67","id":10468003,"avatar_url":"https://avatars.githubusercontent.com/u/10468003?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfeman67","html_url":"https://github.com/wolfeman67","followers_url":"https://api.github.com/users/wolfeman67/followers","following_url":"https://api.github.com/users/wolfeman67/following{/other_user}","gists_url":"https://api.github.com/users/wolfeman67/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfeman67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfeman67/subscriptions","organizations_url":"https://api.github.com/users/wolfeman67/orgs","repos_url":"https://api.github.com/users/wolfeman67/repos","events_url":"https://api.github.com/users/wolfeman67/events{/privacy}","received_events_url":"https://api.github.com/users/wolfeman67/received_events","type":"User","site_admin":false},"repo":{"id":30209409,"name":"node-ari-shared-line-appearances","full_name":"wolfeman67/node-ari-shared-line-appearances","owner":{"login":"wolfeman67","id":10468003,"avatar_url":"https://avatars.githubusercontent.com/u/10468003?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfeman67","html_url":"https://github.com/wolfeman67","followers_url":"https://api.github.com/users/wolfeman67/followers","following_url":"https://api.github.com/users/wolfeman67/following{/other_user}","gists_url":"https://api.github.com/users/wolfeman67/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfeman67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfeman67/subscriptions","organizations_url":"https://api.github.com/users/wolfeman67/orgs","repos_url":"https://api.github.com/users/wolfeman67/repos","events_url":"https://api.github.com/users/wolfeman67/events{/privacy}","received_events_url":"https://api.github.com/users/wolfeman67/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances","description":"Co-op implementation of SLA in ARI using Node.js","fork":false,"url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances","forks_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/forks","keys_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/teams","hooks_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/hooks","issue_events_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/events{/number}","events_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/events","assignees_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/assignees{/user}","branches_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/branches{/branch}","tags_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/tags","blobs_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/statuses/{sha}","languages_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/languages","stargazers_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/stargazers","contributors_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/contributors","subscribers_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/subscribers","subscription_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/subscription","commits_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/contents/{+path}","compare_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/merges","archive_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/downloads","issues_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues{/number}","pulls_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls{/number}","milestones_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/milestones{/number}","notifications_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/labels{/name}","releases_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/releases{/id}","created_at":"2015-02-02T21:23:52Z","updated_at":"2015-04-03T19:20:45Z","pushed_at":"2015-04-03T19:20:45Z","git_url":"git://github.com/wolfeman67/node-ari-shared-line-appearances.git","ssh_url":"git@github.com:wolfeman67/node-ari-shared-line-appearances.git","clone_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances.git","svn_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances","homepage":null,"size":673,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wolfeman67:master","ref":"master","sha":"d15a864f660c7ece9611450148f31f5209c14473","user":{"login":"wolfeman67","id":10468003,"avatar_url":"https://avatars.githubusercontent.com/u/10468003?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfeman67","html_url":"https://github.com/wolfeman67","followers_url":"https://api.github.com/users/wolfeman67/followers","following_url":"https://api.github.com/users/wolfeman67/following{/other_user}","gists_url":"https://api.github.com/users/wolfeman67/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfeman67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfeman67/subscriptions","organizations_url":"https://api.github.com/users/wolfeman67/orgs","repos_url":"https://api.github.com/users/wolfeman67/repos","events_url":"https://api.github.com/users/wolfeman67/events{/privacy}","received_events_url":"https://api.github.com/users/wolfeman67/received_events","type":"User","site_admin":false},"repo":{"id":30209409,"name":"node-ari-shared-line-appearances","full_name":"wolfeman67/node-ari-shared-line-appearances","owner":{"login":"wolfeman67","id":10468003,"avatar_url":"https://avatars.githubusercontent.com/u/10468003?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfeman67","html_url":"https://github.com/wolfeman67","followers_url":"https://api.github.com/users/wolfeman67/followers","following_url":"https://api.github.com/users/wolfeman67/following{/other_user}","gists_url":"https://api.github.com/users/wolfeman67/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfeman67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfeman67/subscriptions","organizations_url":"https://api.github.com/users/wolfeman67/orgs","repos_url":"https://api.github.com/users/wolfeman67/repos","events_url":"https://api.github.com/users/wolfeman67/events{/privacy}","received_events_url":"https://api.github.com/users/wolfeman67/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances","description":"Co-op implementation of SLA in ARI using Node.js","fork":false,"url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances","forks_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/forks","keys_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/teams","hooks_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/hooks","issue_events_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/events{/number}","events_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/events","assignees_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/assignees{/user}","branches_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/branches{/branch}","tags_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/tags","blobs_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/statuses/{sha}","languages_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/languages","stargazers_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/stargazers","contributors_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/contributors","subscribers_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/subscribers","subscription_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/subscription","commits_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/contents/{+path}","compare_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/merges","archive_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/downloads","issues_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues{/number}","pulls_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls{/number}","milestones_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/milestones{/number}","notifications_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/labels{/name}","releases_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/releases{/id}","created_at":"2015-02-02T21:23:52Z","updated_at":"2015-04-03T19:20:45Z","pushed_at":"2015-04-03T19:20:45Z","git_url":"git://github.com/wolfeman67/node-ari-shared-line-appearances.git","ssh_url":"git@github.com:wolfeman67/node-ari-shared-line-appearances.git","clone_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances.git","svn_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances","homepage":null,"size":673,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16"},"html":{"href":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/16"},"issue":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/16"},"comments":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/statuses/ce46ec3b03f3704bd2c3c9c2dccdd2333a55a957"}}}}