diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index dd5658d93554353fc946b7e0120afe22c1bd41ce..f3275f017b2b899ed41b7730c57296f4f258cfbe 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -683,7 +683,7 @@ sflphone_place_call ( call_t * c ) if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0) { - format_phone_number (&c->to); + //format_phone_number (&c->to); if( account_list_get_size() == 0 ) { @@ -871,7 +871,5 @@ void format_phone_number (gchar **number) { _number = *number; - // strip_spaces (&_number); - - + //strip_spaces (&_number); } diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index 52902adeb15a6142af5a8ab109db077b012b3c32..c1def3f9b629a24a81ff406b5c286e12585d7dd6 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -1138,7 +1138,7 @@ dbus_get_is_recording(const call_t * c) { g_error_free(error); } - g_print("RECORDING: %i \n",isRecording); + //g_print("RECORDING: %i \n",isRecording); return isRecording; } diff --git a/sflphone-gtk/src/menus.c b/sflphone-gtk/src/menus.c index e32bb3e7da16d2633925f61afde33bae05f665f8..6a0a17ea7ed6685e93f951995c705dc5e2b8dc08 100644 --- a/sflphone-gtk/src/menus.c +++ b/sflphone-gtk/src/menus.c @@ -324,7 +324,7 @@ create_call_menu() NULL); gtk_widget_show (menu_items); - image = gtk_tool_button_new_from_stock (GTK_STOCK_MEDIA_RECORD); + image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_MENU); recordMenu = gtk_image_menu_item_new_with_mnemonic(_("_Record")); gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( recordMenu ), image ); gtk_menu_shell_append (GTK_MENU_SHELL (menu), recordMenu); @@ -812,7 +812,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) if(record) { menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Record")); - image = gtk_tool_button_new_from_stock (GTK_STOCK_MEDIA_RECORD); + image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); g_signal_connect (G_OBJECT (menu_items), "activate", diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 9315572eb80ae12be08028b92ec5f6108bdd4a83..16d22b136ad57236ccf1089911bc9c96265f0d2b 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -445,9 +445,9 @@ ManagerImpl::offHoldCall(const CallID& id) switchCall(id); - // codecName = getCurrentCodecName(id); + codecName = getCurrentCodecName(id); // _debug("ManagerImpl::hangupCall(): broadcast codec name %s \n",codecName.c_str()); - // if (_dbus) _dbus->getCallManager()->currentSelectedCodec(id,codecName.c_str()); + if (_dbus) _dbus->getCallManager()->currentSelectedCodec(id,codecName.c_str()); return returnValue; } @@ -739,7 +739,9 @@ ManagerImpl::incomingCall(Call* call, const AccountID& accountId) */ /* Broadcast a signal over DBus */ - _dbus->getCallManager()->incomingCall(accountId, call->getCallId(), from); + if (_dbus) _dbus->getCallManager()->incomingCall(accountId, call->getCallId(), from); + + //if (_dbus) _dbus->getCallManager()->callStateChanged(call->getCallId(), "INCOMING"); // Reduce volume of the other pulseaudio-connected audio applications if( _audiodriver->getLayerType() == PULSEAUDIO && getConfigInt( PREFERENCES , CONFIG_PA_VOLUME_CTRL ) ) { @@ -787,7 +789,6 @@ ManagerImpl::peerRingingCall(const CallID& id) void ManagerImpl::peerHungupCall(const CallID& id) { - _debug("ManagerImpl::peerHungupCall():this function is called when peer hangup \n"); PulseLayer *pulselayer; AccountID accountid; bool returnValue; @@ -977,15 +978,12 @@ ManagerImpl::ringtone() { //TODO Comment this because it makes the daemon crashes since the main thread //synchronizes the ringtone thread. - _debug("RINGING!!! 1\n"); ringchoice = getConfigString(AUDIO, RING_CHOICE); //if there is no / inside the path if ( ringchoice.find(DIR_SEPARATOR_CH) == std::string::npos ) { // check inside global share directory ringchoice = std::string(PROGSHAREDIR) + DIR_SEPARATOR_STR + RINGDIR + DIR_SEPARATOR_STR + ringchoice; - - _debug("RINGING!!! 2\n"); } audiolayer = getAudioDriver(); @@ -993,7 +991,6 @@ ManagerImpl::ringtone() if (audiolayer == 0) return; - _debug("RINGING!!! 3\n"); samplerate = audiolayer->getSampleRate(); codecForTone = _codecDescriptorMap.getFirstCodecAvailable(); @@ -1004,7 +1001,6 @@ ManagerImpl::ringtone() if (loadFile) { - _debug("RINGING!!! 5\n"); _toneMutex.enterMutex(); _audiofile.start(); _toneMutex.leaveMutex(); @@ -1014,18 +1010,15 @@ ManagerImpl::ringtone() } else{ audiolayer->startStream(); - _debug("RINGING!!! 6\n"); } } else { ringback(); - _debug("RINGING!!! 7\n"); } } else { ringback(); - _debug("RINGING!!! 8\n"); } } diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index 4053df3cc63f12e1942380599078762cb8bfa958..33ce2d4ec21ce4c7881da9d563afa65277b43532 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -1619,8 +1619,6 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam SIPVoIPLink *link; pjsip_rx_data *rdata; - _debug (" ***************************** NEW CALL STATE %i **************************\n", inv->state); - /* Retrieve the call information */ call = reinterpret_cast<SIPCall*> (inv->mod_data[_mod_ua.id]); if(!call) @@ -1688,8 +1686,8 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam } else { - // The call is ringing - if (inv->state == PJSIP_INV_STATE_EARLY){ + // The call is ringing - We need to handle this case only on outgoing call + if (inv->state == PJSIP_INV_STATE_EARLY && e->body.tsx_state.tsx->role == PJSIP_ROLE_UAC){ _debug ("*************************** PJSIP_INV_STATE_EARLY - PEER RINGING ***********************************\n"); call->setConnectionState(Call::Ringing); Manager::instance().peerRingingCall(call->getCallId());