Skip to content
Snippets Groups Projects
Commit 9ce08e07 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Allow user to make IP call without any accounts configured

parent 849f00de
No related branches found
No related tags found
No related merge requests found
...@@ -670,13 +670,20 @@ sflphone_keypad( guint keyval, gchar * key) ...@@ -670,13 +670,20 @@ sflphone_keypad( guint keyval, gchar * key)
* Place a call with the current account. * Place a call with the current account.
* If there is no default account selected, place a call with the first * If there is no default account selected, place a call with the first
* registered account of the account list * registered account of the account list
* Else, popup an error message * Else, check if it an IP call. if not, popup an error message
*/ */
void void
sflphone_place_call ( call_t * c ) sflphone_place_call ( call_t * c )
{ {
if (c->state == CALL_STATE_DIALING && g_str_has_prefix (c->to, "ip:"))
{
dbus_place_call (c);
}
else {
if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0) if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0)
{ {
...@@ -697,7 +704,6 @@ sflphone_place_call ( call_t * c ) ...@@ -697,7 +704,6 @@ sflphone_place_call ( call_t * c )
else else
{ {
account_t * current; account_t * current;
if(g_strcasecmp(c->accountID, "") != 0) { if(g_strcasecmp(c->accountID, "") != 0) {
...@@ -746,11 +752,10 @@ sflphone_place_call ( call_t * c ) ...@@ -746,11 +752,10 @@ sflphone_place_call ( call_t * c )
} }
// Update history // Update history
c->history_state = OUTGOING; c->history_state = OUTGOING;
g_print ("add in history\n");
calllist_add(history, c); calllist_add(history, c);
} }
} }
}
void void
sflphone_display_selected_codec (const gchar* codecName) sflphone_display_selected_codec (const gchar* codecName)
...@@ -761,10 +766,15 @@ sflphone_display_selected_codec (const gchar* codecName) ...@@ -761,10 +766,15 @@ sflphone_display_selected_codec (const gchar* codecName)
account_t* acc; account_t* acc;
if(selectedCall->accountID != NULL){ if(selectedCall->accountID != NULL){
acc = account_list_get_by_id(selectedCall->accountID); acc = account_list_get_by_id(selectedCall->accountID);
if (!acc) {
msg = g_markup_printf_escaped (_("IP call - %s"), codecName);
}
else {
msg = g_markup_printf_escaped(_("%s account- %s %s") , msg = g_markup_printf_escaped(_("%s account- %s %s") ,
(gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE),
(gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS),
codecName); codecName);
}
statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT); statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT);
g_free(msg); g_free(msg);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment