diff --git a/misc/examples/kemi/kamailio-basic-kemi-jsdt.js b/misc/examples/kemi/kamailio-basic-kemi-jsdt.js index cedbf098b09..9949739d949 100644 --- a/misc/examples/kemi/kamailio-basic-kemi-jsdt.js +++ b/misc/examples/kemi/kamailio-basic-kemi-jsdt.js @@ -116,18 +116,19 @@ function ksr_route_relay() function ksr_route_reqinit() { if (!KSR.is_myself_srcip()) { + var srcip = KSR.kx.get_srcip(); if (KSR.htable.sht_match_name("ipban", "eq", srcip) > 0) { // ip is already blocked KSR.dbg("request from blocked IP - " + KSR.kx.get_method() + " from " + KSR.kx.get_furi() + " (IP:" - + KSR.kx.get_srcip() + ":" + KSR.kx.get_srcport() + ")\n"); + + srcip + ":" + KSR.kx.get_srcport() + ")\n"); KSR.x.exit(); } if (KSR.pike.pike_check_req()<0) { KSR.err("ALERT: pike blocking " + KSR.kx.get_method() + " from " + KSR.kx.get_furi() + " (IP:" - + KSR.kx.get_srcip() + ":" + KSR.kx.get_srcport() + ")\n"); - KSR.htable.sht_seti("ipban", KSR.kx.get_srcip(), 1); + + srcip + ":" + KSR.kx.get_srcport() + ")\n"); + KSR.htable.sht_seti("ipban", srcip, 1); KSR.x.exit(); } }