herlesupreeth / docker_open5gs

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker
BSD 2-Clause "Simplified" License
279 stars 156 forks source link

VOLTE: Unable to establish calls between two UEs using new PCSCF #318

Closed razvancrainea closed 1 month ago

razvancrainea commented 1 month ago

Hello!

I'm trying to develop a new IMS solution that is using OpenSIPS as CSCF. Most of the development is completed, and I've successfully managed to register two UEs over IPsec. However, when I try to place a call between them, although the INVITE is properly sent to the terminating UE, and it responds with a 183, the phone is not actually ringing, and the call is eventually thorn down. This happens in either direction (UE1 calling UE2, and UE2 caling UE1). I've attached a few sngrep screenshots for reference, as well as a pcap.

Call from UE1 (Xiaomi Redmi Note 9T) -> UE2 (OnePlus 8T) ims1

Call from UE2 (OnePlus 8T) -> UE1 (Xiaomi Redmi Note 9T) ims2 call-attempts-fail.zip

If I replace the P-CSCF with Kamailio, the calls are running fine, so I must be missing something in my P-CSCF configuration/setup, but I am not sure what, and how to troubleshoot this. So any hints on what is the problem, or how I can troubleshoot this, it would be really helpful.

Thanks!

razvancrainea commented 1 month ago

The only difference I spotted between OpenSIPS's and Kamailio's behavior is that for the failed scenario (OpenSIPS P-CSCF), the PRACK is received over UDP, while for the successful scenario (Kamailio P-CSCF), the PRACK comes over TCP. However, I couldn't find any references in the specifications on what could lead to this behavior, and how an UE decides when to use UDP and when TCP. Perhaps understanding this is a good start, but I couldn't find any reference on this.

Thanks a lot!

razvancrainea commented 1 month ago

I've managed to sort this out - the problem was that I was not paying attention to the media, and I was not using the Rx interface to allow the media flow. Sorting this out fixed the issue, and now I have a fully working call. Thanks a lot for your work!

herlesupreeth commented 1 month ago

Glad it got sorted out. If i recall correctly usage of TVP or UDP is in some RFC. Usually TCP is used when MTU exceed a certain threshold around 1300 bytes.

Let me know if you face further issues. Looking forward to seeing opensips IMS getting integrated here.

razvancrainea commented 1 month ago

Indeed, having this sorted out, I now have a fully working PoC, that is derived from this repository (thanks a lot for your work!), that I will be presenting next week at the OpenSIPS Summit Workshop. As soon as that finishes, I would like to wrap everything up and open a PR for it.