Commit e52805f9 authored by Alexandre Savard's avatar Alexandre Savard Committed by Emmanuel Milou

[#2557] Display complete sip uri for outgoing calls

parent 0e39027e
......@@ -694,6 +694,8 @@ sflphone_new_call()
peer_name = g_strdup ("");
create_new_call (CALL, CALL_STATE_DIALING, "", "", peer_name, peer_number, &c);
c->_history_state = OUTGOING;
calllist_add (current_calls,c);
calltree_add_call (current_calls, c, NULL);
update_actions();
......
......@@ -351,25 +351,33 @@ calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type, gch
DEBUG("Display call info");
// Get the hostname for this call (NULL if not existent)
hostname = g_strrstr(peer_number, "@");
// If call is outgoing, keep the hostname, strip it elsewhere
if(c->_type == CALL && c->_history_state == OUTGOING) {
// Test if we are dialing a new number
if(g_strcmp0("", c->_peer_number) != 0) {
display_number = peer_number;
// Strip the hostname if existent
if(hostname) {
display_number = g_strndup(peer_number, hostname - peer_number);
}
else {
// Get the hostname for this call (NULL if not existent)
hostname = g_strrstr(peer_number, "@");
// Test if we are dialing a new number
if(g_strcmp0("", c->_peer_number) != 0) {
// Strip the hostname if existent
if(hostname) {
display_number = g_strndup(peer_number, hostname - peer_number);
}
else {
display_number = peer_number;
}
}
else {
display_number = peer_number;
}
}
else {
display_number = peer_number;
}
// Different display depending on type
switch(display_type) {
......
Markdown is supported
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