Hello,
I am trying to implement RTPEngine failover, where if a selected RTPEngine node fails in the middle of the call (and not responding NG requests), I want to select an alternative node. However, when I call rtpengine_manage(), it does not seem to select an alternative node in case of a failure. To address this, I have attempted to check if $avp(RTP_INSTANCE) is null after calling rtpengine_manage(), and then use rtpengine_delete() to forget the selected RTPEngine node for the specific call, with the expectation that Kamailio would assign a new RTPEngine node for subsequent SIP message retries. However, it appears that rtpengine_delete() does not have the desired effect in this regard.
Here is an excerpt of my code for reference: ``` route[RTP] { #!ifdef WITH_RTPENGINE if (has_body("application/sdp")) { if ($avp(x_source) == "INTERNAL") { rtpengine_manage("replace-session-connection replace-origin direction=internal direction=external"); } else if ($avp(x_source) == "EXTERNAL") { rtpengine_manage("replace-session-connection replace-origin direction=external direction=internal"); }
if ($avp(RTP_INSTANCE) == $null) { rtpengine_delete(); drop(); } } #!endif } ```
Can you please advise on how I can achieve the desired failover behavior? Is there another function similar to `rtpengine_reset_call` that can make Kamailio forget the RTPEngine node for a specific call?
Thank you!
Hi,
use rtpengine with redis and let it do the work for you with pub/sub the calls in redis.
https://github.com/sipwise/rtpengine/wiki/Redis-keyspace-notifications
mehdithreem+kamailio@gmail.com schrieb am Sa., 15. Apr. 2023, 09:52:
Hello,
I am trying to implement RTPEngine failover, where if a selected RTPEngine node fails in the middle of the call (and not responding NG requests), I want to select an alternative node. However, when I call rtpengine_manage(), it does not seem to select an alternative node in case of a failure. To address this, I have attempted to check if $avp(RTP_INSTANCE) is null after calling rtpengine_manage(), and then use rtpengine_delete() to forget the selected RTPEngine node for the specific call, with the expectation that Kamailio would assign a new RTPEngine node for subsequent SIP message retries. However, it appears that rtpengine_delete() does not have the desired effect in this regard.
Here is an excerpt of my code for reference:
route[RTP] { #!ifdef WITH_RTPENGINE if (has_body("application/sdp")) { if ($avp(x_source) == "INTERNAL") { rtpengine_manage("replace-session-connection replace-origin direction=internal direction=external"); } else if ($avp(x_source) == "EXTERNAL") { rtpengine_manage("replace-session-connection replace-origin direction=external direction=internal"); } if ($avp(RTP_INSTANCE) == $null) { rtpengine_delete(); drop(); } } #!endif }
Can you please advise on how I can achieve the desired failover behavior? Is there another function similar to `rtpengine_reset_call` that can make Kamailio forget the RTPEngine node for a specific call?
Thank you! __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: