Third party webrtc phone with FreePBX


(Ted) #1

Hi all, i hope you guys are having a fantastic week.

I’m testing out a simple webrtc phone that connects to asterisk via web socket to pbx FQDN, port 8089 and web socket path /ws. These are the options that get specified in the soft phone app. This app works fine with the other asterisk based pbx. But with FreePBX, I’m not sure what all i should enable in the Extension advanced settings as well as SIP settings(things such as webrtc settings, ws, etc).

What all should be enabled in the FreePBX in order for this webrtc phone app to successfully connect to the FreePBX extension and make and receive voice and vodeo calls? Lets Encrypt has also been enabled and working as it uses it for encryption.

Would appreciate your guys help.


(Andrew) #2


Try enabling these settings on your extension and see how you do.


#3

by default ws is bound to port 8088 , wss is bound to port 8089 (ws clients probably won’t work any more on in most browsers)


(Ted) #4

When I enable all these and try to register, it doesn’t give me the Web Socker Error anymore in the browser phone, but now it says Registration Failed in the phone. Then, when I check in asterisk, it says, registration failed, wrong password. I definitely enter the password correctly. Even tried changing the password completely on both ends.

What could be wrong here? Looks like it is able to connect to the web socket this time. The only thing that worked was port 8089 with /ws as the path. Any other combination gave me web socket error.


#5

Check whether the failure occurred in pjsip, or in chan_sip. Confirm that the extension you created is of the same type.

Possibly, the client has a issue with password length or special characters. Create a simple password consisting of no more than 12 letters and digits. Paste it into Secret for the extension and into the softphone.

If no luck, at the Asterisk command prompt, type
pjsip set logger on
or
sip set debug on
and look at the incoming REGISTER request. Check that the extension number and other parameters are correct.


(Ted) #6

The message is coming from a chan_sip extension, however, my extension is pjsip. Why does it say chan_sip in the error message in asterisk? This is what it’s saying:

== WebSocket connection from ‘pbxip:port’ for protocol ‘sip’ accepted using version ‘13’
[2021-07-01 15:10:27] NOTICE[17832]: chan_sip.c:29053 handle_request_register: Registration from ‘“Maint” sip:ext#@fqdn-of-pbx’ failed for ‘pbxip:53644’ - Wrong password


(Ted) #7

Would you happen to know why it says chan_sip in the error message? Isn’t it supposed to be pjsip?


(Ted) #8

Fixed it by adding websocket_enabled - false for chan_sip protocol.


(Ted) #9

I am now able to register the webrtc phone to the FreePBX extension, but it only works when the Media Encryption is set to DTLS-SRTP. And then, my IP desk phone stops receiving calls, because it uses regular UDP for transport. How can I have both the webrtc and IP phone working on the same extension? There has got to be a way to have both of them receive and make calls.


(Greg Snover) #10

There’s not - The signaling that is compatible with WebRTC is not compatible with any phones out there - I found this out with FOP - you could pair two extensions together, but one can’t be both.


#11

In the settings of the extension go to the advanced tab and find the “max contacts” field. Make it however many devices you wish to be able to register to that one extension. By default it is set at 1.


(Ted) #12

Max contacts are to specify how many contacts can register. This however does not allow to register a UDP phone and a webrtc phone. They operate on different protocols. To be exact, it allows them to register, but the transport doesn’t go through when making a call. It’s either one, or the other.


(Ted) #13

Greg, what do you think can be solution here? How do you think the FreePBX built in ucp phone works and you’re able to call it on the same extension with the regular IP phone?


(Greg Snover) #14

Yeah, I wondered the same thing when I was using FOP - I think it is a WebRTC phone specifically tweaked to work with FreePBX and the extensions in their default configs - @lgaetz could probably give us the exact scoop - see my adventures here: FOP2 WebRTC with Asterisk 18.3.0 and FreePBX15 working settings and a question - FreePBX / Tips and Tricks - FreePBX Community Forums

The way around this is to set up an extension specifically for the WebRTC phone, leave the physical phone on it’s normal extension, and put Follow-Me on both extensions referencing the other - so if anybody calls either extension, they both ring no matter what - not an elegant solution, but a workable one - You can also make the secondary extension look like it’s the primary extension through the advanced settings - then you only need FM/FM on the Primary to have it ring both.


(Lorne Gaetz) #15

Greg is correct, there is a ghost pjsip endpoint created under the hood for the UCP phone registration. If the primary extension is 101, the webrtc phone registers to 99101, and dialplan is used to route calls to and from each as if they are both primary.


(Ted) #16

Can i register the IP phone over tls encryption? Would it mean it’s going to use the same protocol for transport as webrtc?


(system) closed #17

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.