Common code: Add call state debugging

This commit is contained in:
Andreas Eversberg 2016-08-07 17:23:56 +02:00
parent 362b1cbb61
commit 541eafe59e
1 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,15 @@ enum call_state {
CALL_DISCONNECTED,
};
static const char *call_state_name[] = {
"IDLE",
"SETUP_MO",
"SETUP_MT",
"ALERTING",
"CONNECT",
"DISCONNECTED",
};
enum audio_pattern {
PATTERN_NONE = 0,
PATTERN_TEST,
@ -172,6 +181,7 @@ static call_t call;
static void call_new_state(enum call_state state)
{
PDEBUG(DCALL, DEBUG_DEBUG, "Call state '%s' -> '%s'\n", call_state_name[call.state], call_state_name[state]);
call.state = state;
call.audio_pos = 0;
call.test_audio_pos = 0;