Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
2070e9d0
提交
2070e9d0
authored
8月 29, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
doh
git-svn-id:
http://svn.openzap.org/svn/openzap/trunk@522
a93c3328-9c30-0410-af19-c9cd2b2d52af
上级
c18c881b
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
38 行增加
和
35 行删除
+38
-35
mod_openzap.c
libs/freetdm/mod_openzap/mod_openzap.c
+8
-7
zap_types.h
libs/freetdm/src/include/zap_types.h
+2
-0
ozmod_analog.c
libs/freetdm/src/ozmod/ozmod_analog/ozmod_analog.c
+0
-1
ozmod_ss7_boost.c
libs/freetdm/src/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c
+2
-1
testanalog.c
libs/freetdm/src/testanalog.c
+2
-1
testboost.c
libs/freetdm/src/testboost.c
+2
-2
testisdn.c
libs/freetdm/src/testisdn.c
+2
-14
zap_io.c
libs/freetdm/src/zap_io.c
+20
-9
没有找到文件。
libs/freetdm/mod_openzap/mod_openzap.c
浏览文件 @
2070e9d0
...
@@ -1538,6 +1538,7 @@ static switch_status_t load_config(void)
...
@@ -1538,6 +1538,7 @@ static switch_status_t load_config(void)
if
(
!
id
)
{
if
(
!
id
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"span missing required param 'id'
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"span missing required param 'id'
\n
"
);
continue
;
}
}
span_id
=
atoi
(
id
);
span_id
=
atoi
(
id
);
...
@@ -1562,8 +1563,8 @@ static switch_status_t load_config(void)
...
@@ -1562,8 +1563,8 @@ static switch_status_t load_config(void)
if
(
zap_configure_span
(
"analog"
,
span
,
on_analog_signal
,
if
(
zap_configure_span
(
"analog"
,
span
,
on_analog_signal
,
"tonemap"
,
tonegroup
,
"tonemap"
,
tonegroup
,
"digit_timeout"
,
&
to
,
"digit_timeout"
,
&
to
,
"max_dialstr"
,
&
max
"max_dialstr"
,
&
max
,
)
!=
ZAP_SUCCESS
)
{
TAG_END
)
!=
ZAP_SUCCESS
)
{
zap_log
(
ZAP_LOG_ERROR
,
"Error starting OpenZAP span %d
\n
"
,
span_id
);
zap_log
(
ZAP_LOG_ERROR
,
"Error starting OpenZAP span %d
\n
"
,
span_id
);
continue
;
continue
;
}
}
...
@@ -1640,8 +1641,8 @@ static switch_status_t load_config(void)
...
@@ -1640,8 +1641,8 @@ static switch_status_t load_config(void)
if
(
zap_configure_span
(
"isdn"
,
span
,
on_clear_channel_signal
,
if
(
zap_configure_span
(
"isdn"
,
span
,
on_clear_channel_signal
,
"mode"
,
mode
,
"mode"
,
mode
,
"dialect"
,
dialect
"dialect"
,
dialect
,
)
!=
ZAP_SUCCESS
)
{
TAG_END
)
!=
ZAP_SUCCESS
)
{
zap_log
(
ZAP_LOG_ERROR
,
"Error starting OpenZAP span %d mode: %d dialect: %d error: %s
\n
"
,
span_id
,
mode
,
dialect
,
span
->
last_error
);
zap_log
(
ZAP_LOG_ERROR
,
"Error starting OpenZAP span %d mode: %d dialect: %d error: %s
\n
"
,
span_id
,
mode
,
dialect
,
span
->
last_error
);
continue
;
continue
;
}
}
...
@@ -1689,7 +1690,7 @@ static switch_status_t load_config(void)
...
@@ -1689,7 +1690,7 @@ static switch_status_t load_config(void)
}
}
}
}
if
(
!
(
id
&&
local_ip
&&
local_port
&&
remote_ip
&&
remote_port
)
)
{
if
(
!
id
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"span missing required param
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"span missing required param
\n
"
);
continue
;
continue
;
}
}
...
@@ -1709,8 +1710,8 @@ static switch_status_t load_config(void)
...
@@ -1709,8 +1710,8 @@ static switch_status_t load_config(void)
"local_ip"
,
local_ip
,
"local_ip"
,
local_ip
,
"local_port"
,
&
local_port
,
"local_port"
,
&
local_port
,
"remote_ip"
,
remote_ip
,
"remote_ip"
,
remote_ip
,
"remote_port"
,
&
remote_port
"remote_port"
,
&
remote_port
,
)
!=
ZAP_SUCCESS
)
{
TAG_END
)
!=
ZAP_SUCCESS
)
{
zap_log
(
ZAP_LOG_ERROR
,
"Error starting OpenZAP span %d error: %s
\n
"
,
span_id
,
span
->
last_error
);
zap_log
(
ZAP_LOG_ERROR
,
"Error starting OpenZAP span %d error: %s
\n
"
,
span_id
,
span
->
last_error
);
continue
;
continue
;
}
}
...
...
libs/freetdm/src/include/zap_types.h
浏览文件 @
2070e9d0
...
@@ -58,6 +58,8 @@ typedef ssize_t zap_ssize_t;
...
@@ -58,6 +58,8 @@ typedef ssize_t zap_ssize_t;
typedef
int
zap_filehandle_t
;
typedef
int
zap_filehandle_t
;
#endif
#endif
#define TAG_END NULL
typedef
size_t
zap_size_t
;
typedef
size_t
zap_size_t
;
struct
zap_io_interface
;
struct
zap_io_interface
;
...
...
libs/freetdm/src/ozmod/ozmod_analog/ozmod_analog.c
浏览文件 @
2070e9d0
...
@@ -107,7 +107,6 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
...
@@ -107,7 +107,6 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
memset
(
analog_data
,
0
,
sizeof
(
*
analog_data
));
memset
(
analog_data
,
0
,
sizeof
(
*
analog_data
));
assert
(
analog_data
!=
NULL
);
assert
(
analog_data
!=
NULL
);
while
(
var
=
va_arg
(
ap
,
char
*
))
{
while
(
var
=
va_arg
(
ap
,
char
*
))
{
if
(
!
strcasecmp
(
var
,
"tonemap"
))
{
if
(
!
strcasecmp
(
var
,
"tonemap"
))
{
if
(
!
(
val
=
va_arg
(
ap
,
char
*
)))
{
if
(
!
(
val
=
va_arg
(
ap
,
char
*
)))
{
...
...
libs/freetdm/src/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c
浏览文件 @
2070e9d0
...
@@ -1122,6 +1122,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
...
@@ -1122,6 +1122,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
if
(
!
local_ip
&&
local_port
&&
remote_ip
&&
remote_port
&&
sig_cb
)
{
if
(
!
local_ip
&&
local_port
&&
remote_ip
&&
remote_port
&&
sig_cb
)
{
zap_set_string
(
span
->
last_error
,
"missing params"
);
return
ZAP_FAIL
;
return
ZAP_FAIL
;
}
}
...
@@ -1147,7 +1148,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
...
@@ -1147,7 +1148,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
zap_module_t
zap_module
=
{
zap_module_t
zap_module
=
{
"
analog
"
,
"
ss7_boost
"
,
NULL
,
NULL
,
NULL
,
NULL
,
zap_ss7_boost_init
,
zap_ss7_boost_init
,
...
...
libs/freetdm/src/testanalog.c
浏览文件 @
2070e9d0
...
@@ -98,7 +98,8 @@ int main(int argc, char *argv[])
...
@@ -98,7 +98,8 @@ int main(int argc, char *argv[])
if
(
zap_configure_span
(
"analog"
,
span
,
on_signal
,
if
(
zap_configure_span
(
"analog"
,
span
,
on_signal
,
"tonemap"
,
"te"
,
"tonemap"
,
"te"
,
"digit_timeout"
,
&
digit_timeout
,
"digit_timeout"
,
&
digit_timeout
,
"max_dialstr"
,
&
max_dialstr
"max_dialstr"
,
&
max_dialstr
,
TAG_END
)
==
ZAP_SUCCESS
)
{
)
==
ZAP_SUCCESS
)
{
zap_log
(
ZAP_LOG_ERROR
,
"Error configuring OpenZAP span
\n
"
);
zap_log
(
ZAP_LOG_ERROR
,
"Error configuring OpenZAP span
\n
"
);
goto
done
;
goto
done
;
...
...
libs/freetdm/src/testboost.c
浏览文件 @
2070e9d0
...
@@ -43,8 +43,8 @@ int main(int argc, char *argv[])
...
@@ -43,8 +43,8 @@ int main(int argc, char *argv[])
"local_ip"
,
"127.0.0.65"
,
"local_ip"
,
"127.0.0.65"
,
"local_port"
,
&
local_port
,
"local_port"
,
&
local_port
,
"remote_ip"
,
"127.0.0.66"
,
"remote_ip"
,
"127.0.0.66"
,
"remote_port"
,
&
remote_port
"remote_port"
,
&
remote_port
,
)
==
ZAP_SUCCESS
)
{
TAG_END
)
==
ZAP_SUCCESS
)
{
zap_span_start
(
span
);
zap_span_start
(
span
);
}
else
{
}
else
{
fprintf
(
stderr
,
"Error starting SS7_BOOST
\n
"
);
fprintf
(
stderr
,
"Error starting SS7_BOOST
\n
"
);
...
...
libs/freetdm/src/testisdn.c
浏览文件 @
2070e9d0
...
@@ -38,27 +38,15 @@ int main(int argc, char *argv[])
...
@@ -38,27 +38,15 @@ int main(int argc, char *argv[])
goto
done
;
goto
done
;
}
}
#if 1
if
(
zap_configure_span
(
"isdn"
,
span
,
on_signal
,
if
(
zap_configure_span
(
"isdn"
,
span
,
on_signal
,
"mode"
,
"te"
,
"mode"
,
"te"
,
"dialect"
,
"national"
"dialect"
,
"national"
,
)
==
ZAP_SUCCESS
)
{
TAG_END
)
==
ZAP_SUCCESS
)
{
zap_span_start
(
span
);
zap_span_start
(
span
);
}
else
{
}
else
{
fprintf
(
stderr
,
"Error starting ISDN D-Channel
\n
"
);
fprintf
(
stderr
,
"Error starting ISDN D-Channel
\n
"
);
goto
done
;
goto
done
;
}
}
#else
if
(
zap_isdn_configure_span
(
span
,
Q931_TE
,
Q931_Dialect_National
,
0
,
on_signal
)
==
ZAP_SUCCESS
)
{
zap_isdn_start
(
span
);
}
else
{
fprintf
(
stderr
,
"Error starting ISDN D-Channel
\n
"
);
goto
done
;
}
#endif
signal
(
SIGINT
,
handle_SIGINT
);
signal
(
SIGINT
,
handle_SIGINT
);
R
=
1
;
R
=
1
;
...
...
libs/freetdm/src/zap_io.c
浏览文件 @
2070e9d0
...
@@ -2135,13 +2135,13 @@ int zap_load_modules(void)
...
@@ -2135,13 +2135,13 @@ int zap_load_modules(void)
if
(
!
(
lib
=
zap_dso_open
(
path
,
&
err
)))
{
if
(
!
(
lib
=
zap_dso_open
(
path
,
&
err
)))
{
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s [%s]
\n
"
,
path
,
err
);
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s [%s]
\n
"
,
path
,
err
);
free
(
err
);
zap_safe_
free
(
err
);
continue
;
continue
;
}
}
if
(
!
(
mod
=
(
zap_module_t
*
)
zap_dso_func_sym
(
lib
,
"zap_module"
,
&
err
)))
{
if
(
!
(
mod
=
(
zap_module_t
*
)
zap_dso_func_sym
(
lib
,
"zap_module"
,
&
err
)))
{
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s [%s]
\n
"
,
path
,
err
);
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s [%s]
\n
"
,
path
,
err
);
free
(
err
);
zap_safe_
free
(
err
);
continue
;
continue
;
}
}
...
@@ -2149,20 +2149,24 @@ int zap_load_modules(void)
...
@@ -2149,20 +2149,24 @@ int zap_load_modules(void)
zap_io_interface_t
*
interface
;
zap_io_interface_t
*
interface
;
if
(
mod
->
io_load
(
&
interface
)
!=
ZAP_SUCCESS
||
!
interface
)
{
if
(
mod
->
io_load
(
&
interface
)
!=
ZAP_SUCCESS
||
!
interface
)
{
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s
[%s]
\n
"
,
path
,
err
);
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s
\n
"
,
path
);
}
else
{
}
else
{
zap_log
(
ZAP_LOG_INFO
,
"Loading IO from %s
\n
"
,
path
);
zap_log
(
ZAP_LOG_INFO
,
"Loading IO from %s
\n
"
,
path
);
zap_mutex_lock
(
globals
.
mutex
);
zap_mutex_lock
(
globals
.
mutex
);
hashtable_insert
(
globals
.
interface_hash
,
(
void
*
)
interface
->
name
,
interface
);
if
(
hashtable_search
(
globals
.
interface_hash
,
(
void
*
)
interface
->
name
))
{
process_module_config
(
interface
);
zap_log
(
ZAP_LOG_ERROR
,
"Interface %s already loaded!
\n
"
,
interface
->
name
);
}
else
{
hashtable_insert
(
globals
.
interface_hash
,
(
void
*
)
interface
->
name
,
interface
);
process_module_config
(
interface
);
x
++
;
}
zap_mutex_unlock
(
globals
.
mutex
);
zap_mutex_unlock
(
globals
.
mutex
);
x
++
;
}
}
}
}
if
(
mod
->
sig_load
)
{
if
(
mod
->
sig_load
)
{
if
(
mod
->
sig_load
()
!=
ZAP_SUCCESS
)
{
if
(
mod
->
sig_load
()
!=
ZAP_SUCCESS
)
{
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s
[%s]
\n
"
,
path
,
err
);
zap_log
(
ZAP_LOG_ERROR
,
"Error loading %s
\n
"
,
path
);
}
else
{
}
else
{
zap_log
(
ZAP_LOG_INFO
,
"Loading SIG from %s
\n
"
,
path
);
zap_log
(
ZAP_LOG_INFO
,
"Loading SIG from %s
\n
"
,
path
);
x
++
;
x
++
;
...
@@ -2180,8 +2184,15 @@ int zap_load_modules(void)
...
@@ -2180,8 +2184,15 @@ int zap_load_modules(void)
zap_set_string
(
mod
->
name
,
p
);
zap_set_string
(
mod
->
name
,
p
);
}
}
hashtable_insert
(
globals
.
module_hash
,
(
void
*
)
mod
->
name
,
mod
);
zap_mutex_lock
(
globals
.
mutex
);
count
++
;
if
(
hashtable_search
(
globals
.
module_hash
,
(
void
*
)
mod
->
name
))
{
zap_log
(
ZAP_LOG_ERROR
,
"Module %s already loaded!
\n
"
,
mod
->
name
);
zap_dso_destroy
(
&
lib
);
}
else
{
hashtable_insert
(
globals
.
module_hash
,
(
void
*
)
mod
->
name
,
mod
);
count
++
;
}
zap_mutex_unlock
(
globals
.
mutex
);
}
else
{
}
else
{
zap_log
(
ZAP_LOG_ERROR
,
"Unloading %s
\n
"
,
path
);
zap_log
(
ZAP_LOG_ERROR
,
"Unloading %s
\n
"
,
path
);
zap_dso_destroy
(
&
lib
);
zap_dso_destroy
(
&
lib
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论