Table of Contents
List of Examples
Table of Contents
The PUA_JSON module adds support to publish updates to the presence module through the pua_json_publish() function.
From a high-level perspective, the module may be used for:
Providing a real-time presence updates.
The module parses json data objects and inserts them into the presentity table for real-time presence updates.
The function build presentity state from json_payload and updates presentity table.
Usage: presence related.
This function can be used from ANY ROUTE.
Example 1.1. pua_json_publish usage
...
event_route[xhttp:request] {
$var(call-id) = $(rb{json.parse,Call-ID});
if ($(rb{json.parse,Event-Package}) == "dialog") {
xlog("L_INFO", "$var(call-id)|log|received $(rb{json.parse,Event-Package}) update for $(rb{json.parse,From})");
pua_json_publish($rb);
}
}
...