Skip to content

Commit

Permalink
misc/examples: kemi - sanity checks for response in python script
Browse files Browse the repository at this point in the history
(cherry picked from commit bd42130)
(cherry picked from commit 0ba7876)
  • Loading branch information
miconda committed Mar 2, 2022
1 parent 2be54b7 commit fb4d740
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions misc/examples/kemi/kamailio-basic-kemi-python.py
Expand Up @@ -172,7 +172,7 @@ def ksr_route_reqinit(self, msg):
KSR.sl.sl_send_reply(200,"Keepalive")
return -255

if KSR.sanity.sanity_check(1511, 7)<0 :
if KSR.sanity.sanity_check(17895, 7)<0 :
KSR.err("Malformed SIP message from "
+ KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) +"\n")
return -255
Expand Down Expand Up @@ -372,7 +372,14 @@ def ksr_failure_manage(self, msg):
# SIP response handling
# -- equivalent of reply_route{}
def ksr_reply_route(self, msg):
KSR.info("===== response - from kamailio python script\n")
KSR.dbg("response handling - python script\n")

if KSR.sanity.sanity_check(17604, 6)<0 :
KSR.err("Malformed SIP response from "
+ KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) +"\n")
KSR.set_drop()
return -255

return 1


Expand Down

0 comments on commit fb4d740

Please sign in to comment.