Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
a05f5b93
Commit
a05f5b93
authored
4 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
callmodel: avoid to hold detached calls
Change-Id: I79f48e08e62e8a9dfdc28b2f2e4f89ea4b6f4ba0
parent
49f5f63e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/api/account.h
+1
-0
1 addition, 0 deletions
src/api/account.h
src/newaccountmodel.cpp
+2
-0
2 additions, 0 deletions
src/newaccountmodel.cpp
src/newcallmodel.cpp
+16
-1
16 additions, 1 deletion
src/newcallmodel.cpp
with
19 additions
and
1 deletion
src/api/account.h
+
1
−
0
View file @
a05f5b93
...
...
@@ -96,6 +96,7 @@ struct ConfProperties_t {
QString
mailbox
;
QString
dtmfType
;
bool
autoAnswer
;
bool
isRendezVous
;
int
activeCallLimit
;
QString
hostname
;
QString
username
;
...
...
This diff is collapsed.
Click to expand it.
src/newaccountmodel.cpp
+
2
−
0
View file @
a05f5b93
...
...
@@ -738,6 +738,7 @@ account::Info::fromDetails(const MapStringString& details)
confProperties
.
mailbox
=
details
[
ConfProperties
::
MAILBOX
];
confProperties
.
dtmfType
=
details
[
ConfProperties
::
DTMF_TYPE
];
confProperties
.
autoAnswer
=
toBool
(
details
[
ConfProperties
::
AUTOANSWER
]);
confProperties
.
isRendezVous
=
toBool
(
details
[
ConfProperties
::
ISRENDEZVOUS
]);
confProperties
.
activeCallLimit
=
toInt
(
details
[
ConfProperties
::
ACTIVE_CALL_LIMIT
]);
confProperties
.
hostname
=
details
[
ConfProperties
::
HOSTNAME
];
profileInfo
.
uri
=
(
profileInfo
.
type
==
profile
::
Type
::
RING
and
details
[
ConfProperties
::
USERNAME
].
contains
(
"ring:"
))
...
...
@@ -844,6 +845,7 @@ account::ConfProperties_t::toDetails() const
details
[
ConfProperties
::
MAILBOX
]
=
this
->
mailbox
;
details
[
ConfProperties
::
DTMF_TYPE
]
=
this
->
dtmfType
;
details
[
ConfProperties
::
AUTOANSWER
]
=
toQString
(
this
->
autoAnswer
);
details
[
ConfProperties
::
ISRENDEZVOUS
]
=
toQString
(
this
->
isRendezVous
);
details
[
ConfProperties
::
ACTIVE_CALL_LIMIT
]
=
toQString
(
this
->
activeCallLimit
);
details
[
ConfProperties
::
HOSTNAME
]
=
this
->
hostname
;
details
[
ConfProperties
::
ROUTE
]
=
this
->
routeset
;
...
...
This diff is collapsed.
Click to expand it.
src/newcallmodel.cpp
+
16
−
1
View file @
a05f5b93
...
...
@@ -39,6 +39,7 @@
// Ring daemon
#include
<media_const.h>
#include
<account_const.h>
// Qt
#include
<QObject>
...
...
@@ -614,7 +615,12 @@ NewCallModel::setCurrentCall(const QString& callId) const
for
(
const
auto
&
cid
:
Lrc
::
activeCalls
())
{
auto
filtered
=
std
::
find
(
filterCalls
.
begin
(),
filterCalls
.
end
(),
cid
)
!=
filterCalls
.
end
();
if
(
cid
!=
callId
&&
!
filtered
)
{
CallManager
::
instance
().
hold
(
cid
);
// Only hold calls for a non rendez-vous point
MapStringString
callDetails
=
CallManager
::
instance
().
getCallDetails
(
callId
);
auto
accountId
=
callDetails
[
"ACCOUNTID"
];
MapStringString
detailsMap
=
ConfigurationManager
::
instance
().
getAccountDetails
(
accountId
);
if
(
detailsMap
[
DRing
::
Account
::
ConfProperties
::
ISRENDEZVOUS
]
==
"FALSE"
)
CallManager
::
instance
().
hold
(
cid
);
}
}
if
(
!
lrc
::
api
::
Lrc
::
holdConferences
)
{
...
...
@@ -622,6 +628,10 @@ NewCallModel::setCurrentCall(const QString& callId) const
}
for
(
const
auto
&
confId
:
conferences
)
{
if
(
callId
!=
confId
)
{
MapStringString
confDetails
=
CallManager
::
instance
().
getConferenceDetails
(
confId
);
// Only hold conference if attached
if
(
confDetails
[
"CALL_STATE"
]
==
"ACTIVE_DETACHED"
)
continue
;
QStringList
callList
=
CallManager
::
instance
().
getParticipantList
(
confId
);
if
(
callList
.
indexOf
(
callId
)
==
-
1
)
CallManager
::
instance
().
holdConference
(
confId
);
...
...
@@ -684,6 +694,11 @@ NewCallModelPimpl::slotIncomingCall(const QString& accountId, const QString& cal
if
(
linked
.
owner
.
id
!=
accountId
)
{
return
;
}
if
(
linked
.
owner
.
confProperties
.
isRendezVous
)
{
// Do not notify for calls if rendez vous because it's in a detached
// mode and auto answer is managed by the daemon
return
;
}
// do not use auto here (QDBusPendingReply<MapStringString>)
MapStringString
callDetails
=
CallManager
::
instance
().
getCallDetails
(
callId
);
...
...
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