From: Mark Michelson Date: Tue, 17 Jun 2008 18:09:16 +0000 (+0000) Subject: Cisco BTS sends SIP responses with a tab between the Cseq number and X-Git-Tag: 1.4.22-rc1~203 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=133598306143a7f4b29377ed06958b226154f843;p=thirdparty%2Fasterisk.git Cisco BTS sends SIP responses with a tab between the Cseq number and 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f257b94074..baf4e3576e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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;