The issue is that the SIP side starts sending media as soon as it receives the SDP offer from the media broker. However the media broker doesn't start sending to the browser until it has:
1. Received the answer from the SIP side (which contains the codecs that we may want to offer to the web side) 2. Then it starts the stun process to establish the path on the browser side which has to complete before media is finally sent to the browser.
For your information we have looked into solutions to this problem before but have previously decided we have the best or 'least worst' option.
- The problem with setting up the media path on the web side earlier is that we may end up selecting the wrong codec and force us to transcode the media which is an expensive operation and should be avoided whenever possible for compelling performance reasons.
- We did consider forcing the SIP side into making the SDP offer by sending an INVITE with no SDP but this is not supported by all devices/servers
- Another approach we tried is to buffer the SIP side media and send it once the Web side media path is set up. However this lead to an unacceptable latency lag during the whole call.
The recommended work around for this issue is to add a second or so of silence (or comfort noise) at the beginning of an announcement.