Merged revisions 37212 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37212 | bweschke | 2006-07-06 15:38:45 -0500 (Thu, 06 Jul 2006) | 3 lines Don't do wierd things on a callback agent that has attempted logoff while still on the phone. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
092304ffa9
commit
4149f37efa
|
@ -771,14 +771,16 @@ static int agent_hangup(struct ast_channel *ast)
|
|||
ast_channel_lock(p->chan);
|
||||
ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
|
||||
ast_channel_unlock(p->chan);
|
||||
} else {
|
||||
} else if (p->loginstart) {
|
||||
ast_channel_lock(p->chan);
|
||||
ast_moh_start(p->chan, p->moh);
|
||||
ast_channel_unlock(p->chan);
|
||||
}
|
||||
}
|
||||
ast_mutex_unlock(&p->lock);
|
||||
ast_device_state_changed("Agent/%s", p->agent);
|
||||
/* Only register a device state change if the agent is still logged in */
|
||||
if (p->loginstart)
|
||||
ast_device_state_changed("Agent/%s", p->agent);
|
||||
|
||||
if (p->pending) {
|
||||
AST_LIST_LOCK(&agents);
|
||||
|
|
Loading…
Reference in New Issue