Hey Arseniy,

I had a similar thing so I tweaked the default config a little. Here is the kemi python bit I use.

        if KSR.rr.loose_route() > 0:
            if KSR.is_method_in("B"):
                # do accounting ...
                KSR.setflag(FLT_ACC)
                # ... even if the transaction fails
                KSR.setflag(FLT_ACCFAILED)
            elif KSR.is_NOTIFY():
                # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
                KSR.rr.record_route()

            self.ksr_route_relay(msg)
        else:
            if KSR.is_ACK():
                if KSR.tm.t_check_trans() > 0:
                    # no loose-route, but stateful ACK
                    # must be an ACK after a 487
                    # or e.g. 404 from upstream server
                    self.ksr_route_relay(msg)
                else:
                    self.ksr_route_dispatch(msg) # Goes to my dispatcher logic
                return -255

            KSR.sl.sl_send_reply(404, "No request here")
        return -255

I use dispatcher to route between destinations and use double rr params as I sit behind NAT and have private endpoints I route to.

https://www.kamailio.org/docs/modules/devel/modules/rr.html#rr.p.enable_double_rr

I also describe the rr params as well as depending on direction (to do NAT traversal.)

So from PBX to Customer - KSR.rr.record_route_preset("PUB_IP" + ";r2=on", "PRIV_IP" + ";r2=on")
And from Customer to PBX - KSR.rr.record_route_preset("PRIV_IP" + ";r2=on", "PUB_IP" + ";r2=on")

Hope this helps you get it working.

John.


On Thu, 2 May 2024 at 12:48, Arseniy Moskvich via sr-users <sr-users@lists.kamailio.org> wrote:
Hi everyone. We are new to Kamailio and using Kamailio 5.8 with FreeSwitch.
We have the issue with the incoming call from our provider. They are dropping after 30 seconds. The client doesn't receive ACK from Kamailio. But FreeSwitch sends ACK to Kamailio. The outbound call is working fine. At the moment flow is our provider -> FreeSwitch -> Kamailio -> our web client. Could someone give us some directions please? Please find attached Kemi.py.
Thank you so much in advance
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: