Index: main/features.c =================================================================== --- main/features.c (revision 158632) +++ main/features.c (working copy) @@ -235,6 +235,8 @@ static int parkedplay = 0; /*!< Who to play the courtesy tone to */ static char xfersound[256]; /*!< Call transfer sound */ static char xferfailsound[256]; /*!< Call transfer failure sound */ +static char pickupsound[256]; /*!< Pickup sound */ +static char pickupfailsound[256]; /*!< Pickup failure sound */ static int adsipark; @@ -3310,6 +3312,8 @@ courtesytone[0] = '\0'; strcpy(xfersound, "beep"); strcpy(xferfailsound, "pbx-invalid"); + pickupsound[0] = '\0'; + pickupfailsound[0] = '\0'; adsipark = 0; comebacktoorigin = 1; @@ -3414,6 +3418,10 @@ ast_copy_string(xferfailsound, var->value, sizeof(xferfailsound)); } else if (!strcasecmp(var->name, "pickupexten")) { ast_copy_string(pickup_ext, var->value, sizeof(pickup_ext)); + } else if (!strcasecmp(var->name, "pickupsound")) { + ast_copy_string(pickupsound, var->value, sizeof(pickupsound)); + } else if (!strcasecmp(var->name, "pickupfailsound")) { + ast_copy_string(pickupfailsound, var->value, sizeof(pickupfailsound)); } else if (!strcasecmp(var->name, "comebacktoorigin")) { comebacktoorigin = ast_true(var->value); } else if (!strcasecmp(var->name, "parkedmusicclass")) { @@ -4040,10 +4048,16 @@ res = ast_channel_masquerade(cur, chan); if (res) ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, cur->name); /* Done */ + if (!ast_strlen_zero(pickupsound)) { + ast_stream_and_wait(cur, pickupsound, ""); + } ast_channel_unlock(cur); return res; } else { ast_debug(1, "No call pickup possible...\n"); + if (!ast_strlen_zero(pickupfailsound)) { + ast_stream_and_wait(chan, pickupfailsound, ""); + } } return -1; } Index: configs/features.conf.sample =================================================================== --- configs/features.conf.sample (revision 158632) +++ configs/features.conf.sample (working copy) @@ -35,6 +35,8 @@ ;xfersound = beep ; to indicate an attended transfer is complete ;xferfailsound = beeperr ; to indicate a failed transfer ;pickupexten = *8 ; Configure the pickup extension. (default is *8) +;pickupsound = beep ; to indicate a successful pickup (default: no sound) +;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound) ;featuredigittimeout = 2000 ; Max time (ms) between digits for ; feature activation (default is 2000 ms) ;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.