Index: apps/app_directed_pickup.c =================================================================== --- apps/app_directed_pickup.c (revision 315724) +++ apps/app_directed_pickup.c (working copy) @@ -147,10 +147,12 @@ /* Helper function that determines whether a channel is capable of being picked up */ static int can_pickup(struct ast_channel *chan) { - if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN)) + ast_log(LOG_NOTICE, "chan=%s state=%s\n", chan->name, ast_state2str(chan->_state)); + if (!chan->pbx && (chan->_state == AST_STATE_DIALING || chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN)) { return 1; - else + } else { return 0; + } } struct pickup_by_name_args {