[asterisk-bugs] [JIRA] (ASTERISK-23790) Incorrect parsing SIP display info

Rusty Newton (JIRA) noreply at issues.asterisk.org
Wed Jun 11 18:00:57 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-23790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219363#comment-219363 ] 

Rusty Newton commented on ASTERISK-23790:
-----------------------------------------

Thanks for the debug log. I do see the closing bracket.

{noformat}
[May 28 07:29:09] DEBUG[28416] chan_sip.c:  Header  1 [ 65]: Via: SIP/2.0/UDP 10.214.104.121:5060;branch=z9hG4bK14aa2d13175ef3
[May 28 07:29:09] DEBUG[28416] chan_sip.c:  Header  2 [323]: From: "HelpDesk" <sip:8504 at 10.214.104.121;x-nearend;x-refci=19259122;x-nearendclusterid=StandAloneCluster;x-nearenddevice=SEP7C95F33EEDDF;x-nearendaddr=8555;x-farendrefci=19259121;x-farendclusterid=StandAloneCluster;x-farenddevice=SEP3C0E236D0240;x-farendaddr=8009>;tag=2946942~394ad5a3-1eb8-404e-81f1-1e37daf715dc-19259126
[May 28 07:29:09] DEBUG[28416] chan_sip.c:  Header  3 [ 29]: To: <sip:8505 at 10.214.104.255>
{noformat}

However it looks like Asterisk stops reading the header at around 256 characters. As it stops reading right at "... ;x-farendaddr=8' "

{noformat}
[May 28 07:29:09] WARNING[28416] sip/reqresp_parser.c: No closing bracket found in ' <sip:8504 at 10.214.104.121;x-nearend;x-refci=19259122;x-nearendclusterid=StandAloneCluster;x-nearenddevice=SEP7C95F33EEDDF;x-nearendaddr=8555;x-farendrefci=19259121;x-farendclusterid=StandAloneCluster;x-farenddevice=SEP3C0E236D0240;x-farendaddr=8'
[May 28 07:29:09] DEBUG[28416] sip/reqresp_parser.c: No supported scheme found in ' <sip:8504 at 10.214.104.121;x-nearend;x-refci=19259122;x-nearendclusterid=StandAloneCluster;x-nearenddevice=SEP7C95F33EEDDF;x-nearendaddr=8555;x-farendrefci=19259121;x-farendclusterid=StandAloneCluster;x-farenddevice=SEP3C0E236D0240;x-farendaddr=8' using the scheme[s] sip:,sips:
{noformat}

So. I'm no developer, but I'd suppose there is a character length limit to whatever variable or array the header is read into before being parsed.

> Incorrect parsing SIP display info
> ----------------------------------
>
>                 Key: ASTERISK-23790
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23790
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 1.8.26.1, 12.2.0
>         Environment: CentOS 6.5
>            Reporter: uniken1
>            Assignee: uniken1
>         Attachments: myDebugLog
>
>
> Asterisk drop call from trunk when SIP display info pressent in SIP invite packet. When I tcpdump packets I found that Asterisk incorrect parsing SIP packet. It said "No closing bracket found...", but bracket realy exists.
> Check screens:
> http://i64.fastpic.ru/big/2014/0526/cd/207e0e4f6924812d1bcdbe2b5283eacd.png
> http://i64.fastpic.ru/big/2014/0526/ab/5764bee7a86881b6a29065396d554cab.png



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list