]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3794 I think I got to the bottom of the thing you hit with intercept, please updat...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Feb 2012 21:33:37 +0000 (15:33 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Feb 2012 21:33:43 +0000 (15:33 -0600)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 0bb119f8d360ca1c870cf1eafc5e04c487a1c704..1a949044daf38f39f7d5c02a1046d6ddc434e0fa 100644 (file)
@@ -2487,9 +2487,12 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                                                                  "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" "
                                                                  "version=\"%s\" state=\"%s\" entity=\"%s\">\n", version, default_dialog, clean_id);
                                                                  
-                                                                 
                }
 
+               if (!strcasecmp(astate, "hangup")) {
+                       astate = "terminated";
+               }
+               
                if (!zstr(uuid)) {
                        if (!zstr(answer_state)) {
                                astate = answer_state;
@@ -2507,9 +2510,6 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                                astate = "confirmed";
                        }
                        
-                       if (!strcasecmp(astate, "hangup")) {
-                               astate = "terminated";
-                       }
                        
                        if (is_dialog) {
 
@@ -2629,7 +2629,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                        if (in) {
                                open = "open";
 
-                               if (switch_false(resub)) {
+                               if (!strcasecmp(astate, "terminated") && switch_false(resub)) {
                                        int term;
 
                                        const char *direction = switch_event_get_header(helper->event, "Caller-Direction");