[SR-Users] Kamailio + KEMI + topos + change_reply_status

Marrold kamailio at marrold.co.uk
Tue Mar 8 23:45:14 CET 2022


Hi,

I'm using Kamailio 5.5.3 with a KEMI / Python based configuration on Debian
11.

In my reply route I am trying to convert a 183 to a 180 with:
KSR.textopsx.change_reply_status(180,
"Ringing")

I've noticed with TOPOS enabled, it doesn't work and I still see a 183 go
out. But with it disabled, it works as expected and it's converted to a
180. I get the same behaviour with / without msg_apply_changes()

Config looks like this:

    def ksr_onreply_manage(self, msg):

        KSR.info(f"ksr_onreply_manage\r\n")

        scode = KSR.pv.get("$rs")

        if KSR.permissions.allow_source_address_group()<0:
            if scode == 183:
               KSR.info(f"ksr_onreply_manage: Converting 183 to 180\r\n")
               KSR.textopsx.change_reply_status(180, "Ringing")
               KSR.textopsx.msg_apply_changes()

        if scode>100 and scode<299 :
            self.ksr_route_natmanage(msg)

        return 1

The debug log doesn't reveal anything too obvious, I can share if its of
any use.

Does anyone have any suggestions?

Thanks
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220308/60685335/attachment.htm>


More information about the sr-users mailing list