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

An Error occurred while connecting to the websocket. #7

Closed
symbiose1 opened this issue Nov 15, 2016 · 45 comments
Closed

An Error occurred while connecting to the websocket. #7

symbiose1 opened this issue Nov 15, 2016 · 45 comments
Labels

Comments

@symbiose1
Copy link

Hi, i have follow your guide and i have an issue..
The phone open but i have this error: An Error occurred while connecting to the websocket.
I have properly make the config in asterisk. The port is open..
Do you have an idea ? can you help me with that ?
thanks

@chornyitaras
Copy link
Owner

hi @symbiose1
Are you using valid ssl sertificate?
You can also try to check your system configuration using https://tryit.jssip.net/

@symbiose1
Copy link
Author

Hi, no, i use a self-sign.

Is it the problem ?

De : Taras Chornyi [mailto:notifications@github.com]
Envoyé : 16 novembre 2016 14:02
À : chornyitaras/PBXWebPhone PBXWebPhone@noreply.github.com
Cc : symbiose1 c.crevier@symbioseccc.com; Mention mention@noreply.github.com
Objet : Re: [chornyitaras/PBXWebPhone] An Error occurred while connecting to the websocket. (#7)

hi @symbiose1 https://github.com/symbiose1
Are you using valid ssl sertificate?
You can also try to check your system configuration using https://tryit.jssip.net/


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #7 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AWZkhMYzPoy4o0Drymfid8DHoqmE5dqzks5q-1MkgaJpZM4KzGMN . https://github.com/notifications/beacon/AWZkhKpy69if3pIJjQ5iJHwbyTqlkJp-ks5q-1MkgaJpZM4KzGMN.gif

@chornyitaras
Copy link
Owner

@symbiose1
It might be.
Try to open https://:8089/ws in your browser and confirm securitu exeptions.
PS
why not to get free SSL cert form letsencrypt ?

@symbiose1
Copy link
Author

symbiose1 commented Nov 16, 2016

When i try to access at https://:8089/ws https://:8089/ws its doesnt work.

I will try with letsencrypt.

De : Taras Chornyi [mailto:notifications@github.com]
Envoyé : 16 novembre 2016 14:24
À : chornyitaras/PBXWebPhone PBXWebPhone@noreply.github.com
Cc : symbiose1 c.crevier@symbioseccc.com; Mention mention@noreply.github.com
Objet : Re: [chornyitaras/PBXWebPhone] An Error occurred while connecting to the websocket. (#7)

@symbiose1 https://github.com/symbiose1

It might be.
Try to open https://:8089/ws https://:8089/ws in your browser and confirm securitu exeptions.
PS
why not to get free SSL cert form letsencrypt ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #7 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AWZkhEM3GfG0ZcmBj4E5t7L42ceWDtPkks5q-1hWgaJpZM4KzGMN . https://github.com/notifications/beacon/AWZkhLtwQQOFJ0-tc3AjM9EP4HJZ-nilks5q-1hWgaJpZM4KzGMN.gif

@chornyitaras
Copy link
Owner

chornyitaras commented Nov 16, 2016

is port 8089 open? when accessing https://dial1.sym-it.ca:8089/ws using browser you should get something like this:
image

can you execute following command on your server?

netstat -tulpan | grep asterisk

this will show what ports asterisk is currently listening

@symbiose1
Copy link
Author

Free community-based ViciDial Support is available
at http://www.vicidial.org/VICIDIALforum

  • ViciBox v.7.0.3-160505
    accesdistant:~ # netstat -tulpan | grep asterisk
    tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 1642/asterisk
    tcp 0 0 127.0.0.1:5038 127.0.0.1:9186 ESTABLISHED 1642/asterisk
    tcp 0 0 127.0.0.1:5038 127.0.0.1:9185 ESTABLISHED 1642/asterisk
    udp 0 0 0.0.0.0:5060 0.0.0.0:* 1642/asterisk
    udp 0 0 0.0.0.0:4520 0.0.0.0:* 1642/asterisk
    udp 0 0 0.0.0.0:4569 0.0.0.0:* 1642/asterisk

i dont see the port 8089

@chornyitaras
Copy link
Owner

Please check your asterisk configuration
https://github.com/chornyitaras/PBXWebPhone/wiki/Asterisk-configuration

@symbiose1
Copy link
Author

symbiose1 commented Nov 22, 2016

hi,
i have just install letsencrypt,
now i see the port 8089 but when i tru to access to https://:8089/ws isnt working.
The port is properly open in the firewall, i have test with the local ip also and i have nothing ...
image

@chornyitaras
Copy link
Owner

What do you mean by not working? Can you please share a screenshot.

Завантажити Outlook для Androidhttps://aka.ms/ghei36

On Tue, Nov 22, 2016 at 11:29 PM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

hi,
i have just install letsencrypt,
now i see the port 8089 but when i tru to access to https://dial1.sym-it.ca:8089/ws isnt working.
The port is properly open in the firewall, i have test with the local ip also and i have nothing ...
[image]https://cloud.githubusercontent.com/assets/23487620/20542722/daac82be-b0d0-11e6-961f-104217a7d357.png

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262371316, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsL0EixunotwcNzRWw2hV3IYEyARlks5rA17HgaJpZM4KzGMN.

@symbiose1
Copy link
Author

Hi Taras,
when i try to connect onto the campaign,
in the web phone, i have a message error occurred web socket.

Le 22 nov. 2016 à 16:39, Taras Chornyi notifications@github.com a écrit :

What do you mean by not working? Can you please share a screenshot.

Завантажити Outlook для Androidhttps://aka.ms/ghei36

On Tue, Nov 22, 2016 at 11:29 PM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

hi,
i have just install letsencrypt,
now i see the port 8089 but when i tru to access to https://dial1.sym-it.ca:8089/ws isnt working.
The port is properly open in the firewall, i have test with the local ip also and i have nothing ...
[image]https://cloud.githubusercontent.com/assets/23487620/20542722/daac82be-b0d0-11e6-961f-104217a7d357.png

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262371316, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsL0EixunotwcNzRWw2hV3IYEyARlks5rA17HgaJpZM4KzGMN.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #7 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AWZkhIW8K5WJeG9Xyb40uZ3whrej3_U3ks5rA2D1gaJpZM4KzGMN.

@symbiose1
Copy link
Author

image

@chornyitaras
Copy link
Owner

What do you see when accessing https://server_ip:8089/ws ?

Завантажити Outlook для Androidhttps://aka.ms/ghei36

On Tue, Nov 22, 2016 at 11:45 PM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

[image]https://cloud.githubusercontent.com/assets/23487620/20543187/018c420a-b0d3-11e6-8ff0-aa1234fd2bae.png

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262374957, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsPtQcY5h4NA5vEdkyyGgANdoHCQxks5rA2JcgaJpZM4KzGMN.

@symbiose1
Copy link
Author

This site isnt accessible, Error Connection time out
image

@symbiose1
Copy link
Author

Oh, i have find. now
i have enter the port on iptables but in opensuse is a diferent firewall..
i just stop rcSuSEfirewall2.
now i see the page
image

@chornyitaras
Copy link
Owner

Use command " yast firewall " to configure suse firewall

??????????? Outlook https://aka.ms/ghei36 ???https://aka.ms/ghei36 Androidhttps://aka.ms/ghei36

???: symbiose1
?????????: ????????, 22 ????????? 23:53
????: Re: [chornyitaras/PBXWebPhone] An Error occurred while connecting to the websocket. (#7)
????: chornyitaras/PBXWebPhone
?????: Taras Chornyi, Comment

Oh, i have find. now
i have enter the port on iptables but in opensuse is a diferent firewall..
i just stop rcSuSEfirewall2.
now i see the page

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262377024, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsOn9AlMene5OJaPu5a7HqMBKha_Mks5rA2RggaJpZM4KzGMN.

@chornyitaras
Copy link
Owner

Now webphone should work

Завантажити Outlook для Androidhttps://aka.ms/ghei36

On Tue, Nov 22, 2016 at 11:53 PM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

Oh, i have find. now
i have enter the port on iptables but in opensuse is a diferent firewall..
i just stop rcSuSEfirewall2.
now i see the page
[image]https://cloud.githubusercontent.com/assets/23487620/20543534/34c1fd76-b0d4-11e6-8727-7c6088f47ec9.png

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262377024, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsOn9AlMene5OJaPu5a7HqMBKha_Mks5rA2RggaJpZM4KzGMN.

@symbiose1
Copy link
Author

Now, the phone is ready but i dont receive the connect call, "you are now the only one at the conference"
and after 10 second, my session is automaticly disconnected.

i have try to make a manual dial and i have no sound...

@chornyitaras
Copy link
Owner

So you don't receive incoming call after pressing "Call Agent Webphone"?

Завантажити Outlook для Androidhttps://aka.ms/ghei36

On Wed, Nov 23, 2016 at 12:03 AM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

Now, the phone is ready but i dont receive the connect call, "you are now the only one at the conference"
and after 10 second, my session is automaticly disconnected.

i have try to make a manual dial and i have no sound...

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262379509, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsN4L2eVTkd6vriKGWgjwsIK4TU1_ks5rA2bJgaJpZM4KzGMN.

@symbiose1
Copy link
Author

no ...

@chornyitaras
Copy link
Owner

Please check the sip peer status in asterisk.

asterisk -r
sip show peers

On Wed, Nov 23, 2016 at 12:18 AM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

no ...

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262382567, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsNzXQ84PqzvyLQIeJx_MnnGjQ0BTks5rA2oCgaJpZM4KzGMN.

@symbiose1
Copy link
Author

the webphone is gs102

image

@symbiose1
Copy link
Author

image

@chornyitaras
Copy link
Owner

Is your server behind NAT?

On Wed, Nov 23, 2016 at 12:23 AM +0200, "symbiose1" <notifications@github.commailto:notifications@github.com> wrote:

[image]https://cloud.githubusercontent.com/assets/23487620/20544496/6919a6b0-b0d8-11e6-9201-26cc38b7249f.png

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-262383943, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQeLsHgGrZEs_BoFImqlsBCMPjwEp-Amks5rA2tugaJpZM4KzGMN.

@chornyitaras
Copy link
Owner

Don't forget to start firewall. :)

@symbiose1
Copy link
Author

Yes, it is behind nat.

Le 22 nov. 2016 à 17:48, Taras Chornyi notifications@github.com a écrit :

Don't forget to start firewall. :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@symbiose1
Copy link
Author

symbiose1 commented Nov 23, 2016

Hi, i have re-check my settings into the firewall and i think all is good,,,,
i see the phone connected but i dont receive the incomming call.
the webphone is gs102
image

@chornyitaras
Copy link
Owner

plase enable sip debug
asterisk -r
sip set debug peer gs102

Also I advise you to check your Vicidial installation using softphone(Linphon, Xlite ets).
login as agent but don't press "Call Agent Webphone"
Then crete one more phone using Vicidial Admin, register it in softphone and call gs102 fron softphone

@symbiose1
Copy link
Author

symbiose1 commented Nov 24, 2016

Hi Taras,
i have make the sip debud and i see this
image

@chornyitaras
Copy link
Owner

looks like something wrong with asterisk ssl configuration.
please add me @ Skype tarasucho. So we can have live debug session

@symbiose1
Copy link
Author

symbiose1 commented Nov 24, 2016 via email

@chornyitaras
Copy link
Owner

chornyitaras commented Nov 24, 2016

sorry wrong skype name(( correct one: tarasukcho

@zues75
Copy link

zues75 commented Feb 25, 2017

I see that this issue has been resolved and i am having the same issues. How was the asterisk ssl issue resolved?

@chornyitaras
Copy link
Owner

chornyitaras commented Feb 25, 2017

port 8089 was closed, and incorrect certificate configuration

@zues75
Copy link

zues75 commented Feb 25, 2017

Thanks, I think my ports are all ok. Firewall is on but disabled. I am behind a NAT and that has all the ports configured. I did make a letsencrypt cert and used that for both the apache2 and http.conf settings, but if i am seeing this right the http.conf may need to use asterisk ssl certificate is that correct?

@chornyitaras
Copy link
Owner

You need to use same certificate for Apache and asterisk. Make sure that asterisk is listening 8090 port.

netstat -tulpan | grep 8089

Please execute this command on your server.

Then please open in browser https://asterisk_server_domain_name:8089

@zues75
Copy link

zues75 commented Feb 25, 2017

Thanks for getting back to me i tried what you said and the results did come up with port 8089 but it didn't look right. I also went to the website and it didn't come up with a verified cert. I have this on a test vm that i am using to verify the installation and troubleshooting of this before i bring it out to a production machine. At this time i reverted the settings back to before I put anything into the machine and will begin again. Shouldn't take me to long to recreate the dialer with the setting back in it. and i will test them out without any addition settings and see what i get at that time.

@zues75
Copy link

zues75 commented Feb 25, 2017

i executed the netstat -tulpan | grep 8089 and came back with this.

tcp 0 0 192.168.5.94:8089 0.0.0.0:* LISTEN 3410/a

OK i am now at this when going to https://asterisk_server_domain_name:8089 , and yes i did input my url name in place of asterisk_server_domain_name :)

Not Found

The requested URL was not found on this server.
Asterisk Server

@chornyitaras
Copy link
Owner

That's actually good results. This mean that you can connect to asterisk HTTP server.
When opening https://asterisk_domai_name:8089/ws can you see "Upgrade required'?.
If yes please check your Vicidial configuration. Make sure that "Web Socket URL" is set to https://asterisk_domai_name:8089/ws

@zues75
Copy link

zues75 commented Feb 26, 2017

Great I'm on the right track. I read through your earlier post and have test out that https://asterisk_domai_name:8089/ws and i can see. sorry if image didn't come up first time on github chat.
ws connection

As for the Web Socket URL : is that suppose to be wss://asterisk_domain_name:8089/ws or https://asterisk_domain_name:8089/ws ?

@zues75
Copy link

zues75 commented Feb 26, 2017

At this time with wss://asterisk_domain_name:8089/ws i am running into two issues.

1st on is :
There is no " You are to only one in the conference" message that plays when the phone is first picked up.

2nd issue is

Disconnecting call for lack of RTP activity in 61 seconds

@chornyitaras
Copy link
Owner

looks like NAT related issue.
please add stun severer config(file /etc/asterisk/rtp.conf)
icesupport=yes
stunaddr=stun.l.google.com:19302
under [general] section

@zues75
Copy link

zues75 commented Feb 26, 2017

That worked!!!! Thank you. It looks like i will need to look further into the UDP port. hmm strange.

I am getting a strange error that i haven't seen before after i put the stunaddr in there. This action happens when i make a call. Do you have any ideas what this could be from ?

res_srtp.c:415 ast_srtp_unprotect: SRTP unprotect failed with: authentication failure 10

@zues75
Copy link

zues75 commented Feb 26, 2017

And i am still receiving this error also.

tcptls.c:397 tcptls_stream_close: SSL_shutdown() failed: 5

@chornyitaras
Copy link
Owner

Those errors are expected

@zues75
Copy link

zues75 commented Feb 26, 2017

Again Thank you for all your help.

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

No branches or pull requests

3 participants