Index: asterisk/configs/features.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/features.conf.sample,v retrieving revision 1.10 diff -u -r1.10 features.conf.sample --- asterisk/configs/features.conf.sample 27 Apr 2005 03:58:40 -0000 1.10 +++ asterisk/configs/features.conf.sample 25 May 2005 10:28:07 -0000 @@ -6,6 +6,21 @@ parkext => 700 ; What ext. to dial to park parkpos => 701-720 ; What extensions to park calls on context => parkedcalls ; Which context parked calls are in + +; return-macro => announcepark ; Macro that is run when the call is returned to the parked caller + ; if the park times out before someone picks it up. + ; You could use it to announce where the call was parked before + ; the person answers. Asterisk passes the original parking location + ; as an argument, in this case ${ARG1} + ; Example for extensions.conf + ; [macro-announcepark] + ; exten => s,1,Wait(0.2) + ; exten => s,2,SayDigits(${ARG1}) + ; exten => s,3,Playback(beep) + ; + ; The above example will say the parking location where the call came from + ; and then play a beep to indicate the call has been connected + ;parkingtime => 45 ; Number of seconds a call can be parked for ; (default is 45 seconds) ;transferdigittimeout => 3 ; Number of seconds to wait between digits when transfering a call Index: asterisk/res/res_features.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_features.c,v retrieving revision 1.54 diff -u -r1.54 res_features.c --- asterisk/res/res_features.c 16 May 2005 00:43:16 -0000 1.54 +++ asterisk/res/res_features.c 25 May 2005 10:28:08 -0000 @@ -63,6 +63,9 @@ /* Context for dialback for parking (KLUDGE) */ static char parking_con_dial[AST_MAX_EXTENSION] = "park-dial"; +/* Macro that is used with dial application when returning call */ +static char return_macro[AST_MAX_EXTENSION] = ""; + /* Extension you type to park the call */ static char parking_ext[AST_MAX_EXTENSION] = "700"; @@ -1179,7 +1182,10 @@ } } if (con) { - snprintf(returnexten, sizeof(returnexten), "%s||t", peername); + if (ast_strlen_zero(return_macro)) + snprintf(returnexten, sizeof(returnexten), "%s||t", peername); + else + snprintf(returnexten, sizeof(returnexten), "%s||tM(%s^%d)", peername, return_macro, pu->parkingnum); ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", strdup(returnexten), FREE, registrar); } ast_copy_string(pu->chan->exten, peername, sizeof(pu->chan->exten)); @@ -1577,6 +1583,8 @@ ast_copy_string(parking_ext, var->value, sizeof(parking_ext)); } else if (!strcasecmp(var->name, "context")) { ast_copy_string(parking_con, var->value, sizeof(parking_con)); + } else if (!strcasecmp(var->name, "return-macro")) { + ast_copy_string(return_macro, var->value, sizeof(return_macro)); } else if (!strcasecmp(var->name, "parkingtime")) { if ((sscanf(var->value, "%d", &parkingtime) != 1) || (parkingtime < 1)) { ast_log(LOG_WARNING, "%s is not a valid parkingtime\n", var->value);