[SR-Users] KEMI: getting ksr_request_route not found or is not callable after t_relay()

Grant Bagdasarian grant.bagdasarian at messagebird.com
Sat Jul 16 15:25:57 CEST 2022


Hi Nigel,

You need to set this param:
http://www.kamailio.org/wiki/cookbooks/5.5.x/core#kemionsend_route_callback
Can also be set to “” (empty string)

Not sure why this is required. Maybe someone else can explain.

Hope this helps


On Sat, 16 Jul 2022 at 14:45 Nigel Daniels <nigel.daniels at gmail.com> wrote:

> ```
>
> def ksr_route_relay(self, msg):
>     if KSR.is_method_in("IBSU"):
>         if KSR.tm.t_is_set("branch_route") < 0:
>             KSR.tm.t_on_branch("ksr_branch_manage")
>
>     if KSR.is_method_in("ISU"):
>         if KSR.tm.t_is_set("onreply_route") < 0:
>             KSR.tm.t_on_reply("ksr_onreply_manage")
>
>     if KSR.is_INVITE():
>         KSR.info("try and relay the traffic\n")
>         if KSR.tm.t_is_set("ksr_failure_route") < 0:
>             KSR.tm.t_on_failure("ksr_failure_manage")
>
>     t_relay_result = KSR.tm.t_relay(["10.0.0.6", "5060"])
>
>     KSR.info(f't_relay: {t_relay_result}\n')
>     KSR.info(f'MSG: {msg}')
>     if KSR.tm.t_is_set("ksr_failure_route_one"):
>         KSR.tm.t_on_reply("ksr_on_reply_route_one")
>
> ```
> ERROR: app_python3 [python_exec.c:91]: apy_exec(): ksr_request_route not
> found or is not callable
>
> Again this only happens after t_replay is called. Any help understanding
> why this happens would be appreciated.
>
> --
> - Nigel
> __________________________________________________________
> 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/20220716/c09b50bc/attachment.htm>


More information about the sr-users mailing list