Playing Audio (ringing and stream) on Apple iOS not working
Hello,
I was installing an asterisk with Websocket support, and I can use it successfully with JsSIP on Android and Windows OS. If I try to do the same on iOS (on an iPad running version 13.3) I only get one way audio, and also the ringing sound will not be played.
I've tested this as well with the tryit.jssip.net homepage, and the issue is the same. So I think that must be a bug, either of JsSIP or Apples Safari Browser on iOS.
I attached two pictures of the errors, which I get using the Safari console via USB Debugging.

If someone have a working solution for that, or know if this is a problem of Safari or JsSIP it would be very appreciated.
Thanks!
Please, report a bug here when you know it's a bug in JsSIP. If unclear, comment it in the public mailing list.
Hello,
I was installing an asterisk with Websocket support, and I can use it successfully with JsSIP on Android and Windows OS. If I try to do the same on iOS (on an iPad running version 13.3) I only get one way audio, and also the ringing sound will not be played.
I've tested this as well with the tryit.jssip.net homepage, and the issue is the same. So I think that must be a bug, either of JsSIP or Apples Safari Browser on iOS.
I attached two pictures of the errors, which I get using the Safari console via USB Debugging.
![]()
If someone have a working solution for that, or know if this is a problem of Safari or JsSIP it would be very appreciated.
Thanks!
Have you solved this problem?I have encountered the same problem as you
JSSIP does not work on mobile devices iOS. Safari or Chrome or another browser it does not matter, because all browsers on Apple mobile devices use same Webkit.
Same JavaScript code works well on Windows, Android, Linux. All works even on macOS version of all browsers (including Safari).
This issue is actual still in 2024 with JsSip 3.10.0.
Confirmed; most things seem to work (websocket set, registration, call initiation), but the setup of the SIP audio stream seems to be broken, somehow.
Same issue encountered.
We have js sip connection on mobile iOS Safary. However, audio works randomly. We have one way connection. We printed all related data as stream live/enabled/unmuted, peer connection statuses. All data is identical for both working and one way connection. We think that iOS Safari is somehow suspending streams from other device and or speaker are blocked. We have perfect connection on iOS 16, but not in iOS 18.
@yestay90 your words seem to contradict with @vteliatnykov and @pjkundert 's words as they seemed to suggest it was because the js code problem on iOS but you said it was because iOS 18. I also remember I had iOS worked once, but I don't remember the exact iOS version, used to 3 or 4 years ago, so maybe iOS 15
@qiulang , sorry for giving wrong info. We figured out the issue. So, we had a problem jssip worked randomly.
- Initially we thought it is CallkIT problem, because we opened call page using CallKit press.
- After we turned off callkit on swipe, we thought it is Safari webkit issue.
- In the end we found that we had
What I encounter is one-way audio on the call; I could NOT hear the other party but they can hear me.
I have not figured out what the problem is.
If you’re experiencing one-way audio during a call, you won’t be able to hear what others are saying, but they can hear you. To fix this, please try setting the ‘addEventListener’ option on the peer connection ‘track’ instead of ‘addstream’ in your JavaScript code.
From:
session.connection.addEventListener('addstream', (event) => { const mediaStream = event.stream; });
To:
session.connection.addEventListener('track', (event) => { const mediaStream = event.streams[0]; });