Hi Marrold,

Thanks for the quick response, and sorry for the late reply.

Yes, I'm using TSILO module and I adapted your code into mine easily.

Message flow seems as expected. ACK is sent successfully to the incoming 486 response and a new INVITE is sent to the mobile client when it is registered.

However if the mobile client doesn't answer or rejects the call (possibly in all other failure cases) failure_route is not executed again.

This makes sense to me. As far as I know, failure_route is executed after all branches fail. In this case the new branch had not yet been added when 486 was received.

How do I make failure_route executed for the new branch?

What do you think? 


 

On Mon, Aug 16, 2021 at 7:22 PM Marrold <kamailio@marrold.co.uk> wrote:
Hi Koray,

I'm glad you mentioned this, I'm currently working on a similar configuration and tested your scenario and found the same thing. I'm assuming you're using TSILO?

I just quickly tried this in the failure_route and it appears to be working but I'm sure there's still some optimisations to be done. It might need adapting for your situation.

        if ($sht(tsilo=>active_branch::$tU) && t_check_status("[456][0-9][0-9]") ) {
                t_drop_replies();
                t_suspend();
                xlog("suspended transaction [$T(id_index):$T(id_label)] $fU => $rU\n");
                $sht(tsilo=>suspended::$tU) = "" + $T(id_index) + ":" + $T(id_label);
                exit;
        }

One obvious issue currently is when the mobile client registers it resumes the suspended transaction and does another look up on the location table, and then sends a new INVITE to the device that previously rejected the call. If that's a user that manually rejected a call it will be quite annoying.

I'll follow up tomorrow when I've spent more time on this, but hopefully it gets you started.

Thanks
Matthew



On Mon, Aug 16, 2021 at 4:04 PM Koray Vatansever <koray.vatansever@gmail.com> wrote:
Hi,

I have a problem with the following scenario:

I have web and mobile sip clients for the same username.

If both clients are idle, INVITE is forked and both clients ring.
If web client is busy and mobile client is online and registered, the mobile client rings and the caller hears ringback tone.
If web client is busy and mobile client is offline, before the mobile client receives push notification and registers, web client sends 486 busy response and caller hears busy tone.

In this last scenario, I want to wait some time for the mobile client to register and ring.
I tried to drop 486 response in onreply_route[x], but I found that final responses cannot be dropped in this route.
I dropped 486 in reply_route, but I couldn't send an ACK for this transaction.

Is there a way to implement this scenario?

I would appreciate if you have any suggestions.

Thanks,
Koray
 
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@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
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@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