Virtual Extension call forward backup

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.

Just guessing here (neither tested), try:

  1. Use Follow Me instead of call forwarding.
  2. Use a Custom Extension instead of Virtual, with Dial parameter set to call target via Local channel.

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:

/DEVICE/2001/dial : VIRTUAL/2001
/DEVICE/2001/tech : virtual
/DEVICE/2001/type : fixed
/DEVICE/2001/user : 2001

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.

Hi Lorne

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:

On the source freepbx:

/AMPUSER/2001/accountcode                         :
/AMPUSER/2001/answermode                          : disabled
/AMPUSER/2001/cfringtimer                         : 0
/AMPUSER/2001/cidname                             : 2001 (CFW)
/AMPUSER/2001/cidnum                              : 2001
/AMPUSER/2001/concurrency_limit                   : 3
/AMPUSER/2001/cwtone                              : disabled
/AMPUSER/2001/device                              : 2001
/AMPUSER/2001/followme/annmsg                     :
/AMPUSER/2001/followme/changecid                  : default
/AMPUSER/2001/followme/ddial                      : EXTENSION
/AMPUSER/2001/followme/dring                      :
/AMPUSER/2001/followme/fixedcid                   :
/AMPUSER/2001/followme/grpconf                    : DISABLED
/AMPUSER/2001/followme/grplist                    : 2001
/AMPUSER/2001/followme/grppre                     :
/AMPUSER/2001/followme/grptime                    : 20
/AMPUSER/2001/followme/postdest                   : ext-local,2001,dest
/AMPUSER/2001/followme/prering                    : 7
/AMPUSER/2001/followme/remotealertmsg             :
/AMPUSER/2001/followme/ringing                    : Ring
/AMPUSER/2001/followme/rvolume                    :
/AMPUSER/2001/followme/strategy                   : ringallv2-prim
/AMPUSER/2001/followme/toolatemsg                 :
/AMPUSER/2001/hint                                : &Custom:DND2001,CustomPresence:2001
/AMPUSER/2001/intercom                            : enabled
/AMPUSER/2001/intercom/override                   : reject
/AMPUSER/2001/noanswer                            :
/AMPUSER/2001/outboundcid                         :
/AMPUSER/2001/password                            :
/AMPUSER/2001/recording                           :
/AMPUSER/2001/recording/in/external               : dontcare
/AMPUSER/2001/recording/in/internal               : dontcare
/AMPUSER/2001/recording/ondemand                  : disabled
/AMPUSER/2001/recording/out/external              : dontcare
/AMPUSER/2001/recording/out/internal              : dontcare
/AMPUSER/2001/recording/priority                  : 10
/AMPUSER/2001/ringtimer                           : 0
/AMPUSER/2001/rvolume                             :
/AMPUSER/2001/voicemail                           : novm
/CF/2001                                          : 2004
/CW/2001                                          : ENABLED
/CustomDevstate/CF2001                            : BUSY
/CustomDevstate/DEVCF2001                         : BUSY
/CustomDevstate/FOLLOWME2001                      : NOT_INUSE
/CustomPresence/2001                              : available,,
/DEVICE/2001/default_user                         : 2001
/DEVICE/2001/dial                                 : VIRTUAL/2001
/DEVICE/2001/tech                                 : virtual
/DEVICE/2001/type                                 : fixed
/DEVICE/2001/user                                 : 2001

On the restored warm-spare:

/AMPUSER/2001/answermode                          : disabled
/AMPUSER/2001/cidname                             : 2001 (CFW)
/AMPUSER/2001/cidnum                              : 2001
/AMPUSER/2001/followme/annmsg                     :
/AMPUSER/2001/followme/ddial                      : EXTENSION
/AMPUSER/2001/followme/dring                      :
/AMPUSER/2001/followme/grplist                    : 2001
/AMPUSER/2001/followme/grppre                     :
/AMPUSER/2001/followme/grptime                    : 20
/AMPUSER/2001/followme/postdest                   : ext-local,2001,dest
/AMPUSER/2001/followme/prering                    : 7
/AMPUSER/2001/followme/remotealertmsg             :
/AMPUSER/2001/followme/ringing                    : Ring
/AMPUSER/2001/followme/rvolume                    :
/AMPUSER/2001/followme/strategy                   : ringallv2-prim
/AMPUSER/2001/followme/toolatemsg                 :
/AMPUSER/2001/hint                                : &Custom:DND2001,CustomPresence:2001
/AMPUSER/2001/noanswer                            :
/AMPUSER/2001/outboundcid                         :
/AMPUSER/2001/password                            :
/AMPUSER/2001/recording                           :
/AMPUSER/2001/recording/in/external               : dontcare
/AMPUSER/2001/recording/in/internal               : dontcare
/AMPUSER/2001/recording/ondemand                  : disabled
/AMPUSER/2001/recording/out/external              : dontcare
/AMPUSER/2001/recording/out/internal              : dontcare
/AMPUSER/2001/recording/priority                  : 10
/AMPUSER/2001/ringtimer                           : 0
/AMPUSER/2001/voicemail                           : novm
/CW/2001                                          : ENABLED

Quite a bit missing there.

Am happy to spin up a ver 17 and see what happens with a restore if that would be helpful.

We have reproduced this issue. Please refer to Virtual extension call forward option not restored in pbx systems · Issue #217 · FreePBX/issue-tracker · GitHub

Thanks

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.