summaryrefslogtreecommitdiff
path: root/channels/sig_analog.c
diff options
context:
space:
mode:
authorAlec L Davis <sivad.a@paradise.net.nz>2012-02-18 08:02:08 +0000
committerAlec L Davis <sivad.a@paradise.net.nz>2012-02-18 08:02:08 +0000
commita4f6d96b2e7774521076e6b8648af14f49e7a5bd (patch)
tree4bf8aa8f0ef379f64b08dfc576d9621b811d1f6d /channels/sig_analog.c
parent3816fdde94216189e9bbe956a2ec520d8f2c62fa (diff)
push 'outgoing' flag from sig_XXX up to chan_dahdi
'p->outgoing' in chan_dahdi and sig_analog wern't kept in sync, particulary FXS ast_hangup didn't clear the 'outgoing' flag. sig_pri and sig_ss7 were keeping 'outgoing' flag insync. Now provides a callback for all the low level sig_XXX modules. (issue ASTERISK-19316) alecdavis (license 585) Reported by: Jeremy Pepper Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1747/ ........ Merged revisions 355850 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355851 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_analog.c')
-rw-r--r--channels/sig_analog.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index ecb62b938..21a96317a 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -512,6 +512,14 @@ static int analog_on_hook(struct analog_pvt *p)
return -1;
}
+static void analog_set_outgoing(struct analog_pvt *p, int is_outgoing)
+{
+ p->outgoing = is_outgoing;
+ if (p->calls->set_outgoing) {
+ p->calls->set_outgoing(p->chan_pvt, is_outgoing);
+ }
+}
+
static int analog_check_for_conference(struct analog_pvt *p)
{
if (p->calls->check_for_conference) {
@@ -796,11 +804,11 @@ struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const s
}
}
- p->outgoing = 1;
+ analog_set_outgoing(p, 1);
ast = analog_new_ast_channel(p, AST_STATE_RESERVED, 0,
p->owner ? ANALOG_SUB_CALLWAIT : ANALOG_SUB_REAL, requestor);
if (!ast) {
- p->outgoing = 0;
+ analog_set_outgoing(p, 0);
}
return ast;
}
@@ -1026,7 +1034,7 @@ int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest
}
p->dialednone = 0;
- p->outgoing = 1;
+ analog_set_outgoing(p, 1);
mysig = p->sig;
if (p->outsigmod > -1) {
@@ -1429,7 +1437,7 @@ int analog_hangup(struct analog_pvt *p, struct ast_channel *ast)
analog_set_ringtimeout(p, 0);
analog_set_confirmanswer(p, 0);
analog_set_pulsedial(p, 0);
- p->outgoing = 0;
+ analog_set_outgoing(p, 0);
p->onhooktime = time(NULL);
p->cidrings = 1;