mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 18:38:02 +00:00
Don't double generate events
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
14
channel.c
14
channel.c
@@ -1540,12 +1540,14 @@ struct ast_channel *ast_request(char *type, int format, void *data)
|
|||||||
c = chan->requester(type, capabilities, data);
|
c = chan->requester(type, capabilities, data);
|
||||||
if (c) {
|
if (c) {
|
||||||
// ast_device_state_changed(c->name);
|
// ast_device_state_changed(c->name);
|
||||||
manager_event(EVENT_FLAG_CALL, "Newchannel",
|
if (c->_state == AST_STATE_DOWN) {
|
||||||
"Channel: %s\r\n"
|
manager_event(EVENT_FLAG_CALL, "Newchannel",
|
||||||
"State: %s\r\n"
|
"Channel: %s\r\n"
|
||||||
"Callerid: %s\r\n"
|
"State: %s\r\n"
|
||||||
"Uniqueid: %s\r\n",
|
"Callerid: %s\r\n"
|
||||||
c->name, ast_state2str(c->_state), c->callerid ? c->callerid : "<unknown>", c->uniqueid);
|
"Uniqueid: %s\r\n",
|
||||||
|
c->name, ast_state2str(c->_state), c->callerid ? c->callerid : "<unknown>", c->uniqueid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user