Merge 355733, 356476 for 10.1.3

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/10.1.3@356569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2012-02-23 23:31:02 +00:00
parent b0022437ae
commit 9d63a27b7a
5 changed files with 82 additions and 209 deletions

View File

@@ -1 +1 @@
10.1.2
10.1.3

View File

@@ -1,3 +1,55 @@
2012-02-23 Asterisk Development Team <asteriskteam@digium.com>
* Asterisk 10.1.3 Released.
* channels/chan_sip.c: Fix ACK routing for non-2xx responses.
When we send an ACK for a 2xx response to an INVITE, we are supposed
to use the learned route set. However, when we receive a non-2xx
final response to an INVITE, we are supposed to send the ACK to the
same place we initially sent the INVITE.
We had been doing this up until the changes went in that would build
a route set from provisional responses. That introduced a regression
where we would use the learned route set under all circumstances.
With this change, we now will set the destination of our ACK based on
the invitestate. If it is INV_COMPLETED then that means that we have
received a non-2xx final response (INV_TERMINATED indicates a 2xx
response was received). If it is INV_CANCELLED, then that means the
call is being canceled, which means that we should be ACKing a 487
response.
The other change introduced here is setting the invitestate to
INV_CONFIRMED when we send an ACK *after* the reqprep instead of
before. This way, we can tell in reqprep more easily what the
invitestate is prior to sending the ACK.
(closes issue ASTERISK-19389)
reported by Karsten Wemheuer
patches:
ASTERISK-19389v2.patch uploaded by Mark Michelson (license #5049)
* channels/chan_sip.c: Fix regressions with regards to route-set
creation on early dialogs.
This fixes two main issues:
1. Asterisk would send a CANCEL to the route created by the provisional
response instead of using the same destination it did in the initial
INVITE.
2. If a new route set arrives in a 200 OK than was in the 1XX response
(perfectly possible if our outbound INVITE gets forked), then the
route set in the 200 OK needs to overwrite the route set in the 1XX
response.
(closes issue ASTERISK-19358)
Reported by: Karsten Wemheuer
Tested by: Karsten Wemheuer
patches:
ASTERISK-19358.patch uploaded by Mark Michelson (license 5049)
ASTERISK-19358.patch uploaded by Stefan Schmidt (license 6034)
Review: https://reviewboard.asterisk.org/r/1749
2012-02-09 Asterisk Development Team <asteriskteam@digium.com>
* Asterisk 10.1.2 Released.

View File

@@ -1,73 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-10.1.2</title></head>
<body>
<h1 align="center"><a name="top">Release Summary</a></h1>
<h3 align="center">asterisk-10.1.2</h3>
<h3 align="center">Date: 2012-02-09</h3>
<h3 align="center">&lt;asteriskteam@digium.com&gt;</h3>
<hr/>
<h2 align="center">Table of Contents</h2>
<ol>
<li><a href="#summary">Summary</a></li>
<li><a href="#contributors">Contributors</a></li>
<li><a href="#commits">Other Changes</a></li>
<li><a href="#diffstat">Diffstat</a></li>
</ol>
<hr/>
<a name="summary"><h2 align="center">Summary</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
<p>The data in this summary reflects changes that have been made since the previous release, asterisk-10.1.1.</p>
<hr/>
<a name="contributors"><h2 align="center">Contributors</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
<table width="100%" border="0">
<tr>
<td width="33%"><h3>Coders</h3></td>
<td width="33%"><h3>Testers</h3></td>
<td width="33%"><h3>Reporters</h3></td>
</tr>
<tr valign="top">
<td>
2 mjordan<br/>
2 rmudgett<br/>
1 jrose<br/>
1 mmichelson<br/>
1 russell<br/>
1 twilson<br/>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
<hr/>
<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
<table width="100%" border="1">
<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354217">354217</a></td><td>rmudgett</td><td>Improved documentation of CLI "dialplan add extension" command.</td>
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-19222">ASTERISK-19222</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354270">354270</a></td><td>jrose</td><td>Fix column duplication bug in module reload for cdr_pgsql.</td>
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-19216">ASTERISK-19216</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354349">354349</a></td><td>twilson</td><td>Fix multiple SIP realtime issues</td>
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-19172">ASTERISK-19172</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354493">354493</a></td><td>russell</td><td>Remove some unnecessary locking from ast_hangup().</td>
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354496">354496</a></td><td>rmudgett</td><td>Fix crash in ParkAndAnnounce.</td>
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-19311">ASTERISK-19311</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354543">354543</a></td><td>mjordan</td><td>Fix SIP INFO DTMF handling for non-numeric codes</td>
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-18924">ASTERISK-18924</a>, <a href="https://issues.asterisk.org/jira/browse/ASTERISK-19290">ASTERISK-19290</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354546">354546</a></td><td>mmichelson</td><td>Adding reload support to res_fax.so</td>
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-16712">ASTERISK-16712</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/10?view=revision&revision=354548">354548</a></td><td>mjordan</td><td>Clean-up of minor formatting issues in r354542/3/4</td>
<td></td></tr></table>
<hr/>
<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
<pre>
apps/app_parkandannounce.c | 1
cdr/cdr_pgsql.c | 135 ++++++++++++------------
channels/chan_sip.c | 113 +++++++-------------
contrib/realtime/postgresql/realtime.sql | 8 +
main/channel.c | 39 +++----
pbx/pbx_config.c | 68 +++++++-----
res/res_fax.c | 168 +++++++++++++++++++++----------
7 files changed, 287 insertions(+), 245 deletions(-)
</pre><br/>
<hr/>
</body>
</html>

View File

@@ -1,118 +0,0 @@
Release Summary
asterisk-10.1.2
Date: 2012-02-09
<asteriskteam@digium.com>
----------------------------------------------------------------------
Table of Contents
1. Summary
2. Contributors
3. Other Changes
4. Diffstat
----------------------------------------------------------------------
Summary
[Back to Top]
This release includes only bug fixes. The changes included were made only
to address problems that have been identified in this release series.
Users should be able to safely upgrade to this version if this release
series is already in use. Users considering upgrading from a previous
release series are strongly encouraged to review the UPGRADE.txt document
as well as the CHANGES document for information about upgrading to this
release series.
The data in this summary reflects changes that have been made since the
previous release, asterisk-10.1.1.
----------------------------------------------------------------------
Contributors
[Back to Top]
This table lists the people who have submitted code, those that have
tested patches, as well as those that reported issues on the issue tracker
that were resolved in this release. For coders, the number is how many of
their patches (of any size) were committed into this release. For testers,
the number is the number of times their name was listed as assisting with
testing a patch. Finally, for reporters, the number is the number of
issues that they reported that were closed by commits that went into this
release.
Coders Testers Reporters
2 mjordan
2 rmudgett
1 jrose
1 mmichelson
1 russell
1 twilson
----------------------------------------------------------------------
Commits Not Associated with an Issue
[Back to Top]
This is a list of all changes that went into this release that did not
directly close an issue from the issue tracker. The commits may have been
marked as being related to an issue. If that is the case, the issue
numbers are listed here, as well.
+------------------------------------------------------------------------+
| Revision | Author | Summary | Issues Referenced |
|----------+------------+----------------------------+-------------------|
| | | Improved documentation of | |
| 354217 | rmudgett | CLI "dialplan add | ASTERISK-19222 |
| | | extension" command. | |
|----------+------------+----------------------------+-------------------|
| | | Fix column duplication bug | |
| 354270 | jrose | in module reload for | ASTERISK-19216 |
| | | cdr_pgsql. | |
|----------+------------+----------------------------+-------------------|
| 354349 | twilson | Fix multiple SIP realtime | ASTERISK-19172 |
| | | issues | |
|----------+------------+----------------------------+-------------------|
| 354493 | russell | Remove some unnecessary | |
| | | locking from ast_hangup(). | |
|----------+------------+----------------------------+-------------------|
| 354496 | rmudgett | Fix crash in | ASTERISK-19311 |
| | | ParkAndAnnounce. | |
|----------+------------+----------------------------+-------------------|
| 354543 | mjordan | Fix SIP INFO DTMF handling | ASTERISK-18924, |
| | | for non-numeric codes | ASTERISK-19290 |
|----------+------------+----------------------------+-------------------|
| 354546 | mmichelson | Adding reload support to | ASTERISK-16712 |
| | | res_fax.so | |
|----------+------------+----------------------------+-------------------|
| | | Clean-up of minor | |
| 354548 | mjordan | formatting issues in | |
| | | r354542/3/4 | |
+------------------------------------------------------------------------+
----------------------------------------------------------------------
Diffstat Results
[Back to Top]
This is a summary of the changes to the source code that went into this
release that was generated using the diffstat utility.
apps/app_parkandannounce.c | 1
cdr/cdr_pgsql.c | 135 ++++++++++++------------
channels/chan_sip.c | 113 +++++++-------------
contrib/realtime/postgresql/realtime.sql | 8 +
main/channel.c | 39 +++----
pbx/pbx_config.c | 68 +++++++-----
res/res_fax.c | 168 +++++++++++++++++++++----------
7 files changed, 287 insertions(+), 245 deletions(-)
----------------------------------------------------------------------

View File

@@ -1283,7 +1283,7 @@ static int auto_congest(const void *arg);
static struct sip_pvt *find_call(struct sip_request *req, struct ast_sockaddr *addr, const int intended_method);
static void free_old_route(struct sip_route *route);
static void list_route(struct sip_route *route);
static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards);
static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards, int resp);
static enum check_auth_result register_verify(struct sip_pvt *p, struct ast_sockaddr *addr,
struct sip_request *req, const char *uri);
static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *totag, const char *fromtag);
@@ -8023,7 +8023,7 @@ static void forked_invite_init(struct sip_request *req, const char *new_theirtag
ast_string_field_set(p, our_contact, original->our_contact);
ast_string_field_set(p, fullcontact, original->fullcontact);
parse_ok_contact(p, req);
build_route(p, req, 1);
build_route(p, req, 1, 0);
transmit_request(p, SIP_ACK, p->ocseq, XMIT_UNRELIABLE, TRUE);
transmit_request(p, SIP_BYE, 0, XMIT_RELIABLE, TRUE);
@@ -10473,7 +10473,15 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
snprintf(tmp, sizeof(tmp), "%d %s", seqno, sip_methods[sipmethod].text);
add_header(req, "Via", p->via);
if (p->route) {
/*
* Use the learned route set unless this is a CANCEL on an ACK for a non-2xx
* final response. For a CANCEL or ACK, we have to send to the same destination
* as the original INVITE.
*/
if (sipmethod == SIP_CANCEL ||
(sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED))) {
set_destination(p, ast_strdupa(p->uri));
} else if (p->route) {
set_destination(p, p->route->hop);
add_route(req, is_strict ? p->route->next : p->route);
}
@@ -13708,15 +13716,15 @@ static int transmit_request(struct sip_pvt *p, int sipmethod, int seqno, enum xm
{
struct sip_request resp;
if (sipmethod == SIP_ACK) {
p->invitestate = INV_CONFIRMED;
}
reqprep(&resp, p, sipmethod, seqno, newbranch);
if (sipmethod == SIP_CANCEL && p->answered_elsewhere) {
add_header(&resp, "Reason", "SIP;cause=200;text=\"Call completed elsewhere\"");
}
if (sipmethod == SIP_ACK) {
p->invitestate = INV_CONFIRMED;
}
return send_request(p, &resp, reliable, seqno ? seqno : p->ocseq);
}
@@ -14285,8 +14293,9 @@ static void list_route(struct sip_route *route)
}
}
/*! \brief Build route list from Record-Route header */
static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards)
/*! \brief Build route list from Record-Route header
\param resp the SIP response code or 0 for a request */
static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards, int resp)
{
struct sip_route *thishop, *head, *tail;
int start = 0;
@@ -14304,8 +14313,11 @@ static void build_route(struct sip_pvt *p, struct sip_request *req, int backward
p->route = NULL;
}
/* We only want to create the route set the first time this is called */
p->route_persistent = 1;
/* We only want to create the route set the first time this is called except
it is called from a provisional response.*/
if ((resp < 100) || (resp > 199)) {
p->route_persistent = 1;
}
/* Build a tailq, then assign it to p->route when done.
* If backwards, we add entries from the head so they end up
@@ -20288,7 +20300,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
* */
parse_ok_contact(p, req);
if (!reinvite) {
build_route(p, req, 1);
build_route(p, req, 1, resp);
}
if (!req->ignore && p->owner) {
if (get_rpid(p, req)) {
@@ -20338,7 +20350,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
* */
parse_ok_contact(p, req);
if (!reinvite) {
build_route(p, req, 1);
build_route(p, req, 1, resp);
}
if (!req->ignore && p->owner) {
struct ast_party_redirecting redirecting;
@@ -20364,7 +20376,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
* */
parse_ok_contact(p, req);
if (!reinvite) {
build_route(p, req, 1);
build_route(p, req, 1, resp);
}
if (!req->ignore && p->owner) {
if (get_rpid(p, req)) {
@@ -20464,7 +20476,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
parse_ok_contact(p, req);
/* Save Record-Route for any later requests we make on this dialogue */
if (!reinvite)
build_route(p, req, 1);
build_route(p, req, 1, resp);
if(set_address_from_contact(p)) {
/* Bad contact - we don't know how to reach this device */
@@ -23049,7 +23061,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
*recount = 1;
/* Save Record-Route for any later requests we make on this dialogue */
build_route(p, req, 0);
build_route(p, req, 0, 0);
if (c) {
ast_party_redirecting_init(&redirecting);
@@ -25014,7 +25026,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
if (sipdebug)
ast_debug(4, "Initializing initreq for method %s - callid %s\n", sip_methods[req->method].text, p->callid);
check_via(p, req);
build_route(p, req, 0);
build_route(p, req, 0, 0);
} else if (req->debug && req->ignore)
ast_verbose("Ignoring this SUBSCRIBE request\n");