Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e3856f92
提交
e3856f92
authored
5月 11, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1434
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
174ad6ed
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
7 行删除
+8
-7
mod_exosip.c
src/mod/endpoints/mod_exosip/mod_exosip.c
+8
-7
没有找到文件。
src/mod/endpoints/mod_exosip/mod_exosip.c
浏览文件 @
e3856f92
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#include <osip2/osip_mt.h>
#include <osip2/osip_mt.h>
#include <osip_rfc3264.h>
#include <osip_rfc3264.h>
#include <osipparser2/osip_port.h>
#include <osipparser2/osip_port.h>
#define DBFILE "exosip.db"
static
const
char
modname
[]
=
"mod_exosip"
;
static
const
char
modname
[]
=
"mod_exosip"
;
#define STRLEN 15
#define STRLEN 15
...
@@ -928,11 +928,12 @@ static char *find_reg_url(switch_core_db_t *db, char *key, char *val, switch_siz
...
@@ -928,11 +928,12 @@ static char *find_reg_url(switch_core_db_t *db, char *key, char *val, switch_siz
if
(
db
)
{
if
(
db
)
{
udb
=
db
;
udb
=
db
;
}
else
{
}
else
{
udb
=
switch_core_db_
handle
(
);
udb
=
switch_core_db_
open_file
(
DBFILE
);
}
}
cbt
.
val
=
val
;
cbt
.
val
=
val
;
cbt
.
len
=
len
;
cbt
.
len
=
len
;
switch_mutex_lock
(
globals
.
reg_mutex
);
snprintf
(
val
,
len
,
"select url from sip_registrations where key='%s'"
,
key
);
snprintf
(
val
,
len
,
"select url from sip_registrations where key='%s'"
,
key
);
switch_core_db_exec
(
udb
,
val
,
find_callback
,
&
cbt
,
&
errmsg
);
switch_core_db_exec
(
udb
,
val
,
find_callback
,
&
cbt
,
&
errmsg
);
...
@@ -945,6 +946,7 @@ static char *find_reg_url(switch_core_db_t *db, char *key, char *val, switch_siz
...
@@ -945,6 +946,7 @@ static char *find_reg_url(switch_core_db_t *db, char *key, char *val, switch_siz
if
(
!
db
)
{
if
(
!
db
)
{
switch_core_db_close
(
udb
);
switch_core_db_close
(
udb
);
}
}
switch_mutex_unlock
(
globals
.
reg_mutex
);
return
cbt
.
matches
?
val
:
NULL
;
return
cbt
.
matches
?
val
:
NULL
;
}
}
...
@@ -996,12 +998,12 @@ static switch_status_t exosip_outgoing_channel(switch_core_session_t *session, s
...
@@ -996,12 +998,12 @@ static switch_status_t exosip_outgoing_channel(switch_core_session_t *session, s
caller_profile
=
switch_caller_profile_clone
(
*
new_session
,
outbound_profile
);
caller_profile
=
switch_caller_profile_clone
(
*
new_session
,
outbound_profile
);
switch_mutex_lock
(
globals
.
reg_mutex
);
if
(
!
strchr
(
caller_profile
->
destination_number
,
'@'
)
&&
(
url
=
find_reg_url
(
NULL
,
caller_profile
->
destination_number
,
tmp
,
sizeof
(
tmp
))))
{
if
(
!
strchr
(
caller_profile
->
destination_number
,
'@'
)
&&
(
url
=
find_reg_url
(
NULL
,
caller_profile
->
destination_number
,
tmp
,
sizeof
(
tmp
))))
{
caller_profile
->
rdnis
=
switch_core_session_strdup
(
*
new_session
,
caller_profile
->
destination_number
);
caller_profile
->
rdnis
=
switch_core_session_strdup
(
*
new_session
,
caller_profile
->
destination_number
);
caller_profile
->
destination_number
=
switch_core_session_strdup
(
*
new_session
,
url
);
caller_profile
->
destination_number
=
switch_core_session_strdup
(
*
new_session
,
url
);
}
}
switch_mutex_unlock
(
globals
.
reg_mutex
);
switch_channel_set_caller_profile
(
channel
,
caller_profile
);
switch_channel_set_caller_profile
(
channel
,
caller_profile
);
tech_pvt
->
caller_profile
=
caller_profile
;
tech_pvt
->
caller_profile
=
caller_profile
;
...
@@ -1040,7 +1042,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
...
@@ -1040,7 +1042,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
/* NOTE: **interface is **_interface because the common lib redefines interface to struct in some situations */
/* NOTE: **interface is **_interface because the common lib redefines interface to struct in some situations */
if
((
globals
.
db
=
switch_core_db_
handle
(
)))
{
if
((
globals
.
db
=
switch_core_db_
open_file
(
DBFILE
)))
{
switch_core_db_test_reactive
(
globals
.
db
,
"select * from sip_registrations"
,
create_interfaces_sql
);
switch_core_db_test_reactive
(
globals
.
db
,
"select * from sip_registrations"
,
create_interfaces_sql
);
}
else
{
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"Cannot Open SQL Database!
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"Cannot Open SQL Database!
\n
"
);
...
@@ -1505,7 +1507,6 @@ static void handle_message_new(eXosip_event_t *je)
...
@@ -1505,7 +1507,6 @@ static void handle_message_new(eXosip_event_t *je)
je
->
request
->
from
->
url
->
username
);
je
->
request
->
from
->
url
->
username
);
}
}
printf
(
"TEST [%s]
\n
"
,
sql
);
switch_mutex_lock
(
globals
.
reg_mutex
);
switch_mutex_lock
(
globals
.
reg_mutex
);
switch_core_db_persistant_execute
(
globals
.
db
,
sql
,
25
);
switch_core_db_persistant_execute
(
globals
.
db
,
sql
,
25
);
switch_mutex_unlock
(
globals
.
reg_mutex
);
switch_mutex_unlock
(
globals
.
reg_mutex
);
...
@@ -1936,7 +1937,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
...
@@ -1936,7 +1937,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
eXosip_event_t
*
event
=
NULL
;
eXosip_event_t
*
event
=
NULL
;
switch_event_t
*
s_event
;
switch_event_t
*
s_event
;
time_t
now
=
0
,
next
=
0
;
time_t
now
=
0
,
next
=
0
;
int
interval
=
6
0
;
int
interval
=
3
0
;
config_exosip
(
0
);
config_exosip
(
0
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论