One-click push configuration

This service allows the user to push an new QueueMetrics configuration on top of the current QM configuration.

A QueueMetrics configuration can be easily represented using a JSON file, by posting the file to the service (i.e. by using a curl request), QM will apply the configuration to the system.

This service makes use of the Synchronizer service of QueueMetrics. From the "Explore System Parameters" page in QueueMetrics, various modes can be selected for the Synchronizer service through a property named default.synchronizer_mode.

This is an example of a valid curl request:

curl  --user robot:robot -i -H  -X POST
      "http://localhost:8080/QueueMetrics/QmPushCfgService/jsonStatsApi.do?"
      --data-urlencode data@newcfg.json

This is an example of a valid JSON configuration file:

{
  "version": "1.0.0",
  "requestor": "FreePbx",
  "requestor_version": "13.xx.yy",
  "tenants": [
    {
      "tenant_id": "",
      "agents": [
        {
          "agent_id": "Agent/101",
          "agent_name": "Mike Boom",
          "agent_aliases": [],
          "agent_extension": "",
          "user_password": "999"
        },
        {
          "agent_id": "Agent/102",
          "agent_name": "John Doe",
          "agent_aliases": [
            "sip/654",
            "john_doe"
          ],
          "agent_extension": "103",
          "user_password": "999"
        }
      ],
      "queues": [
        {
          "queue_id": "300",
          "queue_name": "Sales (300)",
          "queue_composition": "300",
          "queue_wrapup": 0,
          "queue_inbound": true,
          "known_agents": [
            {
              "agent_id": "Agent/101",
              "agent_penalty": 1,
              "agent_dynamic": false
            },
            {
              "agent_id": "Agent/102",
              "agent_penalty": 0,
              "agent_dynamic": false
            }
          ]
        },
        {
          "queue_id": "3000",
          "queue_name": "Sales (3000)",
          "queue_composition": "3000",
          "queue_wrapup": 0,
          "queue_inbound": true,
          "known_agents": [
            {
              "agent_id": "Agent/101",
              "agent_penalty": 1,
              "agent_dynamic": false
            },
            {
              "agent_id": "Agent/102",
              "agent_penalty": 0,
              "agent_dynamic": false
            }
          ]
        }
      ]
    }
  ]
}
Please note that this is the same data structure that can be exported by the QueueMetrics synchronizer, or imported manually from the QueueMetrics synchonizer if available as a file or a remote URL.

Controlling object creation and overwriting

By selecting the default mode in the "Explore System Parameters" page in QueueMetrics, the QmPushCfgService service’s behaviour will change - so that you can basically decide which objects will be created, updated or deleted.

The different selectable modes are a list of combinations of the following four permissions:

  • Permission to create objects (agents, queues, pbx)

  • Permission to delete objects (agents, queues, pbx)

  • Permission to update objects (agents, queues, pbx)

  • Permission to create users

The default mode is CR_UPD_DEL_USR that means "Create Update Delete objects and Create users". A number of other modes are documented on the QueueMetrics User Manual.

Controlling user passwords

When creating users, the user’s passwords will be dictated by the user_password field of the agents object in the JSON configuration file. This is because the user creation function will create matching users for each created agent, if the correct permissions are given by selecting the appropriate mode.

If an agent definition in the configuration file has an empty or missing user_password field, the given password will be dicatated by the synchronizer.default_password parameter on the QueueMetrics system. If this parameter is not set, thew password will be generated randomly as a string of 40 characters, so that you will have to force a new one.