Index: res/res_features.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_features.c,v retrieving revision 1.6 diff -u -r1.6 res_features.c --- res/res_features.c 3 Aug 2004 14:09:48 -0000 1.6 +++ res/res_features.c 3 Aug 2004 20:57:59 -0000 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -117,6 +118,22 @@ return pickup_ext; } +static int adsi_announce_park(struct ast_channel *chan, int parkingnum) +{ + int res; + int justify[5] = {ADSI_JUST_CENT, ADSI_JUST_CENT, ADSI_JUST_CENT, ADSI_JUST_CENT}; + char tmp[256] = ""; + char *message[5] = {NULL, NULL, NULL, NULL, NULL}; + + snprintf(tmp, sizeof(tmp), "Parked on %d", parkingnum); + message[0] = tmp; + res = adsi_load_session(chan, NULL, 0, 1); + if (res == -1) { + return res; + } + return adsi_print(chan, message, justify, 1); +} + int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeout, int *extout) { /* We put the user in the parking list, then wake up the parking thread to be sure it looks @@ -191,7 +208,13 @@ ); if (peer) { + if (adsi_available(peer)) { + adsi_announce_park(peer, pu->parkingnum); + } ast_say_digits(peer, pu->parkingnum, "", peer->language); + if (adsi_available(peer)) { + adsi_unload_session(peer); + } if (pu->notquiteyet) { /* Wake up parking thread if we're really done */ ast_moh_start(pu->chan, NULL);