It's in route_reqinit, I only to couple of checks before calling it
def ksr_request_route(self, msg):
received_port = KSR.pv.get("$Rp");
proto = KSR.pv.get("$proto");
if ((received_port == MY_WS_PORT) or (received_port == MY_WSS_PORT) and
(proto != "ws") and (proto != "wss")):
KSR.xlog.xwarn("SIP request received on " + received_port +
"\n");
KSR.sl.send_reply(403, "Forbidden");
exit();
if not KSR.is_method_in("IABCRO"):
KSR.sl.sl_send_reply(405, "Method not allowed");
exit();
if KSR.is_INVITE():
KSR.rr.record_route();
KSR.dialog.dlg_manage();
self.ksr_route_reqinit(msg);
def ksr_route_reqinit(self, msg):
KSR.xlog.xinfo("IN ksr_route_reqinit\n");
if KSR.maxfwd.process_maxfwd(10) < 0:
KSR.sl.sl_send_reply(483, "Too many hops");
exit();
if KSR.is_OPTIONS() and KSR.is_myself_ruri():
KSR.x.modf("options_reply");
exit();
if KSR.sanity.sanity_check(1511, 7) < 0:
KSR.xlog.xinfo("Malformed SIP message from " +
str(KSR.pv.get("$si")) + ":" + str(KSR.pv.get("$sp")) +
"\n");
exit();
return 1;
________________________________
Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850
15 июля 2019 г., в 9:20, Daniel-Constantin Mierla
<miconda(a)gmail.com> написал(а):
Hello,
do you have that piece of code in the request route function (or a function executed from
there)?
Any other functions from KSR executed before, or it is just at the top?
Cheers,
Daniel
On Mon, Jul 15, 2019 at 12:31 AM Alexandru Covalschi <568691(a)gmail.com
<mailto:568691@gmail.com>> wrote:
Hello list,
if KSR.is_OPTIONS() and KSR.is_myself_ruri():
KSR.x.modf("options_reply");
exit();
with a valid URI (no username) gives the subj output (opt_reply(): called for non-OPTIONS
request)
How could that be?
Python KEMI, 5.2.3, docker.
________________________________
Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
<https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
--
Daniel-Constantin Mierla -
http://www.asipto.com <http://www.asipto.com/>
http://twitter.com/#!/miconda <http://twitter.com/#!/miconda> -
http://www.linkedin.com/in/miconda
<http://www.linkedin.com/in/miconda>_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users