Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
44fd0de8
提交
44fd0de8
authored
5月 13, 2012
作者:
Giovanni Maruzzelli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gsmopen: indented
上级
8a1508d6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
gsmopen_protocol.cpp
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
+10
-10
mod_gsmopen.cpp
src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
+1
-1
没有找到文件。
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
浏览文件 @
44fd0de8
...
...
@@ -420,7 +420,7 @@ int gsmopen_serial_config_AT(private_t *tech_pvt)
WARNINGA
(
"AT+CSMP do not got OK from the phone, continuing
\n
"
,
GSMOPEN_P_LOG
);
}
}
#endif
// NOTDEF
//GSMLIB? XXX
#endif
// NOTDEF
//GSMLIB? XXX
#ifdef NOTDEF //GSMLIB? XXX
...
...
@@ -2737,7 +2737,7 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
if
(
tech_pvt
->
no_ucs2
||
tech_pvt
->
sms_pdu_not_supported
==
0
)
{
try
{
int
bad_8859
=
0
;
int
bad_8859
=
0
;
memset
(
mesg_test
,
'\0'
,
sizeof
(
mesg_test
));
sprintf
(
mesg_test
,
":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù"
);
//let's test the beauty of utf8
...
...
@@ -2745,7 +2745,7 @@ int bad_8859=0;
//text=mesg_test;
bad_8859
=
utf8_to_iso_8859_1
(
tech_pvt
,
text
,
strlen
(
text
),
smscommand
,
sizeof
(
smscommand
));
if
(
!
bad_8859
)
{
if
(
!
bad_8859
)
{
err
=
gsmopen_serial_write_AT_ack
(
tech_pvt
,
"AT+CMGF=0"
);
if
(
err
)
{
ERRORA
(
"AT+CMGF=0 (set message sending to PDU (as opposed to TEXT) do not got OK from the phone
\n
"
,
GSMOPEN_P_LOG
);
...
...
@@ -2765,10 +2765,10 @@ int bad_8859=0;
POPPA_UNLOCKA
(
&
tech_pvt
->
controldev_lock
);
tech_pvt
->
no_ucs2
=
0
;
tech_pvt
->
sms_pdu_not_supported
=
1
;
ok
=
gsmopen_sendsms
(
tech_pvt
,
dest
,
text
);
tech_pvt
->
sms_pdu_not_supported
=
1
;
ok
=
gsmopen_sendsms
(
tech_pvt
,
dest
,
text
);
tech_pvt
->
no_ucs2
=
1
;
tech_pvt
->
sms_pdu_not_supported
=
0
;
tech_pvt
->
sms_pdu_not_supported
=
0
;
return
ok
;
}
...
...
@@ -2834,7 +2834,7 @@ int bad_8859=0;
if
(
tech_pvt
->
no_ucs2
||
tech_pvt
->
sms_pdu_not_supported
==
0
)
{
memset
(
smscommand
,
'\0'
,
sizeof
(
smscommand
));
sprintf
(
smscommand
,
"%s"
,
pdu2
);
}
else
{
}
else
{
memset
(
mesg_test
,
'\0'
,
sizeof
(
mesg_test
));
sprintf
(
mesg_test
,
":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù"
);
//let's test the beauty of utf8
//text=mesg_test;
...
...
@@ -2873,7 +2873,7 @@ int bad_8859=0;
ERRORA
(
"Error de-activating echo from modem
\n
"
,
GSMOPEN_P_LOG
);
}
}
uscita:
uscita:
gsmopen_sleep
(
1000
);
if
(
tech_pvt
->
at_cmgw
[
0
])
{
...
...
@@ -3040,9 +3040,9 @@ int gsmopen_serial_getstatus_AT(private_t *tech_pvt)
if
(
res
)
{
ERRORA
(
"AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||
\n
"
,
GSMOPEN_P_LOG
,
at_command
);
}
res
=
gsmopen_serial_write_AT_ack
(
p
,
"AT+CSCS=
\"
CIAPALO2
\"
"
);
res
=
gsmopen_serial_write_AT_ack
(
p
,
"AT+CSCS=
\"
GSM
\"
"
);
if
(
res
)
{
ERRORA
(
"AT+CSCS=
\"
CIAPALO2
\"
(set TE messages to GSM) do not got OK from the phone
\n
"
,
GSMOPEN_P_LOG
);
ERRORA
(
"AT+CSCS=
\"
GSM
\"
(set TE messages to GSM) do not got OK from the phone
\n
"
,
GSMOPEN_P_LOG
);
}
memset
(
at_command
,
0
,
sizeof
(
at_command
));
sprintf
(
at_command
,
"AT+CMGD=%d"
,
p
->
unread_sms_msg_id
);
/* delete the message */
...
...
src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
浏览文件 @
44fd0de8
...
...
@@ -3073,7 +3073,7 @@ int sms_incoming(private_t *tech_pvt)
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to_host", "to_host");
switch_event_add_body
(
event
,
"%s
\n
"
,
tech_pvt
->
sms_body
);
//switch_core_chat_send("GLOBAL", event); /* mod_sms */
switch_core_chat_send
(
"GLOBAL"
,
event
);
/* mod_sms */
switch_core_chat_send
(
"GLOBAL"
,
event
);
/* mod_sms */
}
else
{
ERRORA
(
"cannot create event on interface %s. WHY?????
\n
"
,
GSMOPEN_P_LOG
,
tech_pvt
->
name
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论