Regarding the Coding style/C standard requirements, I started a discussion several months ago to see what people/devs consider to be better to use:
* https://lists.kamailio.org/pipermail/sr-users/2020-April/109072.html
Kamailio being used in various embedded devices, with stricter compilers, in terms of declaring variables, they have to be at least at the beginning of the block, although now I also prefer at the beginning of functions, since we guide mainly after C89 (which was the implemented in compilers when project was started in 2000).
On PR, I haven't done any extensive review, but if no other comments, it can be merged.