mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
Sound confirmation of call pickup success.
(closes issue #13826) Reported by: azielke Patches: pickupsound2-trunk.patch uploaded by azielke (license 548) __20081124_bug_13826_updated.patch uploaded by lmadsen (license 10) Tested by: lmadsen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -149,6 +149,8 @@ Miscellaneous
|
|||||||
externhost and localnet settings.
|
externhost and localnet settings.
|
||||||
* The Asterisk core now supports ITU G.722.1 and G.722.1C media streams, and
|
* The Asterisk core now supports ITU G.722.1 and G.722.1C media streams, and
|
||||||
can connect calls in passthrough mode, as well as record and play back files.
|
can connect calls in passthrough mode, as well as record and play back files.
|
||||||
|
* Successful and unsuccessful call pickup can now be alerted through sounds, by
|
||||||
|
using pickupsound and pickupfailsound in features.conf.
|
||||||
|
|
||||||
Asterisk Manager Interface
|
Asterisk Manager Interface
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@@ -39,6 +39,8 @@ context => parkedcalls ; Which context parked calls are in (default parking lot
|
|||||||
;xfersound = beep ; to indicate an attended transfer is complete
|
;xfersound = beep ; to indicate an attended transfer is complete
|
||||||
;xferfailsound = beeperr ; to indicate a failed transfer
|
;xferfailsound = beeperr ; to indicate a failed transfer
|
||||||
;pickupexten = *8 ; Configure the pickup extension. (default is *8)
|
;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
|
;featuredigittimeout = 2000 ; Max time (ms) between digits for
|
||||||
; feature activation (default is 2000 ms)
|
; feature activation (default is 2000 ms)
|
||||||
;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
|
;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
|
||||||
|
@@ -238,6 +238,8 @@ static char courtesytone[256]; /*!< Courtesy tone */
|
|||||||
static int parkedplay = 0; /*!< Who to play the courtesy tone to */
|
static int parkedplay = 0; /*!< Who to play the courtesy tone to */
|
||||||
static char xfersound[256]; /*!< Call transfer sound */
|
static char xfersound[256]; /*!< Call transfer sound */
|
||||||
static char xferfailsound[256]; /*!< Call transfer failure 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;
|
static int adsipark;
|
||||||
|
|
||||||
@@ -3634,6 +3636,8 @@ static int load_config(void)
|
|||||||
courtesytone[0] = '\0';
|
courtesytone[0] = '\0';
|
||||||
strcpy(xfersound, "beep");
|
strcpy(xfersound, "beep");
|
||||||
strcpy(xferfailsound, "pbx-invalid");
|
strcpy(xferfailsound, "pbx-invalid");
|
||||||
|
pickupsound[0] = '\0';
|
||||||
|
pickupfailsound[0] = '\0';
|
||||||
adsipark = 0;
|
adsipark = 0;
|
||||||
comebacktoorigin = 1;
|
comebacktoorigin = 1;
|
||||||
|
|
||||||
@@ -3754,6 +3758,10 @@ static int load_config(void)
|
|||||||
ast_copy_string(xferfailsound, var->value, sizeof(xferfailsound));
|
ast_copy_string(xferfailsound, var->value, sizeof(xferfailsound));
|
||||||
} else if (!strcasecmp(var->name, "pickupexten")) {
|
} else if (!strcasecmp(var->name, "pickupexten")) {
|
||||||
ast_copy_string(pickup_ext, var->value, sizeof(pickup_ext));
|
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")) {
|
} else if (!strcasecmp(var->name, "comebacktoorigin")) {
|
||||||
comebacktoorigin = ast_true(var->value);
|
comebacktoorigin = ast_true(var->value);
|
||||||
} else if (!strcasecmp(var->name, "parkedmusicclass")) {
|
} else if (!strcasecmp(var->name, "parkedmusicclass")) {
|
||||||
@@ -4395,10 +4403,16 @@ int ast_pickup_call(struct ast_channel *chan)
|
|||||||
res = ast_channel_masquerade(cur, chan);
|
res = ast_channel_masquerade(cur, chan);
|
||||||
if (res)
|
if (res)
|
||||||
ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, cur->name); /* Done */
|
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);
|
ast_channel_unlock(cur);
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
ast_debug(1, "No call pickup possible...\n");
|
ast_debug(1, "No call pickup possible...\n");
|
||||||
|
if (!ast_strlen_zero(pickupfailsound)) {
|
||||||
|
ast_stream_and_wait(chan, pickupfailsound, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user