This module implements an abstraction for retrieving asterisk data and export it.
Register
To register a callback use:
If you instead want to register multiple nodes at once use:
Unregister
To unregister a callback function already registered you can just call:
And every node registered by the current module (file) will be unregistered. If you want to unregister a specific node use:
Implementation
A simple callback function implementation:
Getting the tree
To get the tree you need to create a query, a query is based on three parameters a path to the provider, a search condition and a filter condition.
After using it you need to release the allocated memory of the returned tree:
Iterate
To retrieve nodes from the tree, it is possible to iterate through the returned nodes of the tree using:
node_name is the name of the nodes to retrieve and path is the path to the internal nodes to retrieve (if needed).
Retrieving
After getting the node you where searching for, you will need to retrieve its value, to do that you may use one of the ast_data_retrieve_#type functions: