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

Karsten Horsmann khorsmann at gmail.com
Wed Mar 9 01:09:14 CET 2022


Hi Marrold,

not tested but could it be that you check an string with an int?

Kind regards
Karsten Horsmann

Marrold <kamailio at marrold.co.uk> schrieb am Di., 8. März 2022, 23:46:

> 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
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220309/7c5e19e6/attachment.htm>


More information about the sr-users mailing list