]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add a flag that indicates whether a SIP dialog is an outgoing call or not. SIP_OUTGOI...
authorJoshua Colp <jcolp@digium.com>
Wed, 21 Feb 2007 17:18:19 +0000 (17:18 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 21 Feb 2007 17:18:19 +0000 (17:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@55914 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f8df46409c1e403041fd933d34278d0c8bd72a43..e2749760848280f93d8669cfafed17e1da7ce0e9 100644 (file)
@@ -778,6 +778,7 @@ struct sip_auth {
 #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_OUTGOING_CALL         (1 << 27)       /*!< 27: Is this an outgoing call? */
 
 #define SIP_PAGE2_FLAGS_TO_COPY \
        (SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
@@ -2992,7 +2993,7 @@ static int update_call_counter(struct sip_pvt *fup, int event)
 {
        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;
 
@@ -15257,6 +15258,8 @@ static struct ast_channel *sip_request_call(const char *type, int format, void *
                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");