From fbe4e6475d7c873e8adbd770c1c2b86f02c3da85 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 22 Feb 2012 23:08:19 -0600 Subject: [PATCH] FS-3794 wow i am going bonkers --- src/mod/endpoints/mod_sofia/sofia_presence.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 5dc57c6908..6b0442eb76 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2493,10 +2493,6 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * } - if (!strcasecmp(astate, "hangup")) { - astate = "terminated"; - } - if (!zstr(uuid)) { if (!zstr(answer_state)) { astate = answer_state; @@ -2528,6 +2524,11 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * if (holding) { astate = "early"; } + + + if (!strcasecmp(astate, "hangup")) { + astate = "terminated"; + } stream.write_function(&stream, "\n", uuid, direction); stream.write_function(&stream, "%s\n", astate);