Index: include/asterisk/features.h =================================================================== --- include/asterisk/features.h (revision 330704) +++ include/asterisk/features.h (working copy) @@ -119,6 +119,8 @@ /*! \brief Bridge a call, optionally allowing redirection */ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,struct ast_bridge_config *config); +int ast_pickup_active(struct ast_channel *chan); + /*! * \brief Test if a channel can be picked up. * Index: main/channel.c =================================================================== --- main/channel.c (revision 330704) +++ main/channel.c (working copy) @@ -68,6 +68,7 @@ #include "asterisk/stringfields.h" #include "asterisk/global_datastores.h" #include "asterisk/data.h" +#include "asterisk/features.h" #ifdef HAVE_EPOLL #include @@ -2809,6 +2810,13 @@ ast_channel_unlock(chan); return 0; } + + if (ast_pickup_active(chan)) { + ast_log(LOG_ERROR, "==================Pickup active on this channel '%s'=========================\n", chan->name); +// ast_channel_unlock(chan); +// return 0; + } + ast_channel_unlock(chan); ao2_unlink(channels, chan);