]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3794 wow i am going bonkers
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Feb 2012 05:08:19 +0000 (23:08 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Feb 2012 05:08:19 +0000 (23:08 -0600)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 5dc57c6908a00907e8841d338bcc8aa6e14f31a8..6b0442eb769ec92b69eba0eb85149e51d831cf2f 100644 (file)
@@ -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, "<dialog id=\"%s\" direction=\"%s\">\n", uuid, direction);
                                stream.write_function(&stream, "<state>%s</state>\n", astate);