Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d22d045b
提交
d22d045b
authored
11月 08, 2013
作者:
Chris Rienzo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mod_rayo: add <sendfax> component
上级
02f1853d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
257 行增加
和
57 行删除
+257
-57
Makefile
src/mod/event_handlers/mod_rayo/Makefile
+2
-2
rayo.conf.xml
...ent_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml
+4
-4
mod_rayo.c
src/mod/event_handlers/mod_rayo/mod_rayo.c
+13
-1
rayo_components.c
src/mod/event_handlers/mod_rayo/rayo_components.c
+2
-2
rayo_components.h
src/mod/event_handlers/mod_rayo/rayo_components.h
+2
-2
rayo_elements.c
src/mod/event_handlers/mod_rayo/rayo_elements.c
+20
-12
rayo_elements.h
src/mod/event_handlers/mod_rayo/rayo_elements.h
+3
-2
rayo_fax_components.c
src/mod/event_handlers/mod_rayo/rayo_fax_components.c
+211
-32
没有找到文件。
src/mod/event_handlers/mod_rayo/Makefile
浏览文件 @
d22d045b
...
...
@@ -11,10 +11,10 @@ LOCAL_OBJS= $(IKS_LA) \
nlsml.o
\
rayo_components.o
\
rayo_elements.o
\
rayo_fax_components.o
\
rayo_input_component.o
\
rayo_output_component.o
\
rayo_prompt_component.o
\
rayo_receivefax_component.o
\
rayo_record_component.o
\
sasl.o
\
srgs.o
\
...
...
@@ -24,11 +24,11 @@ LOCAL_SOURCES= \
nlsml.c
\
rayo_components.c
\
rayo_elements.c
\
rayo_fax_components.c
\
rayo_input_component.c
\
rayo_output_component.c
\
rayo_prompt_component.c
\
rayo_record_component.c
\
rayo_receivefax_component.c
\
sasl.c
\
srgs.c
\
xmpp_streams.c
...
...
src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml
浏览文件 @
d22d045b
...
...
@@ -16,11 +16,11 @@
<param
name=
"default-recognizer"
value=
"pocketsphinx"
/>
</input>
<!-- receivefax component params -->
<
receive
fax>
<!--
send/
receivefax component params -->
<fax>
<!-- where to store incoming faxes -->
<param
name=
"file-prefix"
value=
"/tmp/"
/>
</
receive
fax>
<param
name=
"
receivefax-
file-prefix"
value=
"/tmp/"
/>
</fax>
<!-- XMPP server domain -->
<domain
name=
"$${rayo_domain_name}"
shared-secret=
"ClueCon"
>
...
...
src/mod/event_handlers/mod_rayo/mod_rayo.c
浏览文件 @
d22d045b
...
...
@@ -952,6 +952,7 @@ static void rayo_call_cleanup(struct rayo_actor *actor)
iks_delete
(
revent
);
switch_event_destroy
(
&
event
);
switch_core_hash_destroy
(
&
call
->
pcps
);
}
/**
...
...
@@ -1130,13 +1131,23 @@ static struct rayo_call *_rayo_call_create(const char *uuid, const char *file, i
return
rayo_call_init
(
call
,
pool
,
uuid
,
file
,
line
);
}
/**
* Mixer destructor
*/
static
void
rayo_mixer_cleanup
(
struct
rayo_actor
*
actor
)
{
struct
rayo_mixer
*
mixer
=
RAYO_MIXER
(
actor
);
switch_core_hash_destroy
(
&
mixer
->
members
);
switch_core_hash_destroy
(
&
mixer
->
subscribers
);
}
/**
* Initialize mixer
*/
static
struct
rayo_mixer
*
rayo_mixer_init
(
struct
rayo_mixer
*
mixer
,
switch_memory_pool_t
*
pool
,
const
char
*
name
,
const
char
*
file
,
int
line
)
{
char
*
mixer_jid
=
switch_mprintf
(
"%s@%s"
,
name
,
RAYO_JID
(
globals
.
server
));
rayo_actor_init
(
RAYO_ACTOR
(
mixer
),
pool
,
RAT_MIXER
,
""
,
name
,
mixer_jid
,
NULL
,
rayo_mixer_send
,
file
,
line
);
rayo_actor_init
(
RAYO_ACTOR
(
mixer
),
pool
,
RAT_MIXER
,
""
,
name
,
mixer_jid
,
rayo_mixer_cleanup
,
rayo_mixer_send
,
file
,
line
);
switch_core_hash_init
(
&
mixer
->
members
,
pool
);
switch_core_hash_init
(
&
mixer
->
subscribers
,
pool
);
switch_safe_free
(
mixer_jid
);
...
...
@@ -1307,6 +1318,7 @@ static void rayo_peer_server_cleanup(struct rayo_actor *actor)
RAYO_UNLOCK
(
client
);
RAYO_DESTROY
(
client
);
}
switch_core_hash_destroy
(
&
rserver
->
clients
);
switch_mutex_unlock
(
globals
.
clients_mutex
);
}
...
...
src/mod/event_handlers/mod_rayo/rayo_components.c
浏览文件 @
d22d045b
...
...
@@ -227,7 +227,7 @@ switch_status_t rayo_components_load(switch_loadable_module_interface_t **module
rayo_output_component_load
(
module_interface
,
pool
,
config_file
)
!=
SWITCH_STATUS_SUCCESS
||
rayo_prompt_component_load
(
module_interface
,
pool
,
config_file
)
!=
SWITCH_STATUS_SUCCESS
||
rayo_record_component_load
(
module_interface
,
pool
,
config_file
)
!=
SWITCH_STATUS_SUCCESS
||
rayo_
receivefax_component
_load
(
module_interface
,
pool
,
config_file
)
!=
SWITCH_STATUS_SUCCESS
)
{
rayo_
fax_components
_load
(
module_interface
,
pool
,
config_file
)
!=
SWITCH_STATUS_SUCCESS
)
{
return
SWITCH_STATUS_TERM
;
}
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -242,7 +242,7 @@ switch_status_t rayo_components_shutdown(void)
rayo_output_component_shutdown
();
rayo_prompt_component_shutdown
();
rayo_record_component_shutdown
();
rayo_
receivefax_component
_shutdown
();
rayo_
fax_components
_shutdown
();
return
SWITCH_STATUS_SUCCESS
;
}
...
...
src/mod/event_handlers/mod_rayo/rayo_components.h
浏览文件 @
d22d045b
...
...
@@ -61,14 +61,14 @@ extern switch_status_t rayo_input_component_load(switch_loadable_module_interfac
extern
switch_status_t
rayo_output_component_load
(
switch_loadable_module_interface_t
**
module_interface
,
switch_memory_pool_t
*
pool
,
const
char
*
config_file
);
extern
switch_status_t
rayo_prompt_component_load
(
switch_loadable_module_interface_t
**
module_interface
,
switch_memory_pool_t
*
pool
,
const
char
*
config_file
);
extern
switch_status_t
rayo_record_component_load
(
switch_loadable_module_interface_t
**
module_interface
,
switch_memory_pool_t
*
pool
,
const
char
*
config_file
);
extern
switch_status_t
rayo_
receivefax_component
_load
(
switch_loadable_module_interface_t
**
module_interface
,
switch_memory_pool_t
*
pool
,
const
char
*
config_file
);
extern
switch_status_t
rayo_
fax_components
_load
(
switch_loadable_module_interface_t
**
module_interface
,
switch_memory_pool_t
*
pool
,
const
char
*
config_file
);
extern
switch_status_t
rayo_components_shutdown
(
void
);
extern
switch_status_t
rayo_input_component_shutdown
(
void
);
extern
switch_status_t
rayo_output_component_shutdown
(
void
);
extern
switch_status_t
rayo_prompt_component_shutdown
(
void
);
extern
switch_status_t
rayo_record_component_shutdown
(
void
);
extern
switch_status_t
rayo_
receivefax_component
_shutdown
(
void
);
extern
switch_status_t
rayo_
fax_components
_shutdown
(
void
);
extern
void
rayo_component_send_start
(
struct
rayo_component
*
component
,
iks
*
iq
);
extern
void
rayo_component_send_iq_error
(
struct
rayo_component
*
component
,
iks
*
iq
,
const
char
*
error_name
,
const
char
*
error_type
);
...
...
src/mod/event_handlers/mod_rayo/rayo_elements.c
浏览文件 @
d22d045b
...
...
@@ -49,6 +49,17 @@ ELEMENT(RAYO_INPUT)
ATTRIB
(
start
-
timers
,
true
,
bool
)
ELEMENT_END
/**
* <join> command validation
*/
ELEMENT
(
RAYO_JOIN
)
ATTRIB
(
xmlns
,,
any
)
STRING_ATTRIB
(
direction
,
duplex
,
"send,recv,duplex"
)
STRING_ATTRIB
(
media
,
bridge
,
"bridge,direct"
)
ATTRIB
(
call
-
uri
,,
any
)
ATTRIB
(
mixer
-
name
,,
any
)
ELEMENT_END
/**
* <output> component validation
*/
...
...
@@ -80,6 +91,13 @@ ELEMENT(RAYO_PROMPT)
ATTRIB
(
barge
-
in
,
true
,
bool
)
ELEMENT_END
/**
* <receivefax> command validation
*/
ELEMENT
(
RAYO_RECEIVEFAX
)
ATTRIB
(
xmlns
,,
any
)
ELEMENT_END
/**
* <record> component validation
*/
...
...
@@ -97,22 +115,12 @@ ELEMENT(RAYO_RECORD)
ELEMENT_END
/**
* <
join
> command validation
* <
sendfax
> command validation
*/
ELEMENT
(
RAYO_
JOIN
)
ELEMENT
(
RAYO_
SENDFAX
)
ATTRIB
(
xmlns
,,
any
)
STRING_ATTRIB
(
direction
,
duplex
,
"send,recv,duplex"
)
STRING_ATTRIB
(
media
,
bridge
,
"bridge,direct"
)
ATTRIB
(
call
-
uri
,,
any
)
ATTRIB
(
mixer
-
name
,,
any
)
ELEMENT_END
/**
* <receivefax> command validation
*/
ELEMENT
(
RAYO_RECEIVEFAX
)
ATTRIB
(
xmlns
,,
any
)
ELEMENT_END
/* For Emacs:
* Local Variables:
...
...
src/mod/event_handlers/mod_rayo/rayo_elements.h
浏览文件 @
d22d045b
...
...
@@ -32,12 +32,13 @@
#include "iks_helpers.h"
ELEMENT_DECL
(
RAYO_INPUT
)
ELEMENT_DECL
(
RAYO_JOIN
)
ELEMENT_DECL
(
RAYO_OUTPUT
)
ELEMENT_DECL
(
RAYO_OUTPUT_SEEK
)
ELEMENT_DECL
(
RAYO_PROMPT
)
ELEMENT_DECL
(
RAYO_RECORD
)
ELEMENT_DECL
(
RAYO_JOIN
)
ELEMENT_DECL
(
RAYO_RECEIVEFAX
)
ELEMENT_DECL
(
RAYO_RECORD
)
ELEMENT_DECL
(
RAYO_SENDFAX
)
#endif
...
...
src/mod/event_handlers/mod_rayo/rayo_
receivefax_component
.c
→
src/mod/event_handlers/mod_rayo/rayo_
fax_components
.c
浏览文件 @
d22d045b
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论