]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6140 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 22 Jan 2014 21:13:10 +0000 (02:13 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 22 Jan 2014 21:13:21 +0000 (02:13 +0500)
conf/vanilla/sip_profiles/internal.xml
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_presence.c

index 3a5f0eb4ce124464c21087e7060f296a166a19fd..d243c7bb2990473ecc989c8772ea9e72d46c1420 100644 (file)
     <!--<param name="all-reg-options-ping" value="true"/>-->
     <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only'. -->
     <!--<param name="nat-options-ping" value="true"/>-->
+    <!--<param name="sip-options-respond-503-on-busy" value="true"/>-->
+    <!--<param name="sip-messages-respond-200-ok" value="true"/>-->
 
     <!-- TLS: disabled by default, set to "true" to enable -->
     <param name="tls" value="$${internal_ssl_enable}"/>
index a420930ba180f35e5f4e8a1f309071044400118c..603b70ca9533dd040c5734c129655f29a6ed91ce 100644 (file)
@@ -285,6 +285,7 @@ typedef enum {
        PFLAG_TCP_KEEPALIVE,
        PFLAG_TCP_PINGPONG,
        PFLAG_TCP_PING2PONG,
+       PFLAG_MESSAGES_RESPOND_200_OK,
        /* No new flags below this line */
        PFLAG_MAX
 } PFLAGS;
index 98933668069c9f227ef8b7b37ca91ce2205138cb..fdc68664691f3e9d8ace234d5648b904800b159f 100644 (file)
@@ -3733,6 +3733,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
                                        } else if (!strcasecmp(var, "tcp-ping2pong") && !zstr(val)) {
                                                profile->tcp_ping2pong = atoi(val);
                                                sofia_set_pflag(profile, PFLAG_TCP_PING2PONG);
+                                       } else if (!strcasecmp(var, "sip-messages-respond-200-ok") && !zstr(val)) {
+                                               if (switch_true(val)) {
+                                                       sofia_set_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK);
+                                               } else {
+                                                       sofia_clear_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK);
+                                               }
                                        } else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
                                                profile->odbc_dsn = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
index 7f75932c1d533a1ff5f72739642f54994d29993c..f0b2b6023ac33ff111a38c408ff41f7bf3ec85f5 100644 (file)
@@ -4669,7 +4669,11 @@ void sofia_presence_handle_sip_i_message(int status,
 
  end:
 
-       nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
+       if (sofia_test_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK)) {
+               nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
+       } else {
+               nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
+       }
 
 }