Html |
---|
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script> |
Html |
---|
<div class="fb-like" data-href="#" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div> |
...
Scroll export button | ||||||||
---|---|---|---|---|---|---|---|---|
|
Info |
---|
This guide explains how to handle JSON documents inside Wildix Dialplan. Created: November 2021 Permalink: https://confluencewildix.wildixatlassian.comnet/wiki/x/PQIkBguADOAQ |
Table of Contents |
---|
Starting from WMS Beta 5.04, res_json is integrated into the system. It is a wrapper module around a JSON library that allows you to handle JSON documents inside Wildix Dialplan and send requests to external software (e.g. CRM systems).
List of supported apps and functions
App/ function | Description |
JSONELEMENT(doc,path) | (r/o function) gets the value of an element at a given path in a JSON document |
jsonvariables(doc) | (app) reads a single level JSON document (dictionary) into Dialplan variables |
jsonadd(doc,path,elemtype,name,value) | (app) adds an element to the JSON document at the given path |
jsonset(doc,path,newvalue) | (app) changes the value of an element in the JSON document |
jsondelete(doc,path) | (app) deletes an element in the JSON document |
JSONPRETTY(doc) | (r/o function) formats a JSON document for nice printing |
JSONCOMPRESS(doc) | (r/o function) formats a JSON document for minimum footprint |
Parameters:
doc: the name of the variable that contains the JSON document
Note Note: All the functions and apps require the name of a Dialplan variable that contains the JSON document, instead of the parseable string itself.
- path: path to the element you are looking for (like /path/to/element, or /path/to/element/3 to identify the element with index 3 in an array)
- elemtype: element type, one of bool, null, number, string, node or array
- name: the name of the element to be added (may be missing if adding elements to an array)
- value: value to be set for the element we added
- newvalue: value to be set
...
To configure JSON requests in Wildix Dialplan, Custom application has to be used.
Dialplan example:
- To indicate path to JSON document, use the CURL(url) variable together with Set():
Set(variablename=${CURL(URL)}) - JSONPRETTY used with NoOp function displays JSON values in a neat and easily readable format in logs (1).
- The Set variable with JSONELEMENT function returns the value of an element of JSON document and assigns it to the indicated variablename (2).
- The variable jsonvariables(json) turns JSON values into a Dialplan variable (3).
- The NoOp variable returns the Billing code value (4).
Macrosuite divider macro | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Button macro | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|