Before dialling: how QC-Phone Plus shares one SIP registration with the phone for outgoing calls
By Robert Brandt, QuadChroma
Published . Status: design. QC-Phone Plus is in development and not available.
This is part 3 of "Fetch, don't deliver", which describes how QC-Phone Plus brings incoming SIP calls to a sleeping iPhone. The text below refers to the sections of part 1.
Part 1 says that in Plus mode the app does not register at the SIP provider, and that outgoing calls go directly from the app to the provider. That works with every provider whose registrar accepts an outgoing call from a client that is not registered. This part describes what app and server do at registrars that do not accept it.
Right after the user taps to call, the app sends the server a notice without any content and registers once at the provider itself. The server registers the account again on its own, a fixed time after it received the notice: 5 seconds in our design. The app never tells the server when its call ends or how its registration went.
This article describes the method in enough detail to build it.
The problem
- The Plus server keeps the user's SIP account registered with its own contact address (part 1, "Setup", step 3). Incoming calls reach the server, and the phone fetches them.
- Outgoing calls go directly from the app to the provider. The app authenticates its INVITE with digest authentication, like any SIP phone.
- A registrar can have two properties at once:
- it accepts an outgoing INVITE only from a client that holds a current registration and refuses all others, typically with 403 Forbidden;
- it keeps only the newest registration of an account: a new REGISTER replaces the previous binding ("the newest registration wins").
- At such a registrar the app has to register before it can call out. Its REGISTER replaces the server's binding. From that moment, new incoming calls go to the phone and no longer to the server.
- If the server registers again too early, the registrar can refuse the phone's INVITE, because the phone no longer holds the current binding. If the server registers too late or not at all, incoming calls reach no one once the app stops.
- A message from the app at the end of its call does not solve this reliably. The operating system can suspend the app right after a call, and the app can crash or lose its network at any moment. Such a message would also tell the server when the user stops talking.
- The method below needs no such message. The app speaks before it registers, and the server then acts on its own clock.
Three kinds of lines
The app gives each SIP account an outbound class:
- Without registration: the registrar accepts an authenticated INVITE from a client that is not registered. The app sends no notice and does not register. This is the case of part 1.
- Several registrations: the registrar needs a registration, but keeps several bindings per account and lets all of them ring. The app registers briefly for the call and sends no notice. Incoming calls that reach the phone directly in that time get 480 Temporarily Unavailable, so that only the server's announcement carries them. At the end the app removes its own binding with Expires 0 for its own contact, never with the wildcard contact.
- Before dialling: every other line, including every line whose registrar behaviour is not known. This article is about this class.
In our design the class comes from a catalogue per provider. Two observations on the line refine it:
- If the 200 OK to the app's REGISTER lists any contact besides the app's own, the app treats this call like the class "several registrations".
- If a line of the class "without registration" gets 403 Forbidden on a call, the app moves it to "before dialling" and offers a new attempt. The user's next tap uses the method.
An outgoing call, step by step
D is the server's fixed delay: 5 s in our design. The app behaves the same in the foreground and in the background.
- The user taps to call in the app. This includes the dial pad, the call history, contacts, redial, a consultation call during another call, the car system and voice control. On these lines a call never starts from a notification action alone: a notification opens the dial screen, and the call starts with a separate tap.
- Two things start at once. The app starts its SIP stack and opens the TCP or TLS connection to the registrar, without sending any SIP message on it yet. In parallel it sends the notice to the server.
- The notice is an HTTPS POST with the JSON body {} and nothing else, authenticated like every request of the app (part 1). It carries no phone number, no call identifier, no line, no time and no state.
- The server answers 204 No Content at once, before it does anything else. The answer is the same whether the server books a new registration, merges the notice into one already booked, or has nothing to do. The server books one registration of the account at the moment of receipt plus D. We call it the take-back.
- The app waits at most 3.0 s for the 204. With the 204, or after 3.0 s without it, the app sends exactly one REGISTER over the connection it opened. It uses the same contact as a registration in direct mode, Expires 60 s (or the registrar's Min-Expires after 423 Interval Too Brief) and the usual digest authentication. The REGISTER carries no push parameters, and the app never refreshes it.
- The registrar answers 200 OK. From now on it sends new incoming calls to the phone. The app sends its INVITE over the same connection with the same contact, so a registrar that only accepts an INVITE from the registered connection accepts it.
- The app checks its own clock. If the final answer to the REGISTER arrives at or after "204 plus D minus 1.5 s", the INVITE might reach the registrar after the take-back. Then the app sends one fresh notice and one fresh REGISTER before the INVITE, at most once per call. It decides this only by comparing times, never by what the answer said. If the REGISTER times out without a final answer, the call goes at once, without a fresh sequence. The check needs a 204; without one, there is no fresh sequence.
- At receipt plus D the server registers the account again: its own contact, its own connection, its own Call-ID, the next CSeq and its usual Expires. This is an ordinary refresh with nothing from the app in it. The registrar now sends new incoming calls to the server again. Nothing the app does or fails to do cancels, advances or moves the take-back.
- The app's window. The app predicts the take-back as the later of "204 plus D" and "previous predicted take-back plus 3 s". Its window ends 3 s after the predicted take-back, and at most 25 s after the 204. Only this timer ends the window. A change between foreground and background, the end of background time or a suspension by the operating system does not end it. Without a 204, the window ends D plus 3 s after the wait for the 204 ended (see also "When something fails").
- The end. When the window has ended and no call of the app runs on the stack, the stack stops. Stopping sends nothing: no Expires 0, no wildcard contact and no message to the server. At a registrar where the newest registration wins, the binding already belongs to the server again.
Two more rules complete the sequence:
- If the registrar refuses the app's REGISTER, the app still sends its INVITE, and the registrar decides. If it refuses the INVITE too, the app shows the usual error. The clock check of step 7 treats every final answer the same way. The take-back still comes; it is a harmless refresh.
- A 403 Forbidden on the INVITE is final for this attempt. A new tap of the user is a new call with a new notice.
Example timeline
Assumptions: the phone's round-trip time is 100 ms to the provider and to the server, the server's round-trip time to the provider is 60 ms, and D is 5 s. Processing time at the registrar is left out.
- 0.00 s: the user taps to call. The SIP stack starts, the connection to the registrar opens, the notice leaves.
- 0.25 s: the server receives the notice, books the take-back for 5.25 s and answers 204.
- 0.30 s: the 204 arrives. The REGISTER leaves.
- 0.50 s: 200 OK to the REGISTER. The phone's binding has replaced the server's. New incoming calls go to the phone.
- 0.75 s: the INVITE is authorised (100 Trying, 180 Ringing).
- 3.0 s: the called party answers.
- 5.25 s: the server sends its REGISTER. Its 200 OK arrives at 5.4 s, and new incoming calls go to the server again. They are announced as in part 1 and offered as a second call as in "A second call during a call".
- 8.30 s: the window ends (predicted take-back at 5.30 s plus 3 s). The call still runs, so the stack runs on for it.
- If the call had ended at 2.0 s, the stack would stay up until 8.30 s. A call arriving at 4.0 s would ring on the phone as a normal direct call.
Why 5 seconds
- After the 204 the phone needs four round trips until the registrar has authorised its INVITE: the REGISTER with its digest challenge, then the INVITE with its challenge. If the connection to the registrar could not be opened in advance, two more round trips come on top. Each authenticated request also takes the registrar 0.1 to 0.3 s.
- The take-back takes effect at receipt plus D plus 0.15 to 0.5 s, 5.2 s after receipt in the estimates below.
- Our estimates, not measurements, for the time from receipt until the INVITE is authorised (connection opened late / opened in advance) and the margin left before the take-back:
- 50 ms round-trip time (Wi-Fi, 5G): 0.6 s / 0.5 s, margin at least 4.6 s;
- 100 ms (good LTE): 0.95 s / 0.75 s, margin at least 4.2 s;
- 300 ms (busy LTE, roaming): 2.25 s / 1.65 s, margin at least 2.9 s;
- 600 ms (poor network): 4.2 s / 3.0 s, margin 1.0 s / 2.2 s;
- 800 ms: 5.5 s / 4.0 s. A connection opened late then races with the take-back. The clock check of step 7 fires only when the REGISTER's answer comes at or after "204 plus D minus 1.5 s". With these estimates it comes 3.3 to 3.5 s after the 204, so the INVITE can lose the race; its 403 is final for this attempt, and the user taps again.
- A D of 3 s would race already at 300 ms. A longer D lengthens the time in which the other devices of the account do not ring, and the gap after a crash, without a gain on the networks in the list above. Other values of D are also part of the method (see Variants).
- In our design D is one constant for all accounts, allowed between 4 and 7 s. The app never reports measured times to the server.
Incoming calls during the window
- Before the 200 OK to the app's REGISTER, calls go to the server and are announced as in part 1.
- From that 200 OK until the take-back, the registrar sends new calls directly to the phone. In this window the app accepts only calls from its provider. It refuses every other call from the network, as always in Plus mode.
- While a call of the app exists, still being set up or answered, a direct incoming call gets 486 Busy Here. The provider's busy handling takes over.
- After the app's own call has ended and before the window ends, a direct incoming call rings as a normal direct call.
- On a line where the 200 OK listed other contacts, direct calls get 480 Temporarily Unavailable, because the server's announcement already carries them.
- After the take-back calls go to the server again. During the app's own call they are offered as a second call, as described in part 2. The app's call runs on the same SIP stack as calls fetched from the server, so this needs no change.
- A direct call that still rings at the take-back stays with the phone until it ends, because a new binding does not move a running INVITE transaction. The stack stays up until that ringing ends.
- While a call announced by the server rings on the phone, the app sends no notice, does not register and does not dial. A dial attempt in that time is refused locally with a short hint and is not queued. If such ringing starts after the 204 and before the REGISTER, the attempt ends without a REGISTER.
What the server does with a notice
- It books exactly one take-back of the account at receipt plus D. A later notice can only add a later take-back.
- Per account, two take-backs are at least 3 s apart, and there are at most 20 in any 121 s. A notice whose own time would break a limit is merged into the earliest allowed time at or after receipt plus D. It is never dropped, so the last notice is always followed by a take-back.
- If the server's own periodic REGISTER for the account is in flight, the take-back waits for it to end, at most 10 s, and then sends one more REGISTER.
- Take-backs towards one registrar pass a token bucket of 10 REGISTER per second with a burst of 20. They wait in it and are never dropped. A 503 from the registrar pauses its bucket for 30 s.
- On a TLS line whose connection to the registrar is closed at that moment, the server opens it at once and sends the take-back over it. It repeats the send every 500 ms until the REGISTER has left over the verified connection, for at most 25 s. The server does not open a connection when the notice arrives.
- In our current design the server also sends at most one extra REGISTER per line in 60 s, outside its regular refreshes. Take-back try 1 is such an extra REGISTER, so it can leave up to 60 s after its booked time. Between the end of the app's window and a delayed take-back, calls go to a phone that no longer listens.
- If try 1 is refused or fails, the server sends try 2 100 s after the booked time of try 1, that is 105 s after the notice in the normal case. By then the phone's binding, with Expires 60 s, has run out, so a registrar that refuses a second binding while one exists accepts it. While try 2 waits, new notices of the account add nothing; try 2 serves them. After try 2 the account follows the server's ordinary handling of refused registrations.
- A refusal of try 1 that arrives within 15 s of its first send, and every refusal of try 2, is never taken as proof that the credentials are wrong. A refusal that arrives after those 15 s is handled like any refusal of the line.
- The server sends no take-back later than 175 s after the account's last notice.
- It sends no take-back for an account that is paused, whose credentials the provider has refused, that rests on the server's schedule after a refusal, or whose registrar address is changing. While the server's own SIP edge is not ready, a due take-back waits up to 60 s.
- The server sends nothing to any device because of a take-back or its failure. The time of a notice tells the server that an outgoing call is about to begin. The server uses it only for the take-back and derives no busy state, no presence, no push decision and no call waiting from it.
When something fails
- No 204 within 3.0 s, for example because the server is unreachable, a network filters it or it answers with an error: the app registers and calls anyway. The outgoing call never depends on the server.
- The app does not cancel its request. A 204 that arrives up to 20 s after the notice still counts and moves the window.
- While the request is still open, the window lasts at least until 23 s after the notice.
- After a connection error the app repeats the notice once on a new connection, as the identical authenticated request, so that the server accepts it at most once.
- Every answer other than 204 counts as "no 204". If an answer says that the server does not know or no longer serves this device, the app only marks this for its next regular status check, never at the end of the call.
- The app crashes, loses its network or is suspended after its REGISTER: until the take-back takes effect, calls go to a contact that no longer answers. When try 1 leaves on time, that is D plus 0.5 s after receipt of the notice; when the limit on extra REGISTERs delays it, up to 60 s more. If try 1 is refused or fails, no one receives calls until try 2 succeeds, about 105 s after the notice, or else until the server's ordinary handling of refused or failed registrations succeeds. The provider handles such calls as unavailable, for example with voicemail.
- The same happens before the REGISTER: no gap. The take-back is a harmless refresh.
- The server is unreachable, but the provider is reachable: the call goes. While the stack runs, the app takes incoming calls itself. After that, no one receives calls until the server's next regular refresh: at most the Expires of the server's own registration, 600 s by default in our design and up to 3600 s, or a longer Min-Expires that the registrar demands. If the server itself is down, its incoming calls are down anyway.
- No network at all: the REGISTER fails, and the call fails with the usual error.
- The take-back fails: try 2 as described above.
Several devices and several accounts
- All devices of a subscription share the server's single registration per SIP account (part 1). The take-back is per account.
- While one device's binding is current, new calls ring only on that device, directly. The other devices do not ring until the take-back takes effect: at most D plus 0.5 s per outgoing call when it leaves on time, longer in the cases of "What the server does with a notice".
- If two devices dial within D of each other, each registers, and the newest registration wins between them too. The registrar can then refuse the INVITE of the device that registered earlier with 403. That attempt ends, and the user taps again. The server keeps its take-backs at least 3 s apart.
- With several SIP accounts on one device, the app sends one notice per account and registers only that account.
Does the call survive the take-back?
- RFC 3261, section 12: the INVITE transaction sets up the dialog. In-dialog requests follow the remote target from the Contact of the INVITE and the route set from Record-Route. Section 10: a binding only routes new requests to the address of record. Replacing the binding does not end or move a dialog.
- With RFC 5626 flows, in-dialog requests use the phone's connection. The app keeps that connection open with keepalives until its call ends.
- The same holds the other way round. A dialog of the server, for example a call fetched from the server during which the user places a consultation call, continues while the phone's binding is current.
- A provider whose edge refuses in-dialog requests from a source without a binding cannot be served with this method. In our design, such providers are marked in the catalogue.
- Each provider needs these tests after a take-back: BYE in both directions, hold and resume, re-INVITE and UPDATE from the provider, a session-timer refresh, DTMF as SIP INFO, and the far end's hang-up reaching the phone.
What the app never sends
- a second message about a notice: nothing at the end of the call, at the end of the window, when the stack stops, when background time ends or after a crash;
- anything about the result of its REGISTER or of its call;
- a notice after a push, a timer, a change between foreground and background, a network change or an answer from the server;
- a REGISTER through the server, or a REGISTER of the server's contact.
Sequence: outgoing call with take-back
Sequence: incoming call during the window
Variants
The method is part of this publication in all of the following variants, alone or in any combination.
- Which lines use the notice:
- lines whose registrar needs a registration for outgoing calls and keeps only the newest registration, and lines whose registrar behaviour is not known (the default);
- also lines whose registrar keeps several registrations, where the notice does no harm;
- SIP over UDP, TCP, TLS or WebSocket (RFC 7118), and any other signalling system in which a registrar holds one binding per account and accepts outgoing requests only from the bound client.
- How the class of a line is found:
- from a catalogue per provider, with unknown providers counted as "before dialling" (the default);
- from the number of contacts in the 200 OK to the phone's own REGISTER (the default, for the call in progress);
- from a 403 on a call without registration, which marks the line for the user's next tap (the default) or repeats the call at once with the method;
- from test requests between phone and provider: a registered and an unregistered INVITE to a destination that cannot exist, cancelled at any provisional answer above 100 and ended with ACK and BYE on an unexpected 200; 404, 484 or 485 mean "routed", 403 means "refused";
- from a REGISTER without contact that lists the bindings of the account;
- from the contacts in the 200 OK to the server's own REGISTER or take-back;
- from a request that the server sends to the account's own address of record through the provider, which shows whether its binding is current.
- What triggers the notice:
- the user's tap to call in the app, also for redial, history, contacts, consultation calls, car systems and voice control (the default);
- a notification action that starts a call;
- opening the dial screen, starting to type a number or picking a contact, with D from 10 to 120 s and with a further notice at each further input, so that the take-back follows the last input;
- the app coming to the foreground;
- a call started from a tel: or sip: link in another app, from a call intent of the operating system, from a watch, from a smart speaker or by a click-to-call request from a computer;
- an event that predicts an outgoing call, such as a scheduled call, a calendar entry or a prediction from the user's habits, with D from 10 to 120 s;
- any other request that needs the phone's own registration, such as SIP MESSAGE, SUBSCRIBE, OPTIONS or REFER, or a video session.
- The notice:
- an authenticated HTTPS POST with the empty JSON body {}, answered with 204 at once and the same for every outcome (the default);
- carrying a delay, a window length, a sequence number, a nonce, or the account when one device has several;
- carrying the called number, a call or dialog identifier, the time of the tap, an expected call length, the phone's contact address, its network address or its registration identifiers, so that the server can choose the take-back time or remove the phone's binding;
- over WebSocket, QUIC, the persistent home connection of part 1, a SIP MESSAGE, OPTIONS or NOTIFY to the server, or a single UDP datagram;
- as a signal without payload: a TCP or QUIC connection that is only opened and closed, an HTTP HEAD or GET to a fixed address, or a DNS query for a name of the server;
- addressed to the account's own address of record, so that the provider routes it to the server's current binding;
- as the identical request over two network interfaces in parallel, for example Wi-Fi and mobile data;
- sent before the REGISTER (the default), together with it, or right after its 200 OK;
- with the app waiting up to a fixed time for the acknowledgement (3.0 s by default), or not waiting at all;
- with an acknowledgement that carries the booked take-back time, the time left until it or a delay the phone waits before its REGISTER, or that refuses the notice while another device of the account holds the binding.
- The phone's registration:
- one REGISTER with Expires 60 s or the registrar's Min-Expires, never refreshed, over the connection that then carries the INVITE (the default);
- the connection opened in parallel with the notice without any SIP message before the REGISTER (the default), or opened with OPTIONS;
- the shortest Expires the registrar allows, so that the binding lapses by itself;
- with or without RFC 5626 instance and registration identifiers, with or without push parameters (RFC 8599);
- phone and server registering with the same RFC 5626 instance identifier and registration identifier, so that each REGISTER replaces the other's binding also at registrars that keep several bindings per account;
- after a refused REGISTER, the INVITE sent anyway, so that the registrar decides (the default), or no INVITE and the usual error;
- at the end nothing at registrars where the newest registration wins (the default), or Expires 0 for the phone's own contact only, never the wildcard contact;
- a REGISTER whose contact points at the server, so that incoming calls keep reaching the server, at registrars that route to the registered contact and not to the source of the REGISTER.
- When the server registers again:
- a fixed delay D after receipt, the same for all accounts, 5 s and allowed between 4 and 7 s (the default);
- any other fixed D from 0.5 s to 120 s, in particular 1, 2, 3, 8, 10, 15, 20, 30, 60 and 120 s: a shorter D suits a connection opened before the tap, a longer D suits satellite links, roaming or slow registrars;
- a delay drawn at random for each notice from a range, for example 4 to 7 s;
- the next point of a fixed grid per account at or after receipt plus D;
- a delay per account, per network or per provider from measured round-trip times (for example D = k × RTT + c from the phone's or the server's measured round-trip time to the registrar, with k from 4 to 8 and c from 0.5 to 3 s, limited to 1 to 30 s), or a delay the phone asks for in the notice;
- several registrations at fixed delays after one notice, for example at D and at D plus 100 s, whether or not the earlier one succeeded;
- by lease renewal: while the phone needs its binding, it repeats the notice every T seconds, for example T = 2 to 30 s, and the server registers D after the last notice it received;
- a further notice that replaces the booked take-back instead of adding one, so that the take-back moves to the newest receipt plus D, or a notice with an explicit meaning that extends or cancels it;
- after an acknowledgement: the phone reports that its REGISTER succeeded, that its INVITE was authorised or that its call was answered, and the server registers on receipt or a fixed time after it, with the fixed delay as the fallback;
- at the end of the call: the phone reports the end, or the server registers when the phone's binding expires;
- after an answer of the registrar: the server lists the bindings with a REGISTER without contact, or subscribes to the registration event package (RFC 3680), and registers when it sees the phone's binding or the loss of its own;
- after an event of the provider: the server subscribes to the dialog event package (RFC 4235) of the account, or receives a call-control webhook, an API event or a call record, and registers when the phone's call is set up or has ended, with the fixed delay as the fallback;
- after a notice, a shortened interval for the server's own refreshes, for example every 5 to 30 s, for a fixed time of 30 to 300 s;
- without any notice, a server refresh interval of 10 to 60 s, so that any registration of the phone is replaced within that time;
- the server in the phone's SIP path as outbound proxy, session border controller or back-to-back user agent: the phone's REGISTER or INVITE passing through it serves as the notice, and the server registers its own contact D after it;
- the take-back as a plain refresh (the default), as a new registration with a new Call-ID, as one REGISTER that removes the phone's contact with Expires 0 and binds the server's contact, or as a removal of all bindings with the wildcard contact followed by the server's own registration;
- by the phone at its end: the phone's last REGISTER binds the server's contact, at registrars that allow it.
- Retries, limits and delays of the take-back:
- per account at least 3 s between two take-backs and at most 20 per 121 s, merging notices and never dropping the last one (the default), or a minimum gap from 0 to 30 s and at most 1 to 100 take-backs in any period from 10 to 3600 s;
- the phone predicting the take-back from the same limits and ending its window a margin after it, at most a fixed time after the 204 (the default);
- waiting for a REGISTER of the server that is already in flight and then sending one more (the default);
- rate limiting per registrar with a token bucket, and a pause after 503 or Retry-After (the default);
- a general limit per line on extra registrations that delays the take-back, with the phone's window, its Expires or the limit chosen so that no gap opens between the end of the window and the take-back;
- a second try after a refusal or failure, timed after the phone's binding has expired, 100 s after try 1 by default, then the ordinary handling of refused registrations;
- a refusal of a take-back never taken as proof of wrong credentials, within a watch time of 15 s from the first send for try 1 (the default) or without any time limit;
- a periodic refresh of the server that falls due between receipt of a notice and its take-back held back and sent as the take-back, so that no refresh displaces the phone's binding early;
- an upper bound after the last notice, 175 s by default, after which no take-back is sent;
- on TLS lines, opening the connection when the take-back is due (the default) or when the notice arrives.
- The phone's own clock:
- one fresh notice and REGISTER when the final answer to the REGISTER comes at or after "204 plus D minus 1.5 s", at most once per call (the default);
- repeating the whole sequence once after a 403 on the INVITE that comes later than "204 plus D minus 1.5 s";
- reusing a current binding for a further call that starts before "last notice plus D minus 2.5 s", without a new notice;
- a margin per call from the measured duration of the REGISTER exchange (two round trips) plus 0.3 s, instead of the fixed 1.5 s;
- after a timeout of the phone's REGISTER, a fresh notice and a REGISTER to a further address of the provider from DNS (SRV or NAPTR), before the call goes without registration;
- a behaviour that differs between foreground and background, for example a longer D or a notice only in one of the two states;
- a window that also ends when the app goes to the background, when its background time ends, when the operating system suspends it, when the phone's binding expires, or when the phone's own subscription to the registration event package (RFC 3680) shows the server's binding again.
- Incoming calls during the window:
- 486 while a call of the phone exists, and normal ringing after it has ended (the default);
- 480 instead of 486, so that the caller reaches voicemail;
- a redirect (3xx) to an address of the server, at providers that follow redirects;
- direct call waiting beside the phone's own call;
- the phone passing the call to the server, which then holds it as a normal call of part 1;
- 480 for every direct call where the registrar keeps several registrations (the default there);
- direct INVITEs accepted only from the phone's own provider, every other INVITE refused (the default).
- While a call from the server rings on the phone: no notice, no REGISTER and no dial, with the dial refused locally (the default); the dial queued until the ringing ends; or the ringing call declined in favour of the dial.
- Several devices and accounts:
- one registration of the server per SIP account for all devices, one take-back per account (the default);
- one binding of the server per device at registrars that keep several, with a take-back per device;
- one notice per account when one device has several accounts (the default), or one notice for all of them.
- Dialogs after the take-back:
- in-dialog requests following the route set and remote target of the dialog, with the phone's connection kept open by keepalives (the default);
- providers that tie in-dialog requests to the current registration left out (the default), or served by a REGISTER of the phone before each of its in-dialog requests, together with a further notice.
- When the server cannot be reached: the call goes after the fixed wait at the latest (the default); a late acknowledgement moves the window; the identical request repeated after a connection error; the app takes incoming calls itself while its stack runs.
- Other platforms: the same method works on Android, on desktop systems, and in desk phones or gateways that share a SIP account with a server. The server role can also be played by a home router, a DECT base station, a PBX, a session border controller or a cloud function, and the phone role by a DECT or Wi-Fi handset, a watch, a car head unit or a browser using SIP over WebSocket.
- Beyond outgoing calls: the same pattern works for any short task for which a client has to hold the single registration of an account that a server otherwise holds for it. Concretely: IMS registrations (3GPP TS 24.229), where a server holds the registration of the public user identity and the device takes it for an outgoing session; XMPP, where a new session with the same resource can end the older one (RFC 6120); MQTT, where a new connection with the same client identifier ends the older one; and short tasks such as sending a SIP MESSAGE, a SUBSCRIBE for message waiting or presence, or a fax over T.38.
- Numbers: the phone waits 0 to 10 s for the acknowledgement, and its Expires lies between 1 and 3600 s; its window ends 0 to 30 s after the predicted take-back, at most 5 to 180 s after the 204; the clock-check margin (1.5 s by default) lies between 0 s and D; the bound after the last notice lies between 10 and 3600 s, and try 2 follows 1 to 600 s after try 1.
We publish the method and all of its variants so that it stays free for everyone: from the date above it is on public record, and nobody can claim it as new.
Text licence: CC BY 4.0.