from 1.8.27.0 to 1.8.28.0:
* The asterisk command line -I option and the asterisk.conf internal_timing
option are removed and always enabled if any timing module is loaded.
+* SIP (chan_sip) accounts dialed through a Local channel will now properly
+ hide the "1 missed call" if one of the other dialed accounts picks up the
+ call.
from 1.8.26.0 to 1.8.27.0:
* res_fax now returns the correct rates for V.27ter (4800 or 9600 bit/s).
}
ast_channel_early_bridge(chan, NULL);
- hanguptree(outgoing, NULL, 0); /* In this case, there's no answer anywhere */
+ /* When dialing local channels, the hangupcause of the parent channel
+ * tells us whether the call was answered elsewhere. */
+ hanguptree(outgoing, NULL, chan->hangupcause == AST_CAUSE_ANSWERED_ELSEWHERE ? 1 : 0);
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
senddialendevent(chan, pa.status);
ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);
#include <sys/signal.h>
#include "asterisk/lock.h"
+#include "asterisk/causes.h"
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
struct ast_frame f = { AST_FRAME_CONTROL, { AST_CONTROL_HANGUP }, .data.uint32 = ast->hangupcause };
struct ast_channel *owner = NULL;
struct ast_channel *chan = NULL;
+ int answered_elsewhere = 0;
if (!p) {
return -1;
isoutbound = IS_OUTBOUND(ast, p); /* just comparing pointer of ast */
if (p->chan && ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) {
+ answered_elsewhere = 1;
ast_set_flag(p->chan, AST_FLAG_ANSWERED_ELSEWHERE);
ast_debug(2, "This local call has the ANSWERED_ELSEWHERE flag set.\n");
}
p->chan = NULL;
} else {
if (p->chan) {
- ast_queue_hangup(p->chan);
+ /* Use the hangupcause to propagate the fact that the
+ * call was answered somewhere. */
+ if (answered_elsewhere) {
+ ast_queue_hangup_with_cause(p->chan, AST_CAUSE_ANSWERED_ELSEWHERE);
+ } else {
+ ast_queue_hangup(p->chan);
+ }
}
p->owner = NULL;
}