diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index 8a8297e97abcf71788ec4162b5a951b4f97e202b..a6ca09ac5f740fd3362f63c1c6f7dfc94f15cf91 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -216,7 +216,7 @@ static int pickup_by_exten(struct ast_channel *chan, const char *exten, const ch while ((target = ast_channel_iterator_next(iter))) { ast_channel_lock(target); - if (can_pickup(target)) { + if ((chan != target) && can_pickup(target)) { break; } ast_channel_unlock(target);