mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-18 17:41:53 +00:00
add enable-3pcc sofia profile param, it is now disabled by default.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8723 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9ea77a001f
commit
6d463b5d0f
@ -37,5 +37,6 @@
|
|||||||
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
|
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
|
||||||
<param name="rtp-timeout-sec" value="300"/>
|
<param name="rtp-timeout-sec" value="300"/>
|
||||||
<param name="rtp-hold-timeout-sec" value="1800"/>
|
<param name="rtp-hold-timeout-sec" value="1800"/>
|
||||||
|
<!--<param name="enable-3pcc" value="true"/>-->
|
||||||
</settings>
|
</settings>
|
||||||
</profile>
|
</profile>
|
||||||
|
@ -118,6 +118,8 @@
|
|||||||
<!-- disable register and transfer which may be undesirable in a public switch -->
|
<!-- disable register and transfer which may be undesirable in a public switch -->
|
||||||
<!--<param name="disable-transfer" value="true"/>-->
|
<!--<param name="disable-transfer" value="true"/>-->
|
||||||
<!--<param name="disable-register" value="true"/>-->
|
<!--<param name="disable-register" value="true"/>-->
|
||||||
|
<!--<param name="enable-3pcc" value="true"/>-->
|
||||||
|
|
||||||
</settings>
|
</settings>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
@ -28,5 +28,6 @@
|
|||||||
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
|
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
|
||||||
<param name="rtp-timeout-sec" value="300"/>
|
<param name="rtp-timeout-sec" value="300"/>
|
||||||
<param name="rtp-hold-timeout-sec" value="1800"/>
|
<param name="rtp-hold-timeout-sec" value="1800"/>
|
||||||
|
<!--<param name="enable-3pcc" value="true"/>-->
|
||||||
</settings>
|
</settings>
|
||||||
</profile>
|
</profile>
|
||||||
|
@ -147,7 +147,8 @@ typedef enum {
|
|||||||
PFLAG_DISABLE_TIMER = (1 << 19),
|
PFLAG_DISABLE_TIMER = (1 << 19),
|
||||||
PFLAG_DISABLE_100REL = (1 << 20),
|
PFLAG_DISABLE_100REL = (1 << 20),
|
||||||
PFLAG_AGGRESSIVE_NAT_DETECTION = (1 << 21),
|
PFLAG_AGGRESSIVE_NAT_DETECTION = (1 << 21),
|
||||||
PFLAG_RECIEVED_IN_NAT_REG_CONTACT = (1 << 22)
|
PFLAG_RECIEVED_IN_NAT_REG_CONTACT = (1 << 22),
|
||||||
|
PFLAG_3PCC = (1 << 23)
|
||||||
} PFLAGS;
|
} PFLAGS;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -1244,6 +1244,10 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
|||||||
if (switch_true(val)) {
|
if (switch_true(val)) {
|
||||||
profile->pflags |= PFLAG_BLIND_REG;
|
profile->pflags |= PFLAG_BLIND_REG;
|
||||||
}
|
}
|
||||||
|
} else if (!strcasecmp(var, "enable-3pcc")) {
|
||||||
|
if (switch_true(val)) {
|
||||||
|
profile->pflags |= PFLAG_3PCC;
|
||||||
|
}
|
||||||
} else if (!strcasecmp(var, "accept-blind-auth")) {
|
} else if (!strcasecmp(var, "accept-blind-auth")) {
|
||||||
if (switch_true(val)) {
|
if (switch_true(val)) {
|
||||||
profile->pflags |= PFLAG_BLIND_AUTH;
|
profile->pflags |= PFLAG_BLIND_AUTH;
|
||||||
@ -1877,15 +1881,20 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||||
goto done;
|
goto done;
|
||||||
} else {
|
} else {
|
||||||
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP");
|
if (profile->pflags & PFLAG_3PCC) {
|
||||||
sofia_glue_tech_choose_port(tech_pvt, 0);
|
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP");
|
||||||
sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0);
|
sofia_glue_tech_choose_port(tech_pvt, 0);
|
||||||
switch_channel_set_state(channel, CS_HIBERNATE);
|
sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0);
|
||||||
nua_respond(tech_pvt->nh, SIP_200_OK,
|
switch_channel_set_state(channel, CS_HIBERNATE);
|
||||||
SIPTAG_CONTACT_STR(tech_pvt->profile->url),
|
nua_respond(tech_pvt->nh, SIP_200_OK,
|
||||||
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
|
SIPTAG_CONTACT_STR(tech_pvt->profile->url),
|
||||||
SOATAG_REUSE_REJECTED(1),
|
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
|
||||||
SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
|
SOATAG_REUSE_REJECTED(1),
|
||||||
|
SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
|
||||||
|
} else {
|
||||||
|
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "3PCC DISABLED");
|
||||||
|
switch_channel_hangup(channel, SWITCH_CAUSE_MANDATORY_IE_MISSING);
|
||||||
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user