I have set up the basics now - a set of extensions that ring at once, and an alternative out-of-hours set that are controlled on a profile. Of course that meant testing the multiple ringing phones scenario carefully and I had a few bugs with that.
The fun one in SIP is the race condition of cancelling a call and answering it at the same time. We have that rarely on our VoIP service where two people answer a call "at the same time". It is a small window and at present we are broken in that one call gets no audio, or worse one way is to one phone and the other way is from the other phone. Messy, but thankfully almost impossible to reproduce.
Well, the FireBrick code handles this, and I even managed to create the race condition in testing. It correctly picks one phone (the first to answer) and cancels the other calls, or sends a BYE if one of them has in fact managed to answer at the same time.
All good fun. However, I have to ponder other types of ring group and how they work. So far I have this list, only point 1 of which is implemented:-
- Simple ring a set of phones at once.
- Choosing one phone to ring - based on some logic such as round robin, or longest not to have a call
- Cascade ring - ringing one, and then add more every few seconds (and picking the order in some sensible way)
- Holding off if one of the phones is busy - i.e. when it hangs up, if still ringing the group, ring that phone. Setting a number of calls per phone is part of this, as is a "wrap-up-time"
- Queuing, so if multiple callers to the ring group, present in order. A maximum queue size needed and some sort of queuing tone.
- Fallback option where all phones are busy