[asterisk-commits] mnicholson: branch 1.6.0 r195894 - in /branches/1.6.0: ./ include/asterisk/ m...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 21 11:19:34 CDT 2009
Author: mnicholson
Date: Thu May 21 11:19:24 2009
New Revision: 195894
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195894
Log:
Merged revisions 195882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r195882 | mnicholson | 2009-05-21 10:33:55 -0500 (Thu, 21 May 2009) | 20 lines
Merged revisions 195881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r195881 | mnicholson | 2009-05-21 10:25:50 -0500 (Thu, 21 May 2009) | 13 lines
This commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and AST_CDR_FLAG_LOCKED from being updated in certain cases.
This is accomplished by adding two functions to update the answer time and disposition of calls that checks for the proper lock flags. These functions are used in the ast_bridge_call() function so that ForkCDR(A) calls are respected.
This patch also modifies the way ast_bridge_call() chooses the cdr record to base the bridged_cdr on. Previously the first unlocked cdr record would be chosen, now instead the first cdr record is chosen and forked cdr records are moved to the bridge_cdr. This allows the original cdr record and any forked cdr records to be properly updated with answer and end times.
(closes issue #13797)
Reported by: sh0t
Tested by: sh0t
(closes issue #14744)
Reported by: deepesh
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/include/asterisk/cdr.h
branches/1.6.0/main/cdr.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/include/asterisk/cdr.h
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/include/asterisk/cdr.h?view=diff&rev=195894&r1=195893&r2=195894
==============================================================================
--- branches/1.6.0/include/asterisk/cdr.h (original)
+++ branches/1.6.0/include/asterisk/cdr.h Thu May 21 11:19:24 2009
@@ -284,6 +284,24 @@
*/
void ast_cdr_setapp(struct ast_cdr *cdr, char *app, char *data);
+/*!
+ * \brief Set the answer time for a call
+ * \param cdr the cdr you wish to associate with the call
+ * \param t the answer time
+ * Starts all CDR stuff necessary for doing CDR when answering a call
+ * NULL argument is just fine.
+ */
+void ast_cdr_setanswer(struct ast_cdr *cdr, struct timeval t);
+
+/*!
+ * \brief Set the disposition for a call
+ * \param cdr the cdr you wish to associate with the call
+ * \param disposition the new disposition
+ * Set the disposition on a call.
+ * NULL argument is just fine.
+ */
+void ast_cdr_setdisposition(struct ast_cdr *cdr, long int disposition);
+
/*!
* \brief Convert a string to a detail record AMA flag
* \param flag string form of flag
Modified: branches/1.6.0/main/cdr.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/main/cdr.c?view=diff&rev=195894&r1=195893&r2=195894
==============================================================================
--- branches/1.6.0/main/cdr.c (original)
+++ branches/1.6.0/main/cdr.c Thu May 21 11:19:24 2009
@@ -788,6 +788,30 @@
}
}
+void ast_cdr_setanswer(struct ast_cdr *cdr, struct timeval t)
+{
+
+ for (; cdr; cdr = cdr->next) {
+ if (ast_test_flag(cdr, AST_CDR_FLAG_ANSLOCKED))
+ continue;
+ if (ast_test_flag(cdr, AST_CDR_FLAG_DONT_TOUCH) && ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
+ continue;
+ check_post(cdr);
+ cdr->answer = t;
+ }
+}
+
+void ast_cdr_setdisposition(struct ast_cdr *cdr, long int disposition)
+{
+
+ for (; cdr; cdr = cdr->next) {
+ if (ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
+ continue;
+ check_post(cdr);
+ cdr->disposition = disposition;
+ }
+}
+
/* set cid info for one record */
static void set_one_cid(struct ast_cdr *cdr, struct ast_channel *c)
{
More information about the asterisk-commits
mailing list