]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODENDP-184
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 9 Feb 2009 00:30:32 +0000 (00:30 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 9 Feb 2009 00:30:32 +0000 (00:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11697 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index 0c4def97c963825fef379da43e70fac0fe4b624f..a503309c0b478cdd68f8f8038e268dfbf8e81b61 100644 (file)
@@ -1561,6 +1561,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
                                        stream->write_function(stream, "TLS-BIND-URL     \t%s\n", switch_str_nil(profile->tls_bindurl));
                                        }
                                        stream->write_function(stream, "HOLD-MUSIC       \t%s\n", switch_strlen_zero(profile->hold_music) ? "N/A" : profile->hold_music);
+                                       stream->write_function(stream, "OUTBOUND-PROXY   \t%s\n", switch_strlen_zero(profile->outbound_proxy) ? "N/A" : profile->outbound_proxy);
                                        stream->write_function(stream, "CODECS           \t%s\n", switch_str_nil(profile->codec_string));
                                        stream->write_function(stream, "TEL-EVENT        \t%d\n", profile->te);
                                        if (profile->dtmf_type == DTMF_2833) {
@@ -1751,6 +1752,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
                                                stream->write_function(stream, "<TLS-BIND-URL>%s</TLS-BIND-URL>\n", switch_str_nil(profile->tls_bindurl));
                                        }
                                        stream->write_function(stream, "<HOLD-MUSIC>%s</HOLD-MUSIC>\n", switch_strlen_zero(profile->hold_music) ? "N/A" : profile->hold_music);
+                                       stream->write_function(stream, "<OUTBOUND-PROXY>%s</OUTBOUND-PROXY>\n", switch_strlen_zero(profile->outbound_proxy) ? "N/A" : profile->outbound_proxy);
                                        stream->write_function(stream, "<CODECS>%s</CODECS>\n", switch_str_nil(profile->codec_string));
                                        stream->write_function(stream, "<TEL-EVENT>%d</TEL-EVENT>\n", profile->te);
                                        if (profile->dtmf_type == DTMF_2833) {
index 83eb9791abbbb7beb3309e93fce6c75865356917..4ba44c70c9b4b744ea1508531aeb4e88aa3ffc30 100644 (file)
@@ -379,6 +379,7 @@ struct sofia_profile {
        char *sipdomain;
        char *timer_name;
        char *hold_music;
+       char *outbound_proxy;
        char *bind_params;
        char *tls_bind_params;
        char *tls_cert_dir;
index 666ca7de80584535e38e2ab9a2233c94da438110..bfcaa8f9e1d84c2fa4b29ee431fa454d4f1e16fd 100644 (file)
@@ -730,6 +730,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
                                                          TAG_IF(!strchr(profile->sipip, ':'), NTATAG_UDP_MTU(65535)), 
                                                          TAG_IF(profile->disable_srv, NTATAG_USE_SRV(0)),
                                                          TAG_IF(profile->disable_naptr, NTATAG_USE_NAPTR(0)),
+                                                         NTATAG_DEFAULT_PROXY(profile->outbound_proxy),
                                                          NTATAG_SERVER_RPORT(profile->rport_level), 
                                                          TAG_IF(tportlog, TPTAG_LOG(1)), 
                                                          TAG_END());   /* Last tag should always finish the sequence */
@@ -1587,6 +1588,8 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
                                                profile->reg_db_domain = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "hold-music")) {
                                                profile->hold_music = switch_core_strdup(profile->pool, val);
+                                       } else if (!strcasecmp(var, "outbound-proxy")) {
+                                               profile->outbound_proxy = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "session-timeout")) {
                                                int v_session_timeout = atoi(val);
                                                if (v_session_timeout >= 0) {
@@ -1979,6 +1982,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                                profile->timer_name = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "hold-music")) {
                                                profile->hold_music = switch_core_strdup(profile->pool, val);
+                                       } else if (!strcasecmp(var, "outbound-proxy")) {
+                                               profile->outbound_proxy = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "session-timeout")) {
                                                int v_session_timeout = atoi(val);
                                                if (v_session_timeout >= 0) {