summaryrefslogtreecommitdiff
path: root/doc/dundi.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/dundi.tex')
-rw-r--r--doc/dundi.tex18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/dundi.tex b/doc/dundi.tex
index 05d042aad..c932da48c 100644
--- a/doc/dundi.tex
+++ b/doc/dundi.tex
@@ -20,3 +20,21 @@ administrators can locally add extensions which become immediately
available to the other nodes in the system.
For more information visit http://www.dundi.com
+
+\section{DUNDIQUERY and DUNDIRESULT}
+
+The DUNDIQUERY and DUNDIRESULT dialplan functions will let you initiate
+a DUNDi query from the dialplan, see how many results there are, and access
+each one. Here is some example usage:
+
+\begin{verbatim}
+exten => 1,1,Set(ID=${DUNDIQUERY(1|dundi_test|b)})
+exten => 1,n,Set(NUM=${DUNDIRESULT(${ID}|getnum)})
+exten => 1,n,NoOp(There are ${NUM} results)
+exten => 1,n,Set(X=1)
+exten => 1,n,While($[${X} <= ${NUM}])
+exten => 1,n,NoOp(Result ${X} is ${DUNDIRESULT(${ID}|${X})})
+exten => 1,n,Set(X=$[${X} + 1])
+exten => 1,n,EndWhile
+\end{verbatim}
+