fix many nat woes, see changes to default config for details

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8391 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-05-13 23:22:21 +00:00
parent 8541587db6
commit dc757bc9cf
6 changed files with 119 additions and 15 deletions
+13
View File
@@ -868,6 +868,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
uint32_t session_timeout = 0;
const char *val;
const char *rep;
char *sticky;
rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
@@ -1001,6 +1002,17 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
TAG_END());
if (switch_test_flag(tech_pvt, TFLAG_NAT) ||
(val = switch_channel_get_variable(channel, "sip-force-contact")) ||
((val = switch_channel_get_variable(channel, "sip_sticky_contact")) && switch_true(val))) {
tech_pvt->record_route = switch_core_session_strdup(tech_pvt->session, url_str);
sticky = tech_pvt->record_route;
session_timeout = 20;
}
/* TODO: We should use the new tags for making an rpid and add profile options to turn this on/off */
if (switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NAME)) {
priv = "name";
@@ -1091,6 +1103,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
sofia_glue_tech_patch_sdp(tech_pvt);
}
nua_invite(tech_pvt->nh,
NUTAG_AUTOANSWER(0),
NUTAG_SESSION_TIMER(session_timeout),