[SR-Users] RTPEngine + Kamailio state question
abalashov at evaristesys.com
Thu Sep 30 20:00:37 CEST 2021
Yeah, but what happens if I handle an offer/answer with an overridden set ID — let’s say that ID value comes from a database query or API or whatever at initial INVITE processing — and then I restart Kamailio, and then a reinvite occurs.
If I don’t know which set was used, the offer/answer cycle will audio for the call, since whatever RTPEngine is hit up by default will say “I don’t know that Call-ID” and the SDP substitution of media endpoints won’t take place.
I deal with this now by storing the set ID in an RR attribute. A custom $dlg_var(…) would work in modern Kamailio too, I’m sure.
But both are a little messy. What I was trying to ascertain is whether there is some way, non-obvious to me, that the RTPEngine control module can persist these associations.
> On Sep 30, 2021, at 1:46 PM, Richard Fuchs <rfuchs at sipwise.com> wrote:
> On 30/09/2021 13.34, [ EXT ] Alex Balashov wrote:
>> On Sep 30, 2021, at 1:32 PM, Richard Fuchs <rfuchs at sipwise.com> wrote:
>>> On 30/09/2021 13.17, [ EXT ] Alex Balashov wrote:
>>>> I’m not sure how the mapping works internally. But whatever the operation is, is that value stored somewhere or possible to store somewhere so as to persist across restarts in a turn-key way?
>>> AFAICR the node is selected based on a deterministic hash over the call ID. So as long as the config doesn't change between restarts, the node selected from any particular call ID would remain the same.
>>> The exception is cases where the selected node was not available and the call then had to go to a secondary fallback node. AFAIK this association is stored in memory only and would be lost after a restart (which would become a problem if the previously unavailable node is now back up).
>> Thanks for that. That accounts for how a Call-ID is mapped to a node within a set. But what if the set ID chosen for a particular call is nonstandard, i.e. expressly overridden with set_rtpengine_set()? Is that knowledge somehow available after a restart?
> No there's no persistent state at all. I would suggest to always explicitly select the appropriate set before every invocation of any function (or at least once at the beginning of the script) regardless of the use case.
> Kamailio - Users Mailing List - Non Commercial Discussions
> * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
More information about the sr-users