Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
590cf84b
提交
590cf84b
authored
5月 03, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1333
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
c7e5e47a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
11 行删除
+24
-11
mod_dingaling.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
+17
-6
mod_exosip.c
src/mod/endpoints/mod_exosip/mod_exosip.c
+7
-4
switch_ivr.c
src/switch_ivr.c
+0
-1
没有找到文件。
src/mod/endpoints/mod_dingaling/mod_dingaling.c
浏览文件 @
590cf84b
...
@@ -141,6 +141,7 @@ struct private_object {
...
@@ -141,6 +141,7 @@ struct private_object {
switch_time_t
next_desc
;
switch_time_t
next_desc
;
switch_time_t
next_cand
;
switch_time_t
next_cand
;
char
*
stun_ip
;
char
*
stun_ip
;
char
*
recip
;
uint16_t
stun_port
;
uint16_t
stun_port
;
};
};
...
@@ -709,11 +710,15 @@ static switch_status_t channel_waitfor_write(switch_core_session_t *session, int
...
@@ -709,11 +710,15 @@ static switch_status_t channel_waitfor_write(switch_core_session_t *session, int
static
switch_status_t
channel_send_dtmf
(
switch_core_session_t
*
session
,
char
*
dtmf
)
static
switch_status_t
channel_send_dtmf
(
switch_core_session_t
*
session
,
char
*
dtmf
)
{
{
struct
private_object
*
tech_pvt
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
//char *digit
;
char
digits
[
80
]
=
""
;
tech_pvt
=
switch_core_session_get_private
(
session
);
tech_pvt
=
switch_core_session_get_private
(
session
);
assert
(
tech_pvt
!=
NULL
);
assert
(
tech_pvt
!=
NULL
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"DTMF [%s]
\n
"
,
dtmf
);
snprintf
(
digits
,
sizeof
(
digits
),
"+%s
\n
"
,
dtmf
);
ldl_handle_send_msg
(
tech_pvt
->
profile
->
handle
,
tech_pvt
->
recip
,
NULL
,
digits
);
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
...
@@ -757,6 +762,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
...
@@ -757,6 +762,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
}
}
payload
=
tech_pvt
->
read_frame
.
payload
;
payload
=
tech_pvt
->
read_frame
.
payload
;
/* RFC2833 ... TBD try harder to honor the duration etc.*/
/* RFC2833 ... TBD try harder to honor the duration etc.*/
if
(
payload
==
101
)
{
if
(
payload
==
101
)
{
unsigned
char
*
packet
=
tech_pvt
->
read_frame
.
data
;
unsigned
char
*
packet
=
tech_pvt
->
read_frame
.
data
;
...
@@ -778,10 +784,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
...
@@ -778,10 +784,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
if
(
++
tech_pvt
->
dc
>=
3
)
{
if
(
++
tech_pvt
->
dc
>=
3
)
{
tech_pvt
->
last_digit
=
0
;
tech_pvt
->
last_digit
=
0
;
tech_pvt
->
dc
=
0
;
tech_pvt
->
dc
=
0
;
}
else
{
tech_pvt
->
last_digit
=
key
;
}
}
}
tech_pvt
->
last_digit
=
key
;
}
else
{
tech_pvt
->
last_digit
=
0
;
tech_pvt
->
dc
=
0
;
}
}
}
if
(
switch_test_flag
(
&
tech_pvt
->
read_frame
,
SFF_CNG
))
{
if
(
switch_test_flag
(
&
tech_pvt
->
read_frame
,
SFF_CNG
))
{
...
@@ -1081,7 +1090,8 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
...
@@ -1081,7 +1090,8 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
switch_core_session_destroy
(
new_session
);
switch_core_session_destroy
(
new_session
);
return
SWITCH_STATUS_GENERR
;
return
SWITCH_STATUS_GENERR
;
}
}
switch_core_session_add_stream
(
*
new_session
,
NULL
);
switch_core_session_add_stream
(
*
new_session
,
NULL
);
if
((
tech_pvt
=
(
struct
private_object
*
)
switch_core_session_alloc
(
*
new_session
,
sizeof
(
struct
private_object
)))
!=
0
)
{
if
((
tech_pvt
=
(
struct
private_object
*
)
switch_core_session_alloc
(
*
new_session
,
sizeof
(
struct
private_object
)))
!=
0
)
{
memset
(
tech_pvt
,
0
,
sizeof
(
*
tech_pvt
));
memset
(
tech_pvt
,
0
,
sizeof
(
*
tech_pvt
));
...
@@ -1092,6 +1102,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
...
@@ -1092,6 +1102,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
tech_pvt
->
session
=
*
new_session
;
tech_pvt
->
session
=
*
new_session
;
tech_pvt
->
codec_index
=
-
1
;
tech_pvt
->
codec_index
=
-
1
;
tech_pvt
->
local_port
=
switch_rtp_request_port
();
tech_pvt
->
local_port
=
switch_rtp_request_port
();
tech_pvt
->
recip
=
switch_core_session_strdup
(
*
new_session
,
full_id
);
}
else
{
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"Hey where is my memory pool?
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"Hey where is my memory pool?
\n
"
);
switch_core_session_destroy
(
new_session
);
switch_core_session_destroy
(
new_session
);
...
@@ -1511,7 +1522,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
...
@@ -1511,7 +1522,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
tech_pvt
->
profile
=
profile
;
tech_pvt
->
profile
=
profile
;
tech_pvt
->
local_port
=
switch_rtp_request_port
();
tech_pvt
->
local_port
=
switch_rtp_request_port
();
switch_set_flag
(
tech_pvt
,
TFLAG_ANSWER
);
switch_set_flag
(
tech_pvt
,
TFLAG_ANSWER
);
tech_pvt
->
recip
=
switch_core_session_strdup
(
session
,
from
);
}
else
{
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Hey where is my memory pool?
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Hey where is my memory pool?
\n
"
);
switch_core_session_destroy
(
&
session
);
switch_core_session_destroy
(
&
session
);
...
...
src/mod/endpoints/mod_exosip/mod_exosip.c
浏览文件 @
590cf84b
...
@@ -627,7 +627,7 @@ static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_
...
@@ -627,7 +627,7 @@ static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_
}
}
payload
=
tech_pvt
->
read_frame
.
payload
;
payload
=
tech_pvt
->
read_frame
.
payload
;
elapsed
=
(
unsigned
int
)((
switch_time_now
()
-
started
)
/
1000
);
elapsed
=
(
unsigned
int
)((
switch_time_now
()
-
started
)
/
1000
);
...
@@ -663,10 +663,13 @@ static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_
...
@@ -663,10 +663,13 @@ static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_
if
(
++
tech_pvt
->
dc
>=
3
)
{
if
(
++
tech_pvt
->
dc
>=
3
)
{
tech_pvt
->
last_digit
=
0
;
tech_pvt
->
last_digit
=
0
;
tech_pvt
->
dc
=
0
;
tech_pvt
->
dc
=
0
;
}
else
{
tech_pvt
->
last_digit
=
key
;
}
}
}
tech_pvt
->
last_digit
=
key
;
}
else
{
tech_pvt
->
last_digit
=
0
;
tech_pvt
->
dc
=
0
;
}
}
}
...
...
src/switch_ivr.c
浏览文件 @
590cf84b
...
@@ -121,7 +121,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
...
@@ -121,7 +121,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
if
(
switch_channel_has_dtmf
(
channel
))
{
if
(
switch_channel_has_dtmf
(
channel
))
{
char
dtmf
[
128
];
char
dtmf
[
128
];
switch_channel_dequeue_dtmf
(
channel
,
dtmf
,
sizeof
(
dtmf
));
switch_channel_dequeue_dtmf
(
channel
,
dtmf
,
sizeof
(
dtmf
));
for
(
i
=
0
;
i
<
(
unsigned
int
)
strlen
(
dtmf
);
i
++
)
{
for
(
i
=
0
;
i
<
(
unsigned
int
)
strlen
(
dtmf
);
i
++
)
{
if
(
strchr
(
terminators
,
dtmf
[
i
]))
{
if
(
strchr
(
terminators
,
dtmf
[
i
]))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论