diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 8a93851773..5e1bb2ba7b 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Tue Nov 2 17:57:25 CDT 2010 +Wed Nov 3 11:46:27 EDT 2010 diff --git a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c index abe7e68c44..7d3280fef6 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c +++ b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c @@ -1674,7 +1674,7 @@ int agent_set_params(nta_agent_t *agent, tagi_t *tags) progress = 60 * 1000; agent->sa_progress = progress; - if (server_rport > 2) + if (server_rport > 3) server_rport = 1; else if (server_rport < 0) server_rport = 1; @@ -3084,7 +3084,9 @@ int agent_check_request_via(nta_agent_t *agent, rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port)); msg_header_replace_param(msg_home(msg), v->v_common, rport); } - else if (agent->sa_server_rport == 2) { + else if (agent->sa_server_rport == 2 || + (agent->sa_server_rport == 3 && sip && sip->sip_user_agent && + sip->sip_user_agent->g_string && !strncasecmp(sip->sip_user_agent->g_string, "Polycom", 7))) { rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port)); msg_header_replace_param(msg_home(msg), v->v_common, rport); } diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 0f9e265c4d..ac1251daa9 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2414,7 +2414,9 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile) profile->dtmf_type = DTMF_NONE; } } else if (!strcasecmp(var, "NDLB-force-rport")) { - if (switch_true(val)) { + if (val && !strcasecmp(val, "safe")) { + profile->rport_level = 3; + } else if (switch_true(val)) { profile->rport_level = 2; } } else if (!strcasecmp(var, "caller-id-type")) { @@ -3083,7 +3085,9 @@ switch_status_t config_sofia(int reload, char *profile_name) profile->dtmf_type = DTMF_NONE; } } else if (!strcasecmp(var, "NDLB-force-rport")) { - if (switch_true(val)) { + if (val && !strcasecmp(val, "safe")) { + profile->rport_level = 3; + } else if (switch_true(val)) { profile->rport_level = 2; } } else if (!strcasecmp(var, "auto-rtp-bugs")) {