[asterisk-commits] russell: branch russell/func_devstate r54257 - /team/russell/func_devstate/fu...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 13 14:48:50 MST 2007


Author: russell
Date: Tue Feb 13 15:48:49 2007
New Revision: 54257

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54257
Log:
Add documentation on the DEVSTATE function

Modified:
    team/russell/func_devstate/funcs/func_devstate.c

Modified: team/russell/func_devstate/funcs/func_devstate.c
URL: http://svn.digium.com/view/asterisk/team/russell/func_devstate/funcs/func_devstate.c?view=diff&rev=54257&r1=54256&r2=54257
==============================================================================
--- team/russell/func_devstate/funcs/func_devstate.c (original)
+++ team/russell/func_devstate/funcs/func_devstate.c Tue Feb 13 15:48:49 2007
@@ -153,6 +153,23 @@
 	.name = "DEVSTATE",
 	.synopsis = "Get or Set a device state",
 	.syntax = "DEVSTATE(device)",
+	.desc =
+	"  The DEVSTATE function can be used to retrieve the device state from any\n"
+	"device state provider.  For example:\n"
+	"   NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})\n"
+	"   NoOp(Conference number 1234 has state ${DEVSTATE(MeetMe:1234)})\n"
+	"\n"
+	"  The DEVSTATE function can also be used to set custom device state from\n"
+	"the dialplan.  The \"Custom:\" prefix must be used.  For example:\n"
+	"  Set(DEVSTATE(Custom:lamp1)=BUSY)\n"
+	"  Set(DEVSTATE(Custom:lamp2)=NOT_INUSE)\n"
+	"You can subscribe to the status of a custom device state using a hint in\n"
+	"the dialplan:\n"
+	"  exten => 1234,hint,Custom:lamp1\n"
+	"\n"
+	"  The possible values for both uses of this function are:\n"
+	"UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING\n"
+	"RINGINUSE | ONHOLD\n",
 	.read = devstate_read,
 	.write = devstate_write,
 };



More information about the asterisk-commits mailing list