Handle dialog updates to to tag properly (bug #5166)
authorMark Spencer <markster@digium.com>
Wed, 14 Sep 2005 00:43:11 +0000 (00:43 +0000)
committerMark Spencer <markster@digium.com>
Wed, 14 Sep 2005 00:43:11 +0000 (00:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6576 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 871133f..0afcaf3 100755 (executable)
@@ -9236,7 +9236,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                __sip_ack(p, seqno, 0, sipmethod);
 
        /* Get their tag if we haven't already */
                __sip_ack(p, seqno, 0, sipmethod);
 
        /* Get their tag if we haven't already */
-       if (ast_strlen_zero(p->theirtag)) {
+       if (ast_strlen_zero(p->theirtag) || (resp >= 200)) {
                to = get_header(req, "To");
                to = strcasestr(to, "tag=");
                if (to) {
                to = get_header(req, "To");
                to = strcasestr(to, "tag=");
                if (to) {