Voice call with asterisk in android

hello, i used asterisk as a sip server for make a voice call from browser and use webrtc to transfer media, configured asterisk for webrtc support, and now i want to do this in android, how can i do this like browser, how to handle signaling with asterisk and use webrtc for make just voice call in android
need some best practices.
thanks.

1 Like

thank you, these sample does not use asterisk as signaling server, they just used own signaling server.

https://www.mizu-voip.com/Support/Wiki/tabid/99/Default.aspx?topic=Asterisk%20WebRTC
https://www.mizu-voip.com/Software/WebPhone.aspx

1 Like

WebRTC is a standard, and should work the same way in every browser. If you got it working on your computer in chrome, you should have it working automatically in chrome on Android. There might be some permissions you need to accept on the phone, but asking for microphone and webcam permissions in the mobile browser, is no different from doing it on the computer.

However, if your mobile phone is not on the same network as your computer, you could have a network issue, where the phone is not able to contact the Asterisk server. The Asterisk server needs to be accessible from the public internet in order for your phone to connect, or you need to connect the phone to a wireless network that’s got access to the Asterisk server.

To check if the issue is the phone browser, or the network the cellular network you’re connected to, you can setup your phone to provide the internet connection for your computer, either wirelessly. (WiFi or bluetooth) or by connecting the phone to the computer with a cable. The cable solution might require additional software on the PC (The phone acts as a USB network interface, this needs a driver that might not be in your OS by default).

By using your phones internet connection on the computer where everything works, you can control the variables and make sure the only difference is the internet connection, and as such see if you need to open up access to the Asterisk server from the outside.

You will need to make sure the WebRTC port is accessible, by default wss runs on port 8089, then you need to make sure the RTP ports are accessible, I do NOT remember the default range, but they can be configured in rtp.conf. As a rule of thumb, you’ll need 2 RTP ports for each call. That is, if you want to have 10 calls running at the same time, you’ll need at least 20 RTP ports. The default range is rather large, but can be reduced if you do not need a lot of concurrent calls.

At least in the past it has been reported to be a work in progress and continually changing.

So does HTML, CSS, JavaScript etc. But they are still standards, with more or less a basic level of expected functionality, in the way it’s implemented. Also as most browsers today is chrome anyways, it’s still safe to assume if it works on Chrome, it works on most everything but Apple devices.

It’s settled down mostly these days from the RTC side. The Javascript side continues to see changes/behavior changes here and there.

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