[svn-commits] mjordan: tag 10.2.0-rc3 r357265 - in /tags/10.2.0-rc3: ./ channels/ main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Feb 28 11:57:29 CST 2012
Author: mjordan
Date: Tue Feb 28 11:57:25 2012
New Revision: 357265
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=357265
Log:
Updates for 10.2.0-rc3
Updated:
1) .version
2) ChangeLog
3) Removed old summaries
4) Merged r355733, r356476, r357095
Removed:
tags/10.2.0-rc3/asterisk-10.2.0-rc2-summary.html
tags/10.2.0-rc3/asterisk-10.2.0-rc2-summary.txt
Modified:
tags/10.2.0-rc3/ (props changed)
tags/10.2.0-rc3/.version
tags/10.2.0-rc3/ChangeLog
tags/10.2.0-rc3/channels/chan_sip.c
tags/10.2.0-rc3/main/channel.c
Propchange: tags/10.2.0-rc3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 11:57:25 2012
@@ -1,1 +1,1 @@
-/branches/10:353372,353397,353916,354000,354496,354543,354548
+/branches/10:353372,353397,353916,354000,354496,354543,354548,355733,356476,357095
Modified: tags/10.2.0-rc3/.version
URL: http://svnview.digium.com/svn/asterisk/tags/10.2.0-rc3/.version?view=diff&rev=357265&r1=357264&r2=357265
==============================================================================
--- tags/10.2.0-rc3/.version (original)
+++ tags/10.2.0-rc3/.version Tue Feb 28 11:57:25 2012
@@ -1,1 +1,1 @@
-10.2.0-rc2
+10.2.0-rc3
Modified: tags/10.2.0-rc3/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/10.2.0-rc3/ChangeLog?view=diff&rev=357265&r1=357264&r2=357265
==============================================================================
--- tags/10.2.0-rc3/ChangeLog (original)
+++ tags/10.2.0-rc3/ChangeLog Tue Feb 28 11:57:25 2012
@@ -1,3 +1,66 @@
+2012-02-28 Asterisk Development Team <asteriskteam at digium.com>
+
+ * Asterisk 10.2.0-rc3 Released.
+
+ * main/channel.c: Fix callerid of Originated calls.
+
+ The callerid of originated calls (independent of mechanism) was not
+ being passed to the outbound channel. This patch fixes that. Thanks
+ to Matt Riddell for tracking this down.
+ (closes issue ASTERISK-19385)
+ Reported by: ornix
+ patches:
+ callerid.diff uploaded by Matt Riddell (license #5023)
+
+ * 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-10 Asterisk Development Team <asteriskteam at digium.com>
* Asterisk 10.2.0-rc2 Released.
Modified: tags/10.2.0-rc3/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/tags/10.2.0-rc3/channels/chan_sip.c?view=diff&rev=357265&r1=357264&r2=357265
==============================================================================
--- tags/10.2.0-rc3/channels/chan_sip.c (original)
+++ tags/10.2.0-rc3/channels/chan_sip.c Tue Feb 28 11:57:25 2012
@@ -1293,7 +1293,7 @@
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);
@@ -8120,7 +8120,7 @@
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);
@@ -10594,7 +10594,15 @@
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);
}
@@ -13963,13 +13971,13 @@
{
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);
@@ -14546,8 +14554,9 @@
}
}
-/*! \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;
@@ -14565,8 +14574,11 @@
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
@@ -20567,7 +20579,7 @@
* */
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)) {
@@ -20617,7 +20629,7 @@
* */
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;
@@ -20643,7 +20655,7 @@
* */
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)) {
@@ -20743,7 +20755,7 @@
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 */
@@ -23309,7 +23321,7 @@
*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);
@@ -25346,7 +25358,7 @@
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");
Modified: tags/10.2.0-rc3/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/tags/10.2.0-rc3/main/channel.c?view=diff&rev=357265&r1=357264&r2=357265
==============================================================================
--- tags/10.2.0-rc3/main/channel.c (original)
+++ tags/10.2.0-rc3/main/channel.c Tue Feb 28 11:57:25 2012
@@ -5544,6 +5544,16 @@
}
}
+ /*
+ * I seems strange to set the CallerID on an outgoing call leg
+ * to whom we are calling, but this function's callers are doing
+ * various Originate methods. This call leg goes to the local
+ * user. Once the local user answers, the dialplan needs to be
+ * able to access the CallerID from the CALLERID function as if
+ * the local user had placed this call.
+ */
+ ast_set_callerid(chan, cid_num, cid_name, cid_num);
+
ast_set_flag(chan->cdr, AST_CDR_FLAG_ORIGINATED);
ast_party_connected_line_set_init(&connected, &chan->connected);
if (cid_num) {
More information about the svn-commits
mailing list