{"action":"created","comment":{"url":"https://api.github.com/repos/nyaruka/rapidpro/pulls/comments/26393786","id":26393786,"diff_hunk":"@@ -3379,6 +3383,112 @@ def post(self, request, *args, **kwargs):\n             return HttpResponse(\"Not handled\", status=400)\n \n \n+class PlivoHandler(View):\n+\n+    @disable_middleware\n+    def dispatch(self, *args, **kwargs):\n+        return super(PlivoHandler, self).dispatch(*args, **kwargs)\n+\n+    def get(self, request, *args, **kwargs):\n+        return self.post(request, *args, **kwargs)\n+\n+    def post(self, request, *args, **kwargs):\n+        from temba.msgs.models import Msg, SENT, DELIVERED, FAILED, WIRED, PENDING, QUEUED\n+\n+        action = kwargs['action'].lower()\n+        request_uuid = kwargs['uuid']\n+\n+        if not all(k in request.REQUEST for k in ['From', 'To', 'MessageUUID']):\n+                return HttpResponse(\"Missing one of 'From', 'To', or 'MessageUUID' in request parameters.\",\n+                                    status=400)\n+\n+        channel = Channel.objects.filter(is_active=True, uuid=request_uuid, channel_type=PLIVO).first()\n+","path":"temba/api/views.py","position":55,"original_position":55,"commit_id":"67509a97d677b3aacd9a0e18fc804fc04766aaee","original_commit_id":"67509a97d677b3aacd9a0e18fc804fc04766aaee","user":{"login":"norkans7","id":1040571,"avatar_url":"https://avatars.githubusercontent.com/u/1040571?v=3","gravatar_id":"","url":"https://api.github.com/users/norkans7","html_url":"https://github.com/norkans7","followers_url":"https://api.github.com/users/norkans7/followers","following_url":"https://api.github.com/users/norkans7/following{/other_user}","gists_url":"https://api.github.com/users/norkans7/gists{/gist_id}","starred_url":"https://api.github.com/users/norkans7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkans7/subscriptions","organizations_url":"https://api.github.com/users/norkans7/orgs","repos_url":"https://api.github.com/users/norkans7/repos","events_url":"https://api.github.com/users/norkans7/events{/privacy}","received_events_url":"https://api.github.com/users/norkans7/received_events","type":"User","site_admin":false},"body":"@nicpottier I mean here","created_at":"2015-03-13T15:16:14Z","updated_at":"2015-03-13T15:16:14Z","html_url":"https://github.com/nyaruka/rapidpro/pull/113#discussion_r26393786","pull_request_url":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/nyaruka/rapidpro/pulls/comments/26393786"},"html":{"href":"https://github.com/nyaruka/rapidpro/pull/113#discussion_r26393786"},"pull_request":{"href":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113","id":31086324,"html_url":"https://github.com/nyaruka/rapidpro/pull/113","diff_url":"https://github.com/nyaruka/rapidpro/pull/113.diff","patch_url":"https://github.com/nyaruka/rapidpro/pull/113.patch","issue_url":"https://api.github.com/repos/nyaruka/rapidpro/issues/113","number":113,"state":"open","locked":false,"title":"Plivo aggregator","user":{"login":"norkans7","id":1040571,"avatar_url":"https://avatars.githubusercontent.com/u/1040571?v=3","gravatar_id":"","url":"https://api.github.com/users/norkans7","html_url":"https://github.com/norkans7","followers_url":"https://api.github.com/users/norkans7/followers","following_url":"https://api.github.com/users/norkans7/following{/other_user}","gists_url":"https://api.github.com/users/norkans7/gists{/gist_id}","starred_url":"https://api.github.com/users/norkans7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkans7/subscriptions","organizations_url":"https://api.github.com/users/norkans7/orgs","repos_url":"https://api.github.com/users/norkans7/repos","events_url":"https://api.github.com/users/norkans7/events{/privacy}","received_events_url":"https://api.github.com/users/norkans7/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-12T23:00:01Z","updated_at":"2015-03-13T15:16:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d6d630bfbf17eb76513c599837b25a089550f50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113/commits","review_comments_url":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113/comments","review_comment_url":"https://api.github.com/repos/nyaruka/rapidpro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nyaruka/rapidpro/issues/113/comments","statuses_url":"https://api.github.com/repos/nyaruka/rapidpro/statuses/67509a97d677b3aacd9a0e18fc804fc04766aaee","head":{"label":"nyaruka:plivo-aggregator","ref":"plivo-aggregator","sha":"67509a97d677b3aacd9a0e18fc804fc04766aaee","user":{"login":"nyaruka","id":299256,"avatar_url":"https://avatars.githubusercontent.com/u/299256?v=3","gravatar_id":"","url":"https://api.github.com/users/nyaruka","html_url":"https://github.com/nyaruka","followers_url":"https://api.github.com/users/nyaruka/followers","following_url":"https://api.github.com/users/nyaruka/following{/other_user}","gists_url":"https://api.github.com/users/nyaruka/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaruka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaruka/subscriptions","organizations_url":"https://api.github.com/users/nyaruka/orgs","repos_url":"https://api.github.com/users/nyaruka/repos","events_url":"https://api.github.com/users/nyaruka/events{/privacy}","received_events_url":"https://api.github.com/users/nyaruka/received_events","type":"Organization","site_admin":false},"repo":{"id":27415685,"name":"rapidpro","full_name":"nyaruka/rapidpro","owner":{"login":"nyaruka","id":299256,"avatar_url":"https://avatars.githubusercontent.com/u/299256?v=3","gravatar_id":"","url":"https://api.github.com/users/nyaruka","html_url":"https://github.com/nyaruka","followers_url":"https://api.github.com/users/nyaruka/followers","following_url":"https://api.github.com/users/nyaruka/following{/other_user}","gists_url":"https://api.github.com/users/nyaruka/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaruka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaruka/subscriptions","organizations_url":"https://api.github.com/users/nyaruka/orgs","repos_url":"https://api.github.com/users/nyaruka/repos","events_url":"https://api.github.com/users/nyaruka/events{/privacy}","received_events_url":"https://api.github.com/users/nyaruka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nyaruka/rapidpro","description":"RapidPro is a hosted service allowing organizations to visually build scalable interactive messaging applications.","fork":true,"url":"https://api.github.com/repos/nyaruka/rapidpro","forks_url":"https://api.github.com/repos/nyaruka/rapidpro/forks","keys_url":"https://api.github.com/repos/nyaruka/rapidpro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyaruka/rapidpro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyaruka/rapidpro/teams","hooks_url":"https://api.github.com/repos/nyaruka/rapidpro/hooks","issue_events_url":"https://api.github.com/repos/nyaruka/rapidpro/issues/events{/number}","events_url":"https://api.github.com/repos/nyaruka/rapidpro/events","assignees_url":"https://api.github.com/repos/nyaruka/rapidpro/assignees{/user}","branches_url":"https://api.github.com/repos/nyaruka/rapidpro/branches{/branch}","tags_url":"https://api.github.com/repos/nyaruka/rapidpro/tags","blobs_url":"https://api.github.com/repos/nyaruka/rapidpro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyaruka/rapidpro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyaruka/rapidpro/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyaruka/rapidpro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyaruka/rapidpro/statuses/{sha}","languages_url":"https://api.github.com/repos/nyaruka/rapidpro/languages","stargazers_url":"https://api.github.com/repos/nyaruka/rapidpro/stargazers","contributors_url":"https://api.github.com/repos/nyaruka/rapidpro/contributors","subscribers_url":"https://api.github.com/repos/nyaruka/rapidpro/subscribers","subscription_url":"https://api.github.com/repos/nyaruka/rapidpro/subscription","commits_url":"https://api.github.com/repos/nyaruka/rapidpro/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyaruka/rapidpro/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyaruka/rapidpro/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyaruka/rapidpro/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyaruka/rapidpro/contents/{+path}","compare_url":"https://api.github.com/repos/nyaruka/rapidpro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyaruka/rapidpro/merges","archive_url":"https://api.github.com/repos/nyaruka/rapidpro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyaruka/rapidpro/downloads","issues_url":"https://api.github.com/repos/nyaruka/rapidpro/issues{/number}","pulls_url":"https://api.github.com/repos/nyaruka/rapidpro/pulls{/number}","milestones_url":"https://api.github.com/repos/nyaruka/rapidpro/milestones{/number}","notifications_url":"https://api.github.com/repos/nyaruka/rapidpro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyaruka/rapidpro/labels{/name}","releases_url":"https://api.github.com/repos/nyaruka/rapidpro/releases{/id}","created_at":"2014-12-02T04:53:16Z","updated_at":"2015-03-13T05:36:08Z","pushed_at":"2015-03-13T10:36:46Z","git_url":"git://github.com/nyaruka/rapidpro.git","ssh_url":"git@github.com:nyaruka/rapidpro.git","clone_url":"https://github.com/nyaruka/rapidpro.git","svn_url":"https://github.com/nyaruka/rapidpro","homepage":null,"size":13389,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"nyaruka:master","ref":"master","sha":"579bf2d3122100baa1e3f0b0813897731900424e","user":{"login":"nyaruka","id":299256,"avatar_url":"https://avatars.githubusercontent.com/u/299256?v=3","gravatar_id":"","url":"https://api.github.com/users/nyaruka","html_url":"https://github.com/nyaruka","followers_url":"https://api.github.com/users/nyaruka/followers","following_url":"https://api.github.com/users/nyaruka/following{/other_user}","gists_url":"https://api.github.com/users/nyaruka/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaruka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaruka/subscriptions","organizations_url":"https://api.github.com/users/nyaruka/orgs","repos_url":"https://api.github.com/users/nyaruka/repos","events_url":"https://api.github.com/users/nyaruka/events{/privacy}","received_events_url":"https://api.github.com/users/nyaruka/received_events","type":"Organization","site_admin":false},"repo":{"id":27415685,"name":"rapidpro","full_name":"nyaruka/rapidpro","owner":{"login":"nyaruka","id":299256,"avatar_url":"https://avatars.githubusercontent.com/u/299256?v=3","gravatar_id":"","url":"https://api.github.com/users/nyaruka","html_url":"https://github.com/nyaruka","followers_url":"https://api.github.com/users/nyaruka/followers","following_url":"https://api.github.com/users/nyaruka/following{/other_user}","gists_url":"https://api.github.com/users/nyaruka/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaruka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaruka/subscriptions","organizations_url":"https://api.github.com/users/nyaruka/orgs","repos_url":"https://api.github.com/users/nyaruka/repos","events_url":"https://api.github.com/users/nyaruka/events{/privacy}","received_events_url":"https://api.github.com/users/nyaruka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nyaruka/rapidpro","description":"RapidPro is a hosted service allowing organizations to visually build scalable interactive messaging applications.","fork":true,"url":"https://api.github.com/repos/nyaruka/rapidpro","forks_url":"https://api.github.com/repos/nyaruka/rapidpro/forks","keys_url":"https://api.github.com/repos/nyaruka/rapidpro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyaruka/rapidpro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyaruka/rapidpro/teams","hooks_url":"https://api.github.com/repos/nyaruka/rapidpro/hooks","issue_events_url":"https://api.github.com/repos/nyaruka/rapidpro/issues/events{/number}","events_url":"https://api.github.com/repos/nyaruka/rapidpro/events","assignees_url":"https://api.github.com/repos/nyaruka/rapidpro/assignees{/user}","branches_url":"https://api.github.com/repos/nyaruka/rapidpro/branches{/branch}","tags_url":"https://api.github.com/repos/nyaruka/rapidpro/tags","blobs_url":"https://api.github.com/repos/nyaruka/rapidpro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyaruka/rapidpro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyaruka/rapidpro/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyaruka/rapidpro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyaruka/rapidpro/statuses/{sha}","languages_url":"https://api.github.com/repos/nyaruka/rapidpro/languages","stargazers_url":"https://api.github.com/repos/nyaruka/rapidpro/stargazers","contributors_url":"https://api.github.com/repos/nyaruka/rapidpro/contributors","subscribers_url":"https://api.github.com/repos/nyaruka/rapidpro/subscribers","subscription_url":"https://api.github.com/repos/nyaruka/rapidpro/subscription","commits_url":"https://api.github.com/repos/nyaruka/rapidpro/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyaruka/rapidpro/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyaruka/rapidpro/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyaruka/rapidpro/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyaruka/rapidpro/contents/{+path}","compare_url":"https://api.github.com/repos/nyaruka/rapidpro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyaruka/rapidpro/merges","archive_url":"https://api.github.com/repos/nyaruka/rapidpro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyaruka/rapidpro/downloads","issues_url":"https://api.github.com/repos/nyaruka/rapidpro/issues{/number}","pulls_url":"https://api.github.com/repos/nyaruka/rapidpro/pulls{/number}","milestones_url":"https://api.github.com/repos/nyaruka/rapidpro/milestones{/number}","notifications_url":"https://api.github.com/repos/nyaruka/rapidpro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyaruka/rapidpro/labels{/name}","releases_url":"https://api.github.com/repos/nyaruka/rapidpro/releases{/id}","created_at":"2014-12-02T04:53:16Z","updated_at":"2015-03-13T05:36:08Z","pushed_at":"2015-03-13T10:36:46Z","git_url":"git://github.com/nyaruka/rapidpro.git","ssh_url":"git@github.com:nyaruka/rapidpro.git","clone_url":"https://github.com/nyaruka/rapidpro.git","svn_url":"https://github.com/nyaruka/rapidpro","homepage":null,"size":13389,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113"},"html":{"href":"https://github.com/nyaruka/rapidpro/pull/113"},"issue":{"href":"https://api.github.com/repos/nyaruka/rapidpro/issues/113"},"comments":{"href":"https://api.github.com/repos/nyaruka/rapidpro/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/nyaruka/rapidpro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nyaruka/rapidpro/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/nyaruka/rapidpro/statuses/67509a97d677b3aacd9a0e18fc804fc04766aaee"}}}}