Commit 430f8480 authored by smorlat's avatar smorlat
Browse files

print status for incoming calls pending.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@536 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent c29c0d54
......@@ -333,6 +333,7 @@ lpc_cmd_help(LinphoneCore *lc, char *arg)
}
static char callee_name[256]={0};
static char caller_name[256]={0};
static int
lpc_cmd_call(LinphoneCore *lc, char *args)
......@@ -360,10 +361,18 @@ lpc_cmd_call(LinphoneCore *lc, char *args)
return 1;
}
static const char *linphonec_get_callee(){
const char *linphonec_get_callee(){
return callee_name;
}
const char *linphonec_get_caller(){
return caller_name;
}
void linphonec_set_caller(const char *caller){
snprintf(caller_name,sizeof(caller_name)-1,"%s",caller);
}
static int
lpc_cmd_refer(LinphoneCore *lc, char *args)
{
......@@ -1437,6 +1446,10 @@ static int lpc_cmd_status(LinphoneCore *lc, char *args)
case GSTATE_CALL_IN_CONNECTED:
linphonec_out("hook=answered duration=%i\n" ,
linphone_core_get_current_call_duration(lc));
break;
case GSTATE_CALL_IN_INVITE:
linphonec_out("Incoming call from %s\n",linphonec_get_caller());
break;
default:
break;
}
......
......@@ -216,6 +216,7 @@ linphonec_display_url (LinphoneCore * lc, const char *something, const char *url
static void
linphonec_call_received(LinphoneCore *lc, const char *from)
{
linphonec_set_caller(from);
if ( auto_answer) {
answer_call=TRUE;
}
......
......@@ -110,7 +110,7 @@ extern char *linphonec_readline(char *prompt);
void linphonec_set_autoanswer(bool_t enabled);
bool_t linphonec_get_autoanswer();
void linphonec_command_finished(void);
void linphonec_set_caller(const char *caller);
#endif /* def LINPHONEC_H */
......
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