From 8c6184f0dad482ded0ad1574449c6ac234c759f6 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 17 Jun 2008 18:09:54 +0000 Subject: [PATCH] Merged revisions 123333 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r123333 | mmichelson | 2008-06-17 13:09:16 -0500 (Tue, 17 Jun 2008) | 11 lines 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/trunk@123334 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 72035ebad8..09cc711342 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16344,12 +16344,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;