I have a shell script which I use to extract various Extn related settings from both the Database & Config files within FPBX as appropriate & presents them in a single table view for convenience. This works fine currently, however, I would like to include some additional settings but I can’t seem to find where they’re located.
I can find these values within the AdminGUI/UCP, but does anyone know where/how I can extract them via the CLI (so I can then incorporate them into my script);
Extn Ring Time - How long an Extn Rings before switching to On-NoAnswer optional Destination (NOT same setting as FMFM Ring Time). I know there’s a Global Default value in ‘Advanced Settings’, but its the per Extn value I’m after (if its been set to something other than Default).
FindMe/FollowMe - Whether this feature is Enabled/Disabled for a given Extn (I can see the configured FMFM values for each Extn within the ‘findmefollow’ DB table, but not whether they’re actually enabled/disabled for a given Extn - FMFM records seem to exist for ALL Extns, regardless of whether the feature is enabled or not).
Unconditional Call Forwarding - Whether this feature is Enabled/Disabled for a given Extn & if so, what forwarding Tel No is being used.
Any assistance/pointers with the above would be greatly appreciated.
I’m not familiar with the Asterisk DB, but this has given me a good start to it. It appears to reference values like the Windows Registry, in that it uses a Family & Key to identify a given value (like Windows Reg Hive & Key). I’ve experimented with a combination of ‘database show’ & ‘database get’ to see what’s available & extract the specific values I want in the following way.
Show ALL Values relating to Extn 200;
asterisk -x “database show” | grep ‘/200’
Show all Values relating to Extn 200 in AMPUSER family only;
asterisk -x “database show AMPUSER 200”
Get specific values relating to Extn 200;
asterisk -x “database get AMPUSER 200/cidname”
asterisk -x “database get AMPUSER 200/ringtimer”
asterisk -x “database get AMPUSER 200/followme/ddial”
asterisk -x “database get CF 200”
Assuming I’ve not misunderstood anything in my examples above, I think I’m good to go.