Skip to content

Conversation

@mheap
Copy link
Contributor

@mheap mheap commented Feb 15, 2019

No description provided.

'action' => 'notify',
'payload' => ['foo' => 'bar'],
'eventUrl' => [
$uri->getScheme().'://'.$uri->getHost().':'.$uri->getPort().'/webhooks/dtmf'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this URL be /webhooks/notification ? I don't see /webhooks/dtmf defined.

Copy link
Contributor

@lornajane lornajane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The testing instructions should show it in action, not responding to a curl request. Other than the non-matching URL, the code works well and I would also love it if we included a really basic /event endpoint too, what do you think?


* Run `composer install`
* Start the web server `php -t . -S 127.0.0.1:3000`
* Test your code with the following `curl` requests:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we show how to test it in a voice context? I can copy and paste the curl commands but I'm not sure what I've tested or how to use this code in my application.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise this is copy/paste from the incoming call example, but I still think we could make a more useful test for a user.

@mheap mheap force-pushed the notify-building-block branch from b60fb68 to 98a0f5c Compare March 4, 2019 14:16
@mheap
Copy link
Contributor Author

mheap commented Mar 4, 2019

@lornajane Good spot on the URL. I've updated the event URL and add an event webhook handler.

As far as updating the README I'm not sure what we could add in there short of writing detailed VAPI instructions. As this is consistent with our existing blocks I'd like to merge and get the Notify example in the docs and we can look at the quickstart READMEs as a separate issue (see #28)

@lornajane lornajane self-requested a review March 5, 2019 16:15
@lornajane lornajane merged commit dba7cea into master Mar 5, 2019
@lornajane lornajane deleted the notify-building-block branch March 5, 2019 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants