Skip to content

LTE NR co-existance#444

Open
Rashed97 wants to merge 18 commits into
herlesupreeth:masterfrom
Rashed97:lte_nr_coex2
Open

LTE NR co-existance#444
Rashed97 wants to merge 18 commits into
herlesupreeth:masterfrom
Rashed97:lte_nr_coex2

Conversation

@Rashed97
Copy link
Copy Markdown
Contributor

No description provided.

Rashed97 and others added 18 commits March 27, 2025 16:01
These shouldn't be hardcoded, but rather use the IP addresses declared in .env
Rework the MySQL container:

- Change the mysql_init.sh to be bind mounted:
  This allows dynamic changes to the script without having to recompile the container.

- Change the way the container data is first set up:
  The current process depends on the container being started the first time
  with an empty docker volume, since the docker volume will then implement a
  "copy on first use" method to populate itself with data. This data is in the
  docker image from the initial compilation, as installing mysql-server also
  initializes the data directory. If for some reason, the docker volume is not
  "empty", then the generic MySQL data directory from the image is never copied
  into it, resulting in an invalid data directory. This adds checks to ensure
  that the data directory is present, and if not, then initialize one before
  trying to use it.

- Change the permission setting:
  The current usermod -d call doesn't guarantee that the data directory is
  owned by mysql:mysql, and therefore leaves open the possibility for the
  data directory to fail to be used by the MySQL daemon. This occurs when
  migrating the volume from one machine to another. Adding the chown -R call
  ensures that the owner is set properly.

- Don't use mysql restart
  Some edge cases exist where restart doesn't actually stop any running mysql
  instances. Use stop and start instead, and also add a kill call to ensure
  that all running mysql instances are fully killed before we make changes.
- Don't use pkill or kill with database processes. These could lead to database corruption
- Make sure to gracefully shutdown the database daemon/services when the script recieves a terminate or interrupt command
- Ensure that mysqld_safe doesn't take over the PID so that interrupt or terminate signals reach the script
- Change the image to use ENTRYPOINT to ensure that signals reach it
- Add health check: Docker will ping the mysql database service every 30sec to ensure it's still up
Currently the P-CSCF can handle LTE-LTE and NR-NR communications.
Cross-technology communications are still a work in progress.
Using the PANI header, we can determine what interface this UE should
register via.

TODO:
- Implement detection for additional network types (ex. for IWLAN)
- Add some sort of database store for network access type, to be used
  in the mt config, as P-CSCF cannot query the network type from the
  device before starting a call
MT is currently broken due to the lack of a PANI header. This needs
to be reconfigured to read out of a database that has updated values
that are written during UE registeration.
Precursor to moving the N5 code to it's own configs
This allows us to have entirely different routes to select from depending on
the technology, versus having to do switching in the middle of the routes.
This completes the changes required for dynamic N5 and Rx route selection.

This adds the following:
- A table to store subscribers and their registration tech
- A table to store contact subscribers for contact aors
- An HTTP endpoint in S-CSCF to query for a IMPI given a public identity (ex. MSISDN)
- Proper retrieval of the IMPI in MO and MT routes
- Routing based on the registration tech retrieved from the table given an IMPI
Required after the route config file split
@Rashed97
Copy link
Copy Markdown
Contributor Author

@herlesupreeth I've rebased the LTE/NR coex branch here. Let me know if you want any additional changes to it before merging.

@herlesupreeth
Copy link
Copy Markdown
Owner

Awesome!! Thanks a ton for your huge effort again. Really like the additions to srsRAN :) . I will review this MR over weekend and merge

Copy link
Copy Markdown
Owner

@herlesupreeth herlesupreeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment. Thanks again for this nice contribution.

Comment thread pcscf/pcscf.cfg
##!define WITH_DEBUG
#!define WITH_NAT
##!define WITH_NATPING
#!define WITH_NATPING
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this change. I prefer NATPING to be disabled

@herlesupreeth
Copy link
Copy Markdown
Owner

Have you tested 5G calling with this change? I am getting following crash on pcscf upon deploying


Deploying component: 'pcscf'
mysqld is alive
 0(59) INFO: rtimer [rtimer_mod.c:307]: stm_t_param(): created rtimer name=NATPING interval=5 mode=1
 0(59) INFO: rtimer [rtimer_mod.c:307]: stm_t_param(): created rtimer name=NRF_NFM interval=5 mode=1
 0(59) INFO: pv [pv_shv.c:61]: shvar_init_locks(): locks array size 16
 0(59) INFO: <core> [core/tcp_main.c:5241]: init_tcp(): using epoll_lt as the io watch method (auto detected)
loading modules under config path: /usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/:/usr/local/lib64/kamailio/modules
Listening on 
             udp: 172.22.0.21 [172.22.0.21]:5060
             tcp: 172.22.0.21 [172.22.0.21]:5060
Aliases: 
             *: pcscf.ims.mnc001.mcc001.3gppnetwork.org:*

 0(59) INFO: <core> [main.c:3321]: main(): current open file limits [soft/hard]: [1048576/1048576]
 0(59) ERROR: <core> [core/mem/q_malloc.c:758]: qm_realloc(): qm_realloc(0x725fdec00010, 1024) called from core: core/counters.c: cnt_hash_add(390), module: core; qm_malloc() failed!
 0(59) ERROR: <core> [core/counters.c:857]: register_module_stats(): failed to add statistic core.rcv_replies_482
 0(59) ERROR: kex [core_stats.c:478]: register_core_stats(): failed to register core statistics
 0(59) ERROR: <core> [core/sr_module.c:1051]: init_mod(): Error while initializing module kex (/usr/local/lib64/kamailio/modules/kex.so)
ERROR: error while initializing modules
 0(59) ERROR: ims_ipsec_pcscf [ipsec.c:654]: clean_sa(): Error sending delete SAs command via netlink socket: No data available
 0(59) WARNING: ims_ipsec_pcscf [cmd.c:1397]: ipsec_cleanall(): Error cleaning IPSec Security associations during startup.
 0(59) ERROR: ims_ipsec_pcscf [ipsec.c:703]: clean_policy(): Error sending delete policies command via netlink socket: No data available
 0(59) WARNING: ims_ipsec_pcscf [cmd.c:1401]: ipsec_cleanall(): Error cleaning IPSec Policies during startup.
 0(59) ERROR: ims_ipsec_pcscf [ims_ipsec_pcscf_mod.c:422]: mod_destroy(): Error destroying spi generator

@Rashed97
Copy link
Copy Markdown
Contributor Author

@herlesupreeth Apologies for the late reply, I was travelling for work and this kept slipping my mind.

That's actually the exact error that I was facing before that led me to increase the memory size for P-CSCF. I wasn't having it anymore when I last ran my core but I'll try again in the next couple of days when I get home and get some time to spin it up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants