|
|
|
@ -7,6 +7,8 @@
|
|
|
|
|
*
|
|
|
|
|
* Jim Dixon <jim@lambdatel.com>
|
|
|
|
|
*
|
|
|
|
|
* Made only slightly more sane by Mark Spencer <markster@digium.com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software, distributed under the terms of
|
|
|
|
|
* the GNU General Public License
|
|
|
|
|
*/
|
|
|
|
@ -179,7 +181,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
{
|
|
|
|
|
ast_log(LOG_DEBUG,"DISA %s entry timeout on chan %s\n",
|
|
|
|
|
((k) ? "extension" : "password"),chan->name);
|
|
|
|
|
goto reorder;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if ((res = ast_waitfor(chan, -1) < 0)) {
|
|
|
|
|
ast_log(LOG_DEBUG, "Waitfor returned %d\n", res);
|
|
|
|
@ -296,8 +298,16 @@ static int disa_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
exten[i] = 0;
|
|
|
|
|
if (!k) continue; /* if getting password, continue doing it */
|
|
|
|
|
/* if this exists */
|
|
|
|
|
if (ast_exists_extension(chan,ourcontext,exten,1, chan->callerid))
|
|
|
|
|
|
|
|
|
|
/* if can do some more, do it */
|
|
|
|
|
if (!ast_matchmore_extension(chan,ourcontext,exten,1, chan->callerid))
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (k && ast_exists_extension(chan,ourcontext,exten,1, chan->callerid))
|
|
|
|
|
{
|
|
|
|
|
/* We're authenticated and have a valid extension */
|
|
|
|
|
if (ourcallerid && *ourcallerid)
|
|
|
|
|
{
|
|
|
|
|
if (chan->callerid) free(chan->callerid);
|
|
|
|
@ -311,9 +321,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
LOCAL_USER_REMOVE(u);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
/* if can do some more, do it */
|
|
|
|
|
if (ast_canmatch_extension(chan,ourcontext,exten,1, chan->callerid)) continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reorder:
|
|
|
|
|
|
|
|
|
|
/* something is invalid, give em reorder forever */
|
|
|
|
@ -356,7 +364,6 @@ reorder:
|
|
|
|
|
LOCAL_USER_REMOVE(u);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int unload_module(void)
|
|
|
|
|
{
|
|
|
|
@ -381,7 +388,7 @@ int usecount(void)
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *key()
|
|
|
|
|
char *key(void)
|
|
|
|
|
{
|
|
|
|
|
return ASTERISK_GPL_KEY;
|
|
|
|
|
}
|
|
|
|
|