{"action":"created","comment":{"url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/comments/28624016","id":28624016,"diff_hunk":"@@ -5,36 +5,52 @@ This implementation assumes that you have at least Asterisk 12.0.0 running. This\n \n You must also have a valid ARI user in ari.conf named \"user\" and have a password \"pass\", as well as have 127.0.0.1 (or localhost) and 8088 configured as the bindaddr and bindport respectively in http.conf\n \n-It is also required that you have a valid configuration JSON file and a valid sharedExtension object inside of it (which also has a valid trunk that contains valid endpoints underneath the trunk).  An example of this would be:\n+It is also required that you have a valid configuration JSON file and a valid sharedExtension object inside of it (which contains a list of valid trunks and a list of valid station endpoints).  An example of this would be:\n \n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n-{                                                                                \n-  \"sharedExtensions\": [                                                          \n-  {                                                                              \n-    \"42\": {                                                             \n-      \"trunks\": [                                                                \n-        {\"42\":                                                                   \n-          {                                                                      \n-            \"stations\": [                                                        \n-            {\"endpoint\": \"SIP/phone1\"                                            \n-            },                                                                   \n-            {\"endpoint\": \"SIP/phone2\"}                                           \n-            ]                                                                    \n-          }                                                                      \n-        }                                                                        \n-      ]                                                                          \n-    }                                                                            \n-  }                                                                              \n-  ]                                                                              \n+{\n+  \"sharedExtensions\": [\n+    {\n+      \"42\": {\n+        \"trunks\": [\n+          \"42-A\"\n+        ]\n+        \"stations\": [\n+          \"SIP/phone1\",\n+          \"SIP/phone2\"\n+        ]\n+      }\n+    }\n+  ]\n }\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n-Right now, however, this application only supports one trunk per sharedExtension, and the sharedExtension MUST have the same name as the trunk. The support for multiple trunks (such as 42A and 42B) will come later.\n+Right now, however, this application only supports one trunk per sharedExtension, it can have any name, however, but the SIP trunk must appear in sip.conf, like below:\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+[42-A]\n+type = peer\n+host = 0.0.0.0\n+username = 42-A\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n-You must also have a dialplan extension in extensions.conf that leads to the application (must have same name as what application is being started in the code) and that has an argument to represent the SLA bridge to reach.  An example is below:\n+You must also have a dialplan extension in extensions.conf that leads to the application (must have same name as what application is being started in the code) and that has an argument to represent the SLA bridge to reach.  An example with a device state hint is below:\n \n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n-exten => 42,1,NoOp()                                                             \n-    same => n,Stasis(sla,42)                                                    \n+exten => 42,hint,Stasis:42\n+exten => 42,1,NoOp()\n+    same => n,Stasis(sla,42)\n+    same => n,Hangup()\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+If an inbound caller were to be kicked out of this shared extension, they would be hungup. You could also make the dialplan call the application again to redirect a user to another shared extension like below:","path":"README.md","position":62,"original_position":62,"commit_id":"0873c41f95e7a718da393b0fe7c9478b7fb6a291","original_commit_id":"0873c41f95e7a718da393b0fe7c9478b7fb6a291","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":"Use present tense here instead.","created_at":"2015-04-17T19:41:39Z","updated_at":"2015-04-17T19:41:39Z","html_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/21#discussion_r28624016","pull_request_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/comments/28624016"},"html":{"href":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/21#discussion_r28624016"},"pull_request":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21","id":33561871,"html_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/21","diff_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/21.diff","patch_url":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/21.patch","issue_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/21","number":21,"state":"open","locked":false,"title":"Multiple trunk","user":{"login":"TACambron","id":8323558,"avatar_url":"https://avatars.githubusercontent.com/u/8323558?v=3","gravatar_id":"","url":"https://api.github.com/users/TACambron","html_url":"https://github.com/TACambron","followers_url":"https://api.github.com/users/TACambron/followers","following_url":"https://api.github.com/users/TACambron/following{/other_user}","gists_url":"https://api.github.com/users/TACambron/gists{/gist_id}","starred_url":"https://api.github.com/users/TACambron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TACambron/subscriptions","organizations_url":"https://api.github.com/users/TACambron/orgs","repos_url":"https://api.github.com/users/TACambron/repos","events_url":"https://api.github.com/users/TACambron/events{/privacy}","received_events_url":"https://api.github.com/users/TACambron/received_events","type":"User","site_admin":false},"body":"This is the outboundMultiple branch after white space and other syntax errors have been cleaned up. I understand this branch, particularly the sla file, will have to be changed greatly due to findings on a branch that this one is dependent on. This pull request has been made to solely allow for review of the multiple trunk dialing logic implemented in this branch. As soon as the major findings and restructuring has been addressed on the single trunk dialing branch, this branch will re-base and then become fully up for review.","created_at":"2015-04-17T16:47:07Z","updated_at":"2015-04-17T19:41:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21/commits","review_comments_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21/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/21/comments","statuses_url":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/statuses/0873c41f95e7a718da393b0fe7c9478b7fb6a291","head":{"label":"TACambron:multipleTrunk","ref":"multipleTrunk","sha":"0873c41f95e7a718da393b0fe7c9478b7fb6a291","user":{"login":"TACambron","id":8323558,"avatar_url":"https://avatars.githubusercontent.com/u/8323558?v=3","gravatar_id":"","url":"https://api.github.com/users/TACambron","html_url":"https://github.com/TACambron","followers_url":"https://api.github.com/users/TACambron/followers","following_url":"https://api.github.com/users/TACambron/following{/other_user}","gists_url":"https://api.github.com/users/TACambron/gists{/gist_id}","starred_url":"https://api.github.com/users/TACambron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TACambron/subscriptions","organizations_url":"https://api.github.com/users/TACambron/orgs","repos_url":"https://api.github.com/users/TACambron/repos","events_url":"https://api.github.com/users/TACambron/events{/privacy}","received_events_url":"https://api.github.com/users/TACambron/received_events","type":"User","site_admin":false},"repo":{"id":30247500,"name":"node-ari-shared-line-appearances","full_name":"TACambron/node-ari-shared-line-appearances","owner":{"login":"TACambron","id":8323558,"avatar_url":"https://avatars.githubusercontent.com/u/8323558?v=3","gravatar_id":"","url":"https://api.github.com/users/TACambron","html_url":"https://github.com/TACambron","followers_url":"https://api.github.com/users/TACambron/followers","following_url":"https://api.github.com/users/TACambron/following{/other_user}","gists_url":"https://api.github.com/users/TACambron/gists{/gist_id}","starred_url":"https://api.github.com/users/TACambron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TACambron/subscriptions","organizations_url":"https://api.github.com/users/TACambron/orgs","repos_url":"https://api.github.com/users/TACambron/repos","events_url":"https://api.github.com/users/TACambron/events{/privacy}","received_events_url":"https://api.github.com/users/TACambron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TACambron/node-ari-shared-line-appearances","description":"Co-op implementation of SLA in ARI using Node.js","fork":true,"url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances","forks_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/forks","keys_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/teams","hooks_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/hooks","issue_events_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/issues/events{/number}","events_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/events","assignees_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/assignees{/user}","branches_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/branches{/branch}","tags_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/tags","blobs_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/git/refs{/sha}","trees_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/statuses/{sha}","languages_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/languages","stargazers_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/stargazers","contributors_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/contributors","subscribers_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/subscribers","subscription_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/subscription","commits_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/commits{/sha}","git_commits_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/git/commits{/sha}","comments_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/comments{/number}","issue_comment_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/issues/comments{/number}","contents_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/contents/{+path}","compare_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/merges","archive_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/downloads","issues_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/issues{/number}","pulls_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/pulls{/number}","milestones_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/milestones{/number}","notifications_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/labels{/name}","releases_url":"https://api.github.com/repos/TACambron/node-ari-shared-line-appearances/releases{/id}","created_at":"2015-02-03T14:47:06Z","updated_at":"2015-03-04T05:00:43Z","pushed_at":"2015-04-17T16:42:53Z","git_url":"git://github.com/TACambron/node-ari-shared-line-appearances.git","ssh_url":"git@github.com:TACambron/node-ari-shared-line-appearances.git","clone_url":"https://github.com/TACambron/node-ari-shared-line-appearances.git","svn_url":"https://github.com/TACambron/node-ari-shared-line-appearances","homepage":null,"size":277,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"wolfeman67:master","ref":"master","sha":"66cf578737241339a24026866ecb3a2273df12b7","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-17T16:47:07Z","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":827,"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":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21"},"html":{"href":"https://github.com/wolfeman67/node-ari-shared-line-appearances/pull/21"},"issue":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/21"},"comments":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/pulls/21/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/21/commits"},"statuses":{"href":"https://api.github.com/repos/wolfeman67/node-ari-shared-line-appearances/statuses/0873c41f95e7a718da393b0fe7c9478b7fb6a291"}}}}