WebRTC - Updated Instructions?

OK, so I thought I would take a swing at setting up WebRTC, as I have a few users who will need a mobile extension, and it seemed easier/better than installing a softphone.

I tried to follow the instructions here, but they are old.

I have installed a certificate (digicert, not self-signed), and I have enabled the WebRTC phone for a user in User Manager. I am on the same subnet as the PBX, and am connecting to the UCP via the local IP Address (ie: http://192.168.0.2/ucp).

If I log in via http, I see the phone icon in the top bar next to availability, but it is red. If I log in via SSL https, the phone icon is not there.

I don’t know what I have done wrong, but the documentation doesn’t seem to have kept up with the software, or I am just too dumb to find the up-to-date documentation. Can anyone point me in the right direction?

Tom

An update here: Based on the input on this thread, I selected the “Default” checkbox for the new key in Certificate Manager, which propagated it out to the Advanced Settings for the mini-HTTPD server.

After doing this, I had the phone icon in the SSL encrypted version of the page, but it was red, occasionally flashing yellow (as if it were trying to register and failing?). I verified that my user had the “Enable WebRTC Phone” setting in User Management:UCP:WebRTC", and that was fine.

I had a previously generated self-signed certificate in Certificate Manager, and I had not deleted this when I uploaded my new certificate. I noticed that my user still had this self-signed cert selected, even though I had selected the uploaded cert before. I re-selected the uploaded cert, clicked submit (I think I had to click “Apply Settings”, too). Then I edited my user’s settings again and the self-signed cert (first in the list) was still selected. No matter what I did, that cert remained selected in the user manager until I deleted it.

Now, the phone icon is visible and it is green, but I cannot initiate a call. When I click “New Web Call”, enter a number, and click “Call”, nothing happens. I can see the following in the asterisk full log:

[2016-12-08 11:21:56] VERBOSE[19404] chan_sip.c: Registered SIP '99108' at 192.168.0.48:54732
[2016-12-08 11:21:56] NOTICE[19404] chan_sip.c: Peer '99108' is now Reachable. (8ms / 2000ms)
[2016-12-08 11:22:12] NOTICE[19404][C-00016402] chan_sip.c: Failed to authenticate device <sip:[email protected]>;tag=cqu719rcn5

I receive one “Failed to authenticate device” line for each time I click the “Call” button. 192.168.0.48 is my PC, and 192.168.1.2 is my PBX.

I’m sure I have done something dumb, but I cannot determine what it is. Can anyone point me in the right direction?

My apologies: I did a better job of checking the logs, and I found the rest of the exchange. It looks like, even though I have deleted the old self-signed key from Certificate Manager and selected the new uploaded key in User Management, the system is still trying to use the old one.

Old self-signed key name: "default"
New uploaded key name: “DigiCert”

[2016-12-08 11:21:56] VERBOSE[19404] res_http_websocket.c: WebSocket connection from '192.168.0.48:54732' for protocol 'sip' accepted using version '13'
[2016-12-08 11:21:56] VERBOSE[19404] chan_sip.c: Registered SIP '99108' at 192.168.0.48:54732
[2016-12-08 11:21:56] NOTICE[19404] chan_sip.c: Peer '99108' is now Reachable. (8ms / 2000ms)
[2016-12-08 11:22:12] VERBOSE[19404][C-00016402] res_rtp_asterisk.c: DTLS ECDH initialized (secp256r1), faster PFS enabled
[2016-12-08 11:22:12] ERROR[19404][C-00016402] res_rtp_asterisk.c: Specified certificate file '/etc/asterisk/keys/default.crt' for RTP instance '0x7fdf895d91f8' could not be used
[2016-12-08 11:22:12] ERROR[19404][C-00016402] chan_sip.c: Attempted to set an invalid DTLS-SRTP configuration on RTP instance '0x7fdf895d91f8'
[2016-12-08 11:22:12] NOTICE[19404][C-00016402] chan_sip.c: Failed to authenticate device <sip:[email protected]>;tag=cqu719rcn5
[2016-12-08 11:25:40] VERBOSE[19404][C-00016426] res_rtp_asterisk.c: DTLS ECDH initialized (secp256r1), faster PFS enabled
[2016-12-08 11:25:40] ERROR[19404][C-00016426] res_rtp_asterisk.c: Specified certificate file '/etc/asterisk/keys/default.crt' for RTP instance '0x7fdf8a7baa28' could not be used
[2016-12-08 11:25:40] ERROR[19404][C-00016426] chan_sip.c: Attempted to set an invalid DTLS-SRTP configuration on RTP instance '0x7fdf8a7baa28'
[2016-12-08 11:25:40] NOTICE[19404][C-00016426] chan_sip.c: Failed to authenticate device <sip:[email protected]>;tag=afkq17h7ko
[2016-12-08 11:51:58] VERBOSE[19404] chan_sip.c: Unregistered SIP '99108'

After going in to “User Management” again, disabling the WebRTC phone, submitting, and then re-enabling it, I am now able to place a call. I’m not certain if this is a bug but maybe somone will find this thread and it will help them.

Now to figure out how to configure the microphone and other settings, as I cannot hear audio going either direction.