Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
58a8979c
提交
58a8979c
authored
1月 13, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweak
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7199
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
3993d8aa
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
39 行增加
和
37 行删除
+39
-37
switch_core.h
src/include/switch_core.h
+1
-1
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+1
-1
mod_rss.c
src/mod/applications/mod_rss/mod_rss.c
+1
-1
mod_amr.c
src/mod/codecs/mod_amr/mod_amr.c
+2
-2
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+1
-1
switch_core_session.c
src/switch_core_session.c
+9
-7
switch_core_state_machine.c
src/switch_core_state_machine.c
+1
-1
switch_ivr.c
src/switch_ivr.c
+1
-1
switch_ivr_async.c
src/switch_ivr_async.c
+3
-3
switch_ivr_bridge.c
src/switch_ivr_bridge.c
+3
-3
switch_ivr_originate.c
src/switch_ivr_originate.c
+3
-3
switch_ivr_play_say.c
src/switch_ivr_play_say.c
+13
-13
没有找到文件。
src/include/switch_core.h
浏览文件 @
58a8979c
...
...
@@ -797,7 +797,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(_In_ switc
\brief Reset the buffers and resampler on a session
\param session the session to reset
*/
SWITCH_DECLARE
(
void
)
switch_core_session_reset
(
_In_
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
void
)
switch_core_session_reset
(
_In_
switch_core_session_t
*
session
,
switch_bool_t
flush_dtmf
);
/*!
\brief Write a frame to a session
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
58a8979c
...
...
@@ -4369,7 +4369,7 @@ SWITCH_STANDARD_APP(conference_function)
switch_safe_free
(
dfile
);
}
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
/* release the readlock */
if
(
rl
)
{
...
...
src/mod/applications/mod_rss/mod_rss.c
浏览文件 @
58a8979c
...
...
@@ -624,7 +624,7 @@ SWITCH_STANDARD_APP(rss_function)
}
switch_xml_free
(
xml
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
}
...
...
src/mod/codecs/mod_amr/mod_amr.c
浏览文件 @
58a8979c
...
...
@@ -37,8 +37,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load);
SWITCH_MODULE_DEFINITION
(
mod_amr
,
mod_amr_load
,
NULL
,
NULL
);
#ifndef AMR_PASSTHROUGH
#include "
amr/
interf_enc.h"
#include "
amr/
interf_dec.h"
#include "interf_enc.h"
#include "interf_dec.h"
/*
* Check section 8.1 of rfc3267 for possible sdp options.
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
58a8979c
...
...
@@ -1016,7 +1016,7 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
tech_pvt
->
read_codec
.
implementation
->
iananame
,
tech_pvt
->
rm_encoding
);
switch_core_codec_destroy
(
&
tech_pvt
->
read_codec
);
switch_core_codec_destroy
(
&
tech_pvt
->
write_codec
);
switch_core_session_reset
(
tech_pvt
->
session
);
switch_core_session_reset
(
tech_pvt
->
session
,
SWITCH_TRUE
);
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Already using %s
\n
"
,
tech_pvt
->
read_codec
.
implementation
->
iananame
);
return
SWITCH_STATUS_SUCCESS
;
...
...
src/switch_core_session.c
浏览文件 @
58a8979c
...
...
@@ -575,11 +575,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(switch
}
SWITCH_DECLARE
(
void
)
switch_core_session_reset
(
switch_core_session_t
*
session
)
SWITCH_DECLARE
(
void
)
switch_core_session_reset
(
switch_core_session_t
*
session
,
switch_bool_t
flush_dtmf
)
{
switch_channel_t
*
channel
;
switch_size_t
has
;
channel
=
switch_core_session_get_channel
(
session
);
switch_assert
(
channel
!=
NULL
);
/* clear resamplers*/
switch_resample_destroy
(
&
session
->
read_resampler
);
switch_resample_destroy
(
&
session
->
write_resampler
);
...
...
@@ -590,12 +593,11 @@ SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session)
/* wipe theese, they will be recreated if need be */
switch_buffer_destroy
(
&
session
->
raw_read_buffer
);
switch_buffer_destroy
(
&
session
->
raw_write_buffer
);
/* flush dtmf */
channel
=
switch_core_session_get_channel
(
session
);
while
((
has
=
switch_channel_has_dtmf
(
channel
)))
{
switch_channel_flush_dtmf
(
channel
);
if
(
flush_dtmf
)
{
while
((
has
=
switch_channel_has_dtmf
(
channel
)))
{
switch_channel_flush_dtmf
(
channel
);
}
}
switch_ivr_deactivate_unicast
(
session
);
...
...
src/switch_core_state_machine.c
浏览文件 @
58a8979c
...
...
@@ -220,7 +220,7 @@ static void switch_core_standard_on_park(switch_core_session_t *session)
switch_assert
(
session
!=
NULL
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Standard PARK
\n
"
);
switch_channel_clear_flag
(
session
->
channel
,
CF_TRANSFER
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
switch_ivr_park
(
session
,
NULL
);
}
...
...
src/switch_ivr.c
浏览文件 @
58a8979c
...
...
@@ -882,7 +882,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
const
char
*
uuid
=
NULL
;
switch_assert
(
session
!=
NULL
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
channel
=
switch_core_session_get_channel
(
session
);
switch_assert
(
channel
!=
NULL
);
...
...
src/switch_ivr_async.c
浏览文件 @
58a8979c
...
...
@@ -300,7 +300,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_displace_session(switch_core_session_
SWITCH_FILE_FLAG_READ
|
SWITCH_FILE_DATA_SHORT
,
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
SWITCH_STATUS_GENERR
;
}
...
...
@@ -664,7 +664,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
status
=
SWITCH_STATUS_SUCCESS
;
switch_core_session_set_read_codec
(
session
,
read_codec
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
}
return
status
;
...
...
@@ -720,7 +720,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t
SWITCH_FILE_FLAG_WRITE
|
SWITCH_FILE_DATA_SHORT
,
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error opening %s
\n
"
,
file
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
SWITCH_STATUS_GENERR
;
}
...
...
src/switch_ivr_bridge.c
浏览文件 @
58a8979c
...
...
@@ -222,7 +222,7 @@ static void *audio_bridge_thread(switch_thread_t * thread, void *obj)
end:
switch_core_session_kill_channel
(
session_b
,
SWITCH_SIG_BREAK
);
switch_core_session_reset
(
session_a
);
switch_core_session_reset
(
session_a
,
SWITCH_TRUE
);
switch_channel_set_variable
(
chan_a
,
SWITCH_BRIDGE_VARIABLE
,
NULL
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"BRIDGE THREAD DONE [%s]
\n
"
,
switch_channel_get_name
(
chan_a
));
switch_channel_clear_flag
(
chan_a
,
CF_BRIDGED
);
...
...
@@ -353,8 +353,8 @@ static switch_status_t uuid_bridge_on_transmit(switch_core_session_t *session)
switch_channel_clear_flag
(
channel
,
CF_TRANSFER
);
switch_channel_clear_flag
(
other_channel
,
CF_TRANSFER
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
other_session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
switch_core_session_reset
(
other_session
,
SWITCH_TRUE
);
ready_a
=
switch_channel_ready
(
channel
);
ready_b
=
switch_channel_ready
(
other_channel
);
...
...
src/switch_ivr_originate.c
浏览文件 @
58a8979c
...
...
@@ -448,7 +448,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
if
(
!
pass
&&
write_codec
.
implementation
)
{
if
(
read_codec
&&
!
ringback
.
asis
)
{
switch_core_session_set_read_codec
(
session
,
read_codec
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
}
switch_core_codec_destroy
(
&
write_codec
);
}
...
...
@@ -1116,7 +1116,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
if
(
session
&&
(
ringback_data
||
!
switch_channel_test_flag
(
caller_channel
,
CF_BYPASS_MEDIA
)))
{
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_FALSE
);
}
for
(
i
=
0
;
i
<
and_argc
;
i
++
)
{
...
...
@@ -1243,7 +1243,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if
(
!
pass
&&
write_codec
.
implementation
)
{
if
(
read_codec
&&
!
ringback
.
asis
)
{
switch_core_session_set_read_codec
(
session
,
read_codec
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_FALSE
);
}
switch_core_codec_destroy
(
&
write_codec
);
}
...
...
src/switch_ivr_play_say.c
浏览文件 @
58a8979c
...
...
@@ -371,7 +371,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
read_codec
->
implementation
->
actual_samples_per_second
,
SWITCH_FILE_FLAG_WRITE
|
SWITCH_FILE_DATA_SHORT
,
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
SWITCH_STATUS_GENERR
;
}
...
...
@@ -429,7 +429,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
"Raw Codec Activation Failed %s@%uhz %u channels %dms
\n
"
,
codec_name
,
fh
->
samplerate
,
fh
->
channels
,
read_codec
->
implementation
->
microseconds_per_frame
/
1000
);
switch_core_file_close
(
fh
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
SWITCH_STATUS_GENERR
;
}
...
...
@@ -551,7 +551,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
switch_core_session_set_read_codec
(
session
,
read_codec
);
switch_core_file_close
(
fh
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
status
;
}
...
...
@@ -747,7 +747,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
read_codec
->
implementation
->
number_of_channels
,
read_codec
->
implementation
->
actual_samples_per_second
,
SWITCH_FILE_FLAG_READ
|
SWITCH_FILE_DATA_SHORT
,
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
status
=
SWITCH_STATUS_NOTFOUND
;
goto
end
;
}
...
...
@@ -812,7 +812,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"setup buffer failed
\n
"
);
switch_core_file_close
(
fh
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
status
=
SWITCH_STATUS_GENERR
;
goto
end
;
...
...
@@ -839,7 +839,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Raw Codec Activation Failed %s@%uhz %u channels %dms
\n
"
,
codec_name
,
fh
->
samplerate
,
fh
->
channels
,
interval
);
switch_core_file_close
(
fh
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
status
=
SWITCH_STATUS_GENERR
;
goto
end
;
}
...
...
@@ -856,7 +856,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"setup timer failed!
\n
"
);
switch_core_codec_destroy
(
&
codec
);
switch_core_file_close
(
fh
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
status
=
SWITCH_STATUS_GENERR
;
goto
end
;
}
...
...
@@ -1103,7 +1103,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
end
:
free
(
abuf
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
status
;
}
...
...
@@ -1566,7 +1566,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
timer_name
=
switch_channel_get_variable
(
channel
,
"timer_name"
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
read_codec
=
switch_core_session_get_read_codec
(
session
);
rate
=
read_codec
->
implementation
->
actual_samples_per_second
;
...
...
@@ -1577,7 +1577,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
if
(
switch_core_speech_open
(
sh
,
tts_name
,
voice_name
,
(
uint32_t
)
rate
,
interval
,
&
flags
,
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Invalid TTS module!
\n
"
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
if
(
cache_obj
)
{
switch_channel_set_private
(
channel
,
SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME
,
NULL
);
}
...
...
@@ -1603,7 +1603,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Raw Codec Activation Failed %s@%uhz 1 channel %dms
\n
"
,
codec_name
,
rate
,
interval
);
flags
=
0
;
switch_core_speech_close
(
sh
,
&
flags
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
if
(
cache_obj
)
{
switch_channel_set_private
(
channel
,
SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME
,
NULL
);
}
...
...
@@ -1620,7 +1620,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
switch_core_codec_destroy
(
write_frame
.
codec
);
flags
=
0
;
switch_core_speech_close
(
sh
,
&
flags
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
if
(
cache_obj
)
{
switch_channel_set_private
(
channel
,
SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME
,
NULL
);
}
...
...
@@ -1650,6 +1650,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
}
}
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
,
SWITCH_TRUE
);
return
status
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论