[Asterisk-cvs] asterisk/apps app_meetme.c,1.56,1.57
markster at lists.digium.com
markster at lists.digium.com
Tue Aug 3 02:45:18 CDT 2004
- Previous message: [Asterisk-cvs] asterisk ChangeLog,1.67,1.68 HARDWARE,1.3,1.4 asterisk.c,1.111,1.112 muted.c,1.4,1.5 pbx.c,1.142,1.143
- Next message: [Asterisk-cvs] asterisk/channels chan_mgcp.c,1.69,1.70
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/apps
In directory localhost.localdomain:/tmp/cvs-serv3205/apps
Modified Files:
app_meetme.c
Log Message:
Plane commits (a.k.a. the Delta deltas): 1) Make muted reconnect 2) Add "X" option to meetme and add ${MEETME_EXIT_CONTEXT}, 3) Allow SIP call parking with supervised transfer, 4) Only create parking entries when calls actually get parked, 5) Add "sunshine" song, 6) Update hardware documentation, 7) Don't load empty strings from history file
Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- app_meetme.c 2 Aug 2004 15:28:12 -0000 1.56
+++ app_meetme.c 3 Aug 2004 06:31:20 -0000 1.57
@@ -59,6 +59,9 @@
" 'm' -- set monitor only mode (Listen only, no talking)\n"
" 't' -- set talk only mode. (Talk only, no listening)\n"
" 'p' -- allow user to exit the conference by pressing '#'\n"
+" 'X' -- allow user to exit the conference by entering a valid single\n"
+" digit extension ${MEETME_EXIT_CONTEXT} or the current context\n"
+" if that variable is not defined.\n"
" 'd' -- dynamically add conference\n"
" 'D' -- dynamically add conference, prompting for a PIN\n"
" 'e' -- select an empty conference\n"
@@ -148,6 +151,7 @@
#define CONFFLAG_MOH (1 << 9) /* Set to have music on hold when user is alone in conference */
#define CONFFLAG_ADMINEXIT (1 << 10) /* If set the MeetMe will return if all marked with this flag left */
#define CONFFLAG_WAITMARKED (1 << 11) /* If set, the MeetMe will wait until a marked user enters */
+#define CONFFLAG_EXIT_CONTEXT (1 << 12) /* If set, the MeetMe will wait until a marked user enters */
static int careful_write(int fd, unsigned char *data, int len)
@@ -504,6 +508,7 @@
char *agifile;
char *agifiledefault = "conf-background.agi";
char meetmesecs[30] = "";
+ char exitcontext[AST_MAX_EXTENSION] = "";
ZT_BUFFERINFO bi;
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
@@ -560,6 +565,14 @@
user->adminflags = 0;
ast_mutex_unlock(&conflock);
origquiet = confflags & CONFFLAG_QUIET;
+ if (confflags & CONFFLAG_EXIT_CONTEXT) {
+ if ((agifile = pbx_builtin_getvar_helper(chan, "MEETME_EXIT_CONTEXT")))
+ strncpy(exitcontext, agifile, sizeof(exitcontext) - 1);
+ else if (!ast_strlen_zero(chan->macrocontext))
+ strncpy(exitcontext, chan->macrocontext, sizeof(exitcontext) - 1);
+ else
+ strncpy(exitcontext, chan->context, sizeof(exitcontext) - 1);
+ }
while((confflags & CONFFLAG_WAITMARKED) && (conf->markedusers < 0)) {
confflags &= ~CONFFLAG_QUIET;
confflags |= origquiet;
@@ -806,7 +819,18 @@
f = ast_read(c);
if (!f)
break;
- if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#') && (confflags & CONFFLAG_POUNDEXIT)) {
+ if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
+ char tmp[2];
+ tmp[0] = f->subclass;
+ tmp[1] = '\0';
+ if (ast_exists_extension(chan, exitcontext, tmp, 1, chan->callerid)) {
+ strncpy(chan->context, exitcontext, sizeof(chan->context) - 1);
+ strncpy(chan->exten, tmp, sizeof(chan->exten) - 1);
+ chan->priority = 0;
+ ret = 0;
+ break;
+ }
+ } else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#') && (confflags & CONFFLAG_POUNDEXIT)) {
ret = 0;
break;
} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
@@ -1187,6 +1211,8 @@
confflags |= CONFFLAG_MOH;
if (strchr(inflags, 'x'))
confflags |= CONFFLAG_ADMINEXIT;
+ if (strchr(inflags, 'X'))
+ confflags |= CONFFLAG_EXIT_CONTEXT;
if (strchr(inflags, 'b'))
confflags |= CONFFLAG_AGI;
if (strchr(inflags, 'w'))
- Previous message: [Asterisk-cvs] asterisk ChangeLog,1.67,1.68 HARDWARE,1.3,1.4 asterisk.c,1.111,1.112 muted.c,1.4,1.5 pbx.c,1.142,1.143
- Next message: [Asterisk-cvs] asterisk/channels chan_mgcp.c,1.69,1.70
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list