Index: configs/features.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/features.conf.sample,v retrieving revision 1.9 diff -u -p -r1.9 features.conf.sample --- configs/features.conf.sample 5 Jan 2005 21:31:40 -0000 1.9 +++ configs/features.conf.sample 31 Mar 2005 12:52:32 -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: res/res_features.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_features.c,v retrieving revision 1.45 diff -u -p -r1.45 res_features.c --- res/res_features.c 24 Mar 2005 05:37:59 -0000 1.45 +++ res/res_features.c 31 Mar 2005 12:52:33 -0000 @@ -57,6 +57,9 @@ static char parking_con_dial[AST_MAX_EXT /* Extension you type to park the call */ static char parking_ext[AST_MAX_EXTENSION] = "700"; +/* Macro to run when the call is returned after a timeout */ +static char return_macro[AST_MAX_EXTENSION]; + static char pickup_ext[AST_MAX_EXTENSION] = "*8"; /* Default sounds */ @@ -1123,7 +1126,10 @@ static void *do_parking_thread(void *ign } } if (con) { - snprintf(returnexten, sizeof(returnexten), "%s||t", peername); + if(strlen(return_macro) > 0) + snprintf(returnexten, sizeof(returnexten),"%s||tM(%s^%d)",peername, return_macro, pu->parkingnum); + else + snprintf(returnexten, sizeof(returnexten), "%s||t", peername); ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", strdup(returnexten), free, registrar); } strncpy(pu->chan->exten, peername, sizeof(pu->chan->exten) - 1); @@ -1516,6 +1522,8 @@ static int load_config(void) while(var) { if (!strcasecmp(var->name, "parkext")) { strncpy(parking_ext, var->value, sizeof(parking_ext) - 1); + } else if (!strcasecmp(var->name, "return-macro")) { + strncpy(return_macro, var->value, sizeof(return_macro) - 1); } else if (!strcasecmp(var->name, "context")) { strncpy(parking_con, var->value, sizeof(parking_con) - 1); } else if (!strcasecmp(var->name, "parkingtime")) {