[asterisk-commits] mjordan: tag 1.8.9.0-rc3 r352286 - in /tags/1.8.9.0-rc3: ./ channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 24 10:19:37 CST 2012
Author: mjordan
Date: Tue Jan 24 10:19:31 2012
New Revision: 352286
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=352286
Log:
Commit changes: r349731, r352199, r352014, r351504
Removed:
tags/1.8.9.0-rc3/asterisk-1.8.9.0-rc2-summary.html
tags/1.8.9.0-rc3/asterisk-1.8.9.0-rc2-summary.txt
Modified:
tags/1.8.9.0-rc3/ (props changed)
tags/1.8.9.0-rc3/.version
tags/1.8.9.0-rc3/ChangeLog
tags/1.8.9.0-rc3/channels/chan_sip.c
tags/1.8.9.0-rc3/main/features.c
tags/1.8.9.0-rc3/main/file.c
Propchange: tags/1.8.9.0-rc3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 24 10:19:31 2012
@@ -1,1 +1,1 @@
-/branches/1.8:350552
+/branches/1.8:349731,350552,351504,352014,352199
Modified: tags/1.8.9.0-rc3/.version
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.9.0-rc3/.version?view=diff&rev=352286&r1=352285&r2=352286
==============================================================================
--- tags/1.8.9.0-rc3/.version (original)
+++ tags/1.8.9.0-rc3/.version Tue Jan 24 10:19:31 2012
@@ -1,1 +1,1 @@
-1.8.9.0-rc2
+1.8.9.0-rc3
Modified: tags/1.8.9.0-rc3/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.9.0-rc3/ChangeLog?view=diff&rev=352286&r1=352285&r2=352286
==============================================================================
--- tags/1.8.9.0-rc3/ChangeLog (original)
+++ tags/1.8.9.0-rc3/ChangeLog Tue Jan 24 10:19:31 2012
@@ -1,3 +1,34 @@
+2012-01-24 Asterisk Development Team <asteriskteam at digium.com>
+
+ * Asterisk 1.8.9.0-rc3 Released.
+
+ * Test results:
+ http://bamboo.asterisk.org/browse/TESTING-ASTERISK1890RCS-
+
+ * main/file.c: Allow playback of formats that don't support
+ seeking. ast_streamfile previously did unconditional seeking
+ on files that broke playback of formats that don't support that
+ functionality. This patch avoids the seek that was causing the
+ problem. (closes issue ASTERISK-18994) Patch-by: Timo Teras
+
+ * channels/chan_sip.c: AST-2012-001: prevent crash when an SDP offer
+ is received with an encrypted video stream when support for video
+ is disabled and res_srtp is loaded. (closes issue ASTERISK-19202)
+ Reported by: Catalin Sanda
+
+ * channels/chan_sip.c: Fix RTP reference leak. If a blind transfer
+ were initiated using a REFER without a prior reINVITE to place the
+ call on hold, AND if Asterisk were sending RTCP reports, then there
+ was a reference leak for the RTP instance of the transferer.
+ (closes issue ASERISK-19192) Reported by: Tyuta Vitali
+
+ * main/features.c: Fix blind transfers from failing if an 'h' extension
+ is present. This prevents the 'h' extension from being run on the
+ transferee channel when it is transferred via a native transfer
+ mechanism such as SIP REFER. (closes issue ASTERISK-19173) Reported
+ by: Ross Beer Tested by: Kristjan Vrban Patches: ASTERISK-19173 by
+ Mark Michelson (license 5049)
+
2012-01-13 Asterisk Development Team <asteriskteam at digium.com>
* Asterisk 1.8.9.0-rc2 Released.
Modified: tags/1.8.9.0-rc3/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.9.0-rc3/channels/chan_sip.c?view=diff&rev=352286&r1=352285&r2=352286
==============================================================================
--- tags/1.8.9.0-rc3/channels/chan_sip.c (original)
+++ tags/1.8.9.0-rc3/channels/chan_sip.c Tue Jan 24 10:19:31 2012
@@ -3860,6 +3860,7 @@
ast_channel_unref(owner);
} else if (p->refer && !p->alreadygone) {
ast_debug(3, "Finally hanging up channel after transfer: %s\n", p->callid);
+ stop_media_flows(p);
transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
append_history(p, "ReferBYE", "Sending BYE on transferer call leg %s", p->callid);
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
@@ -20202,15 +20203,22 @@
case 200: /* Notify accepted */
/* They got the notify, this is the end */
if (p->owner) {
- if (!p->refer) {
+ if (p->refer) {
+ ast_log(LOG_NOTICE, "Got OK on REFER Notify message\n");
+ } else {
ast_log(LOG_WARNING, "Notify answer on an owned channel? - %s\n", p->owner->name);
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_NORMAL_UNSPECIFIED);
- } else {
- ast_debug(4, "Got OK on REFER Notify message\n");
+ /*
+ * XXX There is discrepancy on whether a hangup should be queued
+ * or not. This code used to be duplicated in two places, and the more
+ * frequently hit area had this disabled, making it the de facto
+ * "correct" way to go.
+ *
+ * ast_queue_hangup_with_cause(p->owner, AST_CAUSE_NORMAL_UNSPECIFIED);
+ */
}
} else {
- if (p->subscribed == NONE) {
- ast_debug(4, "Got 200 accepted on NOTIFY\n");
+ if (p->subscribed == NONE && !p->refer) {
+ ast_debug(4, "Got 200 accepted on NOTIFY %s\n", p->callid);
pvt_set_needdestroy(p, "received 200 response");
}
if (ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE)) {
@@ -20234,6 +20242,9 @@
ast_log(LOG_NOTICE, "Failed to authenticate on NOTIFY to '%s'\n", get_header(&p->initreq, "From"));
pvt_set_needdestroy(p, "failed to authenticate NOTIFY");
}
+ break;
+ case 481: /* Call leg does not exist */
+ pvt_set_needdestroy(p, "Received 481 response for NOTIFY");
break;
}
}
@@ -20829,6 +20840,9 @@
} else if (sipmethod == SIP_MESSAGE) {
/* More good gravy! */
handle_response_message(p, resp, rest, req, seqno);
+ } else if (sipmethod == SIP_NOTIFY) {
+ /* The gravy train continues to roll */
+ handle_response_notify(p, resp, rest, req, seqno);
} else if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
switch(resp) {
case 100: /* 100 Trying */
@@ -20844,8 +20858,6 @@
p->authtries = 0; /* Reset authentication counter */
if (sipmethod == SIP_INVITE) {
handle_response_invite(p, resp, rest, req, seqno);
- } else if (sipmethod == SIP_NOTIFY) {
- handle_response_notify(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_REGISTER) {
handle_response_register(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_SUBSCRIBE) {
@@ -20860,8 +20872,6 @@
case 407: /* Proxy auth required */
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, seqno);
- else if (sipmethod == SIP_NOTIFY)
- handle_response_notify(p, resp, rest, req, seqno);
else if (sipmethod == SIP_SUBSCRIBE)
handle_response_subscribe(p, resp, rest, req, seqno);
else if (p->registry && sipmethod == SIP_REGISTER)
@@ -20936,8 +20946,6 @@
handle_response_invite(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_SUBSCRIBE) {
handle_response_subscribe(p, resp, rest, req, seqno);
- } else if (sipmethod == SIP_NOTIFY) {
- pvt_set_needdestroy(p, "received 481 response");
} else if (sipmethod == SIP_BYE) {
/* The other side has no transaction to bye,
just assume it's all right then */
@@ -21094,24 +21102,6 @@
ast_debug(1, "Got 200 OK on CANCEL\n");
/* Wait for 487, then destroy */
- } else if (sipmethod == SIP_NOTIFY) {
- /* They got the notify, this is the end */
- if (p->owner) {
- if (p->refer) {
- ast_debug(1, "Got 200 OK on NOTIFY for transfer\n");
- } else
- ast_log(LOG_WARNING, "Notify answer on an owned channel?\n");
- /* ast_queue_hangup(p->owner); Disabled */
- } else {
- if (!p->subscribed && !p->refer) {
- pvt_set_needdestroy(p, "transaction completed");
- }
- if (ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE)) {
- /* Ready to send the next state we have on queue */
- ast_clear_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
- cb_extensionstate((char *)p->context, (char *)p->exten, p->laststate, (void *) p);
- }
- }
} else if (sipmethod == SIP_BYE) {
pvt_set_needdestroy(p, "transaction completed");
}
@@ -21132,8 +21122,6 @@
/* Re-invite failed */
handle_response_invite(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_BYE) {
- pvt_set_needdestroy(p, "received 481 response");
- } else if (sipmethod == SIP_NOTIFY) {
pvt_set_needdestroy(p, "received 481 response");
} else if (sipdebug) {
ast_debug(1, "Remote host can't match request %s to call '%s'. Giving up\n", sip_methods[sipmethod].text, p->callid);
@@ -29356,6 +29344,12 @@
static int process_crypto(struct sip_pvt *p, struct ast_rtp_instance *rtp, struct sip_srtp **srtp, const char *a)
{
+ /* If no RTP instance exists for this media stream don't bother processing the crypto line */
+ if (!rtp) {
+ ast_debug(3, "Received offer with crypto line for media stream that is not enabled\n");
+ return FALSE;
+ }
+
if (strncasecmp(a, "crypto:", 7)) {
return FALSE;
}
Modified: tags/1.8.9.0-rc3/main/features.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.9.0-rc3/main/features.c?view=diff&rev=352286&r1=352285&r2=352286
==============================================================================
--- tags/1.8.9.0-rc3/main/features.c (original)
+++ tags/1.8.9.0-rc3/main/features.c Tue Jan 24 10:19:31 2012
@@ -4096,6 +4096,17 @@
if (!f || (f->frametype == AST_FRAME_CONTROL &&
(f->subclass.integer == AST_CONTROL_HANGUP || f->subclass.integer == AST_CONTROL_BUSY ||
f->subclass.integer == AST_CONTROL_CONGESTION))) {
+ /*
+ * If the bridge was broken for a hangup that isn't real, then
+ * then don't run the h extension, because the channel isn't
+ * really hung up. This should really only happen with AST_SOFTHANGUP_ASYNCGOTO,
+ * but it doesn't hurt to check AST_SOFTHANGUP_UNBRIDGE either.
+ */
+ ast_channel_lock(chan);
+ if (chan->_softhangup & (AST_SOFTHANGUP_ASYNCGOTO | AST_SOFTHANGUP_UNBRIDGE)) {
+ ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT);
+ }
+ ast_channel_unlock(chan);
res = -1;
break;
}
Modified: tags/1.8.9.0-rc3/main/file.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.9.0-rc3/main/file.c?view=diff&rev=352286&r1=352285&r2=352286
==============================================================================
--- tags/1.8.9.0-rc3/main/file.c (original)
+++ tags/1.8.9.0-rc3/main/file.c Tue Jan 24 10:19:31 2012
@@ -949,6 +949,7 @@
struct ast_filestream *fs;
struct ast_filestream *vfs=NULL;
char fmt[256];
+ off_t pos;
int seekattempt;
int res;
@@ -961,12 +962,17 @@
/* check to see if there is any data present (not a zero length file),
* done this way because there is no where for ast_openstream_full to
* return the file had no data. */
- seekattempt = fseek(fs->f, -1, SEEK_END);
- if (seekattempt && errno == EINVAL) {
- /* Zero-length file, as opposed to a pipe */
- return 0;
+ pos = ftello(fs->f);
+ seekattempt = fseeko(fs->f, -1, SEEK_END);
+ if (seekattempt) {
+ if (errno == EINVAL) {
+ /* Zero-length file, as opposed to a pipe */
+ return 0;
+ } else {
+ ast_seekstream(fs, 0, SEEK_SET);
+ }
} else {
- ast_seekstream(fs, 0, SEEK_SET);
+ fseeko(fs->f, pos, SEEK_SET);
}
vfs = ast_openvstream(chan, filename, preflang);
More information about the asterisk-commits
mailing list