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

ConnectionError: ConnectionError (53000): Raised whenever a signaling connection error occurs that is not covered by a more specific error code. #2

Open
michaelsync opened this issue May 15, 2022 · 7 comments

Comments

@michaelsync
Copy link

I am getting this error when I run.

ConnectionError: ConnectionError (53000): Raised whenever a signaling connection error occurs that is not covered by a more specific error code.

Twilio Nuget: 5.75.0
/*! @twilio/voice-sdk.js 2.1.1

image

@bld010
Copy link
Contributor

bld010 commented May 26, 2022

Hi @michaelsync ... Twilio Developer Educator here.

First thing I would check is to make sure your AccessToken is correct. You can decode it at jwt.io. It should have your TwiML App's SID in it.

Next, I'd make sure that your TwiML App's Voice Configuration URL is pointing to the right place. However you have it configured, can you try making a POST request to the URL you've set in your TwiML App and does it return the TwiML you expect?

@michaelsync
Copy link
Author

Hi @bld010

Thanks for your reply. I am sure that I have the correct configuration. I have double-checked. As you can see in the screenshot, I can see the client name.

I assume that I won't see the client name if I don't have the correct token.

The URL that I set is based on ngrok. I have tested it too.

image

image

The debug log is enabled by default but doesn't show much information about the error.

@bld010
Copy link
Contributor

bld010 commented May 27, 2022

Thanks for checking all of that! The client name is a partially good sign that you have the right token (the TwiML App SID is also crucial). I do notice that your ngrok tunnel looks like it hasn't received any connections, meaning that you're not receiving Twilio's webhook when it's looking for Voice TwiML (your /voice endpoint). This could mean that there's something wrong with the AccessToken.

Are you seeing any errors in your Twilio Console?

Are you attempting to use a Twilio Region other than the default US-1? If so, your API Key/Secret both need to be created within that region. Also, you should specify the edge that's closest to that region when you instantiate your Twilio.Device.

@michaelsync
Copy link
Author

Thanks, @bld010

Yes. My account is in AU1 region.

image

API key is also in AU.

image

I put Sydney

image

I am still getting the same error.

image

No error. on Twilio Error Logs.

image

@michaelsync
Copy link
Author

Hi @bld010

Thanks for asking me about the region. Yes. I tested with US region and it works fine. I have to switch my account setting to US and re-create the API key in US region. It works.

But it doesn't work in AU. Can you please confirm it?

@bld010
Copy link
Contributor

bld010 commented May 31, 2022

AU should work. Here's a document about using non-US1 regions with the Voice JS SDK.

If you have the edge set to "sydney", and your API Key, Secret, and TwiML App are all created within the AU region in your Twilio Console ... I think the other piece may be that the Access Token will need one more argument when you're creating it: region='au1'

@dsmwong
Copy link

dsmwong commented Jun 1, 2022

Please also note that you will require Voice JS 2.1.0 and above and replace twilio.min.js in the wwwroot/js directory

https://github.com/twilio/twilio-voice.js/tags

https://github.com/twilio/twilio-voice.js/blob/master/CHANGELOG.md#210-december-16-2021---release

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

3 participants