diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 4e632c9ca245a117de4dc626474625a8e87f4d77..5126356e800897476fbbec22c8a072a62ac3e817 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -303,7 +303,9 @@ sflphone_hang_up() sflphone_pick_up() { DEBUG("sflphone_pick_up\n"); - callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree); + callable_obj_t * selectedCall = NULL; + selectedCall = calltab_get_selected_call(active_calltree); + if(selectedCall) { switch(selectedCall->_state) @@ -802,6 +804,7 @@ sflphone_display_selected_codec (const gchar* codecName) selectedCall = calltab_get_selected_call(current_calls); if (selectedCall) { if(selectedCall->_accountID != NULL){ + statusbar_pop_message(__MSG_ACCOUNT_DEFAULT); acc = account_list_get_by_id(selectedCall->_accountID); if (!acc) { msg = g_markup_printf_escaped (_("IP call - %s"), codecName); diff --git a/sflphone-client-gnome/src/callable_obj.c b/sflphone-client-gnome/src/callable_obj.c index 8cff3894f7e88fe714cd8ab5a93ba3d0e567db67..7332c87ba624fe4cd6384ddfc1cd57ff104330b4 100644 --- a/sflphone-client-gnome/src/callable_obj.c +++ b/sflphone-client-gnome/src/callable_obj.c @@ -243,7 +243,6 @@ gchar* get_call_duration (callable_obj_t *obj) duration = (int) difftime(end, start); - DEBUG("END: %d START: %d DURATION: %d", end, start, duration); if( duration / 60 == 0 ) { if( duration < 10 ) diff --git a/sflphone-client-gnome/src/config/accountwindow.c b/sflphone-client-gnome/src/config/accountwindow.c index 493233362a1fddd6e1614ebd44ad26462513a034..549828dba5f4ec059a0e26e50e125e8df0765502 100644 --- a/sflphone-client-gnome/src/config/accountwindow.c +++ b/sflphone-client-gnome/src/config/accountwindow.c @@ -299,12 +299,12 @@ show_account_window (account_t * a) /* General Settings */ tab = createAccountTab(a); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Basic"))); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new_with_mnemonic(_("_Basic"))); gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab); /* Advanced */ tab = createAdvancedTab(a); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Advanced"))); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new_with_mnemonic(_("_Advanced"))); gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab); gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook) , 0); diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index ad4fc09a2a5810a8c5fb9cb1e07045225f195e16..b4ad2226dfcaa819ac46eda8f8d09b4ef3d15952 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -129,6 +129,7 @@ call_state_cb (DBusGProxy *proxy UNUSED, stop_notification(); sflphone_hung_up (c); calltree_update_call( history, c ); + status_bar_display_account(); } else if ( strcmp(state, "UNHOLD_CURRENT") == 0 ) { diff --git a/sflphone-client-gnome/src/menus.c b/sflphone-client-gnome/src/menus.c index a7b95b9723ba68a12b6efd06ea79400ac917b2d8..7eee725ea55ef68a1f1c0fae3f304fc14a0d612f 100644 --- a/sflphone-client-gnome/src/menus.c +++ b/sflphone-client-gnome/src/menus.c @@ -122,6 +122,7 @@ help_about ( void * foo UNUSED) "Alexandre Savard <alexandre.savard@savoirfairelinux.com>", "Jean-Philippe Barrette-LaPierre", "Laurielle Lea", + "Pierre-Luc Bacon <pierre-luc.bacon@savoifairelinux.com>", NULL}; gchar *artists[] = { "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index d7d337d084f2ba68a5ccdb12f5de27d5240562d6..074090a2c44a8cd4ddc578fb7255df72e720030e 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -284,31 +284,38 @@ ManagerImpl::answerCall (const CallID& id) stopTone (true); - AccountID currentaccountid = getAccountFromCall (id); - Call* currentcall = getAccountLink (currentaccountid)->getCall (getCurrentCallId()); - _debug ("ManagerImpl::answerCall :: current call->getState %i \n",currentcall->getState()); - - if (currentcall->getState() == 1) - isActive = true; - - // stopTone(false); - _debug ("Try to answer call: %s\n", id.data()); - - AccountID accountid = getAccountFromCall (id); - - if (accountid == AccountNULL) { - _debug ("Answering Call: Call doesn't exists\n"); - //return false; + AccountID currentAccountId; + currentAccountId = getAccountFromCall (id); + if(currentAccountId == AccountNULL) { + _debug("ManagerImpl::answerCall : AccountId is null\n"); + return false; + } + + Call* currentCall = NULL; + currentCall = getAccountLink (currentAccountId)->getCall (id); + if (currentCall == NULL) { + _debug("ManagerImpl::answerCall : currentCall is null\n"); + } + + Call* lastCall = NULL; + if (!getCurrentCallId().empty()) { + lastCall = getAccountLink (currentAccountId)->getCall (getCurrentCallId()); + if (lastCall == NULL) { + _debug("ManagerImpl::answerCall : lastCall is null\n"); + } } - // if (id != getCurrentCallId()) { - if (isActive) { - _debug ("* Manager Info: there is currently a call, try to hold it\n"); + _debug ("ManagerImpl::answerCall :: current call->getState %i \n", currentCall->getState()); + _debug ("Try to answer call: %s\n", id.data()); - onHoldCall (getCurrentCallId()); + if (lastCall != NULL) { + if (lastCall->getState() == Call::Active) { + _debug ("* Manager Info: there is currently a call, try to hold it\n"); + onHoldCall (getCurrentCallId()); + } } - if (!getAccountLink (accountid)->answer (id)) { + if (!getAccountLink (currentAccountId)->answer (id)) { // error when receiving... removeCallAccount (id); return false; @@ -316,15 +323,14 @@ ManagerImpl::answerCall (const CallID& id) // if it was waiting, it's waiting no more if (_dbus) _dbus->getCallManager()->callStateChanged (id, "CURRENT"); - + + std::string codecName = Manager::instance().getCurrentCodecName (id); + if (_dbus) _dbus->getCallManager()->currentSelectedCodec (id,codecName.c_str()); + removeWaitingCall (id); switchCall (id); - // std::string codecName = getCurrentCodecName(id); - // _debug("ManagerImpl::hangupCall(): broadcast codec name %s \n",codecName.c_str()); - // if (_dbus) _dbus->getCallManager()->currentSelectedCodec(id,codecName.c_str()); - return true; } diff --git a/sflphone-common/src/sipvoiplink.cpp b/sflphone-common/src/sipvoiplink.cpp index 0e4a4cb0b64a31057f4b0937001e92ab00c34276..5257cabf505f17bb822ee7745a36c62191a9d5f6 100644 --- a/sflphone-common/src/sipvoiplink.cpp +++ b/sflphone-common/src/sipvoiplink.cpp @@ -2151,7 +2151,7 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) try { call->setAudioStart (true); - link->getAudioRtp()->start(); + link->getAudioRtp()->start(); } catch(exception& rtpException) { _debug("%s\n", rtpException.what()); }