[sr-dev] git:master:d678d095: misc/examples: handle return code for ksr_route_withindlg() in kemy python example

Daniel-Constantin Mierla miconda at gmail.com
Thu May 4 18:06:59 CEST 2017


Module: kamailio
Branch: master
Commit: d678d095858271a0282b8a824840880f9994041b
URL: https://github.com/kamailio/kamailio/commit/d678d095858271a0282b8a824840880f9994041b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-05-04T18:06:46+02:00

misc/examples: handle return code for ksr_route_withindlg() in kemy python example

- closes GH #1117

---

Modified: misc/examples/kemi/kamailio-basic-kemi-python.py

---

Diff:  https://github.com/kamailio/kamailio/commit/d678d095858271a0282b8a824840880f9994041b.diff
Patch: https://github.com/kamailio/kamailio/commit/d678d095858271a0282b8a824840880f9994041b.patch

---

diff --git a/misc/examples/kemi/kamailio-basic-kemi-python.py b/misc/examples/kemi/kamailio-basic-kemi-python.py
index 8d23a6b..b38a331 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-python.py
+++ b/misc/examples/kemi/kamailio-basic-kemi-python.py
@@ -66,7 +66,8 @@ def ksr_request_route(self, msg):
             return 1;
 
         # handle requests within SIP dialogs
-        self.ksr_route_withindlg(msg);
+        if self.ksr_route_withindlg(msg)==-255 :
+            return 1;
 
         # -- only initial requests (no To tag)
 




More information about the sr-dev mailing list