Commit d63e3053 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#1157] Commit missing files

parent 3352a2d9
......@@ -165,6 +165,7 @@ call_state_cb (DBusGProxy *proxy UNUSED,
{
callable_obj_t *new_call;
GHashTable *call_details;
gchar *type;
DEBUG ("New ringing call! accountID: %s", callID);
......@@ -174,8 +175,26 @@ call_state_cb (DBusGProxy *proxy UNUSED,
// Restore the callID to be synchronous with the daemon
new_call->_callID = g_strdup(callID);
type = g_hash_table_lookup (call_details, "CALL_TYPE");
sflphone_incoming_call (new_call);
if (g_strcasecmp (type, "0") == 0)
{
g_print ("incoming\n");
new_call->_history_state = INCOMING;
}
else
{
g_print ("outgoing\n");
new_call->_history_state = OUTGOING;
}
calllist_add (current_calls, new_call);
calllist_add (history, new_call);
calltree_add_call (current_calls, new_call);
update_menus ();
calltree_display (current_calls);
//sflphone_incoming_call (new_call);
}
}
}
......
......@@ -81,6 +81,11 @@ class Call{
*/
CallID& getCallId() {return _id; }
inline CallType getCallType (void)
{
return _type;
}
/**
* Set the peer number (destination on outgoing)
* not protected by mutex (when created)
......
......@@ -2854,6 +2854,8 @@ std::map< std::string, std::string > ManagerImpl::getCallDetails(const CallID& c
Account *account;
VoIPLink *link;
Call *call;
std::stringstream type;
// We need here to retrieve the call information attached to the call ID
// To achieve that, we need to get the voip link attached to the call
......@@ -2874,10 +2876,13 @@ std::map< std::string, std::string > ManagerImpl::getCallDetails(const CallID& c
if (call)
{
type << call->getCallType () << std::endl;
call_details.insert (std::pair<std::string, std::string> ("ACCOUNTID", accountid));
call_details.insert (std::pair<std::string, std::string> ("PEER_NUMBER", call->getPeerNumber ()));
call_details.insert (std::pair<std::string, std::string> ("PEER_NAME", call->getPeerName ()));
call_details.insert (std::pair<std::string, std::string> ("CALL_STATE", call->getStateStr (call->getState())));
call_details.insert (std::pair<std::string, std::string> ("CALL_TYPE", type.str ()));
}
else
{
......@@ -2886,6 +2891,7 @@ std::map< std::string, std::string > ManagerImpl::getCallDetails(const CallID& c
call_details.insert (std::pair<std::string, std::string> ("PEER_NUMBER", "Unknown"));
call_details.insert (std::pair<std::string, std::string> ("PEER_NAME", "Unknown"));
call_details.insert (std::pair<std::string, std::string> ("CALL_STATE", "FAILURE"));
call_details.insert (std::pair<std::string, std::string> ("CALL_TYPE", "0"));
}
return call_details;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment