Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
36f1e5e2
提交
36f1e5e2
authored
2月 21, 2014
作者:
Chris Rienzo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
ssh://git.freeswitch.org:222/freeswitch
上级
79b26b8e
63aea267
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
186 行增加
和
22 行删除
+186
-22
.gitignore
docs/man/.gitignore
+2
-0
freeswitch.1.ronn
docs/man/freeswitch.1.ronn
+155
-0
su_alloc.c
libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
+10
-10
datatypes.h
libs/srtp/crypto/include/datatypes.h
+1
-1
switch_channel.c
src/switch_channel.c
+4
-0
switch_ivr_bridge.c
src/switch_ivr_bridge.c
+14
-11
没有找到文件。
docs/man/.gitignore
0 → 100644
浏览文件 @
36f1e5e2
*.1
*.html
docs/man/freeswitch.1.ronn
0 → 100644
浏览文件 @
36f1e5e2
freeswitch(1) -- scalable multi-protocol softswitch
===================================================
## SYNOPSIS
`freeswitch` [<options>]
## DESCRIPTION
`freeswitch` is a high-performance softswitch that supports many kinds
of telephony applications. It's commonly used as a PBX with SIP
endpoints.
`freeswitch` expects a set of configuration files to exist in
/etc/freeswitch. Example configurations can be found in
/usr/share/freeswitch/conf.
`freeswitch` is a modular system and modules can be loaded at runtime.
`freeswitch` is started in the foreground by default but can also be
started as a daemon.
## OPTIONS
* `-h`:
Show inline help.
* `-version`:
Print the version and exit.
* `-nf`:
Stay in the foreground (default unless `-nc` is specified).
* `-reincarnate`:
Restart the switch in the event of an uncontrolled exit.
* `-reincarnate-reexec`:
Like `-reincarnate` but cause the switch binary to be run again
with execv.
* `-u` <user>:
Run setuid after starting the switch.
* `-g` <group>:
Run setgid after starting the switch.
* `-core`:
Cause the switch to dump a core when crashing; you'll need to
ensure your system ulimits allow this, and if you've set `-u` or
`-g` you may also need to run:
sysctl -w fs.suid_dumpable=1
* `-rp`:
Enable realtime priority.
* `-lp`:
Enable low priority.
* `-np`:
Enable normal priority.
* `-vg`:
Run under Valgrind.
* `-nosql`:
Disable the use of SQL for internal switch operations.
* `-heavy-timer`:
Use a more expensive system timer that may be more accurate, but
note this may also impose heavier loads on your system.
* `-nonat`:
When the switch starts, it runs checks to determine if it is
behind NAT; this flag disables these checks.
* `-nonatmap`:
Disable automatic NAT port mapping.
* `-nocal`:
When the switch starts, it calibrates itself to deviations in the
system clock; this flag disables this calibration.
* `-nort`:
Disable use of clock_realtime.
* `-stop`:
Stop the switch if running in the background.
* `-nc`:
Disable the interactive console and cause the switch to go into
the background unless `-nf` is also specified.
* `-ncwait`:
Like `-nc` but cause the parent process to wait until the switch
is started before exiting.
* `-c`:
Enable the interactive console and stay in the foreground (this is
the default).
* `-base` <basedir>:
Set the prefix directory.
* `-cfgname` <filename>:
Set the pathname to the main configuration file.
* `-conf` <directory>:
Set the directory for configuration files.
* `-log` <directory>:
Set the directory for log files.
* `-run` <directory>:
Set the directory for temporary runtime files.
* `-db` <directory>:
Set the directory for internal database files.
* `-mod` <directory>:
Set the directory for runtime modules.
* `-htdocs` <directory>:
Set the directory for htdocs.
* `-scripts` <directory>:
Set the directory for call control scripts.
* `-temp` <directory>:
Set the directory for temporary files.
* `-grammar` <directory>:
Set the directory for grammar files.
* `-recordings` <directory>:
Set the directory for call recordings.
* `-storage` <directory>:
Set the directory for voicemail storage.
* `-sounds` <directory>:
Set the directory for sound files.
## AUTHORS
FreeSWITCH was originally developed by `Anthony Minessale II
<anthm@freeswitch.org>` with continued development by Anthony and a
team of active contributors.
This man page and the packaging for Debian was written by `Travis
Cross <tc@traviscross.com>`.
## SEE ALSO
sysctl(8), ulimit(1posix)
libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
浏览文件 @
36f1e5e2
...
...
@@ -238,7 +238,7 @@ enum {
};
#define ALIGNMENT (8)
#define ALIGN(n) (size_t)(((n) + (ALIGNMENT - 1)) & (size_t)~(ALIGNMENT - 1))
#define
__
ALIGN(n) (size_t)(((n) + (ALIGNMENT - 1)) & (size_t)~(ALIGNMENT - 1))
#define SIZEBITS (sizeof (unsigned) * 8 - 1)
typedef
struct
{
...
...
@@ -478,7 +478,7 @@ void *sub_alloc(su_home_t *home,
sub
->
sub_preload
&&
size
<=
sub
->
sub_prsize
)
{
/* Use preloaded memory */
size_t
prused
=
sub
->
sub_prused
+
size
+
MEMCHECK_EXTRA
;
prused
=
ALIGN
(
prused
);
prused
=
__
ALIGN
(
prused
);
if
(
prused
<=
sub
->
sub_prsize
)
{
preload
=
(
char
*
)
sub
->
sub_preload
+
sub
->
sub_prused
;
sub
->
sub_prused
=
(
unsigned
)
prused
;
...
...
@@ -1313,7 +1313,7 @@ void su_home_preload(su_home_t *home, isize_t n, isize_t isize)
size_t
size
;
void
*
preload
;
size
=
n
*
ALIGN
(
isize
);
size
=
n
*
__
ALIGN
(
isize
);
if
(
size
>
65535
)
/* We have 16 bits... */
size
=
65535
&
(
ALIGNMENT
-
1
);
...
...
@@ -1334,13 +1334,13 @@ su_home_t *su_home_auto(void *area, isize_t size)
{
su_home_t
*
home
;
su_block_t
*
sub
;
size_t
homesize
=
ALIGN
(
sizeof
*
home
);
size_t
subsize
=
ALIGN
(
offsetof
(
su_block_t
,
sub_nodes
[
SUB_N_AUTO
]));
size_t
homesize
=
__
ALIGN
(
sizeof
*
home
);
size_t
subsize
=
__
ALIGN
(
offsetof
(
su_block_t
,
sub_nodes
[
SUB_N_AUTO
]));
size_t
prepsize
;
char
*
p
=
area
;
prepsize
=
homesize
+
subsize
+
(
ALIGN
((
intptr_t
)
p
)
-
(
intptr_t
)
p
);
prepsize
=
homesize
+
subsize
+
(
__
ALIGN
((
intptr_t
)
p
)
-
(
intptr_t
)
p
);
if
(
area
==
NULL
||
size
<
prepsize
)
return
NULL
;
...
...
@@ -1443,11 +1443,11 @@ void *su_realloc(su_home_t *home, void *data, isize_t size)
p
=
(
char
*
)
data
-
home
->
suh_blocks
->
sub_preload
;
p
+=
sua
->
sua_size
+
MEMCHECK_EXTRA
;
p
=
ALIGN
(
p
);
p
=
__
ALIGN
(
p
);
if
(
p
==
sub
->
sub_prused
)
{
size_t
p2
=
(
char
*
)
data
-
sub
->
sub_preload
+
size
+
MEMCHECK_EXTRA
;
p2
=
ALIGN
(
p2
);
p2
=
__
ALIGN
(
p2
);
if
(
p2
<=
sub
->
sub_prsize
)
{
/* Extend/reduce existing preload */
if
(
sub
->
sub_stats
)
{
...
...
@@ -1840,7 +1840,7 @@ void su_home_stats_alloc(su_block_t *sub, void *p, void *preload,
{
su_home_stat_t
*
hs
=
sub
->
sub_stats
;
size_t
rsize
=
ALIGN
(
size
);
size_t
rsize
=
__
ALIGN
(
size
);
hs
->
hs_rehash
+=
(
sub
->
sub_n
!=
hs
->
hs_blocksize
);
hs
->
hs_blocksize
=
sub
->
sub_n
;
...
...
@@ -1869,7 +1869,7 @@ void su_home_stats_free(su_block_t *sub, void *p, void *preload,
{
su_home_stat_t
*
hs
=
sub
->
sub_stats
;
size_t
rsize
=
ALIGN
(
size
);
size_t
rsize
=
__
ALIGN
(
size
);
if
(
preload
)
{
hs
->
hs_frees
.
hsf_preload
++
;
...
...
libs/srtp/crypto/include/datatypes.h
浏览文件 @
36f1e5e2
...
...
@@ -393,7 +393,7 @@ octet_string_set_to_zero(uint8_t *s, int len);
# define be64_to_cpu(x) bswap_64((x))
#else
#if defined(__GNUC__) && defined(HAVE_X86) && !defined(__FreeBSD__)
#if defined(__GNUC__) && defined(HAVE_X86) && !defined(__FreeBSD__)
&& !defined(__OpenBSD__)
/* Fall back. */
static
inline
uint32_t
be32_to_cpu
(
uint32_t
v
)
{
/* optimized for x86. */
...
...
src/switch_channel.c
浏览文件 @
36f1e5e2
...
...
@@ -3160,6 +3160,10 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
}
switch_mutex_unlock
(
channel
->
state_mutex
);
if
(
switch_channel_test_flag
(
channel
,
CF_LEG_HOLDING
))
{
switch_channel_mark_hold
(
channel
,
SWITCH_FALSE
);
}
if
(
!
ok
)
{
return
channel
->
state
;
}
...
...
src/switch_ivr_bridge.c
浏览文件 @
36f1e5e2
...
...
@@ -647,21 +647,24 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session_a
),
SWITCH_LOG_DEBUG
,
"BRIDGE THREAD DONE [%s]
\n
"
,
switch_channel_get_name
(
chan_a
));
switch_channel_clear_flag
(
chan_a
,
CF_BRIDGED
);
if
(
switch_channel_test_flag
(
chan_a
,
CF_LEG_HOLDING
)
&&
switch_channel_ready
(
chan_b
)
&&
switch_channel_get_state
(
chan_b
)
!=
CS_PARK
)
{
const
char
*
ext
=
switch_channel_get_variable
(
chan_a
,
"hold_hangup_xfer_exten"
);
if
(
switch_channel_test_flag
(
chan_a
,
CF_LEG_HOLDING
))
{
switch_channel_stop_broadcast
(
chan_b
);
if
(
switch_channel_ready
(
chan_b
)
&&
switch_channel_get_state
(
chan_b
)
!=
CS_PARK
)
{
const
char
*
ext
=
switch_channel_get_variable
(
chan_a
,
"hold_hangup_xfer_exten"
);
if
(
zstr
(
ext
))
{
switch_call_cause_t
cause
=
switch_channel_get_cause
(
chan_b
);
if
(
cause
==
SWITCH_CAUSE_NONE
)
{
cause
=
SWITCH_CAUSE_NORMAL_CLEARING
;
switch_channel_stop_broadcast
(
chan_b
);
if
(
zstr
(
ext
))
{
switch_call_cause_t
cause
=
switch_channel_get_cause
(
chan_b
);
if
(
cause
==
SWITCH_CAUSE_NONE
)
{
cause
=
SWITCH_CAUSE_NORMAL_CLEARING
;
}
switch_channel_hangup
(
chan_b
,
cause
);
}
else
{
switch_channel_set_variable
(
chan_b
,
SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE
,
ext
);
}
switch_channel_hangup
(
chan_b
,
cause
);
}
else
{
switch_channel_set_variable
(
chan_b
,
SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE
,
ext
);
}
switch_channel_
clear_flag
(
chan_a
,
CF_LEG_HOLDING
);
switch_channel_
mark_hold
(
chan_a
,
SWITCH_FALSE
);
}
if
(
switch_channel_test_flag
(
chan_a
,
CF_INTERCEPTED
))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论