Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
665b12b1
提交
665b12b1
authored
12月 21, 2010
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
差异文件
Merge remote branch 'fsorig/master'
上级
ebb61335
fcd7515c
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
121 行增加
和
56 行删除
+121
-56
vars.xml
conf/vars.xml
+2
-0
fs_cli.c
libs/esl/fs_cli.c
+2
-2
mod_freetdm.2010.vcxproj
libs/freetdm/mod_freetdm/mod_freetdm.2010.vcxproj
+2
-2
ftmod_sangoma_isdn.2008.vcproj
...c/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj
+7
-3
ftmod_sangoma_isdn.2010.vcxproj
.../ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2010.vcxproj
+13
-5
ftmod_wanpipe.2010.vcxproj
...reetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.2010.vcxproj
+4
-4
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+47
-1
mod_fifo.c
src/mod/applications/mod_fifo/mod_fifo.c
+26
-16
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+14
-17
switch_ivr_bridge.c
src/switch_ivr_bridge.c
+0
-4
switch_ivr_originate.c
src/switch_ivr_originate.c
+3
-0
FreeSwitchCore.2010.vcxproj
w32/Library/FreeSwitchCore.2010.vcxproj
+1
-2
没有找到文件。
conf/vars.xml
浏览文件 @
665b12b1
...
...
@@ -204,6 +204,8 @@
<X-PRE-PROCESS
cmd=
"set"
data=
"fr-ring=%(1500,3500,440.0,0.0)"
/>
<X-PRE-PROCESS
cmd=
"set"
data=
"rs-ring=%(1000,4000,425.0,0.0)"
/>
<X-PRE-PROCESS
cmd=
"set"
data=
"ru-ring=%(800,3200,425,0)"
/>
<X-PRE-PROCESS
cmd=
"set"
data=
"de-ring=%(1000,4000,425,0)"
/>
<X-PRE-PROCESS
cmd=
"set"
data=
"dz-ring=%(1500,3500,425.0,0.0)"
/>
<X-PRE-PROCESS
cmd=
"set"
data=
"bong-ring=v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440)"
/>
<X-PRE-PROCESS
cmd=
"set"
data=
"sit=%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)"
/>
<!--
...
...
libs/esl/fs_cli.c
浏览文件 @
665b12b1
...
...
@@ -656,7 +656,7 @@ static int process_command(esl_handle_t *handle, const char *cmd)
"-----------------------------------------------
\n
"
"/help
\t
Help
\n
"
"/exit, /quit, /bye, ...
\t
Exit the program.
\n
"
"/event, /noevent, /nixevent
\t
Event commands.
\n
"
"/event, /noevent
s
, /nixevent
\t
Event commands.
\n
"
"/log, /nolog
\t
Log commands.
\n
"
"/uuid
\t
Filter logs for a single call uuid
\n
"
"/filter
\t
Filter commands.
\n
"
...
...
@@ -692,7 +692,7 @@ static int process_command(esl_handle_t *handle, const char *cmd)
}
else
if
(
!
strncasecmp
(
cmd
,
"event"
,
5
)
||
!
strncasecmp
(
cmd
,
"noevent
"
,
7
)
||
!
strncasecmp
(
cmd
,
"noevent
s"
,
8
)
||
!
strncasecmp
(
cmd
,
"nixevent"
,
8
)
||
!
strncasecmp
(
cmd
,
"log"
,
3
)
||
!
strncasecmp
(
cmd
,
"nolog"
,
5
)
||
...
...
libs/freetdm/mod_freetdm/mod_freetdm.2010.vcxproj
浏览文件 @
665b12b1
...
...
@@ -103,7 +103,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>
FreeSwitch.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
FreeSwitch
Core
.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
../../../$(PlatformName)\$(Configuration);%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<ProgramDatabaseFile>
$(OutDir)$(TargetName).pdb
</ProgramDatabaseFile>
...
...
@@ -127,7 +127,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>
FreeSwitch.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
FreeSwitch
Core
.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
../../../$(PlatformName)\$(Configuration);%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<ProgramDatabaseFile>
$(OutDir)$(TargetName).pdb
</ProgramDatabaseFile>
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj
浏览文件 @
665b12b1
...
...
@@ -40,11 +40,12 @@
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
""C:\Program Files\
libsng_isdn\include";"C:\Program Files\libsng_isdn\include\sng_isdn
";../../include;"C:\Program Files\Sangoma\include""
AdditionalIncludeDirectories=
""C:\Program Files\
sangoma\sng_isdn\include
";../../include;"C:\Program Files\Sangoma\include""
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;"
MinimalRebuild=
"true"
ExceptionHandling=
"0"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"false"
...
...
@@ -63,7 +64,7 @@
Name=
"VCLinkerTool"
AdditionalDependencies=
"freetdm.lib libsng_isdn.lib"
LinkIncremental=
"2"
AdditionalLibraryDirectories=
""$(OutDir)";"C:\Program Files\
lib
sng_isdn\lib";"C:\Program Files\Sangoma\api\lib\x86""
AdditionalLibraryDirectories=
""$(OutDir)";"C:\Program Files\
sangoma\
sng_isdn\lib";"C:\Program Files\Sangoma\api\lib\x86""
GenerateDebugInformation=
"true"
SubSystem=
"1"
RandomizedBaseAddress=
"1"
...
...
@@ -116,10 +117,11 @@
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""C:\Program Files\sangoma\sng_isdn\include";../../include;"C:\Program Files\Sangoma\include""
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;"
MinimalRebuild=
"true"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"
3
"
RuntimeLibrary=
"
2
"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"false"
...
...
@@ -136,7 +138,9 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"freetdm.lib libsng_isdn.lib"
LinkIncremental=
"2"
AdditionalLibraryDirectories=
""$(OutDir)";"C:\Program Files\sangoma\sng_isdn\lib";"C:\Program Files\Sangoma\api\lib\x86""
GenerateDebugInformation=
"true"
SubSystem=
"2"
OptimizeReferences=
"2"
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2010.vcxproj
浏览文件 @
665b12b1
...
...
@@ -85,7 +85,7 @@
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
C:\Program Files\
libsng_isdn\include;C:\Program Files\libsng_isdn\include\sng_isdn
;../../include;C:\Program Files\Sangoma\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>
C:\Program Files\
sangoma\sng_isdn\include
;../../include;C:\Program Files\Sangoma\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MinimalRebuild>
true
</MinimalRebuild>
<ExceptionHandling>
...
...
@@ -95,10 +95,11 @@
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<RuntimeLibrary>
MultiThreadedDebugDLL
</RuntimeLibrary>
</ClCompile>
<Link>
<AdditionalDependencies>
freetdm.lib;libsng_isdn.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\
lib
sng_isdn\lib;C:\Program Files\Sangoma\api\lib\x86;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\
sangoma\
sng_isdn\lib;C:\Program Files\Sangoma\api\lib\x86;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
<RandomizedBaseAddress>
false
</RandomizedBaseAddress>
...
...
@@ -110,7 +111,7 @@
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
C:\Program Files\
libsng_isdn\include;C:\Program Files\libsng_isdn\include\sng_isdn
;../../include;C:\Program Files\Sangoma\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>
C:\Program Files\
sangoma\sng_isdn\include
;../../include;C:\Program Files\Sangoma\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
...
...
@@ -119,6 +120,7 @@
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<RuntimeLibrary>
MultiThreadedDebugDLL
</RuntimeLibrary>
</ClCompile>
<Link>
<AdditionalDependencies>
freetdm.lib;libsng_isdn.lib;%(AdditionalDependencies)
</AdditionalDependencies>
...
...
@@ -135,11 +137,13 @@
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MinimalRebuild>
true
</MinimalRebuild>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedD
ebugD
LL
</RuntimeLibrary>
<RuntimeLibrary>
MultiThreadedDLL
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<AdditionalIncludeDirectories>
C:\Program Files\sangoma\sng_isdn\include;../../include;C:\Program Files\Sangoma\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<Optimization>
Disabled
</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
...
...
@@ -147,23 +151,27 @@
<OptimizeReferences>
true
</OptimizeReferences>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<TargetMachine>
MachineX86
</TargetMachine>
<AdditionalDependencies>
freetdm.lib;libsng_isdn.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\sangoma\sng_isdn\lib;C:\Program Files\Sangoma\api\lib\x86;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedD
ebugD
LL
</RuntimeLibrary>
<RuntimeLibrary>
MultiThreadedDLL
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<AdditionalIncludeDirectories>
C:\Program Files\sangoma\sng_isdn\include;../../include;C:\Program Files\Sangoma\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Windows
</SubSystem>
<OptimizeReferences>
true
</OptimizeReferences>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<AdditionalDependencies>
freetdm.lib;libsng_isdn.lib;%(AdditionalDependencies)
</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
...
...
libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.2010.vcxproj
浏览文件 @
665b12b1
...
...
@@ -100,7 +100,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>
freetdm.lib;
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\Sangoma\api\lib\x86;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
...
...
@@ -127,7 +127,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>
freetdm.lib;
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\Sangoma\api\lib\x64;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
...
...
@@ -148,7 +148,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>
freetdm.lib;
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\Sangoma\api\lib\x86;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
...
...
@@ -174,7 +174,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>
freetdm.lib;
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
libsangoma.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OutDir);C:\Program Files\Sangoma\api\lib\x64;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
665b12b1
...
...
@@ -191,7 +191,8 @@ typedef enum {
EFLAG_TRANSFER
=
(
1
<<
23
),
EFLAG_BGDIAL_RESULT
=
(
1
<<
24
),
EFLAG_FLOOR_CHANGE
=
(
1
<<
25
),
EFLAG_MUTE_DETECT
=
(
1
<<
26
)
EFLAG_MUTE_DETECT
=
(
1
<<
26
),
EFLAG_RECORD
=
(
1
<<
27
)
}
event_type_t
;
typedef
struct
conference_file_node
{
...
...
@@ -270,6 +271,7 @@ typedef struct conference_obj {
uint32_t
not_talking_buf_len
;
int
comfort_noise_level
;
int
is_recording
;
int
record_count
;
int
video_running
;
uint32_t
eflags
;
uint32_t
verbose_events
;
...
...
@@ -283,6 +285,7 @@ typedef struct conference_obj {
uint32_t
avg_score
;
uint32_t
avg_itt
;
uint32_t
avg_tally
;
switch_time_t
run_time
;
}
conference_obj_t
;
/* Relationship with another member */
...
...
@@ -468,6 +471,7 @@ static switch_status_t conference_add_event_member_data(conference_member_t *mem
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"Hear"
,
"%s"
,
switch_test_flag
(
member
,
MFLAG_CAN_HEAR
)
?
"true"
:
"false"
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"Speak"
,
"%s"
,
switch_test_flag
(
member
,
MFLAG_CAN_SPEAK
)
?
"true"
:
"false"
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"Talking"
,
"%s"
,
switch_test_flag
(
member
,
MFLAG_TALKING
)
?
"true"
:
"false"
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"Mute-Detect"
,
"%s"
,
switch_test_flag
(
member
,
MFLAG_MUTE_DETECT
)
?
"true"
:
"false"
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"Member-ID"
,
"%u"
,
member
->
id
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"Member-Type"
,
"%s"
,
switch_test_flag
(
member
,
MFLAG_MOD
)
?
"moderator"
:
"member"
);
...
...
@@ -563,6 +567,7 @@ static switch_status_t conference_record_stop(conference_obj_t *conference, char
return
count
;
}
/* Add a custom relationship to a member */
static
conference_relationship_t
*
member_add_relationship
(
conference_member_t
*
member
,
uint32_t
id
)
{
...
...
@@ -1035,6 +1040,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
switch_mutex_unlock
(
globals
.
hash_mutex
);
conference
->
is_recording
=
0
;
conference
->
record_count
=
0
;
while
(
globals
.
running
&&
!
switch_test_flag
(
conference
,
CFLAG_DESTRUCT
))
{
switch_size_t
file_sample_len
=
samples
;
...
...
@@ -1099,6 +1105,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
/* Start recording if there's more than one participant. */
if
(
conference
->
auto_record
&&
!
conference
->
is_recording
&&
conference
->
count
>
1
)
{
conference
->
is_recording
=
1
;
conference
->
record_count
++
;
imember
=
conference
->
members
;
if
(
imember
)
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
imember
->
session
);
...
...
@@ -2623,6 +2630,7 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
switch_timer_t
timer
=
{
0
};
uint32_t
rlen
;
switch_size_t
data_buf_len
;
switch_event_t
*
event
;
data_buf_len
=
samples
*
sizeof
(
int16_t
);
...
...
@@ -2701,6 +2709,15 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
switch_core_file_set_string
(
&
fh
,
SWITCH_AUDIO_COL_STR_ARTIST
,
"FreeSWITCH mod_conference Software Conference Module"
);
if
(
test_eflag
(
conference
,
EFLAG_RECORD
)
&&
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
CONF_EVENT_MAINT
)
==
SWITCH_STATUS_SUCCESS
)
{
conference_add_event_data
(
conference
,
event
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Action"
,
"start-recording"
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Path"
,
rec
->
path
);
switch_event_fire
(
&
event
);
}
while
(
switch_test_flag
(
member
,
MFLAG_RUNNING
)
&&
switch_test_flag
(
conference
,
CFLAG_RUNNING
)
&&
conference
->
count
)
{
switch_size_t
len
=
0
;
mux_used
=
(
uint32_t
)
switch_buffer_inuse
(
member
->
mux_buffer
);
...
...
@@ -3759,6 +3776,13 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer
switch_xml_set_attr_d
(
x_conference
,
"dynamic"
,
"true"
);
}
if
(
conference
->
record_count
>
0
)
{
switch_xml_set_attr_d
(
x_conference
,
"recording"
,
"true"
);
}
switch_snprintf
(
i
,
sizeof
(
i
),
"%d"
,
switch_epoch_time_now
(
NULL
)
-
conference
->
run_time
);
switch_xml_set_attr_d
(
x_conference
,
"run_time"
,
ival
);
if
(
conference
->
agc_level
)
{
char
tmp
[
30
]
=
""
;
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
conference
->
agc_level
);
...
...
@@ -3825,6 +3849,9 @@ static void conference_xlist(conference_obj_t *conference, switch_xml_t x_confer
x_tag
=
switch_xml_add_child_d
(
x_flags
,
"can_speak"
,
count
++
);
switch_xml_set_txt_d
(
x_tag
,
switch_test_flag
(
member
,
MFLAG_CAN_SPEAK
)
?
"true"
:
"false"
);
x_tag
=
switch_xml_add_child_d
(
x_flags
,
"mute_detect"
,
count
++
);
switch_xml_set_txt_d
(
x_tag
,
switch_test_flag
(
member
,
MFLAG_MUTE_DETECT
)
?
"true"
:
"false"
);
x_tag
=
switch_xml_add_child_d
(
x_flags
,
"talking"
,
count
++
);
switch_xml_set_txt_d
(
x_tag
,
switch_test_flag
(
member
,
MFLAG_TALKING
)
?
"true"
:
"false"
);
...
...
@@ -4414,6 +4441,7 @@ static switch_status_t conf_api_sub_record(conference_obj_t *conference, switch_
return
SWITCH_STATUS_GENERR
;
stream
->
write_function
(
stream
,
"Record file %s
\n
"
,
argv
[
2
]);
conference
->
record_count
++
;
launch_conference_record_thread
(
conference
,
argv
[
2
]);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -4421,6 +4449,7 @@ static switch_status_t conf_api_sub_record(conference_obj_t *conference, switch_
static
switch_status_t
conf_api_sub_norecord
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
int
all
;
switch_event_t
*
event
;
switch_assert
(
conference
!=
NULL
);
switch_assert
(
stream
!=
NULL
);
...
...
@@ -4432,6 +4461,20 @@ static switch_status_t conf_api_sub_norecord(conference_obj_t *conference, switc
stream
->
write_function
(
stream
,
"Stop recording file %s
\n
"
,
argv
[
2
]);
if
(
!
conference_record_stop
(
conference
,
all
?
NULL
:
argv
[
2
])
&&
!
all
)
{
stream
->
write_function
(
stream
,
"non-existant recording '%s'
\n
"
,
argv
[
2
]);
}
else
{
if
(
all
)
{
conference
->
record_count
=
0
;
}
else
{
conference
->
record_count
--
;
}
if
(
test_eflag
(
conference
,
EFLAG_RECORD
)
&&
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
CONF_EVENT_MAINT
)
==
SWITCH_STATUS_SUCCESS
)
{
conference_add_event_data
(
conference
,
event
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Action"
,
"stop-recording"
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Path"
,
all
?
"all"
:
argv
[
2
]);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Other-Recordings"
,
conference
->
record_count
?
"true"
:
"false"
);
switch_event_fire
(
&
event
);
}
}
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -5138,6 +5181,8 @@ static void clear_eflags(char *events, uint32_t *f)
*
f
&=
~
EFLAG_BGDIAL_RESULT
;
}
else
if
(
!
strcmp
(
event
,
"floor-change"
))
{
*
f
&=
~
EFLAG_FLOOR_CHANGE
;
}
else
if
(
!
strcmp
(
event
,
"record"
))
{
*
f
&=
~
EFLAG_RECORD
;
}
event
=
next
;
...
...
@@ -6121,6 +6166,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_m
conference
->
caller_id_name
=
switch_core_strdup
(
conference
->
pool
,
caller_id_name
);
conference
->
caller_id_number
=
switch_core_strdup
(
conference
->
pool
,
caller_id_number
);
conference
->
caller_controls
=
switch_core_strdup
(
conference
->
pool
,
caller_controls
);
conference
->
run_time
=
switch_epoch_time_now
(
NULL
);
if
(
!
zstr
(
perpetual_sound
))
{
...
...
src/mod/applications/mod_fifo/mod_fifo.c
浏览文件 @
665b12b1
...
...
@@ -1761,27 +1761,28 @@ static void *SWITCH_THREAD_FUNC node_thread_run(switch_thread_t *thread, void *o
for
(
hi
=
switch_hash_first
(
NULL
,
globals
.
fifo_hash
);
hi
;
hi
=
switch_hash_next
(
hi
))
{
switch_hash_this
(
hi
,
&
var
,
NULL
,
&
val
);
if
((
node
=
(
fifo_node_t
*
)
val
))
{
int
x
=
0
;
switch_event_t
*
pop
;
if
(
node
->
ready
==
FIFO_DELAY_DESTROY
)
{
int
doit
=
0
;
switch_mutex_lock
(
node
->
update_mutex
);
doit
=
node
->
consumer_count
==
0
&&
node_caller_count
(
node
)
==
0
;
switch_mutex_unlock
(
node
->
update_mutex
);
if
(
doit
)
{
if
(
switch_thread_rwlock_trywrlock
(
node
->
rwlock
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"%s removed.
\n
"
,
node
->
name
);
switch_core_hash_delete
(
globals
.
fifo_hash
,
node
->
name
);
for
(
x
=
0
;
x
<
MAX_PRI
;
x
++
)
{
while
(
fifo_queue_pop
(
node
->
fifo_list
[
x
],
&
pop
,
2
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_event_destroy
(
&
pop
);
}
}
node
->
ready
=
0
;
switch_mutex_lock
(
node
->
mutex
);
switch_core_hash_destroy
(
&
node
->
consumer_hash
);
switch_mutex_unlock
(
node
->
mutex
);
switch_mutex_unlock
(
node
->
update_mutex
);
switch_thread_rwlock_unlock
(
node
->
rwlock
);
switch_core_destroy_memory_pool
(
&
node
->
pool
);
goto
restart
;
}
}
...
...
@@ -2172,7 +2173,7 @@ SWITCH_STANDARD_APP(fifo_function)
char
*
mydata
=
NULL
,
*
argv
[
5
]
=
{
0
};
fifo_node_t
*
node
=
NULL
,
*
node_list
[
MAX_NODES_PER_CONSUMER
+
1
]
=
{
0
};
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
int
do_wait
=
1
,
node_count
=
0
,
i
=
0
;
int
do_
destroy
=
0
,
do_
wait
=
1
,
node_count
=
0
,
i
=
0
;
const
char
*
moh
=
NULL
;
const
char
*
announce
=
NULL
;
switch_event_t
*
event
=
NULL
;
...
...
@@ -2247,13 +2248,10 @@ SWITCH_STANDARD_APP(fifo_function)
if
(
!
(
node
=
switch_core_hash_find
(
globals
.
fifo_hash
,
nlist
[
i
])))
{
node
=
create_node
(
nlist
[
i
],
importance
,
globals
.
sql_mutex
);
node
->
ready
=
1
;
switch_thread_rwlock_rdlock
(
node
->
rwlock
);
}
node_list
[
node_count
++
]
=
node
;
}
if
(
switch_true
(
switch_channel_get_variable
(
channel
,
"fifo_destroy_after_use"
))
&&
node
->
ready
==
1
)
{
node
->
ready
=
FIFO_DELAY_DESTROY
;
switch_thread_rwlock_rdlock
(
node
->
rwlock
);
node
_list
[
node_count
++
]
=
node
;
}
switch_mutex_unlock
(
globals
.
mutex
);
...
...
@@ -3103,9 +3101,21 @@ SWITCH_STANDARD_APP(fifo_function)
done
:
if
(
node
)
{
if
(
switch_true
(
switch_channel_get_variable
(
channel
,
"fifo_destroy_after_use"
)))
{
do_destroy
=
1
;
}
switch_mutex_lock
(
globals
.
mutex
);
for
(
i
=
0
;
i
<
node_count
;
i
++
)
{
if
(
!
(
node
=
node_list
[
i
]))
{
continue
;
}
switch_thread_rwlock_unlock
(
node
->
rwlock
);
if
(
node
->
ready
==
1
&&
do_destroy
)
{
node
->
ready
=
FIFO_DELAY_DESTROY
;
}
}
switch_mutex_unlock
(
globals
.
mutex
);
switch_channel_clear_app_flag_key
(
FIFO_APP_KEY
,
channel
,
FIFO_APP_BRIDGE_TAG
);
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
665b12b1
...
...
@@ -55,6 +55,7 @@ static void sync_sla(sofia_profile_t *profile, const char *to_user, const char *
struct
dialog_helper
{
char
status
[
512
];
char
rpid
[
512
];
char
presence_id
[
1024
];
};
struct
resub_helper
{
...
...
@@ -479,9 +480,10 @@ static int sofia_presence_dialog_callback(void *pArg, int argc, char **argv, cha
{
struct
dialog_helper
*
helper
=
(
struct
dialog_helper
*
)
pArg
;
if
(
argc
==
2
)
{
if
(
argc
==
3
)
{
switch_set_string
(
helper
->
status
,
argv
[
0
]);
switch_set_string
(
helper
->
rpid
,
argv
[
1
]);
switch_set_string
(
helper
->
presence_id
,
argv
[
2
]);
}
return
-
1
;
...
...
@@ -638,7 +640,8 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
}
if
(
probe_euser
&&
probe_host
&&
(
profile
=
sofia_glue_find_profile
(
probe_host
)))
{
sql
=
switch_mprintf
(
"select status,rpid from sip_dialogs where ((sip_from_user='%q' and sip_from_host='%q') or presence_id='%q@%q')"
,
sql
=
switch_mprintf
(
"select status,rpid,presence_id from sip_dialogs "
"where ((sip_from_user='%q' and sip_from_host='%q') or presence_id='%q@%q')"
,
probe_euser
,
probe_host
,
probe_euser
,
probe_host
);
sofia_glue_execute_sql_callback
(
profile
,
profile
->
ireg_mutex
,
sql
,
sofia_presence_dialog_callback
,
&
dh
);
...
...
@@ -656,16 +659,16 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
"sip_dialogs.direction, "
"sip_dialogs.sip_to_user, "
"sip_dialogs.sip_to_host, "
"sip_presence.status,"
"sip_presence.rpid,"
"sip_dialogs.presence_id, "
"sip_presence.open_closed,"
"'%q','%q' "
"from sip_registrations "
"
from sip_registrations
left join sip_dialogs on "
"left join sip_dialogs on "
"sip_dialogs.presence_id = sip_registrations.sip_user || '@' || sip_registrations.sip_host "
"or (sip_dialogs.sip_from_user = sip_registrations.sip_user "
"and sip_dialogs.sip_from_host = sip_registrations.sip_host) "
...
...
@@ -813,7 +816,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
sql
=
switch_mprintf
(
"select status,rpid from sip_dialogs where ((sip_from_user='%q' and sip_from_host='%q') or presence_id='%q@%q')"
,
sql
=
switch_mprintf
(
"select status,rpid
,presence_id
from sip_dialogs where ((sip_from_user='%q' and sip_from_host='%q') or presence_id='%q@%q')"
,
euser
,
host
,
euser
,
host
);
sofia_glue_execute_sql_callback
(
profile
,
profile
->
ireg_mutex
,
sql
,
sofia_presence_dialog_callback
,
&
dh
);
switch_safe_free
(
sql
);
...
...
@@ -824,25 +827,19 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
"sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,"
"sip_subscriptions.accept,sip_subscriptions.profile_name"
",'%q','%q','%q',sip_presence.status,sip_presence.rpid,sip_presence.open_closed,'%q','%q',"
"sip_subscriptions.version,
sip_dialogs.presence_id
"
"sip_subscriptions.version,
'%q'
"
"from sip_subscriptions "
"left join sip_presence on "
"(sip_subscriptions.sub_to_user=sip_presence.sip_user and sip_subscriptions.sub_to_host=sip_presence.sip_host and "
"sip_subscriptions.profile_name=sip_presence.profile_name) "
"left join sip_dialogs on "
"sip_dialogs.presence_id = sip_subscriptions.sub_to_user || '@' || sip_subscriptions.sub_to_host or "
"(sip_dialogs.sip_from_user = sip_subscriptions.sub_to_user "
"and sip_dialogs.sip_from_host = sip_subscriptions.sub_to_host) "
"where sip_subscriptions.expires > -1 and "
"(event='%q' or event='%q') and sub_to_user='%q' "
"and (sub_to_host='%q' or presence_hosts like '%%%q%%') "
"and (sip_subscriptions.profile_name = '%q' or sip_subscriptions.presence_hosts != sip_subscriptions.sub_to_host)"
,
switch_str_nil
(
status
),
switch_str_nil
(
rpid
),
host
,
dh
.
status
,
dh
.
rpid
,
"and (sip_subscriptions.profile_name = '%q' or sip_subscriptions.presence_hosts != sip_subscriptions.sub_to_host) "
,
switch_str_nil
(
status
),
switch_str_nil
(
rpid
),
host
,
dh
.
status
,
dh
.
rpid
,
dh
.
presence_id
,
event_type
,
alt_event_type
,
euser
,
host
,
host
,
profile
->
name
)))
{
struct
presence_helper
helper
=
{
0
};
...
...
src/switch_ivr_bridge.c
浏览文件 @
665b12b1
...
...
@@ -1052,8 +1052,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
switch_channel_set_variable
(
caller_channel
,
"signal_bridge"
,
"true"
);
switch_channel_set_variable
(
peer_channel
,
"signal_bridge"
,
"true"
);
switch_channel_sort_cid
(
peer_channel
,
SWITCH_FALSE
);
/* fire events that will change the data table from "show channels" */
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_CHANNEL_EXECUTE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_channel_event_set_data
(
caller_channel
,
event
);
...
...
@@ -1119,8 +1117,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
switch_channel_set_flag_recursive
(
caller_channel
,
CF_BRIDGE_ORIGINATOR
);
switch_channel_clear_flag
(
peer_channel
,
CF_BRIDGE_ORIGINATOR
);
switch_channel_sort_cid
(
peer_channel
,
SWITCH_FALSE
);
b_leg
->
session
=
peer_session
;
switch_copy_string
(
b_leg
->
b_uuid
,
switch_core_session_get_uuid
(
session
),
sizeof
(
b_leg
->
b_uuid
));
b_leg
->
stream_id
=
stream_id
;
...
...
src/switch_ivr_originate.c
浏览文件 @
665b12b1
...
...
@@ -2410,6 +2410,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
}
new_profile
->
callee_id_name
=
switch_core_strdup
(
new_profile
->
pool
,
"Outbound Call"
);
new_profile
->
callee_id_number
=
switch_core_strdup
(
new_profile
->
pool
,
new_profile
->
destination_number
);
originate_status
[
i
].
caller_profile
=
NULL
;
originate_status
[
i
].
peer_channel
=
NULL
;
originate_status
[
i
].
peer_session
=
NULL
;
...
...
w32/Library/FreeSwitchCore.2010.vcxproj
浏览文件 @
665b12b1
...
...
@@ -120,8 +120,7 @@
<RandomizedBaseAddress>
false
</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>
</ImportLibrary>
<ImportLibrary>
$(OutDir)FreeSwitchCore.lib
</ImportLibrary>
<TargetMachine>
MachineX86
</TargetMachine>
<ShowProgress>
</ShowProgress>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论