Index: asterisk/channel.c =================================================================== RCS file: /usr/cvsroot/asterisk/channel.c,v retrieving revision 1.48 diff -u -r1.48 channel.c --- asterisk/channel.c 1 Oct 2003 14:59:40 -0000 1.48 +++ asterisk/channel.c 1 Oct 2003 19:30:48 -0000 @@ -1621,10 +1621,14 @@ if (c->_state == AST_STATE_DOWN) { manager_event(EVENT_FLAG_CALL, "Newchannel", "Channel: %s\r\n" + "Context: %s\r\n" "State: %s\r\n" "Callerid: %s\r\n" "Uniqueid: %s\r\n", - c->name, ast_state2str(c->_state), c->callerid ? c->callerid : "", c->uniqueid); + c->name, + c->context ? c->context : "", + ast_state2str(c->_state), + c->callerid ? c->callerid : "", c->uniqueid); } } return c; @@ -2127,11 +2131,12 @@ ast_cdr_setcid(chan->cdr, chan); manager_event(EVENT_FLAG_CALL, "Newcallerid", "Channel: %s\r\n" + "Context: %s\r\n" "Callerid: %s\r\n" "Uniqueid: %s\r\n", - chan->name, chan->callerid ? - chan->callerid : "", - chan->uniqueid); + chan->name, + chan->context ? chan->context : "", + chan->callerid ? chan->callerid : "", chan->uniqueid); } int ast_setstate(struct ast_channel *chan, int state) @@ -2143,17 +2148,25 @@ ast_device_state_changed(chan->name); manager_event(EVENT_FLAG_CALL, "Newchannel", "Channel: %s\r\n" + "Context: %s\r\n" "State: %s\r\n" "Callerid: %s\r\n" "Uniqueid: %s\r\n", - chan->name, ast_state2str(chan->_state), chan->callerid ? chan->callerid : "", chan->uniqueid); + chan->name, + chan->context ? chan->context : "", + ast_state2str(chan->_state), + chan->callerid ? chan->callerid : "", chan->uniqueid); } else { manager_event(EVENT_FLAG_CALL, "Newstate", "Channel: %s\r\n" + "Context: %s\r\n" "State: %s\r\n" "Callerid: %s\r\n" "Uniqueid: %s\r\n", - chan->name, ast_state2str(chan->_state), chan->callerid ? chan->callerid : "", chan->uniqueid); + chan->name, + chan->context ? chan->context : "", + ast_state2str(chan->_state), + chan->callerid ? chan->callerid : "", chan->uniqueid); } } return 0;