Module: kamailio Branch: master Commit: 7612f67001c57d6adf339cd318e48ad828123213 URL: https://github.com/kamailio/kamailio/commit/7612f67001c57d6adf339cd318e48ad8...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-02-01T15:06:51+01:00
misc/examples/kemi: convert port to string in log messages
---
Modified: misc/examples/kemi/kamailio-basic-kemi-python.py
---
Diff: https://github.com/kamailio/kamailio/commit/7612f67001c57d6adf339cd318e48ad8... Patch: https://github.com/kamailio/kamailio/commit/7612f67001c57d6adf339cd318e48ad8...
---
diff --git a/misc/examples/kemi/kamailio-basic-kemi-python.py b/misc/examples/kemi/kamailio-basic-kemi-python.py index f692280959..7d952e413e 100644 --- a/misc/examples/kemi/kamailio-basic-kemi-python.py +++ b/misc/examples/kemi/kamailio-basic-kemi-python.py @@ -146,13 +146,13 @@ def ksr_route_reqinit(self, msg): # ip is already blocked KSR.dbg("request from blocked IP - " + KSR.pv.get("$rm") + " from " + KSR.pv.get("$fu") + " (IP:" - + KSR.pv.get("$si") + ":" + KSR.pv.get("$sp") + ")\n"); + + KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) + ")\n"); return -255;
if KSR.pike.pike_check_req()<0 : KSR.err("ALERT: pike blocking " + KSR.pv.get("$rm") + " from " + KSR.pv.get("$fu") + " (IP:" - + KSR.pv.get("$si") + ":" + KSR.pv.get("$sp") + ")\n"); + + KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) + ")\n"); KSR.pv.seti("$sht(ipban=>$si)", 1); return -255;
@@ -174,7 +174,7 @@ def ksr_route_reqinit(self, msg):
if KSR.sanity.sanity_check(1511, 7)<0 : KSR.err("Malformed SIP message from " - + KSR.pv.get("$si") + ":" + KSR.pv.get("$sp") +"\n"); + + KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) +"\n"); return -255;