]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add send-display-update profile param to disable the update method
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 11 Sep 2012 20:40:43 +0000 (15:40 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 11 Sep 2012 20:40:50 +0000 (15:40 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index f0c57cb988fd4a9d14a18562d51e8e1b27f0a96d..683929a88a1909dfc7eb664ffa5a6c850d0312dd 100644 (file)
@@ -272,6 +272,7 @@ typedef enum {
        PFLAG_THREAD_PER_REG,
        PFLAG_MWI_USE_REG_CALLID,
        PFLAG_FIRE_MESSAGE_EVENTS,
+       PFLAG_SEND_DISPLAY_UPDATE,
        /* No new flags below this line */
        PFLAG_MAX
 } PFLAGS;
index c95a00b820949e46e66fbc8db82b27753b7ef67c..967a5502bd948ff255f51ca4f28ecc914d317eec 100644 (file)
@@ -2497,12 +2497,13 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Created agent for %s\n", profile->name);
        
        nua_set_params(profile->nua,
-                                  SIPTAG_ALLOW_STR("INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO"),
+                                  SIPTAG_ALLOW_STR("INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO"),
                                   NUTAG_AUTOANSWER(0),
                                   NUTAG_AUTOACK(0),
                                   NUTAG_AUTOALERT(0),
                                   NUTAG_ENABLEMESSENGER(1),
                                   NTATAG_EXTRA_100(0),
+                                  TAG_IF(sofia_test_pflag(profile, PFLAG_SEND_DISPLAY_UPDATE), NUTAG_ALLOW("UPDATE")),
                                   TAG_IF((profile->mflags & MFLAG_REGISTER), NUTAG_ALLOW("REGISTER")),
                                   TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")),
                                   TAG_IF(!sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_ALLOW("PRACK")),
@@ -3609,6 +3610,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
                                                } else {
                                                        sofia_clear_pflag(profile, PFLAG_CONFIRM_BLIND_TRANSFER);
                                                }
+                                       } else if (!strcasecmp(var, "send-display-update")) {
+                                               if (switch_true(val)) {
+                                                       sofia_set_pflag(profile, PFLAG_SEND_DISPLAY_UPDATE);
+                                               } else {
+                                                       sofia_clear_pflag(profile, PFLAG_SEND_DISPLAY_UPDATE);
+                                               }
                                        } else if (!strcasecmp(var, "mwi-use-reg-callid")) {
                                                if (switch_true(val)) {
                                                        sofia_set_pflag(profile, PFLAG_MWI_USE_REG_CALLID);
@@ -4359,6 +4366,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                sofia_set_pflag(profile, PFLAG_RTP_AUTOFLUSH_DURING_BRIDGE);
                                profile->contact_user = SOFIA_DEFAULT_CONTACT_USER;
                                sofia_set_pflag(profile, PFLAG_PASS_CALLEE_ID);
+                               sofia_set_pflag(profile, PFLAG_SEND_DISPLAY_UPDATE);
                                sofia_set_pflag(profile, PFLAG_MESSAGE_QUERY_ON_FIRST_REGISTER);
                                //sofia_set_pflag(profile, PFLAG_PRESENCE_ON_FIRST_REGISTER);           
                                sofia_set_pflag(profile, PFLAG_SQL_IN_TRANS);
@@ -4432,6 +4440,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                                } else {
                                                        sofia_clear_pflag(profile, PFLAG_CONFIRM_BLIND_TRANSFER);
                                                }
+                                       } else if (!strcasecmp(var, "send-display-update")) {
+                                               if (switch_true(val)) {
+                                                       sofia_set_pflag(profile, PFLAG_SEND_DISPLAY_UPDATE);
+                                               } else {
+                                                       sofia_clear_pflag(profile, PFLAG_SEND_DISPLAY_UPDATE);
+                                               }
                                        } else if (!strcasecmp(var, "mwi-use-reg-callid")) {
                                                if (switch_true(val)) {
                                                        sofia_set_pflag(profile, PFLAG_MWI_USE_REG_CALLID);