Video Chat application taking time while receiving audio stream, iOS, Web Call Server

Arpit Parekh

New Member
Hello,
All.

We are working on iOS application using Swift.
We have hosted Web Call Server on AWS from Amazon Marketplace.

Creating two person Video Call application, using Video Chat example code.
We have added audio call as well as video call in our application.
We are also using call kit.

It is taking time (delay) about 5 seconds to receive voice from remote stream.

For that,

Step 1:
1. We me make an outgoing call using connect room
FPWCSApi2Call is also made to support audio for callkit.

2. We join the room and publish the stream.

3. Remote person answers the call using callkit and connect and joins the room.

4. While receiveng the audio at remote end, but it is taking delay around 5 seconds to receive the voice at remote end.

Can it be done faster?
 

Max

Administrator
Staff member
Good day.
Please set the following parameters in /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties file
Code:
periodic_fir_request=true
periodic_fir_request_interval=2000
The initial delay should be no more than 2 seconds in this case.
 

Arpit Parekh

New Member
Hello we have observed some logs

Please look
We tried to print logs at iOS end,
and tried to check time required for each events.

Code:
Caller
Connecting room Time Duration: 0.0007609128952026367
room Connected Time Duration:2.1659889221191406

joinRoom(roomName:) Time Duration 0.00
room joined Time Duration: 0.5214749574661255

localStream publishing Time Duration: 0.00011897087097167969
localStream published successfully. Time Duration: 1.8340449333190918

remote participant joined demo2 Time Duration: 1.965522050857544
remote participant's stream published demo2  Time Duration: 3.512807011604309

Callee
Connecting room Time Duration: 0.001350998878479004
room Connected Time Duration:2.8764760494232178

joinRoom(roomName:) Time Duration 0.00
room joined Time Duration: 0.30389106273651123

localStream publishing Time Duration: 0.0002009868621826172
localStream published successfully. Time Duration: 1.5724530220031738
Time required for connecting room taking around 2 seconds
And publishing stream requires around 1.5 seconds

Any suggestion
 

Arpit Parekh

New Member
Hello,

Would it be possible to conduct a remote session as it will be helpful for us to understand and resolve the issue? If so, please share your availability so we can schedule a meeting.

We have submitted the required form and shared our server’s SSH credentials. Kindly provide your IP ranges so we can allow SSH access.

Please note that this is a demo server. Once testing is complete, we will replicate the changes on the live server. Therefore, we require detailed guidance on the configuration changes made so we can implement them accordingly.

Kindly respond to me at arpitbp@teamlocus.net.

Looking forward to your support.

Best regards,
Arpit
 

Max

Administrator
Staff member
We have submitted the required form and shared our server’s SSH credentials. Kindly provide your IP ranges so we can allow SSH access.
Please see the IP address to allow SSH connections here: Providing support engineer access to your server
Would it be possible to conduct a remote session as it will be helpful for us to understand and resolve the issue? If so, please share your availability so we can schedule a meeting.
We do not arrange any remote sessions.
 

Max

Administrator
Staff member
We checked the server by credentials provided.
Seems like the server too far from a clients. The instanse is in us-west AWS region, but you`re probably testing from India. In this case a minimal server ping will be 200 ms and more (from our test PC ping is 222 ms to intermediate hosts). Unfortunately, we can't test ping to the server directly because ICMP seems to be blocked.
Also seems like the server outgoing traffic is strictly restricted: evem Amazon Linux repository is not available:
1743134670387.png

Flashphoner license server is not available too, so streaming does not work
1743134718401.png

The license server must be available from the instance for any streaming functions to work. Please fix the issues.
We recommend to migrate the instance to a region closer to clients. For example, for Indian clients use the intances in one of the Indian regions. This will fix a long ping and connection issues.
Also seems you have parameters that are not supported in WCS at all
1743135055387.png

Remove those parameters from WCS configuration.
 

Arpit Parekh

New Member
Hello Support,
Please find below inline answers.

We checked the server by credentials provided.
Seems like the server too far from a clients. The instanse is in us-west AWS region, but you`re probably testing from India. In this case a minimal server ping will be 200 ms and more (from our test PC ping is 222 ms to intermediate hosts)
--> We have users in multiple regions, so it isn't possible for us to host the server near the India region. Actually, our dev team is based in India, but more clients are in the US. Eventually, it will be used by users from the US, India, Australia, and New Zealand as well.

Unfortunately, we can't test ping to the server directly because ICMP seems to be blocked.
--> We have allowed ICMP on the server.

Also seems like the server outgoing traffic is strictly restricted: evem Amazon Linux repository is not available:
--> We have allowed internet traffic from the server.

Flashphoner license server is not available too, so streaming does not work. The license server must be available from the instance for any streaming functions to work. Please fix the issues.
--> It should work as we have allowed outbound internet traffic.

We recommend to migrate the instance to a region closer to clients. For example, for Indian clients use the intances in one of the Indian regions. This will fix a long ping and connection issues.
--> We have users in multiple regions, and our major clients are in the US, so it isn't possible for us to migrate the instance to the India region.

Also seems you have parameters that are not supported in WCS at all.Remove those parameters from WCS configuration.
--> As guided, we have removed the following parameters from the flashphoner.properties:
ice_gathering_timeout=1000
preferred_audio_codec=opus
preferred_video_codec=VP8

Resolving the latency issue is important for us, as we have users across multiple regions and require all users to connect to our audio/video calling service. Any latency-related disruptions can severely impact the user experience.

Thanks,
Arpit
 

Max

Administrator
Staff member
We have users in multiple regions, and our major clients are in the US, so it isn't possible for us to migrate the instance to the India region.
You can't achive an equal latency via a different publisher channels. So you will have a 1.5-2 secinds latency when publishing form India to US.
Please consider a CDN with origin closer to publishers and edges closer to players. A simple configuration explained in this article, a technical description are here.
 
Top