Hi,

rtpengine_manage() will return -1 if any errors happen. You need to check the return code in kamailio cfg file and explicitly end SIP routing logic if you want so. Otherwise, SIP routing logic will continue.

Thanks,
Stefan

On 10/23/24 10:29, Wolter Eldering via sr-users wrote:


On 22 Oct 2024, at 15:08, Alex Balashov via sr-users <sr-users@lists.kamailio.org> wrote:


On Oct 22, 2024, at 8:47 am, Wolter Eldering via sr-users <sr-users@lists.kamailio.org> wrote:

Hello,

I have a question about the rtpengine module and how to use it via KEMI/python.

Will processing of the native script stop when rtpengine_manage returns with an error?
Or will it continue and will the SDP be forwarded unchanged?

The second one. However, mind the timeout modparams for the `rtpengine` control module. With the defaults, outreach efforts to an unreachable RTPEngine (assuming that's the error) will rapidly block your SIP worker processes.


In that case is it not better to return an error instead of letting the signalling succeed and the media broken or insecure?


--- kamailio.cfg 2024-10-23 09:00:21
+++ kamailio.cfg.orig 2024-10-23 09:00:53
@@ -882,12 +882,7 @@

 #!ifdef WITH_RTPENGINE
  if(nat_uac_test("8")) {
-   if (!rtpengine_manage("SIP-source-address replace-origin replace-session-connection")) {
-           xlog("RTPENGINE: failed to manage call\n");
-      sl_reply_error();
-      exit;
-    }
-   }
+ rtpengine_manage("SIP-source-address replace-origin replace-session-connection");
  } else {
  rtpengine_manage("replace-origin replace-session-connection");
  }
@@ -1092,4 +1087,3 @@
 #!endif
  return;
 }

Not sure how the handle the failure in case rtpengine_manage fails handeling the reply or ACK with SDP.

UAC ->      proxy     -> UAS

                      <-- 200 with SDP
         rtpengine_manage failure
 500 <--
                      -->  CANCEL
 --> ACK




 --> ACK with SDP
        rtpengine_manage failure
 BYE <--
                     --> CANCEL
 200 -->





-- Alex

--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__________________________________________________________
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:


__________________________________________________________
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: