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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
31968806
Commit
31968806
authored
11 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #28529: sip: RTP ports now controllable via D-Bus
parent
d89e6b50
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
daemon/src/account_schema.h
+4
-0
4 additions, 0 deletions
daemon/src/account_schema.h
daemon/src/sip/sipaccount.cpp
+31
-0
31 additions, 0 deletions
daemon/src/sip/sipaccount.cpp
gnome/src/account_schema.h
+6
-1
6 additions, 1 deletion
gnome/src/account_schema.h
with
41 additions
and
1 deletion
daemon/src/account_schema.h
+
4
−
0
View file @
31968806
...
...
@@ -67,6 +67,10 @@ static const char *const CONFIG_ACCOUNT_PASSWORD = "Account.passw
static
const
char
*
const
CONFIG_ACCOUNT_REALM
=
"Account.realm"
;
static
const
char
*
const
CONFIG_ACCOUNT_DEFAULT_REALM
=
"*"
;
static
const
char
*
const
CONFIG_ACCOUNT_USERAGENT
=
"Account.useragent"
;
static
const
char
*
const
CONFIG_ACCOUNT_AUDIO_PORT_MIN
=
"Account.audioPortMin"
;
static
const
char
*
const
CONFIG_ACCOUNT_AUDIO_PORT_MAX
=
"Account.audioPortMax"
;
static
const
char
*
const
CONFIG_ACCOUNT_VIDEO_PORT_MIN
=
"Account.videoPortMin"
;
static
const
char
*
const
CONFIG_ACCOUNT_VIDEO_PORT_MAX
=
"Account.videoPortMax"
;
static
const
char
*
const
CONFIG_LOCAL_INTERFACE
=
"Account.localInterface"
;
static
const
char
*
const
CONFIG_INTERFACE
=
"Account.interface"
;
...
...
This diff is collapsed.
Click to expand it.
daemon/src/sip/sipaccount.cpp
+
31
−
0
View file @
31968806
...
...
@@ -577,6 +577,21 @@ void SIPAccount::setAccountDetails(std::map<std::string, std::string> details)
userAgent_
=
details
[
CONFIG_ACCOUNT_USERAGENT
];
keepAliveEnabled_
=
details
[
CONFIG_KEEP_ALIVE_ENABLED
]
==
TRUE_STR
;
int
tmp
=
atoi
(
details
[
CONFIG_ACCOUNT_AUDIO_PORT_MIN
].
c_str
());
if
(
tmp
>
0
)
audioPortRange_
.
first
=
tmp
;
tmp
=
atoi
(
details
[
CONFIG_ACCOUNT_AUDIO_PORT_MAX
].
c_str
());
if
(
tmp
>
0
)
audioPortRange_
.
second
=
tmp
;
#ifdef SFL_VIDEO
tmp
=
atoi
(
details
[
CONFIG_ACCOUNT_VIDEO_PORT_MIN
].
c_str
());
if
(
tmp
>
0
)
videoPortRange_
.
first
=
tmp
;
tmp
=
atoi
(
details
[
CONFIG_ACCOUNT_VIDEO_PORT_MAX
].
c_str
());
if
(
tmp
>
0
)
videoPortRange_
.
second
=
tmp
;
#endif
// srtp settings
srtpEnabled_
=
details
[
CONFIG_SRTP_ENABLE
]
==
TRUE_STR
;
srtpFallback_
=
details
[
CONFIG_SRTP_RTP_FALLBACK
]
==
TRUE_STR
;
...
...
@@ -632,6 +647,17 @@ static std::string retrievePassword(const std::map<std::string, std::string>& ma
return
""
;
}
void
addRangeToDetails
(
std
::
map
<
std
::
string
,
std
::
string
>
&
a
,
const
char
*
minKey
,
const
char
*
maxKey
,
const
std
::
pair
<
uint16_t
,
uint16_t
>
&
range
)
{
std
::
ostringstream
os
;
os
<<
range
.
first
;
a
[
minKey
]
=
os
.
str
();
os
.
str
(
""
);
os
<<
range
.
second
;
a
[
maxKey
]
=
os
.
str
();
}
std
::
map
<
std
::
string
,
std
::
string
>
SIPAccount
::
getAccountDetails
()
const
{
std
::
map
<
std
::
string
,
std
::
string
>
a
;
...
...
@@ -685,6 +711,11 @@ std::map<std::string, std::string> SIPAccount::getAccountDetails() const
a
[
CONFIG_ACCOUNT_ROUTESET
]
=
serviceRoute_
;
a
[
CONFIG_ACCOUNT_USERAGENT
]
=
userAgent_
;
addRangeToDetails
(
a
,
CONFIG_ACCOUNT_AUDIO_PORT_MIN
,
CONFIG_ACCOUNT_AUDIO_PORT_MAX
,
audioPortRange_
);
#ifdef SFL_VIDEO
addRangeToDetails
(
a
,
CONFIG_ACCOUNT_VIDEO_PORT_MIN
,
CONFIG_ACCOUNT_VIDEO_PORT_MAX
,
videoPortRange_
);
#endif
std
::
stringstream
registrationExpireStr
;
registrationExpireStr
<<
registrationExpire_
;
a
[
CONFIG_ACCOUNT_REGISTRATION_EXPIRE
]
=
registrationExpireStr
.
str
();
...
...
This diff is collapsed.
Click to expand it.
gnome/src/account_schema.h
+
6
−
1
View file @
31968806
...
...
@@ -45,6 +45,7 @@ static const char *const CONFIG_ACCOUNT_TYPE = "Account.type"
static
const
char
*
const
CONFIG_ACCOUNT_ALIAS
=
"Account.alias"
;
static
const
char
*
const
CONFIG_ACCOUNT_MAILBOX
=
"Account.mailbox"
;
static
const
char
*
const
CONFIG_ACCOUNT_ENABLE
=
"Account.enable"
;
static
const
char
*
const
CONFIG_ACCOUNT_AUTOANSWER
=
"Account.autoAnswer"
;
static
const
char
*
const
CONFIG_ACCOUNT_REGISTRATION_EXPIRE
=
"Account.registrationExpire"
;
static
const
char
*
const
CONFIG_ACCOUNT_REGISTRATION_STATUS
=
"Account.registrationStatus"
;
static
const
char
*
const
CONFIG_ACCOUNT_REGISTRATION_STATE_CODE
=
"Account.registrationCode"
;
...
...
@@ -57,6 +58,7 @@ static const char *const CONFIG_KEEP_ALIVE_ENABLED = "Account.keepA
static
const
char
*
const
CONFIG_DEFAULT_REGISTRATION_EXPIRE
=
"60"
;
static
const
char
*
const
CONFIG_DEFAULT_RINGTONE_ENABLED
=
"true"
;
static
const
char
*
const
CONFIG_ACCOUNT_HOSTNAME
=
"Account.hostname"
;
static
const
char
*
const
CONFIG_ACCOUNT_USERNAME
=
"Account.username"
;
...
...
@@ -65,7 +67,10 @@ static const char *const CONFIG_ACCOUNT_PASSWORD = "Account.passw
static
const
char
*
const
CONFIG_ACCOUNT_REALM
=
"Account.realm"
;
static
const
char
*
const
CONFIG_ACCOUNT_DEFAULT_REALM
=
"*"
;
static
const
char
*
const
CONFIG_ACCOUNT_USERAGENT
=
"Account.useragent"
;
static
const
char
*
const
CONFIG_ACCOUNT_AUTOANSWER
=
"Account.autoAnswer"
;
static
const
char
*
const
CONFIG_ACCOUNT_AUDIO_PORT_MIN
=
"Account.audioPortMin"
;
static
const
char
*
const
CONFIG_ACCOUNT_AUDIO_PORT_MAX
=
"Account.audioPortMax"
;
static
const
char
*
const
CONFIG_ACCOUNT_VIDEO_PORT_MIN
=
"Account.videoPortMin"
;
static
const
char
*
const
CONFIG_ACCOUNT_VIDEO_PORT_MAX
=
"Account.videoPortMax"
;
static
const
char
*
const
CONFIG_LOCAL_INTERFACE
=
"Account.localInterface"
;
static
const
char
*
const
CONFIG_INTERFACE
=
"Account.interface"
;
...
...
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