diff options
author | Alec L Davis <sivad.a@paradise.net.nz> | 2012-02-18 08:02:08 +0000 |
---|---|---|
committer | Alec L Davis <sivad.a@paradise.net.nz> | 2012-02-18 08:02:08 +0000 |
commit | a4f6d96b2e7774521076e6b8648af14f49e7a5bd (patch) | |
tree | 4bf8aa8f0ef379f64b08dfc576d9621b811d1f6d /channels/sig_pri.c | |
parent | 3816fdde94216189e9bbe956a2ec520d8f2c62fa (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_pri.c')
-rw-r--r-- | channels/sig_pri.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c index 28a640639..5c70179ef 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -180,6 +180,14 @@ static void sig_pri_set_digital(struct sig_pri_chan *p, int is_digital) } } +static void sig_pri_set_outgoing(struct sig_pri_chan *p, int is_outgoing) +{ + p->outgoing = is_outgoing; + if (p->calls->set_outgoing) { + p->calls->set_outgoing(p->chan_pvt, is_outgoing); + } +} + void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm) { /* @@ -1003,10 +1011,10 @@ struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law ast_debug(1, "%s %d\n", __FUNCTION__, p->channel); - p->outgoing = 1; + sig_pri_set_outgoing(p, 1); ast = sig_pri_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability, p->exten, requestor); if (!ast) { - p->outgoing = 0; + sig_pri_set_outgoing(p, 0); } return ast; } @@ -7228,7 +7236,7 @@ int sig_pri_hangup(struct sig_pri_chan *p, struct ast_channel *ast) return 0; } - p->outgoing = 0; + sig_pri_set_outgoing(p, 0); sig_pri_set_digital(p, 0); /* push up to parent for EC*/ #if defined(HAVE_PRI_CALL_WAITING) if (p->is_call_waiting) { @@ -7440,7 +7448,7 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rd } p->dialdest[0] = '\0'; - p->outgoing = 1; + sig_pri_set_outgoing(p, 1); ast_copy_string(dest, rdest, sizeof(dest)); AST_NONSTANDARD_APP_ARGS(args, dest, '/'); |