提交 e334fd06 authored 作者: Brian West's avatar Brian West

fix variable name

上级 e232afda
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<condition field="$${call_debug}" expression="^true$" break="never"> <condition field="$${call_debug}" expression="^true$" break="never">
<action application="info"/> <action application="info"/>
</condition> </condition>
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never"> <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never">
<action application="set" data="sip_secure_media=true"/> <action application="set" data="sip_secure_media=true"/>
<!-- Offer SRTP on outbound legs if we have it on inbound. --> <!-- Offer SRTP on outbound legs if we have it on inbound. -->
<!-- <action application="export" data="sip_secure_media=true"/> --> <!-- <action application="export" data="sip_secure_media=true"/> -->
...@@ -546,7 +546,7 @@ ...@@ -546,7 +546,7 @@
<extension name="hold_music"> <extension name="hold_music">
<condition field="destination_number" expression="^9999$"/> <condition field="destination_number" expression="^9999$"/>
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$"> <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
<action application="answer"/> <action application="answer"/>
<action application="execute_extension" data="is_secure XML features"/> <action application="execute_extension" data="is_secure XML features"/>
<action application="playback" data="$${hold_music}"/> <action application="playback" data="$${hold_music}"/>
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<condition field="$${call_debug}" expression="^true$" break="never"> <condition field="$${call_debug}" expression="^true$" break="never">
<action application="info"/> <action application="info"/>
</condition> </condition>
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never"> <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never">
<action application="set" data="sip_secure_media=true"/> <action application="set" data="sip_secure_media=true"/>
<!-- Offer SRTP on outbound legs if we have it on inbound. --> <!-- Offer SRTP on outbound legs if we have it on inbound. -->
<!-- <action application="export" data="sip_secure_media=true"/> --> <!-- <action application="export" data="sip_secure_media=true"/> -->
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
<extension name="hold_music"> <extension name="hold_music">
<condition field="destination_number" expression="^9999$"/> <condition field="destination_number" expression="^9999$"/>
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$"> <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
<action application="answer"/> <action application="answer"/>
<action application="execute_extension" data="is_secure XML features"/> <action application="execute_extension" data="is_secure XML features"/>
<action application="playback" data="$${hold_music}"/> <action application="playback" data="$${hold_music}"/>
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<anti-action application="start_dtmf"/> <anti-action application="start_dtmf"/>
</condition> </condition>
--> -->
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never"> <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never">
<action application="set" data="sip_secure_media=true"/> <action application="set" data="sip_secure_media=true"/>
<!-- Offer SRTP on outbound legs if we have it on inbound. --> <!-- Offer SRTP on outbound legs if we have it on inbound. -->
<!-- <action application="export" data="sip_secure_media=true"/> --> <!-- <action application="export" data="sip_secure_media=true"/> -->
...@@ -720,7 +720,7 @@ ...@@ -720,7 +720,7 @@
<extension name="hold_music"> <extension name="hold_music">
<condition field="destination_number" expression="^9664$"/> <condition field="destination_number" expression="^9664$"/>
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$"> <condition field="${rtp_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
<action application="answer"/> <action application="answer"/>
<action application="execute_extension" data="is_secure XML features"/> <action application="execute_extension" data="is_secure XML features"/>
<action application="playback" data="$${hold_music}"/> <action application="playback" data="$${hold_music}"/>
......
...@@ -115,7 +115,7 @@ typedef struct private_object private_object_t; ...@@ -115,7 +115,7 @@ typedef struct private_object private_object_t;
#define SOFIA_SECURE_MEDIA_VARIABLE "sip_secure_media" #define SOFIA_SECURE_MEDIA_VARIABLE "sip_secure_media"
#define SOFIA_SECURE_MEDIA_CONFIRMED_VARIABLE "sip_secure_media_confirmed" #define SOFIA_SECURE_MEDIA_CONFIRMED_VARIABLE "sip_secure_media_confirmed"
#define SOFIA_SECURE_VIDEO_CONFIRMED_VARIABLE "sip_secure_video_confirmed" #define SOFIA_SECURE_VIDEO_CONFIRMED_VARIABLE "sip_secure_video_confirmed"
//#define SOFIA_HAS_CRYPTO_VARIABLE "sip_has_crypto" //#define SOFIA_HAS_CRYPTO_VARIABLE "rtp_has_crypto"
//#define SOFIA_HAS_VIDEO_CRYPTO_VARIABLE "sip_has_video_crypto" //#define SOFIA_HAS_VIDEO_CRYPTO_VARIABLE "sip_has_video_crypto"
//#define SOFIA_CRYPTO_MANDATORY_VARIABLE "sip_crypto_mandatory" //#define SOFIA_CRYPTO_MANDATORY_VARIABLE "sip_crypto_mandatory"
#define FREESWITCH_SUPPORT "update_display,send_info" #define FREESWITCH_SUPPORT "update_display,send_info"
......
...@@ -2372,7 +2372,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess ...@@ -2372,7 +2372,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy->rtcp); crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy->rtcp);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) { if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_128_HMAC_SHA1_80"); switch_channel_set_variable(channel, "rtp_has_crypto", "AES_CM_128_HMAC_SHA1_80");
} }
break; break;
case AES_CM_128_HMAC_SHA1_32: case AES_CM_128_HMAC_SHA1_32:
...@@ -2381,7 +2381,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess ...@@ -2381,7 +2381,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) { if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_128_HMAC_SHA1_32"); switch_channel_set_variable(channel, "rtp_has_crypto", "AES_CM_128_HMAC_SHA1_32");
} }
break; break;
...@@ -2389,14 +2389,14 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess ...@@ -2389,14 +2389,14 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy->rtp); crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy->rtp);
crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy->rtcp); crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy->rtcp);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) { if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_256_HMAC_SHA1_80"); switch_channel_set_variable(channel, "rtp_has_crypto", "AES_CM_256_HMAC_SHA1_80");
} }
case AES_CM_128_NULL_AUTH: case AES_CM_128_NULL_AUTH:
crypto_policy_set_aes_cm_128_null_auth(&policy->rtp); crypto_policy_set_aes_cm_128_null_auth(&policy->rtp);
crypto_policy_set_aes_cm_128_null_auth(&policy->rtcp); crypto_policy_set_aes_cm_128_null_auth(&policy->rtcp);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) { if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_128_NULL_AUTH"); switch_channel_set_variable(channel, "rtp_has_crypto", "AES_CM_128_NULL_AUTH");
} }
break; break;
default: default:
...@@ -2465,7 +2465,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess ...@@ -2465,7 +2465,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
if (rtp_session->dtls) { if (rtp_session->dtls) {
switch_event_add_header(fsevent, SWITCH_STACK_BOTTOM, "secure_type", "srtp:dtls:AES_CM_128_HMAC_SHA1_80"); switch_event_add_header(fsevent, SWITCH_STACK_BOTTOM, "secure_type", "srtp:dtls:AES_CM_128_HMAC_SHA1_80");
} else { } else {
switch_event_add_header(fsevent, SWITCH_STACK_BOTTOM, "secure_type", "srtp:%s", switch_channel_get_variable(channel, "sip_has_crypto")); switch_event_add_header(fsevent, SWITCH_STACK_BOTTOM, "secure_type", "srtp:sdes:%s", switch_channel_get_variable(channel, "rtp_has_crypto"));
} }
switch_event_add_header_string(fsevent, SWITCH_STACK_BOTTOM, "caller-unique-id", switch_channel_get_uuid(channel)); switch_event_add_header_string(fsevent, SWITCH_STACK_BOTTOM, "caller-unique-id", switch_channel_get_uuid(channel));
switch_event_fire(&fsevent); switch_event_fire(&fsevent);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论