Index: main/features.c =================================================================== --- main/features.c (revision 313097) +++ main/features.c (working copy) @@ -5744,14 +5744,14 @@ ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan_name); } + if (!ast_strlen_zero(pickupsound)) { + ast_stream_and_wait(chan, pickupsound, ""); + } + if ((res = ast_channel_masquerade(cur, chan))) { ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan_name, cur_name); } - if (!ast_strlen_zero(pickupsound)) { - ast_stream_and_wait(cur, pickupsound, ""); - } - /* If you want UniqueIDs, set channelvars in manager.conf to CHANNEL(uniqueid) */ ast_manager_event_multichan(EVENT_FLAG_CALL, "Pickup", 2, chans, "Channel: %s\r\nTargetChannel: %s\r\n", chan->name, cur->name);