[Asterisk-cvs] asterisk/apps app_meetme.c,1.15,1.16 app_voicemail.c,1.51,1.52
jeremy at lists.digium.com
jeremy at lists.digium.com
Mon Jan 12 17:29:45 CST 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv21292/apps
Modified Files:
app_meetme.c app_voicemail.c
Log Message:
Implement pin usage in MeetMe. Bug #816
Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- app_meetme.c 11 Jan 2004 20:01:07 -0000 1.15
+++ app_meetme.c 12 Jan 2004 23:21:29 -0000 1.16
@@ -699,13 +699,36 @@
strcpy(confno, "");
} else {
if (strlen(cnf->pin)) {
- /* XXX Should prompt user for pin if pin is required XXX */
+ char pin[AST_MAX_EXTENSION];
- }
- allowretry = 0;
+ if (inpin && *inpin) {
+ strncpy(pin, inpin, sizeof(pin) - 1);
+ } else {
+ /* Prompt user for pin if pin is required */
+ res = ast_app_getdata(chan, "conf-getpin", pin, sizeof(pin) - 1, 0);
+ }
+ if (res == 0) {
+ if (!strcasecmp(pin, cnf->pin)) {
+ /* Pin correct */
+ allowretry = 0;
+ /* Run the conference */
+ res = conf_run(chan, cnf, confflags);
+ }
+ }
+ /* Pin invalid or error */
+ res = ast_streamfile(chan, "conf-invalidpin", chan->language);
+ if (!res)
+ ast_waitstream(chan, "");
+ res = -1;
+ if (allowretry)
+ strcpy(confno, "");
+ } else {
+ /* No pin required */
+ allowretry = 0;
- /* Run the conference */
- res = conf_run(chan, cnf, confflags);
+ /* Run the conference */
+ res = conf_run(chan, cnf, confflags);
+ }
}
}
} while (allowretry);
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- app_voicemail.c 9 Jan 2004 05:45:56 -0000 1.51
+++ app_voicemail.c 12 Jan 2004 23:21:29 -0000 1.52
@@ -1467,8 +1467,12 @@
myserveremail = vmu->serveremail;
sendpage(myserveremail, vmu->pager, msgnum, ext, chan->callerid, end - start, vmu);
}
- } else
+ } else {
+ res = ast_streamfile(chan, "vm-mailboxfull", chan->language);
+ if (!res)
+ res = ast_waitstream(chan, "");
ast_log(LOG_WARNING, "No more messages possible\n");
+ }
} else
ast_log(LOG_WARNING, "No format for saving voicemail?\n");
free_user(vmu);
More information about the svn-commits
mailing list