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

Cannot make outgoing call [BUG] #258

Open
7 tasks done
solidneeds opened this issue Apr 25, 2024 · 5 comments
Open
7 tasks done

Cannot make outgoing call [BUG] #258

solidneeds opened this issue Apr 25, 2024 · 5 comments
Labels
bug Something isn't working needs more info

Comments

@solidneeds
Copy link

  • I have verified that the issue occurs with the latest twilio.js release and is not marked as a known issue in the CHANGELOG.md.
  • I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • I verified that the Quickstart application works in my environment.
  • [ x] I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Code to reproduce the issue:
loaded sdk
Screenshot 2024-04-25 071013

initiating outgoing call:
Screenshot 2024-04-25 071041

// TODO

Expected behavior:

throws error when sdk is loaded and initiating a call

Actual behavior:

TODO

Software versions:

  • Browser(s): Chrome
  • Operating System: Windows
  • twilio.js: Latest
  • Third-party libraries (e.g., Angular, React, etc.): React
@solidneeds solidneeds added the bug Something isn't working label Apr 25, 2024
@charliesantos
Copy link
Collaborator

@solidneeds thanks for submitting. Do you have any reproducible steps? Can you reproduce it using our quickstart? https://www.twilio.com/docs/voice/sdks/javascript/get-started

@solidneeds
Copy link
Author

solidneeds commented Apr 25, 2024

reproducible steps

when setting token
const twilioDevice = new Device(token)
throws error below
Screenshot 2024-04-25 071013

when calling twilioDevice.connect({params, });
i get error below
Screenshot 2024-04-25 071041

@solidneeds
Copy link
Author

solidneeds commented Apr 25, 2024

but i have a server listen using ngrok, but i still get that error above

@solidneeds
Copy link
Author

solidneeds commented Apr 25, 2024

my code

const [phoneNumber, setPhoneNumber] = useState("");
const [token, setToken] = useState("");
const twilioDevice = new Device(token);


const onNumberClick = (value: string) => {
  setPhoneNumber((nums) => nums + value);
};

const getToken = async () => {
  const url =  "https://8d58-2601-1c2-1700-bc50-1873-f304-868f-1094.ngrok-free.app/api/v1/communication/token";
  
  const { data: token } = await axios.post(url);
  if (token) {
    setToken(token);
  }
};
const endCall = () => {
  twilioDevice.disconnectAll();
  unsubscribeTwilioEventListener();
};

useEffect(() => {
  return () => unsubscribeTwilioEventListener();
}, []);


const params = {
  To: "+xxxxxxxxxxx",
  From: "+xxxxxxxxxxx",
};

// Make an outgoing call
async function makeOutgoingCall() {
  const call = await twilioDevice.connect({
    params,
  });
}

@charliesantos
Copy link
Collaborator

The issue seems to be more specific to your application. Can you try reproducing using our quickstart? Also, you can try to submit a support ticket using your Twilio account and our support team should be able to route this issue to the correct team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info
Projects
None yet
Development

No branches or pull requests

2 participants