[sr-dev] onsend reply route issue with KEMI
Daniel-Constantin Mierla
miconda at gmail.com
Wed Apr 14 15:16:54 CEST 2021
Hello,
thanks for the report and digging in further to look for a fix!
I pushed a slightly different version, reversing the order, expecting
the native config file to be still the more common use case.
It is now in the master branch, I will backport for next 5.4.x release.
Cheers,
Daniel
On 13.04.21 22:41, Salah Uddin Ahmed wrote:
> Hi Henning,
>
> Thanks for your reply.
> I have tried this with the latest version, 5.4.4. But it has the same
> behavior as 5.4.1.
> Here added the simple patch we have made. Not sure is there any side
> effect of this change.
>
> ===============================
> Index: kamailio-5.4.4/src/core/onsend.h
> ===================================================================
> --- kamailio-5.4.4.orig/src/core/onsend.h
> +++ kamailio-5.4.4/src/core/onsend.h
> @@ -57,7 +57,7 @@ extern onsend_info_t* p_onsend;
> * WARNING: buf must be 0 terminated (to allow regex matches on it) */
> int run_onsend(sip_msg_t* orig_msg, dest_info_t* dst, char* buf, int
> len);
>
> -#define onsend_route_enabled(rtype)
> (onsend_rt.rlist[DEFAULT_RT]?((rtype==SIP_REPLY)?onsend_route_reply:1):0)
> +#define onsend_route_enabled(rtype)
> (((kemi_onsend_route_callback.len>0 && sr_kemi_eng_get()) ||
> onsend_rt.rlist[DEFAULT_RT])?((rtype==SIP_REPLY)?onsend_route_reply:1):0)
>
> int run_onsend_evroute(onsend_info_t *sndinfo, int evrt, str *evcb,
> str *evname);
> ===============================
>
> Thanks,
> Rubel
>
> On Tue, Apr 13, 2021 at 6:00 AM Henning Westerholt <hw at skalatan.de
> <mailto:hw at skalatan.de>> wrote:
>
> Hello,
>
>
>
> have not looked into the details, but I would suggest before you
> spend more time debugging it to upgrade to the latest 5.4.x
> version. You do not need to change something in your cfg or db for
> this, and it will also contain other bugfixes.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
> <https://skalatan.de/blog/>
>
> Kamailio services – https://gilawa.com <https://gilawa.com/>
>
>
>
> *From:* sr-dev <sr-dev-bounces at lists.kamailio.org
> <mailto:sr-dev-bounces at lists.kamailio.org>> *On Behalf Of *Salah
> Uddin Ahmed
> *Sent:* Monday, April 12, 2021 11:28 PM
> *To:* sr-dev at lists.kamailio.org <mailto:sr-dev at lists.kamailio.org>
> *Subject:* [sr-dev] onsend reply route issue with KEMI
>
>
>
> Hello,
>
>
>
> We are using the Kamailio(5.4.1) with python3 KEMI interpreter.
> Here I noticed an issue on ksr_onsend_route with the reply
> messages. We did "onsend_route_reply=1" on the kamailio.cfg. But
> ksr_onsend_route is not triggered by any reply messages.
>
> Tried to dig some code and found, in t_reply.c before calling
> "run_onsend" it tested whether the onsend_rt list is empty or not
> by onsend_route_enabled(file: onsend.h) method.
>
> But presumably rt lists are always empty if we use a KEMI
> interpreter. We have tried the same version of Kamailio without
> KEMI, then onsend_route works fine.
>
>
>
> If onsend_rt is not being used in case of KEMI then can we replace
> this test with simply by testing only the onsend_route_reply flag?
>
>
>
> Please advise if we are missing something.
>
>
>
> Thank you,
>
> Rubel
>
>
> _______________________________________________
> Kamailio (SER) - Development Mailing List
> sr-dev at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210414/366478ab/attachment.htm>
More information about the sr-dev
mailing list