Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flexisip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
flexisip
Commits
e9b7813e
Commit
e9b7813e
authored
Nov 16, 2018
by
Erwan Croze
👋🏻
Committed by
Simon Morlat
Nov 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix binding of conference server
parent
8ea2fb7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
21 deletions
+16
-21
conference-server.cc
src/conference/conference-server.cc
+14
-11
main.cc
src/main.cc
+2
-10
No files found.
src/conference/conference-server.cc
View file @
e9b7813e
...
...
@@ -59,13 +59,15 @@ void ConferenceServer::_init () {
mTransport
=
config
->
get
<
ConfigString
>
(
"transport"
)
->
read
();
if
(
mTransport
.
length
()
>
0
)
{
SofiaAutoHome
mHome
;
sip_contact_t
*
sipContact
=
sip_contact
_make
(
mHome
.
home
(),
mTransport
.
c_str
());
if
(
sipContact
->
m_url
->
url_port
!=
nullptr
)
{
url_t
*
urlTransport
=
url
_make
(
mHome
.
home
(),
mTransport
.
c_str
());
if
(
urlTransport
!=
nullptr
&&
mTransport
.
at
(
0
)
!=
'<'
)
{
int
port
;
istringstream
istr
;
istr
.
str
(
sipContact
->
m_url
->
url_port
);
istr
.
str
(
urlTransport
->
url_port
);
istr
>>
port
;
cTransport
->
setTcpPort
(
port
);
}
else
{
LOGF
(
"ConferenceServer: Your configured conference transport(
\"
%s
\"
) is not an URI.
\n
If you have
\"
<>
\"
in your transport, remove them."
,
mTransport
.
c_str
());
}
}
...
...
@@ -205,11 +207,11 @@ void flexisip::ConferenceServer::bindConference() {
shared_ptr
<
FakeListener
>
listener
=
make_shared
<
FakeListener
>
();
auto
config
=
GenericManager
::
get
()
->
getRoot
()
->
get
<
GenericStruct
>
(
"conference-server"
);
if
(
config
&&
config
->
get
<
ConfigBoolean
>
(
"enabled"
)
->
read
())
{
SofiaAutoHome
home
;
BindingParameters
parameter
;
sip_contact_t
*
sipContact
=
sip_contact_create
(
home
.
home
(),
reinterpret_cast
<
url_string_t
*>
(
url_make
(
home
.
home
(),
mTransport
.
c_str
())),
nullptr
);
url_t
*
from
=
url_make
(
home
.
home
(),
config
->
get
<
ConfigString
>
(
"conference-factory-uri"
)
->
read
().
c_str
());
sip_contact_t
*
sipContact
=
sip_contact_create
(
mHome
.
home
(),
reinterpret_cast
<
const
url_string_t
*>
(
url_make
(
mHome
.
home
(),
mTransport
.
c_str
())),
nullptr
);
url_t
*
from
=
url_make
(
mHome
.
home
(),
config
->
get
<
ConfigString
>
(
"conference-factory-uri"
)
->
read
().
c_str
());
parameter
.
callId
=
"CONFERENCE"
;
parameter
.
path
=
mPath
;
...
...
@@ -232,12 +234,13 @@ void ConferenceServer::bindChatRoom (
const
string
&
gruu
,
const
shared_ptr
<
ContactUpdateListener
>
&
listener
)
{
SofiaAutoHome
home
;
BindingParameters
parameter
;
sip_contact_t
*
sipContact
=
sip_contact_create
(
home
.
home
(),
reinterpret_cast
<
url_string_t
*>
(
url_make
(
home
.
home
(),
contact
.
c_str
())),
(
"+sip.instance=
\"
<"
+
gruu
+
">
\"
"
).
c_str
());
url_t
*
from
=
url_make
(
home
.
home
(),
bindingUrl
.
c_str
());
url_param_add
(
home
.
home
(),
from
,
(
"gr="
+
gruu
).
c_str
());
sip_contact_t
*
sipContact
=
sip_contact_create
(
mHome
.
home
(),
reinterpret_cast
<
const
url_string_t
*>
(
url_make
(
mHome
.
home
(),
contact
.
c_str
())),
su_strdup
(
mHome
.
home
(),
(
"+sip.instance=
\"
<"
+
gruu
+
">
\"
"
).
c_str
()));
url_t
*
from
=
url_make
(
mHome
.
home
(),
bindingUrl
.
c_str
());
url_param_add
(
mHome
.
home
(),
from
,
(
"gr="
+
gruu
).
c_str
());
parameter
.
callId
=
gruu
;
parameter
.
path
=
mPath
;
...
...
@@ -266,7 +269,7 @@ ConferenceServer::Init::Init() {
String
,
"transport"
,
"uri where the conference server must listen."
,
"
<sip:127.0.0.1:6064;transport=tcp>
"
"
sip:127.0.0.1:6064;transport=tcp
"
},
{
String
,
...
...
src/main.cc
View file @
e9b7813e
...
...
@@ -140,16 +140,6 @@ static void flexisip_stop(int signum) {
if
(
root
)
{
su_root_break
(
root
);
}
#if ENABLE_PRESENCE
if
(
presenceServer
)
{
presenceServer
->
stop
();
}
#endif
#if ENABLE_CONFERENCE
if
(
conferenceServer
)
{
conferenceServer
->
stop
();
}
#endif
}
//else nop
}
...
...
@@ -985,10 +975,12 @@ int main(int argc, char *argv[]) {
a
.
reset
();
#ifdef ENABLE_PRESENCE
presence_cli
=
nullptr
;
presenceServer
->
stop
();
presenceServer
.
reset
();
#endif // ENABLE_PRESENCE
#ifdef ENABLE_CONFERENCE
conferenceServer
->
stop
();
conferenceServer
.
reset
();
#endif // ENABLE_CONFERENCE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment