diff -Nru asterisk-1.8.4.4~dfsg/debian/changelog asterisk-1.8.4.4~dfsg/debian/changelog --- asterisk-1.8.4.4~dfsg/debian/changelog 2011-09-20 16:26:25.000000000 -0400 +++ asterisk-1.8.4.4~dfsg/debian/changelog 2012-03-06 13:37:37.000000000 -0500 @@ -1,3 +1,11 @@ +asterisk (1:1.8.4.4~dfsg-2ubuntu2) oneiric-proposed; urgency=low + + * debian/patches/backport-r312866.diff + - Responding to OPTIONS packet with 404 because Asterisk not looking for + "s" extension (LP: #920020) + + -- Paul Belanger Tue, 06 Mar 2012 13:37:28 -0500 + asterisk (1:1.8.4.4~dfsg-2ubuntu1) oneiric; urgency=low * Merge from debian unstable (LP: #852479). Remaining changes: diff -Nru asterisk-1.8.4.4~dfsg/debian/patches/backport-r312866.diff asterisk-1.8.4.4~dfsg/debian/patches/backport-r312866.diff --- asterisk-1.8.4.4~dfsg/debian/patches/backport-r312866.diff 1969-12-31 19:00:00.000000000 -0500 +++ asterisk-1.8.4.4~dfsg/debian/patches/backport-r312866.diff 2012-03-06 13:33:02.000000000 -0500 @@ -0,0 +1,59 @@ +From: Richard Mudgett +Subject: Responding to OPTIONS packet with 404 because Asterisk not looking for "s" extension + The get_destination() function was not using the "s" extension when the + request URI did not specify an extension. This is a regression caused + when the URI parsing code was extracted into parse_uri(). + . + Made get_destination() substitute the "s" extension when the parsed URI + results in an empty string. +Origin: upstream, http://svnview.digium.com/svn/asterisk?revision=312866&view=revision +Bug: https://issues.asterisk.org/jira/browse/ASTERISK-16997 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/920020 +--- a/channels/chan_sip.c ++++ b/channels/chan_sip.c +@@ -14555,16 +14555,20 @@ static int get_rdnis(struct sip_pvt *p, + return 0; + } + +-/*! \brief Find out who the call is for. +- We use the request uri as a destination. +- This code assumes authentication has been done, so that the +- device (peer/user) context is already set. +- \return 0 on success (found a matching extension), non-zero on failure +- +- \note If the incoming uri is a SIPS: uri, we are required to carry this across +- the dialplan, so that the outbound call also is a sips: call or encrypted +- IAX2 call. If that's not available, the call should FAIL. +-*/ ++/*! ++ * \brief Find out who the call is for. ++ * ++ * \details ++ * We use the request uri as a destination. ++ * This code assumes authentication has been done, so that the ++ * device (peer/user) context is already set. ++ * ++ * \return 0 on success (found a matching extension), non-zero on failure ++ * ++ * \note If the incoming uri is a SIPS: uri, we are required to carry this across ++ * the dialplan, so that the outbound call also is a sips: call or encrypted ++ * IAX2 call. If that's not available, the call should FAIL. ++ */ + static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id) + { + char tmp[256] = "", *uri, *domain, *dummy = NULL; +@@ -14590,6 +14594,14 @@ static enum sip_get_dest_result get_dest + + SIP_PEDANTIC_DECODE(domain); + SIP_PEDANTIC_DECODE(uri); ++ if (ast_strlen_zero(uri)) { ++ /* ++ * Either there really was no extension found or the request ++ * URI had encoded nulls that made the string "empty". Use "s" ++ * as the extension. ++ */ ++ uri = "s"; ++ } + + ast_string_field_set(p, domain, domain); + diff -Nru asterisk-1.8.4.4~dfsg/debian/patches/series asterisk-1.8.4.4~dfsg/debian/patches/series --- asterisk-1.8.4.4~dfsg/debian/patches/series 2011-09-20 16:26:25.000000000 -0400 +++ asterisk-1.8.4.4~dfsg/debian/patches/series 2012-03-06 13:33:21.000000000 -0500 @@ -24,3 +24,4 @@ no_uname kfreebsd gcc46 +backport-r312866.diff