[asterisk-commits] tilghman: trunk r177506 - /trunk/doc/database_transactions.txt

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 19 13:46:13 CST 2009


Author: tilghman
Date: Thu Feb 19 13:46:13 2009
New Revision: 177506

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=177506
Log:
Document how to use database transactions

Added:
    trunk/doc/database_transactions.txt   (with props)

Added: trunk/doc/database_transactions.txt
URL: http://svn.digium.com/svn-view/asterisk/trunk/doc/database_transactions.txt?view=auto&rev=177506
==============================================================================
--- trunk/doc/database_transactions.txt (added)
+++ trunk/doc/database_transactions.txt Thu Feb 19 13:46:13 2009
@@ -1,0 +1,29 @@
+As of 1.6.2, Asterisk now supports doing database transactions from the
+dialplan.  A number of new applications and functions have been introduced
+for this purpose and this document should hopefully familiarize you with
+all of them.
+
+First, the ODBC() function has been added which is used to set up all new
+database transactions.  Simply write the name of the transaction to this
+function, along with the arguments of "transaction" and the database name,
+e.g. Set(ODBC(transaction,postgres-asterisk)=foo).  In this example, the
+name of the transaction is "foo".  The name doesn't really matter, unless
+you're manipulating multiple transactions within the same dialplan, at the
+same time.  Then, you use the transaction name to change which transaction
+is active for the next dialplan function.
+
+The ODBC() function is also used to turn on a mode known as forcecommit.
+For most cases, you won't need to use this, but it's there.  It simply
+causes a transaction to be committed, when the channel hangs up.  The other
+property which may be set is the isolation property.  Please consult with
+your database vendor as to which values are supported by their ODBC driver.
+Asterisk supports setting all standard ODBC values, but many databases do
+not support the entire complement.
+
+Finally, when you have run multiple statements on your transaction and you
+wish to complete the transaction, use the ODBC_Commit and ODBC_Rollback
+applications, along with the transaction ID (in the example above, "foo")
+to commit or rollback the transaction.  Please note that if you do not
+explicitly commit the transaction or if forcecommit is not turned on, the
+transaction will be automatically rolled back at channel destruction (after
+hangup) and all related database resources released back to the pool.

Propchange: trunk/doc/database_transactions.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/doc/database_transactions.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: trunk/doc/database_transactions.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list