correct 'progressinband' parsing (issue #5209, different fix)
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 14 Sep 2005 22:45:31 +0000 (22:45 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 14 Sep 2005 22:45:31 +0000 (22:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6604 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6ecedd5..868d516 100755 (executable)
@@ -11116,10 +11116,10 @@ static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask
        } else if (!strcasecmp(v->name, "progressinband")) {
                ast_set_flag(mask, SIP_PROG_INBAND);
                ast_clear_flag(flags, SIP_PROG_INBAND);
-               if (strcasecmp(v->value, "never"))
-                       ast_set_flag(flags, SIP_PROG_INBAND_NO);
-               else if (ast_true(v->value))
+               if (ast_true(v->value))
                        ast_set_flag(flags, SIP_PROG_INBAND_YES);
+               else if (strcasecmp(v->value, "never"))
+                       ast_set_flag(flags, SIP_PROG_INBAND_NO);
        } else if (!strcasecmp(v->name, "allowguest")) {
 #ifdef OSP_SUPPORT
                if (!strcasecmp(v->value, "osp"))