mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Handle arbitrary long dial sequences (like what we need at Astricon)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3,9 +3,9 @@
|
|||||||
*
|
*
|
||||||
* Trivial application to dial a channel and send an URL on answer
|
* Trivial application to dial a channel and send an URL on answer
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999, Mark Spencer
|
* Copyright (C) 1999-2004, Digium, Inc.
|
||||||
*
|
*
|
||||||
* Mark Spencer <markster@linux-support.net>
|
* Mark Spencer <markster@digium.com>
|
||||||
*
|
*
|
||||||
* This program is free software, distributed under the terms of
|
* This program is free software, distributed under the terms of
|
||||||
* the GNU General Public License
|
* the GNU General Public License
|
||||||
@@ -411,7 +411,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
{
|
{
|
||||||
int res=-1;
|
int res=-1;
|
||||||
struct localuser *u;
|
struct localuser *u;
|
||||||
char info[256], *peers, *timeout, *tech, *number, *rest, *cur;
|
char *info, *peers, *timeout, *tech, *number, *rest, *cur;
|
||||||
char privdb[256] = "", *s;
|
char privdb[256] = "", *s;
|
||||||
char announcemsg[256] = "", *ann;
|
char announcemsg[256] = "", *ann;
|
||||||
struct localuser *outgoing=NULL, *tmp;
|
struct localuser *outgoing=NULL, *tmp;
|
||||||
@@ -463,9 +463,12 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(info = ast_strdupa(data))) {
|
||||||
|
ast_log(LOG_WARNING, "Unable to dupe data :(\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
LOCAL_USER_ADD(u);
|
LOCAL_USER_ADD(u);
|
||||||
|
|
||||||
strncpy(info, (char *)data, sizeof(info) - 1);
|
|
||||||
peers = info;
|
peers = info;
|
||||||
if (peers) {
|
if (peers) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user