[asterisk-commits] file: trunk r55915 - in /trunk: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 21 10:23:43 MST 2007


Author: file
Date: Wed Feb 21 11:23:42 2007
New Revision: 55915

URL: http://svn.digium.com/view/asterisk?view=rev&rev=55915
Log:
Merged revisions 55914 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r55914 | file | 2007-02-21 12:18:19 -0500 (Wed, 21 Feb 2007) | 2 lines

Add a flag that indicates whether a SIP dialog is an outgoing call or not. SIP_OUTGOING originally did it but it was repurposed to the direction of the last transaction, which can cause update_call_counter to falsely decrease the wrong counters. (please don't hurt me oej) (issue #8943 reported by mdu113)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=55915&r1=55914&r2=55915
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Feb 21 11:23:42 2007
@@ -796,9 +796,10 @@
 #define SIP_PAGE2_CALL_ONHOLD_INACTIVE	(1 << 24)	/*!< 24: Inactive  */
 #define SIP_PAGE2_RFC2833_COMPENSATE    (1 << 25)	/*!< 25: ???? */
 #define SIP_PAGE2_BUGGY_MWI		(1 << 26)	/*!< 26: Buggy CISCO MWI fix */
-#define SIP_PAGE2_NOTEXT		(1 << 27)	/*!< 26: Text not supported  */
-#define SIP_PAGE2_TEXTSUPPORT		(1 << 28)	/*!< 27: Global text enable */
-#define SIP_PAGE2_DEBUG_TEXT		(1 << 29)	/*!< 28: Global text debug */
+#define SIP_PAGE2_NOTEXT		(1 << 27)	/*!< 27: Text not supported  */
+#define SIP_PAGE2_TEXTSUPPORT		(1 << 28)	/*!< 28: Global text enable */
+#define SIP_PAGE2_DEBUG_TEXT		(1 << 29)	/*!< 29: Global text debug */
+#define SIP_PAGE2_OUTGOING_CALL         (1 << 30)       /*!< 30: Is this an outgoing call? */
 
 #define SIP_PAGE2_FLAGS_TO_COPY \
 	(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
@@ -3296,7 +3297,7 @@
 {
 	char name[256];
 	int *inuse = NULL, *call_limit = NULL, *inringing = NULL;
-	int outgoing = ast_test_flag(&fup->flags[0], SIP_OUTGOING);
+	int outgoing = ast_test_flag(&fup->flags[1], SIP_PAGE2_OUTGOING_CALL);
 	struct sip_user *u = NULL;
 	struct sip_peer *p = NULL;
 
@@ -15962,6 +15963,8 @@
 		return NULL;
 	}
 
+	ast_set_flag(&p->flags[1], SIP_PAGE2_OUTGOING_CALL);
+
 	if (!(p->options = ast_calloc(1, sizeof(*p->options)))) {
 		sip_destroy(p);
 		ast_log(LOG_ERROR, "Unable to build option SIP data structure - Out of memory\n");



More information about the asterisk-commits mailing list