Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
59af2474
提交
59af2474
authored
4月 13, 2012
作者:
Giovanni Maruzzelli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gsmopen: workaround for reading with timeout, need something to simulate the poll. Next week :)
上级
f74ba1ae
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
4 行删除
+9
-4
gsmopen.h
src/mod/endpoints/mod_gsmopen/gsmopen.h
+4
-2
gsmopen_protocol.cpp
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
+5
-2
没有找到文件。
src/mod/endpoints/mod_gsmopen/gsmopen.h
浏览文件 @
59af2474
...
@@ -537,8 +537,10 @@ int gsmopen_serial_config_AT(private_t *tech_pvt);
...
@@ -537,8 +537,10 @@ int gsmopen_serial_config_AT(private_t *tech_pvt);
#define gsmopen_serial_write_AT_expect_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 0)
#define gsmopen_serial_write_AT_expect_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 0)
#define gsmopen_serial_write_AT_expect_noexpcr_tout(P, D, S, T) gsmopen_serial_write_AT_expect1(P, D, S, 0, T)
#define gsmopen_serial_write_AT_expect_noexpcr_tout(P, D, S, T) gsmopen_serial_write_AT_expect1(P, D, S, 0, T)
// 20.5 sec timeout, used for querying the SIM and sending SMSs
// 20.5 sec timeout, used for querying the SIM and sending SMSs
#define gsmopen_serial_write_AT_expect_longtime(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 20)
//#define gsmopen_serial_write_AT_expect_longtime(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 20)
#define gsmopen_serial_write_AT_expect_longtime_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 20)
//#define gsmopen_serial_write_AT_expect_longtime_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 20)
#define gsmopen_serial_write_AT_expect_longtime(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 5)
#define gsmopen_serial_write_AT_expect_longtime_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 5)
int
gsmopen_serial_write_AT
(
private_t
*
tech_pvt
,
const
char
*
data
);
int
gsmopen_serial_write_AT
(
private_t
*
tech_pvt
,
const
char
*
data
);
int
gsmopen_serial_write_AT_nocr
(
private_t
*
tech_pvt
,
const
char
*
data
);
int
gsmopen_serial_write_AT_nocr
(
private_t
*
tech_pvt
,
const
char
*
data
);
int
gsmopen_serial_write_AT_ack
(
private_t
*
tech_pvt
,
const
char
*
data
);
int
gsmopen_serial_write_AT_ack
(
private_t
*
tech_pvt
,
const
char
*
data
);
...
...
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
浏览文件 @
59af2474
...
@@ -1893,7 +1893,8 @@ int gsmopen_serial_write_AT_ack_nocr_longtime(private_t *tech_pvt, const char *d
...
@@ -1893,7 +1893,8 @@ int gsmopen_serial_write_AT_ack_nocr_longtime(private_t *tech_pvt, const char *d
return
-
1
;
return
-
1
;
}
}
at_result
=
gsmopen_serial_read_AT
(
tech_pvt
,
1
,
500000
,
20
,
NULL
,
1
);
// 20.5 sec timeout
//at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, 20, NULL, 1); // 20.5 sec timeout
at_result
=
gsmopen_serial_read_AT
(
tech_pvt
,
1
,
500000
,
3
,
NULL
,
1
);
// 3.5 sec timeout
UNLOCKA
(
tech_pvt
->
controldev_lock
);
UNLOCKA
(
tech_pvt
->
controldev_lock
);
POPPA_UNLOCKA
(
tech_pvt
->
controldev_lock
);
POPPA_UNLOCKA
(
tech_pvt
->
controldev_lock
);
...
@@ -2466,7 +2467,7 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
...
@@ -2466,7 +2467,7 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
failed
=
1
;
failed
=
1
;
goto
uscita
;
goto
uscita
;
}
}
err
=
gsmopen_serial_AT_expect
(
tech_pvt
,
"> "
,
0
,
1
);
// wait 1.
5
s for the prompt, no crlf
err
=
gsmopen_serial_AT_expect
(
tech_pvt
,
"> "
,
0
,
1
);
// wait 1.
1
s for the prompt, no crlf
#if 1
#if 1
if
(
err
)
{
if
(
err
)
{
DEBUGA_GSMOPEN
DEBUGA_GSMOPEN
...
@@ -2557,10 +2558,12 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
...
@@ -2557,10 +2558,12 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
POPPA_UNLOCKA
(
&
tech_pvt
->
controldev_lock
);
POPPA_UNLOCKA
(
&
tech_pvt
->
controldev_lock
);
}
}
#ifdef NOTDEF
err
=
gsmopen_serial_write_AT_ack
(
tech_pvt
,
"AT+CMGF=0"
);
err
=
gsmopen_serial_write_AT_ack
(
tech_pvt
,
"AT+CMGF=0"
);
if
(
err
)
{
if
(
err
)
{
DEBUGA_GSMOPEN
(
"AT+CMGF=0 (set message sending to PDU (as opposed to TEXT) do not got OK from the phone, continuing
\n
"
,
GSMOPEN_P_LOG
);
DEBUGA_GSMOPEN
(
"AT+CMGF=0 (set message sending to PDU (as opposed to TEXT) do not got OK from the phone, continuing
\n
"
,
GSMOPEN_P_LOG
);
}
}
#endif// NOTDEF
DEBUGA_GSMOPEN
(
"FINISH
\n
"
,
GSMOPEN_P_LOG
);
DEBUGA_GSMOPEN
(
"FINISH
\n
"
,
GSMOPEN_P_LOG
);
if
(
failed
)
if
(
failed
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论