4.9. sht_iterator_next(iname)
5. Exported pseudo-variables
- 6. MI Commands
+ 6. Exported RPC Commands
- 6.1. sht_reload
- 6.2. sht_dump
- 6.3. sht_delete
+ 6.1. htable.get htable key
+ 6.2. htable.delete htable key
+ 6.3. htable.sets htable key value
+ 6.4. htable.seti htable key value
+ 6.5. htable.dump htable
+ 6.6. htable.reload htable
+ 6.7. htable.listTables
+ 6.8. htable.stats
- 7. Exported RPC Commands
+ 7. Event routes
- 7.1. htable.get htable key
- 7.2. htable.delete htable key
- 7.3. htable.sets htable key value
- 7.4. htable.seti htable key value
- 7.5. htable.dump htable
- 7.6. htable.reload htable
- 7.7. htable.listTables
- 7.8. htable.stats
-
- 8. Event routes
-
- 8.1. htable:mod-init
- 8.2. htable:expired:<table>
+ 7.1. htable:mod-init
+ 7.2. htable:expired:<table>
List of Examples
4.9. sht_iterator_next(iname)
5. Exported pseudo-variables
- 6. MI Commands
-
- 6.1. sht_reload
- 6.2. sht_dump
- 6.3. sht_delete
+ 6. Exported RPC Commands
- 7. Exported RPC Commands
+ 6.1. htable.get htable key
+ 6.2. htable.delete htable key
+ 6.3. htable.sets htable key value
+ 6.4. htable.seti htable key value
+ 6.5. htable.dump htable
+ 6.6. htable.reload htable
+ 6.7. htable.listTables
+ 6.8. htable.stats
- 7.1. htable.get htable key
- 7.2. htable.delete htable key
- 7.3. htable.sets htable key value
- 7.4. htable.seti htable key value
- 7.5. htable.dump htable
- 7.6. htable.reload htable
- 7.7. htable.listTables
- 7.8. htable.stats
+ 7. Event routes
- 8. Event routes
-
- 8.1. htable:mod-init
- 8.2. htable:expired:<table>
+ 7.1. htable:mod-init
+ 7.2. htable:expired:<table>
1. Overview
Exported pseudo-variables are documented at
http://www.kamailio.org/wiki/.
-6. MI Commands
-
- 6.1. sht_reload
- 6.2. sht_dump
- 6.3. sht_delete
-
-6.1. sht_reload
-
- Reload a hash table from database.
-
- Name: sht_reload
-
- Parameters: _hash_table_name_ - the name of hash table to reload.
-
- MI FIFO Command Format:
- :sht_reload:_reply_fifo_file_
- _hash_table_name_
- _empty_line_
-
-6.2. sht_dump
-
- Dump content of a hash table via MI.
-
- Name: sht_dump
-
- Parameters: _hash_table_name_ - the name of hash table to dump.
-
- MI FIFO Command Format:
- :sht_dump:_reply_fifo_file_
- _hash_table_name_
- _empty_line_
-
-6.3. sht_delete
-
- Delete a key from a hash table via MI.
-
- Name: sht_delete
-
- Parameters:
- * _hash_table_name: The table name to delete the key from
- * _key_name: The key to delete from the htable
-
- MI FIFO Command Format:
- :sht_delete:_reply_fifo_file_
- _hash_table_name_
- _key_name_
- _empty_line_
-
- Example (note the quoting when executing it via FIFO):
- kamctl fifo sht_delete auth '"user@example.org::last_auth"'
-
-7. Exported RPC Commands
+6. Exported RPC Commands
- 7.1. htable.get htable key
- 7.2. htable.delete htable key
- 7.3. htable.sets htable key value
- 7.4. htable.seti htable key value
- 7.5. htable.dump htable
- 7.6. htable.reload htable
- 7.7. htable.listTables
- 7.8. htable.stats
+ 6.1. htable.get htable key
+ 6.2. htable.delete htable key
+ 6.3. htable.sets htable key value
+ 6.4. htable.seti htable key value
+ 6.5. htable.dump htable
+ 6.6. htable.reload htable
+ 6.7. htable.listTables
+ 6.8. htable.stats
-7.1. htable.get htable key
+6.1. htable.get htable key
Lists one value in a hash table
Example:
...
-# Dump $sht(students=>daniel)
-kamcmd htable.get students daniel
+# Dump $sht(students=>alice)
+kamcmd htable.get students alice
# Dump first entry in array key course $sht(students=>course[0])
kamcmd htable.get students course[0]
...
-7.2. htable.delete htable key
+6.2. htable.delete htable key
Delete one value in a hash table
Example:
...
-# Delete $sht(students=>anna)
-kamcmd htable.delete students anna
+# Delete $sht(students=>alice)
+kamcmd htable.delete students alice
# Delete first entry in array key course $sht(students=>course[0])
kamcmd htable.delete students course[0]
...
-7.3. htable.sets htable key value
+6.3. htable.sets htable key value
Set an item in hash table to string value.
kamcmd htable.sets test x[0] abc
...
-7.4. htable.seti htable key value
+6.4. htable.seti htable key value
Set an item in hash table to integer value.
kamcmd htable.sets test x[0] 123
...
-7.5. htable.dump htable
+6.5. htable.dump htable
Lists all the values in a hash table
kamcmd htable.dump ipban
...
-7.6. htable.reload htable
+6.6. htable.reload htable
Reload hash table from database.
kamcmd htable.reload ipban
...
-7.7. htable.listTables
+6.7. htable.listTables
Lists all defined tables
kamcmd htable.listTables
...
-7.8. htable.stats
+6.8. htable.stats
Get statistics for hash tables - name, number of slots, number of
items, max number of items per slot, min number of items per slot.
kamcmd htable.stats
...
-8. Event routes
+7. Event routes
- 8.1. htable:mod-init
- 8.2. htable:expired:<table>
+ 7.1. htable:mod-init
+ 7.2. htable:expired:<table>
-8.1. htable:mod-init
+7.1. htable:mod-init
When defined, the module calls event_route[htable:mod-init] after all
modules have been initialized. A typical use case is to initialise
}
...
-8.2. htable:expired:<table>
+7.2. htable:expired:<table>
When defined, the module calls event_route[htable:expired:<table>] when
an entry in the given table expires. In this event route, the key and
4.1. mt_match(mtree, pv, mode)
- 5. MI Commands
+ 5. RPC Commands
- 5.1. mt_list
- 5.2. mt_reload
- 5.3. mt_summary
- 5.4. mt_match
-
- 6. RPC Commands
-
- 6.1. mtree.summary
- 6.2. mtree.reload
- 6.3. mtree.match
+ 5.1. mtree.list
+ 5.2. mtree.summary
+ 5.3. mtree.reload
+ 5.4. mtree.match
List of Examples
1.12. Set mt_ignore_duplicates parameter
1.13. Set mt_allow_duplicates parameter
1.14. mt_match usage
+ 1.15. mtree.list rpc usage
Chapter 1. Admin Guide
4.1. mt_match(mtree, pv, mode)
- 5. MI Commands
-
- 5.1. mt_list
- 5.2. mt_reload
- 5.3. mt_summary
- 5.4. mt_match
+ 5. RPC Commands
- 6. RPC Commands
-
- 6.1. mtree.summary
- 6.2. mtree.reload
- 6.3. mtree.match
+ 5.1. mtree.list
+ 5.2. mtree.summary
+ 5.3. mtree.reload
+ 5.4. mtree.match
1. Overview
mt_match("mytree", "$rU", "0");
...
-5. MI Commands
-
- 5.1. mt_list
- 5.2. mt_reload
- 5.3. mt_summary
- 5.4. mt_match
-
-5.1. mt_list
+5. RPC Commands
- List content of a tree.
+ 5.1. mtree.list
+ 5.2. mtree.summary
+ 5.3. mtree.reload
+ 5.4. mtree.match
- Name: mt_list
+5.1. mtree.list
- Parameters:
- * _mtree_ : name of tree to list.
-
- MI FIFO Command Format:
- :mt_list:_reply_fifo_file_
- _mtname_
- _empty_line_
-
-5.2. mt_reload
+ List content of one or all trees.
- Reload mtree from database.
-
- Name: mt_mtree
+ Name: mtree.list
Parameters:
- * _mtname_
- - name of mem tree
-
- MI FIFO Command Format:
- :mt_reload:_reply_fifo_file_
- _mtname_
- _empty_line_
-
-5.3. mt_summary
+ * _mtree_ : name of tree to list (optional).
- List usage summary for all trees.
-
- Name: mt_summary
-
- Parameters: none.
-
- MI FIFO Command Format:
- :mt_summary:_reply_fifo_file_
- _empty_line_
-
-5.4. mt_match
-
- Match prefix value against mtree.
-
- Name: mt_match
-
- Parameters: 3
- * Name of mtree
- * Prefix to match
- * Mode of matching
-
- MI FIFO Command Format:
- :mt_match:_reply_fifo_file_
- _mtree_
- _prefix_
- _mode_
- _empty_line_
-
-6. RPC Commands
-
- 6.1. mtree.summary
- 6.2. mtree.reload
- 6.3. mtree.match
+ Example 1.15. mtree.list rpc usage
+...
+kamcmd mtree.list
+kamcmd mtree.list mytree
+...
-6.1. mtree.summary
+5.2. mtree.summary
List usage summary for all trees or for the tree whose name is given as
parameter.
Parameters:
* _mtree_ - (optional) the name of the tree.
-6.2. mtree.reload
+5.3. mtree.reload
Reload mtree from database to memory.
* _mtree_
- name of mtree or empty string meaning all mtrees
-6.3. mtree.match
+5.4. mtree.match
Match prefix value against mtree