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_ss7.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_ss7.c')
-rw-r--r-- | channels/sig_ss7.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/channels/sig_ss7.c b/channels/sig_ss7.c index 12cc2806c..9edb04bbb 100644 --- a/channels/sig_ss7.c +++ b/channels/sig_ss7.c @@ -120,6 +120,14 @@ static void sig_ss7_set_digital(struct sig_ss7_chan *p, int is_digital) } } +static void sig_ss7_set_outgoing(struct sig_ss7_chan *p, int is_outgoing) +{ + p->outgoing = is_outgoing; + if (p->calls->set_outgoing) { + p->calls->set_outgoing(p->chan_pvt, is_outgoing); + } +} + static void sig_ss7_set_inservice(struct sig_ss7_chan *p, int is_inservice) { if (p->calls->set_inservice) { @@ -1570,7 +1578,7 @@ int sig_ss7_hangup(struct sig_ss7_chan *p, struct ast_channel *ast) p->owner = NULL; sig_ss7_set_dialing(p, 0); - p->outgoing = 0; + sig_ss7_set_outgoing(p, 0); p->progress = 0; p->rlt = 0; p->exten[0] = '\0'; @@ -1755,10 +1763,10 @@ struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law { struct ast_channel *ast; - p->outgoing = 1; + sig_ss7_set_outgoing(p, 1); ast = sig_ss7_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability, p->exten, requestor); if (!ast) { - p->outgoing = 0; + sig_ss7_set_outgoing(p, 0); /* Release the allocated channel. Only have to deal with the linkset lock. */ ast_mutex_lock(&p->ss7->lock); |