[Freeswitch-svn] [commit] r13403 - freeswitch/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
anthm at freeswitch.org
Wed May 20 14:01:51 PDT 2009
Author: anthm
Date: Wed May 20 16:01:51 2009
New Revision: 13403
Log:
add proxy-follow-redirect flag (experimental)
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed May 20 16:01:51 2009
@@ -1565,6 +1565,12 @@
} else {
sofia_clear_pflag(profile, PFLAG_RTP_AUTOFLUSH_DURING_BRIDGE);
}
+ } else if (!strcasecmp(var, "proxy-follow-redirect")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_PROXY_FOLLOW_REDIRECT);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_PROXY_FOLLOW_REDIRECT);
+ }
} else if (!strcasecmp(var, "outbound-use-uuid-as-callid")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_UUID_AS_CALLID);
@@ -2075,6 +2081,12 @@
} else {
sofia_clear_pflag(profile, PFLAG_RTP_AUTOFLUSH_DURING_BRIDGE);
}
+ } else if (!strcasecmp(var, "proxy-follow-redirect")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_PROXY_FOLLOW_REDIRECT);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_PROXY_FOLLOW_REDIRECT);
+ }
} else if (!strcasecmp(var, "inbound-proxy-media") && switch_true(val)) {
sofia_set_flag(profile, TFLAG_PROXY_MEDIA);
} else if (!strcasecmp(var, "force-subscription-expires")) {
@@ -2898,12 +2910,11 @@
int i = 0;
char var_name[80];
- if (tech_pvt->route_uri && p_contact && p_contact->m_url) {
+ if (sofia_test_pflag(profile, PFLAG_PROXY_FOLLOW_REDIRECT) && tech_pvt->route_uri && p_contact && p_contact->m_url) {
tech_pvt->route_uri = switch_core_session_strdup(tech_pvt->session, (const char *) p_contact->m_url);
- nua_set_hparams(tech_pvt->nh, NUTAG_PROXY(tech_pvt->route_uri));
+ nua_set_hparams(tech_pvt->nh, NUTAG_PROXY(tech_pvt->route_uri), TAG_END());
}
-
while (p_contact) {
if (p_contact->m_url) {
if (p_contact->m_url->url_user) {
More information about the Freeswitch-svn
mailing list