Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoming Calls failing for Voice Javascript SDK PHP example #45

Open
ngaffney-twilio opened this issue Sep 22, 2021 · 1 comment
Open

Comments

@ngaffney-twilio
Copy link

Where has this bug occurred?
https://github.com/TwilioDevEd/voice-javascript-sdk-quickstart-php

Describe the bug
When you setup the PHP quickstart, and make a call from your device to the client, it fails to call the client - instead you get the default response from the voice.php file.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guide at the above link to be able to make a call inbound to your PHP quickstart.
  2. Make a call in, and you should hear the default text from the voice.php file being spoken, then it hangs up.

Expected behavior
As this is the browser client example, customers expect to be able to answer the incoming call in their browser. This is possible with a few changes to the PHP file.

Desktop (please complete the following information):

  • OS: Mac OSX
  • Browser: Chrome
  • Version: 93

Smartphone (please complete the following information):

  • N/A - voice call

Additional context
You can make this work by doing the following:

  1. Instead of passing "$_REQUEST['phone']" to the function "get_voice_response" in voice.php, pass "$_REQUEST['Called']".
  2. $_SESSION['identity'] didn't return anything (for me, at least), so just as a test, you can hardcode in your client identity by replacing it with the automatically generated identity in the "Your Device Info" section, on the "http://localhost:8000/" page.

This should then allow you to receive a call in the browser client as expected.

@welcome
Copy link

welcome bot commented Sep 22, 2021

Thank you so much for opening your first issue in this project! We'll try to get back to it as quickly as possible.

While you are waiting...here's a random picture of a corgi (powered by dog.ceo)
picture of dog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant