Reference13r2:Apps/PbxManager/Explorer: Difference between revisions
(→Links) |
mNo edit summary |
||
(22 intermediate revisions by 8 users not shown) | |||
Line 52: | Line 52: | ||
== Examples == | == Examples == | ||
{{Template:3rd Party Input}} | |||
==== Securing it with boolean object 'alwaystrue' ==== | |||
/user[not(pseudo) and starts-with(@cn, "T")] -> + cd/@type = cfnr<br/> | |||
/user[not(pseudo) and starts-with(@cn, "T")]/cd[not(ep)] -> + @bool = alwaystrue & + ep/@e164 = 88 | |||
=== Search all users with number === | |||
/user[not(pseudo)][@e164] | |||
=== Search all user devices with Innovaphone MAC as hardware ID === | |||
/user/device[starts-with(@hw,"009033")] | |||
=== Search all user with template "Config User" and remove password === | |||
/user[@config="Config User"] -> - @pwd - @pwdx | |||
=== Give all phones without app the app phone === | |||
/user/device[starts-with(@hw,"009033")][not(@app)] -> + @app=phone | |||
=== Give all user devices the flag 'Reverse Proxy' === | |||
/user[not(pseudo)][@e164]/device[not(@trusted)] -> + @trusted=true | |||
=== Remove the Flag 'TLS only' from all user devices === | === Remove the Flag 'TLS only' from all user devices === | ||
/user[not(pseudo)][@e164]/device[@tls="true"] -> -@tls | /user[not(pseudo)][@e164]/device[@tls="true"] -> - @tls | ||
=== Set a cfnr to 88 for all users with 'T' as first letter in name === | |||
/user[not(pseudo) and starts-with(@cn, "T")] -> + cd/@type = cfnr<br/> | |||
/user[not(pseudo) and starts-with(@cn, "T")]/cd[not(ep)] -> + ep/@e164 = 88 | |||
=== Setting an only int cfnr for all users === | |||
This is required, for example, for softphones that are not registered and internal callers should receive an announcement. | |||
For this you have to enable the Call forward on myApps offline checkbox. | |||
/user[not(pseudo)][@e164] -> + cd/@type = cfnr | |||
Search for the empty cfnr and add the | |||
/user[not(pseudo)][@e164]/cd[not(ep)] -> + ep/@e164 = 88 (or +ep/@h323 = Object-Name) | |||
Add another + and add | |||
+ src/@type = do | |||
Finally, set the only int flag: | |||
/user[not(pseudo)][@e164]/cd/src -> + ep/@ext = false | |||
=== Disable all forkings with app rcc at node 'Testnode' === | |||
/user[not(pseudo)][@e164][@node="Testnode"]/fork[@app="rcc"][not(@off)] -> + @off = true | |||
=== Give visibility-entries the flag 'visible' === | |||
This is a helpful job for migrations from V12 to set this in V13 new flag. | |||
/user[not(pseudo)][@e164]/allow[not(@visible)] -> + @visible = true | |||
/user[not(pseudo)][@e164]/ | or this example to remove the visibility flags for all users - new visibility flags can then be rolled out using a Config Template | ||
/user[not(pseudo) and starts-with(@cn, *)] -> -allow | |||
== Links == | == Links == | ||
[https://www.w3schools.com/xml/xpath_intro.asp XPath Tutorial (w3schools.com)] | [https://www.w3schools.com/xml/xpath_intro.asp XPath Tutorial (w3schools.com)] |
Latest revision as of 13:31, 26 June 2024
The PBX Manager Explorer is a tool to search and modify the PBX objects configuration based on xpath expressions.
Care should be taken to apply any changes with the OK buttons. These changes come into effect immediately and cannot be reverted. It is good practise to save a backup of the configuration before applying any modification.
Clicking OK if there is no change is also not advised. It creates an unnecessary write operation.
The search input
The search input is used for an xpath expression to filter the objects. Any object, for which an non-empty set is returned, is selected. If the search input is left empty, the expression "/user" is used, which selects all objects.
An example, which selects all objects with a long name starting With "A" would be
/user[starts-with(@cn, "A")]
Add
To modify the data, an expression to add a tag or attribute can be added, by clicking on the plus icon. For example the expression
device/@hw = hw0
adds a "device" tag with the attribute "hw" set to hw0
Del
By clicking on the minus icon an expression to remove a tag or attribut may be specified
Display of current configuration
In the first window below the expressions, the current configuration for each selected object is displayed
Preview of changed configuration
In the window below the configuration is display as if the changes where applied
Operations
OK
applies the change to the current object
OK(all)
applies the change to all objects
Skip
skips the current object
Cancel
Cancels the operation. The changes already applied with OK are not reversed
Examples
Securing it with boolean object 'alwaystrue'
/user[not(pseudo) and starts-with(@cn, "T")] -> + cd/@type = cfnr
/user[not(pseudo) and starts-with(@cn, "T")]/cd[not(ep)] -> + @bool = alwaystrue & + ep/@e164 = 88
Search all users with number
/user[not(pseudo)][@e164]
Search all user devices with Innovaphone MAC as hardware ID
/user/device[starts-with(@hw,"009033")]
Search all user with template "Config User" and remove password
/user[@config="Config User"] -> - @pwd - @pwdx
Give all phones without app the app phone
/user/device[starts-with(@hw,"009033")][not(@app)] -> + @app=phone
Give all user devices the flag 'Reverse Proxy'
/user[not(pseudo)][@e164]/device[not(@trusted)] -> + @trusted=true
Remove the Flag 'TLS only' from all user devices
/user[not(pseudo)][@e164]/device[@tls="true"] -> - @tls
Set a cfnr to 88 for all users with 'T' as first letter in name
/user[not(pseudo) and starts-with(@cn, "T")] -> + cd/@type = cfnr
/user[not(pseudo) and starts-with(@cn, "T")]/cd[not(ep)] -> + ep/@e164 = 88
Setting an only int cfnr for all users
This is required, for example, for softphones that are not registered and internal callers should receive an announcement.
For this you have to enable the Call forward on myApps offline checkbox.
/user[not(pseudo)][@e164] -> + cd/@type = cfnr
Search for the empty cfnr and add the
/user[not(pseudo)][@e164]/cd[not(ep)] -> + ep/@e164 = 88 (or +ep/@h323 = Object-Name)
Add another + and add
+ src/@type = do
Finally, set the only int flag:
/user[not(pseudo)][@e164]/cd/src -> + ep/@ext = false
Disable all forkings with app rcc at node 'Testnode'
/user[not(pseudo)][@e164][@node="Testnode"]/fork[@app="rcc"][not(@off)] -> + @off = true
Give visibility-entries the flag 'visible'
This is a helpful job for migrations from V12 to set this in V13 new flag.
/user[not(pseudo)][@e164]/allow[not(@visible)] -> + @visible = true
or this example to remove the visibility flags for all users - new visibility flags can then be rolled out using a Config Template
/user[not(pseudo) and starts-with(@cn, *)] -> -allow