Kvstore command usage

Can anybody give an example how to use this command

Usage:
  kvstore [options] [--] <module>

Arguments:
  module                   What module are we making calls against?

Options:
      --iknowwhatiamdoing  With great power comes great responsibility. This command can potentially break things. Unless you pass this parameter it is readonly
      --action=ACTION      What action to call [default: ""]
      --key=KEY            The key [default: ""]
      --value=VALUE        A Value if setting one [default: ""]
      --group=GROUP        Optional Group [default: "noid"]
  -h, --help               Display this help message
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Manage kvstore


I want for example add TCP port to pjsip
is it possible using this command?

or maybe I can add contacts to phonebook using this command ?

I couldn’t find any information really, had to comb through the source code a bit.

[root@freepbx ~]# fwconsole kvstore --action getall framework
{
    "navbarToogle": "no"
}

Updating a key:

[root@freepbx ~]# fwconsole kvstore --action set --key=navbarToogle --value=yes framework
Key stored successfully

Making sure it updated:

[root@freepbx ~]# fwconsole kvstore --action get --key navbarToogle framework
"yes"

However, it doesn’t look like SIP settings are stored in the KV tables.

[root@freepbx ~]# mysql -A asterisk -e"show tables like '%kv%'"
+------------------------------------------+
| Tables_in_asterisk (%kv%)                |
+------------------------------------------+
| kvblobstore                              |
| kvstore_Configedit                       |
| kvstore_Dashboard                        |
| kvstore_Fax                              |
| kvstore_FreePBX                          |
| kvstore_FreePBX_Framework                |
| kvstore_FreePBX_Hooks                    |
| kvstore_FreePBX_Media                    |
| kvstore_FreePBX_Realtime                 |
| kvstore_FreePBX_modules_Adv_recovery     |
| kvstore_FreePBX_modules_Amd              |
| kvstore_FreePBX_modules_Backup           |
| kvstore_FreePBX_modules_Calendar         |
| kvstore_FreePBX_modules_Conferences      |
| kvstore_FreePBX_modules_Conferencespro   |
| kvstore_FreePBX_modules_Contactmanager   |
| kvstore_FreePBX_modules_Core             |
| kvstore_FreePBX_modules_Customappsreg    |
| kvstore_FreePBX_modules_Dahdiconfig      |
| kvstore_FreePBX_modules_Filestore        |
| kvstore_FreePBX_modules_Firewall         |
| kvstore_FreePBX_modules_Hotelwakeup      |
| kvstore_FreePBX_modules_Iotserver        |
| kvstore_FreePBX_modules_Manager          |
| kvstore_FreePBX_modules_Missedcall       |
| kvstore_FreePBX_modules_Paging           |
| kvstore_FreePBX_modules_Pagingpro        |
| kvstore_FreePBX_modules_Pbxmfa           |
| kvstore_FreePBX_modules_Pms              |
| kvstore_FreePBX_modules_Printextensions  |
| kvstore_FreePBX_modules_Queuestats       |
| kvstore_FreePBX_modules_Qxact_reports    |
| kvstore_FreePBX_modules_Recording_report |
| kvstore_FreePBX_modules_Restapps         |
| kvstore_FreePBX_modules_Sangomaconnect   |
| kvstore_FreePBX_modules_Sangomacrm       |
| kvstore_FreePBX_modules_Sangomartapi     |
| kvstore_FreePBX_modules_Sipstation       |
| kvstore_FreePBX_modules_Smsconnector     |
| kvstore_FreePBX_modules_Smsplus          |
| kvstore_FreePBX_modules_Superfecta       |
| kvstore_FreePBX_modules_Sysadmin         |
| kvstore_FreePBX_modules_Userman          |
| kvstore_FreePBX_modules_Vmblast          |
| kvstore_FreePBX_modules_Voicemail        |
| kvstore_FreePBX_modules_Voicemail_report |
| kvstore_FreePBX_modules_Voipinnovations  |
| kvstore_FreePBX_modules_Webrtc           |
| kvstore_FreePBX_modules_Zulu             |
| kvstore_OOBE                             |
| kvstore_Sipsettings                      |
+------------------------------------------+

Unless I am missing something.

Regardless, the FreePBX project was once aiming to migrate all tables to KV so you are not forced to use MySQL.

When I was writing new stuff or adding features I would use kvstore. It involves rethinking some things when creating structures. Migration of all modules would be nice for several reasons but ultimately it’s a lot of work so it was never a primary task.

I would like to see more of the old roadmap stuff get done. Unfortunately I think that map was shredded lol


and

have found something

Here’s an example of how we used it to change the external IP: PJSIP and ISP SIP trunk - #25 by billsimon

thanks

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