[OpenSIPS-Users] Push Notification: fr_inv_timeout and t_wait_for_branches and 480

John Quick john.quick at smartvox.co.uk
Tue Sep 7 13:50:17 EST 2021


I'm configuring v3.1 to do Push Notifications. I've followed the tutorials
and got things working, but am finding an issue with timeouts.
As I understand it, the setting for fr_invite_timeout sets how long OpenSIPS
will wait after calling function t_wait_for_branches.
The sequence happens like this:
INVITE to OpenSIPS from a core server to a registered mobile device (PN
enabled)
OpenSIPS sends a PN to the device via Firebase
OpenSIPS calls t_wait_for_branches
User is alerted to incoming call by a notification pop-up and given two
choices - Accept or Reject
As soon as the user taps Accept or Reject, the device sends a REGISTER to
OpenSIPS and waits for an INVITE (which it can match to the PN through data)
OpenSIPS handles the REGISTER as described in the various blog articles and
documentation - i.e. it injects a new branch and sends INVITE
The INVITE reaches the device
If it was Accept, then the device immediately sends a 100, a 180 then a 200
OK
If it was Reject, then the device sends a 100, 180 then a 480 Temporarily
unavailable

I appreciate that this is not strictly how RFC8599 describes the sequence,
but we find ourselves constrained by what is possible on the mobile
operating systems.
Consequently, I need a fairly high timeout (approx 16 seconds) to give the
user enough time to decide they want to answer the call before it times out.
That means setting fr_inv_timeout to 16.

Now, if the user rejects the call, OpenSIPS does not immediately pass the
480 response back upstream. Instead it waits for the entire 16 seconds and
then sends 480 upstream.

Is there any way I can dynamically alter the fr_inv_timeout or tell OpenSIPS
there is only one branch? I don't want to wait and see if there are any more
branches once I have received a response from the first branch because I
know there should only be one device registered to any given user account. I
would like OpenSIPS to wait up to 16 seconds for a 200 or 480, but to act on
it immediately when it arrives. It is alright when it is a 200, but not so
when it is a 480.

John Quick
Smartvox Limited




More information about the Users mailing list