[Asterisk-Users] ADSI and SoftKeys
Jayson Vantuyl
kagato at souja.net
Thu Jul 31 07:30:33 MST 2003
On Wed, Jul 30, 2003 at 05:07:50PM +0200, Armand A. Verstappen wrote:
> On Wed, 2003-07-30 at 16:40, John Congdon wrote:
> > Has anyone solved the problem on the ADSI phones
> > that when you hit one of the soft keys, the Number Pad
> > stops working?
>
> No, I haven't. Just confirming that I have the same problem here, using
> the VoiceMail2 app. Do you experience this outside VoiceMail2 as well?
I've had this problem as well. Coincidentally, I fixed it in my source.
I mailed a patch a while back, but no one who can merge it seems to have
this problem.
It relates to not putting the phone back into voice mode when the
prompts are playing (after updating the screen).
Attached is my (partially incomplete but usable) voicemail2 patch.
Interestingly, it fixes an apparent typo in the Options softkey as well
(that one took me a week to track down).
I hope this helps.
Jayson Vantuyl
-------------- next part --------------
Index: app_voicemail2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail2.c,v
retrieving revision 1.33
diff -U2 -r1.33 app_voicemail2.c
--- app_voicemail2.c 30 Jul 2003 20:04:22 -0000 1.33
+++ app_voicemail2.c 31 Jul 2003 14:47:10 -0000
@@ -93,7 +93,7 @@
static char *tdesc = "Comedian Mail (Voicemail System)";
-static char *adapp = "CoMa";
+static char *adapp = "\x00\x00\x00\x0f";
-static char *adsec = "_AST";
+static char *adsec = "\x9b\xdb\xf7\xac";
static char *addesc = "Comedian Mail";
@@ -1242,6 +1242,6 @@
{
int bytes = 0;
- bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, "Comedian Mail", "");
- bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002 LSS, Inc.", "");
+ bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, "VoiceMail", "");
+ bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, " ", "");
return bytes;
}
@@ -1291,5 +1291,5 @@
bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 1, "Folder", "Folder", "2", 1);
bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 2, "Advanced", "Advnced", "3", 1);
- bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 3, "Options", "Options", "4", 1);
+ bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 3, "Options", "Options", "0", 1);
bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 4, "Help", "Help", "*", 1);
bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 5, "Exit", "Exit", "#", 1);
@@ -1434,4 +1434,5 @@
bytes += adsi_input_control(buf + bytes, ADSI_COMM_PAGE, 4, 0, 1, ADSI_JUST_LEFT);
bytes += adsi_set_keys(buf + bytes, keys);
+ bytes += adsi_voice_mode(buf + bytes, 0);
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -1461,4 +1462,6 @@
bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
bytes += adsi_set_keys(buf + bytes, keys);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -1547,4 +1550,6 @@
bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
bytes += adsi_set_keys(buf + bytes, keys);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -1590,4 +1595,6 @@
keys[5] = ADSI_KEY_SKT | (ADSI_KEY_APPS + 5);
bytes += adsi_set_keys(buf + bytes, keys);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -1633,4 +1640,6 @@
bytes += adsi_set_keys(buf + bytes, keys);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -1671,4 +1680,6 @@
bytes += adsi_set_keys(buf + bytes, keys);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
@@ -1682,4 +1693,6 @@
return;
bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -1696,4 +1709,6 @@
bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Goodbye", "");
bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+
adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
}
@@ -2037,4 +2052,16 @@
char newpassword2[80] = "";
char prefile[256]="";
+ char buf[256];
+ int bytes=0;
+
+ if (adsi_available(chan))
+ {
+ bytes += adsi_logo(buf + bytes);
+ bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Options Menu", "");
+ bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
+ bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+ bytes += adsi_voice_mode(buf + bytes, 0);
+ adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+ }
while((cmd >= 0) && (cmd != 't')) {
if (cmd)
@@ -2361,4 +2388,6 @@
case '0':
cmd = vm_options(chan, vmu, &vms, vmfmts);
+ if (useadsi)
+ adsi_status(chan, vms.newmessages, vms.oldmessages, vms.lastmsg);
break;
default: /* Nothing */
More information about the asterisk-users
mailing list