Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9642e9fc
Commit
9642e9fc
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#3170] Update configuration with service routes
parent
7386f03b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/sip/sipaccount.cpp
+9
-3
9 additions, 3 deletions
sflphone-common/src/sip/sipaccount.cpp
sflphone-common/src/sip/sipaccount.h
+1
-0
1 addition, 0 deletions
sflphone-common/src/sip/sipaccount.h
with
10 additions
and
3 deletions
sflphone-common/src/sip/sipaccount.cpp
+
9
−
3
View file @
9642e9fc
...
...
@@ -89,7 +89,7 @@ SIPAccount::SIPAccount (const AccountID& accountID)
,
_publishedIpAddress
(
""
)
,
_localPort
(
atoi
(
DEFAULT_SIP_PORT
))
,
_publishedPort
(
atoi
(
DEFAULT_SIP_PORT
))
,
_serviceRoute
(
""
)
,
_serviceRoute
(
"
192.168.50.90
"
)
,
_tlsListenerPort
(
atoi
(
DEFAULT_SIP_TLS_PORT
))
,
_transportType
(
PJSIP_TRANSPORT_UNSPECIFIED
)
,
_transport
(
NULL
)
...
...
@@ -176,6 +176,7 @@ void SIPAccount::serialize(Conf::YamlEmitter *emitter) {
Conf
::
ScalarNode
interface
(
_interface
);
std
::
stringstream
portstr
;
portstr
<<
_localPort
;
Conf
::
ScalarNode
port
(
portstr
.
str
());
Conf
::
ScalarNode
serviceRoute
(
_serviceRoute
);
Conf
::
ScalarNode
mailbox
(
"97"
);
Conf
::
ScalarNode
publishAddr
(
_publishedIpAddress
);
...
...
@@ -226,10 +227,13 @@ void SIPAccount::serialize(Conf::YamlEmitter *emitter) {
accountmap
.
setKeyValue
(
expireKey
,
&
expire
);
accountmap
.
setKeyValue
(
interfaceKey
,
&
interface
);
accountmap
.
setKeyValue
(
portKey
,
&
port
);
accountmap
.
setKeyValue
(
stunServerKey
,
&
stunServer
);
accountmap
.
setKeyValue
(
stunEnabledKey
,
&
stunEnabled
);
accountmap
.
setKeyValue
(
publishAddrKey
,
&
publishAddr
);
accountmap
.
setKeyValue
(
publishPortKey
,
&
publishPort
);
accountmap
.
setKeyValue
(
sameasLocalKey
,
&
sameasLocal
);
accountmap
.
setKeyValue
(
resolveOnceKey
,
&
resolveOnce
);
accountmap
.
setKeyValue
(
serviceRouteKey
,
&
serviceRoute
);
accountmap
.
setKeyValue
(
dtmfTypeKey
,
&
dtmfType
);
accountmap
.
setKeyValue
(
displayNameKey
,
&
displayName
);
accountmap
.
setKeyValue
(
codecsKey
,
&
codecs
);
...
...
@@ -319,6 +323,8 @@ void SIPAccount::unserialize(Conf::MappingNode *map)
val
=
(
Conf
::
ScalarNode
*
)(
map
->
getValue
(
dtmfTypeKey
));
if
(
val
)
{
val
=
NULL
;
}
// _dtmfType = atoi(val->getValue();
val
=
(
Conf
::
ScalarNode
*
)(
map
->
getValue
(
serviceRouteKey
));
if
(
val
)
{
_serviceRoute
=
val
->
getValue
();
}
// stun enabled
val
=
(
Conf
::
ScalarNode
*
)(
map
->
getValue
(
stunEnabledKey
));
...
...
@@ -489,7 +495,7 @@ void SIPAccount::setAccountDetails(const std::map<std::string, std::string>& det
find_in_map
(
CONFIG_ACCOUNT_REGISTRATION_EXPIRE
,
registrationExpire
)
setDisplayName
(
displayName
);
setRoute
Set
(
routeset
);
set
Service
Route
(
routeset
);
setLocalInterface
(
localInterface
);
setPublishedSameasLocal
((
publishedSameasLocal
.
compare
(
"true"
)
==
0
)
?
true
:
false
);
setPublishedAddress
(
publishedAddress
);
...
...
@@ -628,7 +634,7 @@ std::map<std::string, std::string> SIPAccount::getAccountDetails()
// Add sip specific details
if
(
getType
()
==
"SIP"
)
{
a
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
ROUTESET
,
getRoute
Set
()));
a
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
ROUTESET
,
get
Service
Route
()));
a
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
CONFIG_ACCOUNT_RESOLVE_ONCE
,
isResolveOnce
()
?
"true"
:
"false"
));
a
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
REALM
,
_realm
));
a
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
USERAGENT
,
getUseragent
()));
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sip/sipaccount.h
+
1
−
0
View file @
9642e9fc
...
...
@@ -60,6 +60,7 @@ const Conf::Key publishPortKey("publishPort");
const
Conf
::
Key
sameasLocalKey
(
"sameasLocal"
);
const
Conf
::
Key
resolveOnceKey
(
"resolveOnce"
);
const
Conf
::
Key
dtmfTypeKey
(
"dtmfType"
);
const
Conf
::
Key
serviceRouteKey
(
"serviceRoute"
);
// TODO: write an object to store credential which implement serializable
const
Conf
::
Key
srtpKey
(
"srtp"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment