PRESENCE_STATE: Provide better documentation for the 'e' option.
authorJonathan Rose <jrose@digium.com>
Mon, 18 Feb 2013 19:48:47 +0000 (19:48 +0000)
committerJonathan Rose <jrose@digium.com>
Mon, 18 Feb 2013 19:48:47 +0000 (19:48 +0000)
Notes that the 'e' option actually decodes data when used as a write function
such as with the SET application while it encodes data when used to read.

Review: https://reviewboard.asterisk.org/r/2335/
........

Merged revisions 381655 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_presencestate.c

index 51df750..66a3f2e 100644 (file)
@@ -71,7 +71,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                        <parameter name="options" required="false">
                          <optionlist>
                            <option name="e">
                        <parameter name="options" required="false">
                          <optionlist>
                            <option name="e">
-                                 <para>Base-64 encode the data.</para>
+                                 <para>On Write - Use this option when the subtype and message provided are Base64
+                                       encoded. On Read - Retrieves message/subtype in Base64 encoded form.</para>
                                </option>
                          </optionlist>
                        </parameter>
                                </option>
                          </optionlist>
                        </parameter>
@@ -85,6 +86,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                        the dialplan.  The <literal>CustomPresence:</literal> prefix must be used. For example:</para>
                        <para>Set(PRESENCE_STATE(CustomPresence:lamp1)=away,temporary,Out to lunch)</para>
                        <para>Set(PRESENCE_STATE(CustomPresence:lamp2)=dnd,,Trying to get work done)</para>
                        the dialplan.  The <literal>CustomPresence:</literal> prefix must be used. For example:</para>
                        <para>Set(PRESENCE_STATE(CustomPresence:lamp1)=away,temporary,Out to lunch)</para>
                        <para>Set(PRESENCE_STATE(CustomPresence:lamp2)=dnd,,Trying to get work done)</para>
+                       <para>Set(PRESENCE_STATE(CustomPresence:lamp3)=xa,T24gdmFjYXRpb24=,,e)</para>
+                       <para>Set(BASE64_LAMP3_PRESENCE=${PRESENCE_STATE(CustomPresence:lamp3,subtype,e)})</para>
                        <para>You can subscribe to the status of a custom presence state using a hint in
                        the dialplan:</para>
                        <para>exten => 1234,hint,CustomPresence:lamp1</para>
                        <para>You can subscribe to the status of a custom presence state using a hint in
                        the dialplan:</para>
                        <para>exten => 1234,hint,CustomPresence:lamp1</para>