[asterisk-bugs] [JIRA] (ASTERISK-22574) Value of expires= is ignored in the Contact header

Filip Jenicek (JIRA) noreply at issues.asterisk.org
Mon Sep 23 03:08:02 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-22574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Jenicek updated ASTERISK-22574:
-------------------------------------

    Description: 
Asterisk ignores the value of expires=<val> in the Contact header of a SIP Registry response when it doesn't end with a semicolon.

The following code reads "%30d;".

tmptmp = strcasestr(contact, "expires=");
if (tmptmp) {
	if (sscanf(tmptmp + 8, "%30d;", &expires) != 1)
		expires = 0;
	}
}

For example: "Contact: <sip:123456 at 178.33.22.11:5060;transport=UDP>;expires=1198"

  was:
Asterisk ignores the value of expires=<val> in the Contact header of a SIP Registry response when it ends with a semicolon.

The following code reads "%30d;".

tmptmp = strcasestr(contact, "expires=");
if (tmptmp) {
	if (sscanf(tmptmp + 8, "%30d;", &expires) != 1)
		expires = 0;
	}
}

For example: "Contact: <sip:123456 at 178.33.22.11:5060;transport=UDP>;expires=1198"

    
> Value of expires= is ignored in the Contact header
> --------------------------------------------------
>
>                 Key: ASTERISK-22574
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22574
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Registration
>    Affects Versions: 1.8.18.0
>         Environment: Linux Operator 3.2.0-686 #1 SMP i686 GNU/Linux
> Asterisk 1.8.18.0
>            Reporter: Filip Jenicek
>         Attachments: chan_sip_expires.patch
>
>
> Asterisk ignores the value of expires=<val> in the Contact header of a SIP Registry response when it doesn't end with a semicolon.
> The following code reads "%30d;".
> tmptmp = strcasestr(contact, "expires=");
> if (tmptmp) {
> 	if (sscanf(tmptmp + 8, "%30d;", &expires) != 1)
> 		expires = 0;
> 	}
> }
> For example: "Contact: <sip:123456 at 178.33.22.11:5060;transport=UDP>;expires=1198"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list