[asterisk-commits] russell: branch russell/messaging r309638 - in /team/russell/messaging: doc/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 4 16:55:35 CST 2011


Author: russell
Date: Fri Mar  4 16:55:31 2011
New Revision: 309638

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=309638
Log:
Add more docs.

Modified:
    team/russell/messaging/doc/asterisk-messaging.txt
    team/russell/messaging/main/asterisk.c
    team/russell/messaging/main/message.c

Modified: team/russell/messaging/doc/asterisk-messaging.txt
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/doc/asterisk-messaging.txt?view=diff&rev=309638&r1=309637&r2=309638
==============================================================================
--- team/russell/messaging/doc/asterisk-messaging.txt (original)
+++ team/russell/messaging/doc/asterisk-messaging.txt Fri Mar  4 16:55:31 2011
@@ -132,7 +132,7 @@
             INVALID_URI      - The protocol handler reported that the URI was
                                not valid.
             SUCCESS          - Successfully passed on to the protocol handler,
-                               but deliver has not necessarily been guaranteed.
+                               but delivery has not necessarily been guaranteed.
             FAILURE          - The protocol handler reported that it was unable
                                to deliver the message for some reason.
 

Modified: team/russell/messaging/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/main/asterisk.c?view=diff&rev=309638&r1=309637&r2=309638
==============================================================================
--- team/russell/messaging/main/asterisk.c (original)
+++ team/russell/messaging/main/asterisk.c Fri Mar  4 16:55:31 2011
@@ -3665,11 +3665,6 @@
 		exit(1);
 	}
 
-	if (ast_msg_init()) {
-		printf("%s", term_quit());
-		exit(1);
-	}
-
 #ifdef TEST_FRAMEWORK
 	if (ast_test_init()) {
 		printf("%s", term_quit());
@@ -3734,6 +3729,11 @@
 	ast_xmldoc_load_documentation();
 #endif
 
+	if (ast_msg_init()) {
+		printf("%s", term_quit());
+		exit(1);
+	}
+
 	/* initialize the data retrieval API */
 	if (ast_data_init()) {
 		printf ("%s", term_quit());

Modified: team/russell/messaging/main/message.c
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/main/message.c?view=diff&rev=309638&r1=309637&r2=309638
==============================================================================
--- team/russell/messaging/main/message.c (original)
+++ team/russell/messaging/main/message.c Fri Mar  4 16:55:31 2011
@@ -37,6 +37,82 @@
 #include "asterisk/app.h"
 #include "asterisk/taskprocessor.h"
 #include "asterisk/message.h"
+
+/*** DOCUMENTATION
+	<function name="MESSAGE" language="en_US">
+		<synopsis>
+			Create a message or read fields from a message.
+		</synopsis>
+		<syntax argsep="/">
+			<parameter name="argument" required="true">
+			<para>Field of the message to get or set.</para>
+			<enumlist>
+				<enum name="to">
+					<para>Read-only.  The destination of the message.  When processing an
+					incoming message, this will be set to the destination listed as
+					the recipient of the message that was received by Asterisk.</para>
+				</enum>
+				<enum name="from">
+					<para>Read-only.  The source of the message.  When processing an
+					incoming message, this will be set to the source of the message.</para>
+				</enum>
+				<enum name="body">
+					<para>Read/Write.  The message body.  When processing an incoming
+					message, this includes the body of the message that Asterisk
+					received.  When MessageSend() is executed, the contents of this
+					field are used as the body of the outgoing message.  The body
+					will always be UTF-8.</para>
+				</enum>
+			</enumlist>
+			</parameter>
+		</syntax>
+		<description>
+			<para>This function will read from or write a value to a text message.
+			It is used both to read the data out of an incoming message, as well as
+			modify or create a message that will be sent outbound.</para>
+		</description>
+		<see-also>
+			<ref type="application">MessageSend</ref>
+		</see-also>
+	</function>
+	<application name="MessageSend" language="en_US">
+ 		<synopsis>
+			Send a text message.
+		</synopsis>
+		<syntax>
+			<parameter name="to" required="true">
+				<para>A To URI for the message.</para>
+			</parameter>
+			<parameter name="from" required="false">
+				<para>A From URI for the message if needed for the
+				message technology being used to send this message.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Send a text message.  The body of the message that will be
+			sent is what is currently set to <literal>MESSAGE(body)</literal>.</para>
+
+			<para>This application sets the following channel variables:</para>
+			<variablelist>
+				<variable name="MESSAGE_SEND_STATUS">
+					<para>This is the time from dialing a channel until when it is disconnected.</para>
+					<value name="INVALID_PROTOCOL">
+						<para>No handler for the technology part of the URI was found.</para>
+					</value>
+					<value name="INVALID_URI">
+						<para>The protocol handler reported that the URI was not valid.</para>
+					</value>
+					<value name="SUCCESS">
+						<para>Successfully passed on to the protocol handler, but delivery has not necessarily been guaranteed.</para>
+					</value>
+					<value name="FAILURE">
+						<para>The protocol handler reported that it was unabled to deliver the message for some reason.</para>
+					</value>
+				</variable>
+			</variablelist>
+		</description>
+	</application>
+ ***/
 
 /*!
  * \brief A message.




More information about the asterisk-commits mailing list