Hello! We needed some commands in rtpengine module to be asynchronous that is offer, answer and delete. I needed help for this.
Firstly, I went through the evapi module to understand how asynchronous commands were implemented by suspending request/responses and then by continuing. But I couldn't see anywhere where the suspended commands were being continued.
Thank you.
Hello,
what is the motivation behind this? Are you seeing performance issues in a production environment that could not solved e.g., by adding some more rtpengine resources?
Regarding implementation, you could also have a look for example at the http_async_client module, which might be a bit more easy to understand regarding the async implementation in Kamailio.
Cheers,
Henning
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://gilawa.comhttps://gilawa.com/
From: sr-dev sr-dev-bounces@lists.kamailio.org On Behalf Of Aditya Gupta Sent: Thursday, November 24, 2022 2:47 PM To: sr-dev@lists.kamailio.org Subject: [sr-dev] Make some commands in kamailio rtpengine module asynchronous
Hello! We needed some commands in rtpengine module to be asynchronous that is offer, answer and delete. I needed help for this.
Firstly, I went through the evapi module to understand how asynchronous commands were implemented by suspending request/responses and then by continuing. But I couldn't see anywhere where the suspended commands were being continued.
Thank you.
We have 2 rtpengines in production and thousands of calls coming in. Few of them get timed out because they don't get processed in time by rtpengine. Simply by making 3 commands; offer, answer and delete. It can help us a lot with this.
I think I've understood what needs to be done and, in a day, or two I'll raise a PR with the changes for rtpengine module. After that I guess there are some changes that needs to be done in sipwise/rtpengine media servers which seems complicated at this point. I'm hoping for your support in improving my PR for now. Against which branch should I raise my PR??
Thank you ________________________________ From: Henning Westerholt hw@gilawa.com Sent: Monday, November 28, 2022 1:47:00 PM To: Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org Cc: Aditya Gupta aditya.gupta@alumni.iiit.ac.in Subject: RE: Make some commands in kamailio rtpengine module asynchronous
Hello,
what is the motivation behind this? Are you seeing performance issues in a production environment that could not solved e.g., by adding some more rtpengine resources?
Regarding implementation, you could also have a look for example at the http_async_client module, which might be a bit more easy to understand regarding the async implementation in Kamailio.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-dev sr-dev-bounces@lists.kamailio.org On Behalf Of Aditya Gupta Sent: Thursday, November 24, 2022 2:47 PM To: sr-dev@lists.kamailio.org Subject: [sr-dev] Make some commands in kamailio rtpengine module asynchronous
Hello!
We needed some commands in rtpengine module to be asynchronous that is offer, answer and delete. I needed help for this.
Firstly, I went through the evapi module to understand how asynchronous commands were implemented by suspending request/responses and then by continuing. But I couldn't see anywhere where the suspended commands were being continued.
Thank you.
On 28/11/2022 04.14, [EXT] Aditya Gupta wrote:
We have 2 rtpengines in production and thousands of calls coming in. Few of them get timed out because they don't get processed in time by rtpengine. Simply by making 3 commands; offer, answer and delete. It can help us a lot with this.
I think I've understood what needs to be done and, in a day, or two I'll raise a PR with the changes for rtpengine module. After that I guess there are some changes that needs to be done in sipwise/rtpengine media servers which seems complicated at this point.
Do you have a sense as to why rtpengine would be slow to respond? Because as Henning mentioned, we can handle many thousands of calls and haven't seen rtpengine becoming slow to respond, even with HA backing enabled.
Cheers
On 28.11.22 14:58, Richard Fuchs wrote:
On 28/11/2022 04.14, [EXT] Aditya Gupta wrote:
We have 2 rtpengines in production and thousands of calls coming in. Few of them get timed out because they don't get processed in time by rtpengine. Simply by making 3 commands; offer, answer and delete. It can help us a lot with this.
I think I've understood what needs to be done and, in a day, or two I'll raise a PR with the changes for rtpengine module. After that I guess there are some changes that needs to be done in sipwise/rtpengine media servers which seems complicated at this point.
Do you have a sense as to why rtpengine would be slow to respond? Because as Henning mentioned, we can handle many thousands of calls and haven't seen rtpengine becoming slow to respond, even with HA backing enabled.
I haven't encountered rtpengine being slow in response, unless there is some network problem on the control link.
As I read in this discussion, the timeout is about calls, so at sip layer. The rtpengine control command has 1s timeout by default, which is under the sip timeout, but of course it can accumulate on many simultaneous calls. On the other hand, if rtpengine command times out, just switching to async processing is not solving it, it will still happen with default timeout value, so the invite is not handled by rtpengine after all. In such case the timeout value has to be increased.
I would rather check if it is actually rtpengine by enabling the latency limit via core parameters, it could be another function in config that could result in a sip layer timeout. Or maybe insufficient number of sip workers (children parameter should be increased) to cope properly with the traffic volume.
Cheers, Daniel