Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
5138aede
提交
5138aede
authored
3月 07, 2014
作者:
Chris Rienzo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6282 mod_rayo: allow outbound call JID to be assigned by client
上级
b8e4a66d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
256 行增加
和
88 行删除
+256
-88
mod_rayo.c
src/mod/event_handlers/mod_rayo/mod_rayo.c
+200
-71
rayo_cpa_component.c
src/mod/event_handlers/mod_rayo/rayo_cpa_component.c
+4
-1
rayo_fax_components.c
src/mod/event_handlers/mod_rayo/rayo_fax_components.c
+11
-3
rayo_input_component.c
src/mod/event_handlers/mod_rayo/rayo_input_component.c
+5
-1
rayo_output_component.c
src/mod/event_handlers/mod_rayo/rayo_output_component.c
+11
-1
rayo_prompt_component.c
src/mod/event_handlers/mod_rayo/rayo_prompt_component.c
+6
-2
rayo_record_component.c
src/mod/event_handlers/mod_rayo/rayo_record_component.c
+19
-9
没有找到文件。
src/mod/event_handlers/mod_rayo/mod_rayo.c
浏览文件 @
5138aede
差异被折叠。
点击展开。
src/mod/event_handlers/mod_rayo/rayo_cpa_component.c
浏览文件 @
5138aede
...
...
@@ -285,7 +285,10 @@ iks *rayo_cpa_component_start(struct rayo_actor *call, struct rayo_message *msg,
/* create CPA component */
switch_core_new_memory_pool
(
&
pool
);
component
=
switch_core_alloc
(
pool
,
sizeof
(
*
component
));
rayo_component_init
((
struct
rayo_component
*
)
component
,
pool
,
RAT_CALL_COMPONENT
,
"cpa"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
));
component
=
CPA_COMPONENT
(
rayo_component_init
((
struct
rayo_component
*
)
component
,
pool
,
RAT_CALL_COMPONENT
,
"cpa"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
)));
if
(
!
component
)
{
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create CPA entity"
);
}
switch_core_hash_init
(
&
component
->
signals
,
pool
);
...
...
src/mod/event_handlers/mod_rayo/rayo_fax_components.c
浏览文件 @
5138aede
/*
* mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2013, Grasshopper
* Copyright (C) 2013
-2014
, Grasshopper
*
* Version: MPL 1.1
*
...
...
@@ -177,7 +177,11 @@ static iks *start_sendfax_component(struct rayo_actor *call, struct rayo_message
/* create sendfax component */
switch_core_new_memory_pool
(
&
pool
);
sendfax_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
sendfax_component
));
rayo_component_init
((
struct
rayo_component
*
)
sendfax_component
,
pool
,
RAT_CALL_COMPONENT
,
"sendfax"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
));
sendfax_component
=
FAX_COMPONENT
(
rayo_component_init
((
struct
rayo_component
*
)
sendfax_component
,
pool
,
RAT_CALL_COMPONENT
,
"sendfax"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
)));
if
(
!
sendfax_component
)
{
switch_core_destroy_memory_pool
(
&
pool
);
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create sendfax entity"
);
}
/* add channel variable so that fax component can be located from fax events */
switch_channel_set_variable
(
channel
,
"rayo_fax_jid"
,
RAYO_JID
(
sendfax_component
));
...
...
@@ -265,7 +269,11 @@ static iks *start_receivefax_component(struct rayo_actor *call, struct rayo_mess
/* create receivefax component */
switch_core_new_memory_pool
(
&
pool
);
receivefax_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
receivefax_component
));
rayo_component_init
((
struct
rayo_component
*
)
receivefax_component
,
pool
,
RAT_CALL_COMPONENT
,
"receivefax"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
));
receivefax_component
=
RECEIVEFAX_COMPONENT
(
rayo_component_init
((
struct
rayo_component
*
)
receivefax_component
,
pool
,
RAT_CALL_COMPONENT
,
"receivefax"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
)));
if
(
!
receivefax_component
)
{
switch_core_destroy_memory_pool
(
&
pool
);
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create sendfax entity"
);
}
file_no
=
rayo_actor_seq_next
(
call
);
receivefax_component
->
filename
=
switch_core_sprintf
(
pool
,
"%s%s%s-%d.tif"
,
globals
.
file_prefix
,
SWITCH_PATH_SEPARATOR
,
switch_core_session_get_uuid
(
session
),
file_no
);
...
...
src/mod/event_handlers/mod_rayo/rayo_input_component.c
浏览文件 @
5138aede
...
...
@@ -662,7 +662,11 @@ static iks *start_call_input_component(struct rayo_actor *call, struct rayo_mess
switch_core_new_memory_pool
(
&
pool
);
input_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
input_component
));
rayo_component_init
(
RAYO_COMPONENT
(
input_component
),
pool
,
RAT_CALL_COMPONENT
,
"input"
,
component_id
,
call
,
iks_find_attrib
(
iq
,
"from"
));
input_component
=
INPUT_COMPONENT
(
rayo_component_init
(
RAYO_COMPONENT
(
input_component
),
pool
,
RAT_CALL_COMPONENT
,
"input"
,
component_id
,
call
,
iks_find_attrib
(
iq
,
"from"
)));
if
(
!
input_component
)
{
switch_core_destroy_memory_pool
(
&
pool
);
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create input entity"
);
}
return
start_call_input
(
input_component
,
session
,
input
,
iq
,
NULL
,
0
);
}
...
...
src/mod/event_handlers/mod_rayo/rayo_output_component.c
浏览文件 @
5138aede
...
...
@@ -68,7 +68,11 @@ static struct rayo_component *create_output_component(struct rayo_actor *actor,
switch_core_new_memory_pool
(
&
pool
);
output_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
output_component
));
rayo_component_init
((
struct
rayo_component
*
)
output_component
,
pool
,
type
,
"output"
,
NULL
,
actor
,
client_jid
);
output_component
=
OUTPUT_COMPONENT
(
rayo_component_init
((
struct
rayo_component
*
)
output_component
,
pool
,
type
,
"output"
,
NULL
,
actor
,
client_jid
));
if
(
!
output_component
)
{
switch_core_destroy_memory_pool
(
&
pool
);
return
NULL
;
}
output_component
->
document
=
iks_copy
(
output
);
output_component
->
start_offset_ms
=
iks_find_int_attrib
(
output
,
"start-offset"
);
...
...
@@ -153,6 +157,9 @@ static iks *start_call_output_component(struct rayo_actor *call, struct rayo_mes
}
output_component
=
create_output_component
(
call
,
RAT_CALL_COMPONENT
,
output
,
iks_find_attrib
(
iq
,
"from"
));
if
(
!
output_component
)
{
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create output entity"
);
}
return
start_call_output
(
output_component
,
session
,
output
,
iq
);
}
...
...
@@ -179,6 +186,9 @@ static iks *start_mixer_output_component(struct rayo_actor *mixer, struct rayo_m
}
component
=
create_output_component
(
mixer
,
RAT_MIXER_COMPONENT
,
output
,
iks_find_attrib
(
iq
,
"from"
));
if
(
!
component
)
{
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create output entity"
);
}
/* build conference command */
SWITCH_STANDARD_STREAM
(
stream
);
...
...
src/mod/event_handlers/mod_rayo/rayo_prompt_component.c
浏览文件 @
5138aede
/*
* mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2013, Grasshopper
* Copyright (C) 2013
-2014
, Grasshopper
*
* Version: MPL 1.1
*
...
...
@@ -559,7 +559,11 @@ static iks *start_call_prompt_component(struct rayo_actor *call, struct rayo_mes
/* create prompt component, linked to call */
switch_core_new_memory_pool
(
&
pool
);
prompt_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
prompt_component
));
rayo_component_init
(
RAYO_COMPONENT
(
prompt_component
),
pool
,
RAT_CALL_COMPONENT
,
"prompt"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
));
prompt_component
=
PROMPT_COMPONENT
(
rayo_component_init
(
RAYO_COMPONENT
(
prompt_component
),
pool
,
RAT_CALL_COMPONENT
,
"prompt"
,
NULL
,
call
,
iks_find_attrib
(
iq
,
"from"
)));
if
(
!
prompt_component
)
{
switch_core_destroy_memory_pool
(
&
pool
);
return
iks_new_error_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create prompt entity"
);
}
prompt_component
->
iq
=
iks_copy
(
iq
);
/* start output */
...
...
src/mod/event_handlers/mod_rayo/rayo_record_component.c
浏览文件 @
5138aede
/*
* mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2013, Grasshopper
* Copyright (C) 2013
-2014
, Grasshopper
*
* Version: MPL 1.1
*
...
...
@@ -156,11 +156,6 @@ static struct rayo_component *record_component_create(struct rayo_actor *actor,
char
*
fs_file_path
;
switch_bool_t
start_paused
;
/* validate record attributes */
if
(
!
VALIDATE_RAYO_RECORD
(
record
))
{
return
NULL
;
}
start_paused
=
iks_find_bool_attrib
(
record
,
"start-paused"
);
/* create record filename from session UUID and ref */
...
...
@@ -175,7 +170,12 @@ static struct rayo_component *record_component_create(struct rayo_actor *actor,
switch_core_new_memory_pool
(
&
pool
);
record_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
record_component
));
rayo_component_init
(
RAYO_COMPONENT
(
record_component
),
pool
,
type
,
"record"
,
fs_file_path
,
actor
,
client_jid
);
record_component
=
RECORD_COMPONENT
(
rayo_component_init
(
RAYO_COMPONENT
(
record_component
),
pool
,
type
,
"record"
,
fs_file_path
,
actor
,
client_jid
));
if
(
!
record_component
)
{
switch_core_destroy_memory_pool
(
&
pool
);
return
NULL
;
}
record_component
->
max_duration
=
iks_find_int_attrib
(
record
,
"max-duration"
);
record_component
->
initial_timeout
=
iks_find_int_attrib
(
record
,
"initial-timeout"
);
record_component
->
final_timeout
=
iks_find_int_attrib
(
record
,
"final-timeout"
);
...
...
@@ -270,9 +270,14 @@ static iks *start_call_record_component(struct rayo_actor *call, struct rayo_mes
struct
rayo_component
*
component
=
NULL
;
iks
*
record
=
iks_find
(
iq
,
"record"
);
/* validate record attributes */
if
(
!
VALIDATE_RAYO_RECORD
(
record
))
{
return
iks_new_error
(
iq
,
STANZA_ERROR_BAD_REQUEST
);
}
component
=
record_component_create
(
call
,
RAT_CALL_COMPONENT
,
iks_find_attrib
(
iq
,
"from"
),
record
);
if
(
!
component
)
{
return
iks_new_error
(
iq
,
STANZA_ERROR_BAD_REQUEST
);
return
iks_new_error
_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create record entity"
);
}
if
(
start_call_record
(
session
,
component
))
{
...
...
@@ -396,9 +401,14 @@ static iks *start_mixer_record_component(struct rayo_actor *mixer, struct rayo_m
struct
rayo_component
*
component
=
NULL
;
iks
*
record
=
iks_find
(
iq
,
"record"
);
/* validate record attributes */
if
(
!
VALIDATE_RAYO_RECORD
(
record
))
{
return
iks_new_error
(
iq
,
STANZA_ERROR_BAD_REQUEST
);
}
component
=
record_component_create
(
mixer
,
RAT_MIXER_COMPONENT
,
iks_find_attrib
(
iq
,
"from"
),
record
);
if
(
!
component
)
{
return
iks_new_error
(
iq
,
STANZA_ERROR_BAD_REQUEST
);
return
iks_new_error
_detailed
(
iq
,
STANZA_ERROR_INTERNAL_SERVER_ERROR
,
"Failed to create record entity"
);
}
/* mixer doesn't allow "send" */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论