]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Cisco BTS sends SIP responses with a tab between the Cseq number and
authorMark Michelson <mmichelson@digium.com>
Tue, 17 Jun 2008 18:09:16 +0000 (18:09 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 17 Jun 2008 18:09:16 +0000 (18:09 +0000)
SIP request method in the Cseq: header. Asterisk did not handle this
properly, but with this patch, all is well.

(closes issue #12834)
Reported by: tobias_e
Patches:
      12834.patch uploaded by putnopvut (license 60)
Tested by: tobias_e

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@123333 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f257b9407406e7d279d54ce9361fc055685d092e..baf4e3576eb5a727ff4e475b18dc3022ff109e7a 100644 (file)
@@ -12735,12 +12735,12 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
        int sipmethod;
        int res = 1;
        const char *c = get_header(req, "Cseq");
-       const char *msg = strchr(c, ' ');
+       /* Skip the Cseq and its subsequent spaces */
+       const char *msg = ast_skip_blanks(ast_skip_nonblanks((char *)c));
 
        if (!msg)
                msg = "";
-       else
-               msg++;
+
        sipmethod = find_sip_method(msg);
 
        owner = p->owner;