We have quite a few virtual extensions - all with call forwarding set. This is to replicate the functionality of “Phantom” numbers on our legacy Nortel CS1k which we’re discontinuing and moving everything over to freepbx. In general this works great - however, I have found that we can’t backup these call forwards (to our warm-spare).
After a bit of digging I’ve found that the problem is because the Backup routine in the callforward module calls the core function “getAllDevicesByType” which returns all the devices in the asterisk DB, but none of the virtual extensions (as they only exist in extensions.conf).
I know I could probably fix this by not using virtual extensions but I’d rather not do that - using virtuals keeps them all nicely compartmentalised.
Any suggestions for backing up the call forward destinations greatly received.
Thanks Stewart. I could certainly try Follow Me instead of call forwarding although my gut tells me that these extensions are exactly what virtual is for (ext’s that will never have an end-device connected) - I think Custom Extensions are going to be a bit of a pain to implement for the couple of hundred virtual’s we have.
That said, I’ve investigated a bit further and I think this qualifies as a bug - I’ve dumped the astdb on both the source (live) and the warm spare and whilst the source contains entries as below:
The warm spare contains no such entries, even after a config apply. The extensions are, however in extensions_additional.conf on the warm spare.
I’m leaning towards copying the sqlite as part of the backup - I know I read somewhere of someone doing this as part of a backup of fop2 and it working fine.
I think this might trip a few people up given the impending release of 17 and the requirement to perform a backup and restore in order to migrate if the astDB is not included in this backup (I haven’t confirmed whether it is or not however). .
I’ve not tried to repro this, but expectation is that virtual extensions would be included in a full backup and subsequently would be restored. This could be a bug.
For clarity - the virtual extensions are included in the backup but any call forwards applied to those virtual extensions are not. Taking a single virtual extension as an example - a dump of astdb and a grep for the extension (2001 in this example) on both freepbx’s gives the following: