Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9e9695a3
提交
9e9695a3
authored
12月 14, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sip is fun
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@6774
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
460298ff
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
52 行增加
和
17 行删除
+52
-17
console.conf.xml
conf/autoload_configs/console.conf.xml
+1
-1
config.h.in
libs/curl/lib/config.h.in
+5
-5
mod_voicemail.c
src/mod/applications/mod_voicemail/mod_voicemail.c
+32
-2
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+2
-2
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+12
-7
没有找到文件。
conf/autoload_configs/console.conf.xml
浏览文件 @
9e9695a3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
name can be a file name, function name or 'all'
name can be a file name, function name or 'all'
value is one or more of debug,info,notice,warning,err,crit,alert,all
value is one or more of debug,info,notice,warning,err,crit,alert,all
-->
-->
<map
name=
"all"
value=
"info,notice,warning,err,crit,alert"
/>
<map
name=
"all"
value=
"
debug,
info,notice,warning,err,crit,alert"
/>
</mappings>
</mappings>
<settings>
<settings>
<!-- comment or set to false for no color logging -->
<!-- comment or set to false for no color logging -->
...
...
libs/curl/lib/config.h.in
浏览文件 @
9e9695a3
...
@@ -621,16 +621,16 @@
...
@@ -621,16 +621,16 @@
/* Define to the function return type for send. */
/* Define to the function return type for send. */
#undef SEND_TYPE_RETV
#undef SEND_TYPE_RETV
/* The size of `curl_off_t', as computed by sizeof. */
/* The size of
a
`curl_off_t', as computed by sizeof. */
#undef SIZEOF_CURL_OFF_T
#undef SIZEOF_CURL_OFF_T
/* The size of `long', as computed by sizeof. */
/* The size of
a
`long', as computed by sizeof. */
#undef SIZEOF_LONG
#undef SIZEOF_LONG
/* The size of `size_t', as computed by sizeof. */
/* The size of
a
`size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
#undef SIZEOF_SIZE_T
/* The size of `time_t', as computed by sizeof. */
/* The size of
a
`time_t', as computed by sizeof. */
#undef SIZEOF_TIME_T
#undef SIZEOF_TIME_T
/* Define to 1 if you have the ANSI C header files. */
/* Define to 1 if you have the ANSI C header files. */
...
@@ -685,7 +685,7 @@
...
@@ -685,7 +685,7 @@
/* type to use in place of in_addr_t if not defined */
/* type to use in place of in_addr_t if not defined */
#undef in_addr_t
#undef in_addr_t
/* Define to `unsigned
int
' if <sys/types.h> does not define. */
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
#undef size_t
/* type to use in place of socklen_t if not defined */
/* type to use in place of socklen_t if not defined */
...
...
src/mod/applications/mod_voicemail/mod_voicemail.c
浏览文件 @
9e9695a3
...
@@ -1361,6 +1361,8 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
...
@@ -1361,6 +1361,8 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
listen_callback_t
cbt
;
listen_callback_t
cbt
;
char
sql
[
256
];
char
sql
[
256
];
int
cur_message
,
total_messages
;
int
cur_message
,
total_messages
;
switch_event_t
*
event
;
message_count
(
profile
,
myid
,
domain_name
,
myfolder
,
&
total_new_messages
,
&
total_saved_messages
,
message_count
(
profile
,
myid
,
domain_name
,
myfolder
,
&
total_new_messages
,
&
total_saved_messages
,
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
memset
(
&
cbt
,
0
,
sizeof
(
cbt
));
memset
(
&
cbt
,
0
,
sizeof
(
cbt
));
...
@@ -1402,6 +1404,26 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
...
@@ -1402,6 +1404,26 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
switch_snprintf
(
sql
,
sizeof
(
sql
),
"delete from voicemail_data where user='%s' and domain='%s' and flags='delete'"
,
myid
,
domain_name
);
switch_snprintf
(
sql
,
sizeof
(
sql
),
"delete from voicemail_data where user='%s' and domain='%s' and flags='delete'"
,
myid
,
domain_name
);
vm_execute_sql
(
profile
,
sql
,
profile
->
mutex
);
vm_execute_sql
(
profile
,
sql
,
profile
->
mutex
);
vm_check_state
=
VM_CHECK_FOLDER_SUMMARY
;
vm_check_state
=
VM_CHECK_FOLDER_SUMMARY
;
message_count
(
profile
,
id
,
domain_name
,
myfolder
,
&
total_new_messages
,
&
total_saved_messages
,
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_MESSAGE_WAITING
)
==
SWITCH_STATUS_SUCCESS
)
{
char
*
mwi_id
;
const
char
*
yn
=
"no"
;
if
(
total_new_messages
||
total_saved_messages
||
total_new_urgent_messages
||
total_saved_urgent_messages
)
{
yn
=
"yes"
;
}
mwi_id
=
switch_mprintf
(
"%s@%s"
,
myid
,
domain_name
);
switch_assert
(
mwi_id
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Messages-Waiting"
,
"%s"
,
yn
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Message-Account"
,
mwi_id
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Voice-Message"
,
"%d/%d (%d/%d)"
,
total_new_messages
,
total_saved_messages
,
total_new_urgent_messages
,
total_saved_urgent_messages
);
switch_event_fire
(
&
event
);
switch_safe_free
(
mwi_id
);
}
}
}
break
;
break
;
case
VM_CHECK_CONFIG
:
case
VM_CHECK_CONFIG
:
...
@@ -1907,8 +1929,12 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
...
@@ -1907,8 +1929,12 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_MESSAGE_WAITING
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_MESSAGE_WAITING
)
==
SWITCH_STATUS_SUCCESS
)
{
const
char
*
yn
=
"no"
;
if
(
total_new_messages
||
total_saved_messages
||
total_new_urgent_messages
||
total_saved_urgent_messages
)
{
yn
=
"yes"
;
}
mwi_id
=
switch_mprintf
(
"%s@%s"
,
id
,
domain_name
);
mwi_id
=
switch_mprintf
(
"%s@%s"
,
id
,
domain_name
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Messages-Waiting"
,
"
yes"
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Messages-Waiting"
,
"
%s"
,
yn
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Message-Account"
,
mwi_id
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Message-Account"
,
mwi_id
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Voice-Message"
,
"%d/%d (%d/%d)"
,
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"MWI-Voice-Message"
,
"%d/%d (%d/%d)"
,
total_new_messages
,
total_saved_messages
,
total_new_urgent_messages
,
total_saved_urgent_messages
);
total_new_messages
,
total_saved_messages
,
total_new_urgent_messages
,
total_saved_urgent_messages
);
...
@@ -2163,7 +2189,11 @@ static void message_query_handler(switch_event_t *event)
...
@@ -2163,7 +2189,11 @@ static void message_query_handler(switch_event_t *event)
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
&
total_new_urgent_messages
,
&
total_saved_urgent_messages
);
if
(
total_new_messages
||
total_saved_messages
)
{
if
(
total_new_messages
||
total_saved_messages
)
{
if
(
switch_event_create
(
&
new_event
,
SWITCH_EVENT_MESSAGE_WAITING
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_event_create
(
&
new_event
,
SWITCH_EVENT_MESSAGE_WAITING
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_event_add_header
(
new_event
,
SWITCH_STACK_BOTTOM
,
"MWI-Messages-Waiting"
,
"yes"
);
const
char
*
yn
=
"no"
;
if
(
total_new_messages
||
total_saved_messages
||
total_new_urgent_messages
||
total_saved_urgent_messages
)
{
yn
=
"yes"
;
}
switch_event_add_header
(
new_event
,
SWITCH_STACK_BOTTOM
,
"MWI-Messages-Waiting"
,
"%s"
,
yn
);
switch_event_add_header
(
new_event
,
SWITCH_STACK_BOTTOM
,
"MWI-Message-Account"
,
account
);
switch_event_add_header
(
new_event
,
SWITCH_STACK_BOTTOM
,
"MWI-Message-Account"
,
account
);
switch_event_add_header
(
new_event
,
SWITCH_STACK_BOTTOM
,
"MWI-Voice-Message"
,
"%d/%d (%d/%d)"
,
switch_event_add_header
(
new_event
,
SWITCH_STACK_BOTTOM
,
"MWI-Voice-Message"
,
"%d/%d (%d/%d)"
,
total_new_messages
,
total_saved_messages
,
total_new_urgent_messages
,
total_saved_urgent_messages
);
total_new_messages
,
total_saved_messages
,
total_new_urgent_messages
,
total_saved_urgent_messages
);
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
9e9695a3
...
@@ -1736,7 +1736,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
...
@@ -1736,7 +1736,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
switch_odbc_handle_exec
(
profile
->
master_odbc
,
reg_sql
,
NULL
);
switch_odbc_handle_exec
(
profile
->
master_odbc
,
reg_sql
,
NULL
);
}
}
if
(
switch_odbc_handle_exec
(
profile
->
master_odbc
,
"
select * from sip_subscriptions where sip_user =
= ''"
,
NULL
)
!=
SWITCH_ODBC_SUCCESS
)
{
if
(
switch_odbc_handle_exec
(
profile
->
master_odbc
,
"
delete from sip_subscriptions where sip_user !
= ''"
,
NULL
)
!=
SWITCH_ODBC_SUCCESS
)
{
switch_odbc_handle_exec
(
profile
->
master_odbc
,
"DROP TABLE sip_subscriptions"
,
NULL
);
switch_odbc_handle_exec
(
profile
->
master_odbc
,
"DROP TABLE sip_subscriptions"
,
NULL
);
switch_odbc_handle_exec
(
profile
->
master_odbc
,
sub_sql
,
NULL
);
switch_odbc_handle_exec
(
profile
->
master_odbc
,
sub_sql
,
NULL
);
}
}
...
@@ -1754,7 +1754,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
...
@@ -1754,7 +1754,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
}
}
switch_core_db_test_reactive
(
profile
->
master_db
,
"select sip_user from sip_registrations"
,
"DROP TABLE sip_registrations"
,
reg_sql
);
switch_core_db_test_reactive
(
profile
->
master_db
,
"select sip_user from sip_registrations"
,
"DROP TABLE sip_registrations"
,
reg_sql
);
switch_core_db_test_reactive
(
profile
->
master_db
,
"
select * from sip_subscriptions where sip_user =
= ''"
,
"DROP TABLE sip_subscriptions"
,
sub_sql
);
switch_core_db_test_reactive
(
profile
->
master_db
,
"
delete * from sip_subscriptions where sip_user !
= ''"
,
"DROP TABLE sip_subscriptions"
,
sub_sql
);
switch_core_db_test_reactive
(
profile
->
master_db
,
"select * from sip_authentication"
,
"DROP TABLE sip_authentication"
,
auth_sql
);
switch_core_db_test_reactive
(
profile
->
master_db
,
"select * from sip_authentication"
,
"DROP TABLE sip_authentication"
,
auth_sql
);
}
}
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
9e9695a3
...
@@ -647,7 +647,7 @@ static int sofia_presence_mwi_callback(void *pArg, int argc, char **argv, char *
...
@@ -647,7 +647,7 @@ static int sofia_presence_mwi_callback(void *pArg, int argc, char **argv, char *
nua_handle_t
*
nh
;
nua_handle_t
*
nh
;
int
expire_sec
=
atoi
(
expires
);
int
expire_sec
=
atoi
(
expires
);
int
*
total
=
(
int
*
)
pArg
;
int
*
total
=
(
int
*
)
pArg
;
if
(
!
(
profile
=
sofia_glue_find_profile
(
sub_to_host
)))
{
if
(
!
(
profile
=
sofia_glue_find_profile
(
sub_to_host
)))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cannot find profile for host %s
\n
"
,
sub_to_host
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cannot find profile for host %s
\n
"
,
sub_to_host
);
return
0
;
return
0
;
...
@@ -673,7 +673,7 @@ static int sofia_presence_mwi_callback(void *pArg, int argc, char **argv, char *
...
@@ -673,7 +673,7 @@ static int sofia_presence_mwi_callback(void *pArg, int argc, char **argv, char *
switch_safe_free
(
exp
);
switch_safe_free
(
exp
);
sofia_glue_release_profile
(
profile
);
sofia_glue_release_profile
(
profile
);
*
total
++
;
(
*
total
)
++
;
return
0
;
return
0
;
}
}
...
@@ -689,27 +689,32 @@ static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char
...
@@ -689,27 +689,32 @@ static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char
sofia_profile_t
*
profile
=
NULL
;
sofia_profile_t
*
profile
=
NULL
;
char
*
id
=
NULL
;
char
*
id
=
NULL
;
nua_handle_t
*
nh
;
nua_handle_t
*
nh
;
char
*
contact
;
if
(
!
(
profile
=
sofia_glue_find_profile
(
sub_to_host
)))
{
if
(
!
(
profile
=
sofia_glue_find_profile
(
sub_to_host
)))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cannot find profile for host %s
\n
"
,
sub_to_host
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cannot find profile for host %s
\n
"
,
sub_to_host
);
return
0
;
return
0
;
}
}
id
=
switch_mprintf
(
"sip:%s@%s"
,
sub_to_user
,
sub_to_host
);
id
=
switch_mprintf
(
"sip:%s@%s"
,
sub_to_user
,
sub_to_host
);
contact
=
sofia_glue_get_url_from_contact
(
argv
[
3
],
0
);
nh
=
nua_handle
(
profile
->
nua
,
NULL
,
nh
=
nua_handle
(
profile
->
nua
,
NULL
,
NUTAG_URL
(
contact
),
SIPTAG_FROM_STR
(
id
),
SIPTAG_FROM_STR
(
id
),
SIPTAG_TO_STR
(
id
),
SIPTAG_CONTACT_STR
(
profile
->
url
),
TAG_END
());
SIPTAG_TO_STR
(
id
),
SIPTAG_CONTACT_STR
(
profile
->
url
),
TAG_END
());
nua_notify
(
nh
,
nua_notify
(
nh
,
NUTAG_NEWSUB
(
1
),
NUTAG_NEWSUB
(
1
),
SIPTAG_EVENT_STR
(
event
),
SIPTAG_CONTENT_TYPE_STR
(
"application/simple-message-summary"
),
SIPTAG_PAYLOAD_STR
(
body
),
TAG_END
());
SIPTAG_EVENT_STR
(
event
),
SIPTAG_CONTENT_TYPE_STR
(
"application/simple-message-summary"
),
SIPTAG_PAYLOAD_STR
(
body
),
TAG_END
());
switch_safe_free
(
id
);
switch_safe_free
(
id
);
sofia_glue_release_profile
(
profile
);
sofia_glue_release_profile
(
profile
);
return
0
;
return
0
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论