Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d208484a
提交
d208484a
authored
7月 21, 2014
作者:
William King
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixing linefeed for mod_managed
上级
c15663cb
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
44389 行增加
和
44389 行删除
+44389
-44389
freeswitch_managed.cpp
src/mod/languages/mod_managed/freeswitch_managed.cpp
+108
-108
freeswitch_wrap.2010.cxx
src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx
+43820
-43820
mod_managed.cpp
src/mod/languages/mod_managed/mod_managed.cpp
+461
-461
没有找到文件。
src/mod/languages/mod_managed/freeswitch_managed.cpp
浏览文件 @
d208484a
/*
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - mod_managed
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - mod_managed
* Copyright (C) 2008, Michael Giagnocavo <mgg@packetrino.com>
* Copyright (C) 2008, Michael Giagnocavo <mgg@packetrino.com>
*
*
* Version: MPL 1.1
* Version: MPL 1.1
*
*
* The contents of this file are subject to the Mozilla Public License Version
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
* http://www.mozilla.org/MPL/
*
*
* Software distributed under the License is distributed on an "AS IS" basis,
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* for the specific language governing rights and limitations under the
* License.
* License.
*
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - mod_managed
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - mod_managed
*
*
* The Initial Developer of the Original Code is
* The Initial Developer of the Original Code is
* Michael Giagnocavo <mgg@packetrino.com>
* Michael Giagnocavo <mgg@packetrino.com>
* Portions created by the Initial Developer are Copyright (C)
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
* the Initial Developer. All Rights Reserved.
*
*
* Contributor(s):
* Contributor(s):
*
*
* Michael Giagnocavo <mgg@packetrino.com>
* Michael Giagnocavo <mgg@packetrino.com>
* Jeff Lenk <jlenk@frontiernet.net> - Modified class to support Dotnet
* Jeff Lenk <jlenk@frontiernet.net> - Modified class to support Dotnet
*
*
* freeswitch_managed.cpp -- Managed CoreSession subclasses
* freeswitch_managed.cpp -- Managed CoreSession subclasses
*
*
*/
*/
#include <switch.h>
#include <switch.h>
#include <switch_cpp.h>
#include <switch_cpp.h>
#include "freeswitch_managed.h"
#include "freeswitch_managed.h"
#ifdef _MANAGED
#ifdef _MANAGED
#pragma unmanaged
#pragma unmanaged
#endif
#endif
ManagedSession
::
ManagedSession
()
:
CoreSession
()
ManagedSession
::
ManagedSession
()
:
CoreSession
()
{
{
}
}
ManagedSession
::
ManagedSession
(
char
*
uuid
)
:
CoreSession
(
uuid
)
ManagedSession
::
ManagedSession
(
char
*
uuid
)
:
CoreSession
(
uuid
)
{
{
}
}
ManagedSession
::
ManagedSession
(
switch_core_session_t
*
session
)
:
CoreSession
(
session
)
ManagedSession
::
ManagedSession
(
switch_core_session_t
*
session
)
:
CoreSession
(
session
)
{
{
}
}
bool
ManagedSession
::
begin_allow_threads
()
bool
ManagedSession
::
begin_allow_threads
()
{
{
return
true
;
return
true
;
}
}
bool
ManagedSession
::
end_allow_threads
()
bool
ManagedSession
::
end_allow_threads
()
{
{
return
true
;
return
true
;
}
}
ManagedSession
::~
ManagedSession
()
ManagedSession
::~
ManagedSession
()
{
{
ATTACH_THREADS
ATTACH_THREADS
// Do auto-hangup ourselves because CoreSession can't call check_hangup_hook
// Do auto-hangup ourselves because CoreSession can't call check_hangup_hook
// after ManagedSession destruction (cause at point it's pure virtual)
// after ManagedSession destruction (cause at point it's pure virtual)
if
(
session
)
{
if
(
session
)
{
if
(
switch_test_flag
(
this
,
S_HUP
)
&&
!
switch_channel_test_flag
(
channel
,
CF_TRANSFER
))
{
if
(
switch_test_flag
(
this
,
S_HUP
)
&&
!
switch_channel_test_flag
(
channel
,
CF_TRANSFER
))
{
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_NORMAL_CLEARING
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_NORMAL_CLEARING
);
setAutoHangup
(
0
);
setAutoHangup
(
0
);
}
}
// Don't let any callbacks use this CoreSession anymore
// Don't let any callbacks use this CoreSession anymore
switch_channel_set_private
(
channel
,
"CoreSession"
,
NULL
);
switch_channel_set_private
(
channel
,
"CoreSession"
,
NULL
);
}
}
}
}
void
ManagedSession
::
check_hangup_hook
()
void
ManagedSession
::
check_hangup_hook
()
{
{
ATTACH_THREADS
ATTACH_THREADS
if
(
!
hangupDelegate
)
{
if
(
!
hangupDelegate
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"hangupDelegate is null."
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"hangupDelegate is null."
);
return
;
return
;
}
}
hangupDelegate
();
hangupDelegate
();
}
}
switch_status_t
ManagedSession
::
run_dtmf_callback
(
void
*
input
,
switch_input_type_t
itype
)
switch_status_t
ManagedSession
::
run_dtmf_callback
(
void
*
input
,
switch_input_type_t
itype
)
{
{
ATTACH_THREADS
ATTACH_THREADS
if
(
!
dtmfDelegate
)
{
if
(
!
dtmfDelegate
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"dtmfDelegate is null."
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"dtmfDelegate is null."
);
return
SWITCH_STATUS_FALSE
;;
return
SWITCH_STATUS_FALSE
;;
}
}
char
*
result
=
dtmfDelegate
(
input
,
itype
);
char
*
result
=
dtmfDelegate
(
input
,
itype
);
switch_status_t
status
=
process_callback_result
(
result
);
switch_status_t
status
=
process_callback_result
(
result
);
RESULT_FREE
(
result
);
RESULT_FREE
(
result
);
return
status
;
return
status
;
}
}
static
switch_status_t
stateHangupHandler
(
switch_core_session_t
*
session
)
{
static
switch_status_t
stateHangupHandler
(
switch_core_session_t
*
session
)
{
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx
浏览文件 @
d208484a
差异被折叠。
点击展开。
src/mod/languages/mod_managed/mod_managed.cpp
浏览文件 @
d208484a
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论