mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user