diff --git a/sflphone-gtk/src/sflnotify.c b/sflphone-gtk/src/sflnotify.c index 2b86e308d9c14ef3c078ea9971573e0e02a9d434..219a5234dd8bd4d956cd6802ce5f1d1f1cd9b036 100644 --- a/sflphone-gtk/src/sflnotify.c +++ b/sflphone-gtk/src/sflnotify.c @@ -31,9 +31,14 @@ notify_incoming_call( call_t* c ) gchar* title; notify_init("sflphone"); - title = g_markup_printf_escaped(_("%s account: %s") , - (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_TYPE) , - (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_ALIAS) ) ; + if (g_strcasecmp (c->accountID,"") == 0) { + title = g_markup_printf_escaped ("IP-to-IP call"); + } + else { + title = g_markup_printf_escaped(_("%s account: %s") , + (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_TYPE) , + (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_ALIAS) ) ; + } callerid = g_markup_printf_escaped(_("<i>From:</i> %s") , c->from); pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL); diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 893323e481a0c93c661cc5d1b96ad00a81f815ec..97144aa5fdd82c4454fa02599e6ad8586bbe7a11 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -268,7 +268,7 @@ ManagerImpl::answerCall(const CallID& id) AccountID accountid = getAccountFromCall( id ); if (accountid == AccountNULL) { _debug("Answering Call: Call doesn't exists\n"); - return false; + //return false; } // if (id != getCurrentCallId()) { @@ -279,7 +279,7 @@ ManagerImpl::answerCall(const CallID& id) } - if (!getAccountLink(accountid)->answer(id)) { + if (!getAccountLink(AccountNULL)->answer(id)) { // error when receiving... removeCallAccount(id); return false; diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index 7f6a88ff6d1d44fd4e17237ee721d055b4eb9d8b..04c8c4a7856514c8b0429d65eaad67e9013f6483 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -1396,9 +1396,6 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam _debug("UserAgent: SIP Init -- listening on port %d\n", _localExternPort); - status = enable_dns_srv_resolver (_endpt, &p_resv); - PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); - // Initialize transaction layer status = pjsip_tsx_layer_init_module(_endpt); PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); @@ -1434,6 +1431,9 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam status = pjsip_xfer_init_module(_endpt); PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); + //status = enable_dns_srv_resolver (_endpt, &p_resv); + //PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); + // Init the callback for INVITE session: pj_bzero(&inv_cb, sizeof (inv_cb)); @@ -1922,7 +1922,7 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e std::string request; // Handle the incoming call invite in this function - _debug("UserAgent: Callback on_rx_request is involved!\n"); + _debug("UserAgent: Callback on_rx_request is involved! *****************************************************\n"); /* First, let's got the username and server name from the invite. * We will use them to detect which account is the callee. @@ -1933,13 +1933,15 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e userName = std::string(sip_uri->user.ptr, sip_uri->user.slen); server = std::string(sip_uri->host.ptr, sip_uri->host.slen) ; + std::cout << userName << " ------------------ " << server << std::endl; + // Get the account id of callee from username and server account_id = Manager::instance().getAccountIdFromNameAndServer(userName, server); /* If we don't find any account to receive the call */ if(account_id == AccountNULL) { _debug("UserAgent: Username %s doesn't match any account!\n",userName.c_str()); - return false; + //return false; } /* Get the voip link associated to the incoming call */