Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
136
Issues
136
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
66f31c2e
Commit
66f31c2e
authored
May 09, 2011
by
Alexandre Savard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5747: Add recording state for conferences
parent
9209fd46
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
141 additions
and
129 deletions
+141
-129
sflphone-client-gnome/pixmaps/Makefile.am
sflphone-client-gnome/pixmaps/Makefile.am
+4
-1
sflphone-client-gnome/pixmaps/usersAttached.svg
sflphone-client-gnome/pixmaps/usersAttached.svg
+1
-1
sflphone-client-gnome/src/actions.c
sflphone-client-gnome/src/actions.c
+8
-2
sflphone-client-gnome/src/conference_obj.c
sflphone-client-gnome/src/conference_obj.c
+8
-5
sflphone-client-gnome/src/conference_obj.h
sflphone-client-gnome/src/conference_obj.h
+2
-1
sflphone-client-gnome/src/contacts/calltree.c
sflphone-client-gnome/src/contacts/calltree.c
+15
-27
sflphone-client-gnome/src/dbus/dbus.c
sflphone-client-gnome/src/dbus/dbus.c
+12
-4
sflphone-client-gnome/src/uimanager.c
sflphone-client-gnome/src/uimanager.c
+1
-1
sflphone-client-gnome/src/widget/imwidget.c
sflphone-client-gnome/src/widget/imwidget.c
+2
-1
sflphone-common/src/call.cpp
sflphone-common/src/call.cpp
+35
-57
sflphone-common/src/conference.cpp
sflphone-common/src/conference.cpp
+9
-6
sflphone-common/src/conference.h
sflphone-common/src/conference.h
+1
-1
sflphone-common/src/managerimpl.cpp
sflphone-common/src/managerimpl.cpp
+43
-22
No files found.
sflphone-client-gnome/pixmaps/Makefile.am
View file @
66f31c2e
...
...
@@ -33,7 +33,10 @@ buttons_DATA = current.svg \
contact_default.svg
\
face-monkey.svg
\
users.svg
\
usersActive.svg
\
usersAttached.svg
\
usersDetached.svg
\
usersAttachedRec.svg
\
usersDetachedRec.svg
\
home.svg
\
wait-on.gif
\
lock_certified.svg
\
...
...
sflphone-client-gnome/pixmaps/usersA
ctive
.svg
→
sflphone-client-gnome/pixmaps/usersA
ttached
.svg
View file @
66f31c2e
...
...
@@ -15,7 +15,7 @@
sodipodi:version=
"0.32"
inkscape:version=
"0.46"
sodipodi:docbase=
"/home/dobey/Projects/gnome-icon-theme/scalable/apps"
sodipodi:docname=
"usersA
ctive
.svg"
sodipodi:docname=
"usersA
ttached
.svg"
inkscape:export-filename=
"/home/jimmac/src/cvs/gnome/gnome-icon-theme/48x48/stock/generic/stock_person.png"
inkscape:export-xdpi=
"90"
inkscape:export-ydpi=
"90"
...
...
sflphone-client-gnome/src/actions.c
View file @
66f31c2e
...
...
@@ -1099,11 +1099,17 @@ sflphone_rec_call()
switch
(
selectedConf
->
_state
)
{
case
CONFERENCE_STATE_ACTIVE_ATACHED
:
selectedConf
->
_state
=
CONFERENCE_STATE_RECORD
;
selectedConf
->
_state
=
CONFERENCE_STATE_
ACTIVE_ATTACHED_
RECORD
;
break
;
case
CONFERENCE_STATE_RECORD
:
case
CONFERENCE_STATE_
ACTIVE_ATTACHED_
RECORD
:
selectedConf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATACHED
;
break
;
case
CONFERENCE_STATE_ACTIVE_DETACHED
:
selectedConf
->
_state
=
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
;
break
;
case
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
:
selectedConf
->
_state
=
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
;
break
;
default:
WARN
(
"Should not happen in sflphone_off_hold ()!"
);
break
;
...
...
sflphone-client-gnome/src/conference_obj.c
View file @
66f31c2e
...
...
@@ -93,14 +93,17 @@ void create_new_conference_from_details (const gchar *conf_id, GHashTable *detai
state_str
=
g_hash_table_lookup
(
details
,
"CONF_STATE"
);
if
(
g_strcasecmp
(
state_str
,
"ACTIVE_ATACHED"
)
==
0
)
if
(
g_strcasecmp
(
state_str
,
"ACTIVE_ATACHED"
)
==
0
)
{
new_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATACHED
;
else
if
(
g_strcasecmp
(
state_str
,
"ACTIVE_DETACHED"
)
==
0
)
}
else
if
(
g_strcasecmp
(
state_str
,
"ACTIVE_ATTACHED_REC"
)
==
0
)
{
new_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
;
}
else
if
(
g_strcasecmp
(
state_str
,
"ACTIVE_DETACHED"
)
==
0
)
{
new_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_DETACHED
;
else
if
(
g_strcasecmp
(
state_str
,
"HOLD"
)
==
0
)
}
else
if
(
g_strcasecmp
(
state_str
,
"ACTIVE_DETACHED_REC"
)
==
0
)
{
new_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
;
}
else
if
(
g_strcasecmp
(
state_str
,
"HOLD"
)
==
0
)
{
new_conf
->
_state
=
CONFERENCE_STATE_HOLD
;
}
*
conf
=
new_conf
;
}
...
...
sflphone-client-gnome/src/conference_obj.h
View file @
66f31c2e
...
...
@@ -44,7 +44,8 @@
typedef
enum
{
CONFERENCE_STATE_ACTIVE_ATACHED
=
0
,
CONFERENCE_STATE_ACTIVE_DETACHED
,
CONFERENCE_STATE_RECORD
,
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
,
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
,
CONFERENCE_STATE_HOLD
}
conference_state_t
;
...
...
sflphone-client-gnome/src/contacts/calltree.c
View file @
66f31c2e
...
...
@@ -257,13 +257,14 @@ row_activated (GtkTreeView *tree_view UNUSED,
switch
(
selectedConf
->
_state
)
{
case
CONFERENCE_STATE_ACTIVE_DETACHED
:
case
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
:
sflphone_add_main_participant
(
selectedConf
);
break
;
case
CONFERENCE_STATE_HOLD
:
sflphone_conference_off_hold
(
selectedConf
);
break
;
case
CONFERENCE_STATE_ACTIVE_ATACHED
:
case
CONFERENCE_STATE_RECORD
:
case
CONFERENCE_STATE_
ACTIVE_ATTACHED_
RECORD
:
default:
break
;
}
...
...
@@ -841,11 +842,9 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
case
SRTP_STATE_ZRTP_SAS_UNCONFIRMED
:
DEBUG
(
"Secure is ON"
);
pixbuf_security
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/lock_unconfirmed.svg"
,
NULL
);
if
(
c
->
_sas
!=
NULL
)
{
DEBUG
(
"SAS is ready with value %s"
,
c
->
_sas
);
}
break
;
case
SRTP_STATE_ZRTP_SAS_CONFIRMED
:
DEBUG
(
"SAS is confirmed"
);
...
...
@@ -866,7 +865,7 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
default:
WARN
(
"Update calltree srtp state #%d- Should not happen!"
,
c
->
_srtp_state
);
if
(
g_strcasecmp
(
srtp_enabled
,
"true"
)
==
0
)
{
if
(
g_strcasecmp
(
srtp_enabled
,
"true"
)
==
0
)
{
pixbuf_security
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/lock_off.svg"
,
NULL
);
}
...
...
@@ -1135,23 +1134,22 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
if
(
tab
==
current_calls
)
{
switch
(
conf
->
_state
)
{
case
CONFERENCE_STATE_ACTIVE_ATACHED
:
{
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/usersActive.svg"
,
NULL
);
case
CONFERENCE_STATE_ACTIVE_ATACHED
:
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/usersAttached.svg"
,
NULL
);
break
;
}
case
CONFERENCE_STATE_ACTIVE_DETACHED
:
case
CONFERENCE_STATE_HOLD
:
{
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/users.svg"
,
NULL
);
case
CONFERENCE_STATE_HOLD
:
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/usersDetached.svg"
,
NULL
);
break
;
case
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
:
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/usersAttachedRec.svg"
,
NULL
);
break
;
case
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
:
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/usersDetachedRec.svg"
,
NULL
);
break
;
}
default:
WARN
(
"Update conference add - Should not happen!"
);
}
}
else
{
DEBUG
(
"Error Conference State NULL for conferece %s!!!!!"
,
conf
->
_confID
);
}
...
...
@@ -1172,22 +1170,12 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
// Every participant to a conference must be secured, the conference is not secured elsewhere
conf
->
_conference_secured
=
TRUE
;
DEBUG
(
"Calltree: Determine if conference is secured"
);
// participant = conf->participant;
// participant = dbus_get_participant_list(conf->_confID);
conference_participant
=
conf
->
participant_list
;
if
(
conference_participant
)
{
DEBUG
(
"Calltree: Determine if at least one participant uses SRTP"
);
// participant = conf->participant;
// participant = dbus_get_participant_list(conf->_confID);
// for (pl = participant; *pl; pl++)
while
(
conference_participant
)
{
// call_id = (gchar*)(*pl);
call_id
=
(
gchar
*
)
(
conference_participant
->
data
);
call
=
calllist_get
(
tab
,
call_id
);
...
...
@@ -1199,7 +1187,7 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
srtp_enabled
=
g_hash_table_lookup
(
account_details
->
properties
,
ACCOUNT_SRTP_ENABLED
);
}
if
(
g_strcasecmp
(
srtp_enabled
,
"true"
)
==
0
)
{
if
(
g_strcasecmp
(
srtp_enabled
,
"true"
)
==
0
)
{
DEBUG
(
"Calltree: SRTP enabled for participant %s"
,
call_id
);
conf
->
_conf_srtp_enabled
=
TRUE
;
break
;
...
...
@@ -1227,7 +1215,7 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
if
(
call
!=
NULL
)
{
if
(
call
->
_srtp_state
==
0
)
{
if
(
call
->
_srtp_state
==
SRTP_STATE_UNLOCKED
)
{
DEBUG
(
"Calltree: Participant %s is not secured"
,
call_id
);
conf
->
_conference_secured
=
FALSE
;
break
;
...
...
sflphone-client-gnome/src/dbus/dbus.c
View file @
66f31c2e
...
...
@@ -239,7 +239,6 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID,
const
gchar
*
state
,
void
*
foo
UNUSED
)
{
// gchar** part;
callable_obj_t
*
call
;
gchar
*
call_id
;
...
...
@@ -258,6 +257,10 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID,
changed_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATACHED
;
}
else
if
(
strcmp
(
state
,
"ACTIVE_DETACHED"
)
==
0
)
{
changed_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_DETACHED
;
}
else
if
(
strcmp
(
state
,
"ACTIVE_ATTACHED_REC"
)
==
0
)
{
changed_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
;
}
else
if
(
strcmp
(
state
,
"ACTIVE_DETACHED_REC"
)
==
0
)
{
changed_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
;
}
else
if
(
strcmp
(
state
,
"HOLD"
)
==
0
)
{
changed_conf
->
_state
=
CONFERENCE_STATE_HOLD
;
}
else
{
...
...
@@ -277,8 +280,6 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID,
part
=
g_slist_next
(
part
);
}
// new_participants = (gchar **) dbus_get_participant_list (changed_conf->_confID);
// update conferece participants
conference_participant_list_update
(
dbus_get_participant_list
(
changed_conf
->
_confID
),
changed_conf
);
...
...
@@ -324,8 +325,15 @@ conference_created_cb (DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
call
=
calllist_get
(
current_calls
,
call_id
);
// if a text widget is already created, disable it, use conference widget instead
if
(
call
->
_im_widget
)
if
(
call
->
_im_widget
)
{
im_widget_update_state
(
IM_WIDGET
(
call
->
_im_widget
),
FALSE
);
}
// if one of these participant is currently recording, the whole conference will be recorded
if
(
call
->
_state
==
CALL_STATE_RECORD
)
{
new_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
;
}
call
->
_confID
=
g_strdup
(
confID
);
}
...
...
sflphone-client-gnome/src/uimanager.c
View file @
66f31c2e
...
...
@@ -358,7 +358,7 @@ update_actions()
break
;
case
CONFERENCE_STATE_RECORD
:
case
CONFERENCE_STATE_
ACTIVE_ATTACHED_
RECORD
:
DEBUG
(
"UIManager: Conference state record"
);
gtk_action_set_sensitive
(
GTK_ACTION
(
hangUpAction
),
TRUE
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
holdToolbar
),
TRUE
);
...
...
sflphone-client-gnome/src/widget/imwidget.c
View file @
66f31c2e
...
...
@@ -459,7 +459,8 @@ conf_state_image_widget (conference_state_t state)
switch
(
state
)
{
case
CONFERENCE_STATE_ACTIVE_ATACHED
:
case
CONFERENCE_STATE_ACTIVE_DETACHED
:
case
CONFERENCE_STATE_RECORD
:
case
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
:
case
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
:
case
CONFERENCE_STATE_HOLD
:
image
=
gtk_image_new_from_stock
(
GTK_STOCK_IM
,
GTK_ICON_SIZE_LARGE_TOOLBAR
);
break
;
...
...
sflphone-common/src/call.cpp
View file @
66f31c2e
...
...
@@ -93,66 +93,44 @@ Call::getStateStr ()
std
::
string
state_str
;
switch
(
state
)
{
case
Active
:
switch
(
connection
)
{
case
Ringing
:
(
type
==
Incoming
)
?
state_str
=
"INCOMING"
:
state_str
=
"RINGING"
;
break
;
case
Connected
:
state_str
=
"CURRENT"
;
break
;
default:
state_str
=
"CURRENT"
;
break
;
}
break
;
case
Hold
:
state_str
=
"HOLD"
;
break
;
case
Busy
:
state_str
=
"BUSY"
;
break
;
case
Inactive
:
switch
(
connection
)
{
case
Ringing
:
(
type
==
Incoming
)
?
state_str
=
"INCOMING"
:
state_str
=
"RINGING"
;
break
;
case
Connected
:
state_str
=
"CURRENT"
;
break
;
default:
state_str
=
"INACTIVE"
;
break
;
}
break
;
case
Conferencing
:
state_str
=
"CONFERENCING"
;
break
;
case
Refused
:
case
Error
:
case
Active
:
switch
(
connection
)
{
case
Ringing
:
(
type
==
Incoming
)
?
state_str
=
"INCOMING"
:
state_str
=
"RINGING"
;
break
;
case
Connected
:
default:
state_str
=
"FAILURE
"
;
isRecording
()
?
state_str
=
"RECORD"
:
state_str
=
"CURRENT
"
;
break
;
}
case
Hold
:
state_str
=
"HOLD"
;
break
;
case
Busy
:
state_str
=
"BUSY"
;
break
;
case
Inactive
:
switch
(
connection
)
{
case
Ringing
:
(
type
==
Incoming
)
?
state_str
=
"INCOMING"
:
state_str
=
"RINGING"
;
break
;
case
Connected
:
state_str
=
"CURRENT"
;
break
;
default:
state_str
=
"INACTIVE"
;
break
;
}
break
;
case
Conferencing
:
state_str
=
"CONFERENCING"
;
break
;
case
Refused
:
case
Error
:
default:
state_str
=
"FAILURE"
;
break
;
}
return
state_str
;
}
...
...
sflphone-common/src/conference.cpp
View file @
66f31c2e
...
...
@@ -38,7 +38,7 @@
int
Conference
::
count
=
0
;
Conference
::
Conference
()
:
_id
(
""
),
_confState
(
A
ctive_Atached
),
_nbParticipant
(
0
)
Conference
::
Conference
()
:
_id
(
""
),
_confState
(
A
CTIVE_ATTACHED
),
_nbParticipant
(
0
)
{
_nbParticipant
=
0
;
...
...
@@ -133,18 +133,21 @@ std::string Conference::getStateStr()
switch
(
_confState
)
{
case
A
ctive_Atached
:
case
A
CTIVE_ATTACHED
:
state_str
=
"ACTIVE_ATACHED"
;
break
;
case
Active_Detached
:
case
ACTIVE_DETACHED
:
state_str
=
"ACTIVE_DETACHED"
;
break
;
case
ACTIVE_ATTACHED_REC
:
state_str
=
"ACTIVE_ATTACHED_REC"
;
break
;
case
ACTIVE_DETACHED_REC
:
state_str
=
"ACTIVE_DETACHED_REC"
;
break
;
case
Hold
:
state_str
=
"HOLD"
;
break
;
default:
break
;
}
...
...
sflphone-common/src/conference.h
View file @
66f31c2e
...
...
@@ -48,7 +48,7 @@ class Conference: public Recordable
public:
enum
ConferenceState
{
A
ctive_Atached
,
Active_Detached
,
Hold
};
enum
ConferenceState
{
A
CTIVE_ATTACHED
,
ACTIVE_DETACHED
,
ACTIVE_ATTACHED_REC
,
ACTIVE_DETACHED_REC
,
Hold
};
static
int
count
;
...
...
sflphone-common/src/managerimpl.cpp
View file @
66f31c2e
...
...
@@ -604,10 +604,10 @@ bool ManagerImpl::offHoldCall (const CallID& call_id)
{
AccountID
account_id
;
bool
returnValue
,
is
_r
ec
;
bool
returnValue
,
is
R
ec
;
std
::
string
codecName
;
is
_r
ec
=
false
;
is
R
ec
=
false
;
_debug
(
"Manager: Put call %s off hold"
,
call_id
.
c_str
());
...
...
@@ -651,16 +651,17 @@ bool ManagerImpl::offHoldCall (const CallID& call_id)
_debug
(
"Manager: Setting offhold, Account %s, callid %s"
,
account_id
.
c_str
(),
call_id
.
c_str
());
is
_r
ec
=
getAccountLink
(
account_id
)
->
getCall
(
call_id
)
->
isRecording
();
is
R
ec
=
getAccountLink
(
account_id
)
->
getCall
(
call_id
)
->
isRecording
();
returnValue
=
getAccountLink
(
account_id
)
->
offhold
(
call_id
);
}
if
(
_dbus
)
{
if
(
is
_rec
)
if
(
is
Rec
)
{
_dbus
->
getCallManager
()
->
callStateChanged
(
call_id
,
"UNHOLD_RECORD"
);
else
}
else
{
_dbus
->
getCallManager
()
->
callStateChanged
(
call_id
,
"UNHOLD_CURRENT"
);
}
}
if
(
participToConference
(
call_id
))
{
...
...
@@ -945,6 +946,7 @@ void ManagerImpl::unHoldConference (const CallID& id)
Conference
*
conf
;
ConferenceMap
::
iterator
iter_conf
=
_conferencemap
.
find
(
id
);
bool
isRec
=
false
;
AccountID
currentAccountId
;
...
...
@@ -961,14 +963,23 @@ void ManagerImpl::unHoldConference (const CallID& id)
currentAccountId
=
getAccountFromCall
(
*
iter_participant
);
call
=
getAccountLink
(
currentAccountId
)
->
getCall
(
*
iter_participant
);
// if one call is currently recording, the conference is in state recording
if
(
call
->
isRecording
())
{
isRec
=
true
;
}
offHoldCall
(
*
iter_participant
);
iter_participant
++
;
}
conf
->
setState
(
Conference
::
Active_Atached
);
if
(
isRec
)
{
conf
->
setState
(
Conference
::
ACTIVE_ATTACHED_REC
);
}
else
{
conf
->
setState
(
Conference
::
ACTIVE_ATTACHED
);
}
if
(
_dbus
)
_dbus
->
getCallManager
()
->
conferenceChanged
(
conf
->
getConfID
(),
conf
->
getStateStr
());
...
...
@@ -1120,8 +1131,7 @@ void ManagerImpl::addMainParticipant (const CallID& conference_id)
ParticipantSet
::
iterator
iter_participant
=
participants
.
begin
();
while
(
iter_participant
!=
participants
.
end
())
{
getMainBuffer
()
->
bindCallID
(
*
iter_participant
,
default_id
);
getMainBuffer
()
->
bindCallID
(
*
iter_participant
,
default_id
);
iter_participant
++
;
}
...
...
@@ -1137,7 +1147,7 @@ void ManagerImpl::addMainParticipant (const CallID& conference_id)
getMainBuffer
()
->
flush
(
default_id
);
conf
->
setState
(
Conference
::
A
ctive_Atached
);
conf
->
setState
(
Conference
::
A
CTIVE_ATTACHED
);
if
(
_dbus
)
_dbus
->
getCallManager
()
->
conferenceChanged
(
conference_id
,
conf
->
getStateStr
());
...
...
@@ -1151,6 +1161,7 @@ void ManagerImpl::addMainParticipant (const CallID& conference_id)
void
ManagerImpl
::
joinParticipant
(
const
CallID
&
call_id1
,
const
CallID
&
call_id2
)
{
bool
isRec
=
false
;
_debug
(
"Manager: Join participants %s, %s"
,
call_id1
.
c_str
(),
call_id2
.
c_str
());
...
...
@@ -1203,14 +1214,19 @@ void ManagerImpl::joinParticipant (const CallID& call_id1, const CallID& call_id
iter_details
=
call1_details
.
find
(
"CALL_STATE"
);
_debug
(
"Manager: Process call %s state: %s"
,
call_id1
.
c_str
(),
iter_details
->
second
.
c_str
());
if
(
iter_details
->
second
==
"HOLD"
)
{
std
::
string
call1_state_str
=
iter_details
->
second
;
if
(
call1_state_str
==
"HOLD"
)
{
offHoldCall
(
call_id1
);
}
else
if
(
iter_details
->
second
==
"INCOMING"
)
{
}
else
if
(
call1_state_str
==
"INCOMING"
)
{
answerCall
(
call_id1
);
}
else
if
(
iter_details
->
second
==
"CURRENT"
)
{
}
else
if
(
call1_state_str
==
"CURRENT"
)
{
getMainBuffer
()
->
unBindAll
(
call_id1
);
conf
->
bindParticipant
(
call_id1
);
}
else
if
(
iter_details
->
second
==
"INACTIVE"
)
{
}
else
if
(
call1_state_str
==
"RECORD"
)
{
getMainBuffer
()
->
unBindAll
(
call_id1
);
conf
->
bindParticipant
(
call_id1
);
isRec
=
true
;
}
else
if
(
call1_state_str
==
"INACTIVE"
)
{
answerCall
(
call_id1
);
}
else
{
_warn
(
"Manager: Call state not recognized"
);
...
...
@@ -1224,14 +1240,19 @@ void ManagerImpl::joinParticipant (const CallID& call_id1, const CallID& call_id
iter_details
=
call2_details
.
find
(
"CALL_STATE"
);
_debug
(
"Manager: Process call %s state: %s"
,
call_id2
.
c_str
(),
iter_details
->
second
.
c_str
());
if
(
iter_details
->
second
==
"HOLD"
)
{
std
::
string
call2_state_str
=
iter_details
->
second
;
if
(
call2_state_str
==
"HOLD"
)
{
offHoldCall
(
call_id2
);
}
else
if
(
iter_details
->
second
==
"INCOMING"
)
{
}
else
if
(
call2_state_str
==
"INCOMING"
)
{
answerCall
(
call_id2
);
}
else
if
(
iter_details
->
second
==
"CURRENT"
)
{
}
else
if
(
call2_state_str
==
"CURRENT"
)
{
getMainBuffer
()
->
unBindAll
(
call_id2
);
conf
->
bindParticipant
(
call_id2
);
}
else
if
(
iter_details
->
second
==
"INACTIVE"
)
{
}
else
if
(
call2_state_str
==
"RECORD"
)
{
getMainBuffer
()
->
unBindAll
(
call_id2
);
conf
->
bindParticipant
(
call_id2
);
isRec
=
true
;
}
else
if
(
call2_state_str
==
"INACTIVE"
)
{
answerCall
(
call_id2
);
}
else
{
_warn
(
"Manager: Call state not recognized"
);
...
...
@@ -1240,6 +1261,7 @@ void ManagerImpl::joinParticipant (const CallID& call_id1, const CallID& call_id
audioLayerMutexLock
();
if
(
_audiodriver
)
{
conf
->
setState
(
Conference
::
ACTIVE_ATTACHED_REC
);
conf
->
setRecordingSmplRate
(
_audiodriver
->
getSampleRate
());
_audiodriver
->
getMainBuffer
()
->
stateInfo
();
}
...
...
@@ -1305,7 +1327,7 @@ void ManagerImpl::detachParticipant (const CallID& call_id,
ConferenceMap
::
iterator
iter
=
_conferencemap
.
find
(
current_call_id
);
Conference
*
conf
=
iter
->
second
;
conf
->
setState
(
Conference
::
A
ctive_Detached
);
conf
->
setState
(
Conference
::
A
CTIVE_DETACHED
);
if
(
_dbus
)
_dbus
->
getCallManager
()
->
conferenceChanged
(
conf
->
getConfID
(),
conf
->
getStateStr
());
...
...
@@ -2205,7 +2227,6 @@ void ManagerImpl::ringback ()
void
ManagerImpl
::
ringtone
(
const
AccountID
&
accountID
)
{
std
::
string
ringchoice
;
AudioLayer
*
audiolayer
;
AudioCodec
*
codecForTone
;
int
layer
,
samplerate
;
bool
loadFile
;
...
...
@@ -2282,7 +2303,7 @@ void ManagerImpl::ringtone (const AccountID& accountID)
audioLayerMutexLock
();
// start audio if not started AND flush all buffers (main and urgent)
audiolay
er
->
startStream
();
_audiodriv
er
->
startStream
();
audioLayerMutexUnlock
();
}
else
{
...
...
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