> In my case, problem is 100% in the REST API, trying to ‘fix’ it in kamailio was just an option that i was exploring  or more like ‘am i doing something wrong?’

Not necessarily, but maybe moving from a centralized http entrypoint to mqtt may be beneficial in your case. Kamailio integration is pretty straightforward and doesn't differ much from http_async_client.