Index: configs/voicemail.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/voicemail.conf.sample,v retrieving revision 1.35 diff -u -r1.35 voicemail.conf.sample --- configs/voicemail.conf.sample 17 Jul 2004 20:36:31 -0000 1.35 +++ configs/voicemail.conf.sample 2 Aug 2004 22:57:21 -0000 @@ -32,6 +32,12 @@ ;directoryintro=dir-intro ; The character set for voicemail messages can be specified here ;charset=ISO-8859-1 +; The ADSI feature descriptor number to download to +;adsifdn=0000000F +; The ADSI security lock code +;adsisec=9BDBF7AC +; The ADSI voicemail application version number. +;adsiver=1 ; Skip the "[PBX]:" string from the message title ;pbxskip=yes ; Change the From: string Index: apps/app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.136 diff -u -r1.136 app_voicemail.c --- apps/app_voicemail.c 18 Jul 2004 20:50:37 -0000 1.136 +++ apps/app_voicemail.c 2 Aug 2004 22:57:22 -0000 @@ -181,14 +181,8 @@ static char *tdesc = "Comedian Mail (Voicemail System)"; -static char *adapp = "\x00\x00\x00\x0F"; - -static char *adsec = "\x9B\xDB\xF7\xAC"; - static char *addesc = "Comedian Mail"; -static int adver = 1; - static char *synopsis_vm = "Leave a voicemail message"; @@ -278,6 +272,10 @@ static char emailtitle[100]; static char charset[32] = "ISO-8859-1"; +static char adsifdn[4] = "\x00\x00\x00\x0F"; +static char adsisec[4] = "\x9B\xDB\xF7\xAC"; +static int adsiver = 1; + STANDARD_LOCAL_USER; @@ -1992,7 +1990,7 @@ bytes += adsi_data_mode(buf + bytes); adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY); - if (adsi_begin_download(chan, addesc, adapp, adsec, adver)) { + if (adsi_begin_download(chan, addesc, adsifdn, adsisec, adsiver)) { bytes = 0; bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Load Cancelled.", ""); bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "ADSI Unavailable", ""); @@ -2090,7 +2088,7 @@ bytes = 0; /* Load the session now */ - if (adsi_load_session(chan, adapp, adver, 1) == 1) { + if (adsi_load_session(chan, adsifdn, adsiver, 1) == 1) { *useadsi = 1; bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Scripts Loaded!", ""); } else @@ -2105,7 +2103,7 @@ int x; if (!adsi_available(chan)) return; - x = adsi_load_session(chan, adapp, adver, 1); + x = adsi_load_session(chan, adsifdn, adsiver, 1); if (x < 0) return; if (!x) { @@ -4168,6 +4166,7 @@ char *dialoutcxt = NULL; char *callbackcxt = NULL; char *exitcxt = NULL; + int tmpadsi[4]; int x; @@ -4447,6 +4446,22 @@ strncpy(fromstring,s,sizeof(fromstring)-1); if ((s=ast_variable_retrieve(cfg, "general", "charset"))) strncpy(charset,s,sizeof(charset)-1); + if ((s=ast_variable_retrieve(cfg, "general", "adsifdn"))) { + sscanf(s, "%2x%2x%2x%2x", &tmpadsi[0], &tmpadsi[1], &tmpadsi[2], &tmpadsi[3]); + for (x=0; x<4; x++) { + memcpy(&adsifdn[x], &tmpadsi[x], 1); + } + } + if ((s=ast_variable_retrieve(cfg, "general", "adsisec"))) { + sscanf(s, "%2x%2x%2x%2x", &tmpadsi[0], &tmpadsi[1], &tmpadsi[2], &tmpadsi[3]); + for (x=0; x<4; x++) { + memcpy(&adsisec[x], &tmpadsi[x], 1); + } + } + if ((s=ast_variable_retrieve(cfg, "general", "adsiver"))) + if (atoi(s)) { + adsiver = atoi(s); + } if ((s=ast_variable_retrieve(cfg, "general", "emailtitle"))) { ast_log(LOG_NOTICE, "Keyword 'emailtitle' is DEPRECATED, please use 'emailsubject' instead.\n"); strncpy(emailtitle,s,sizeof(emailtitle)-1);