aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_disa.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-15 20:20:58 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-15 20:20:58 +0000
commitbbfd86d5f2480aad7a7433ed9c43d03f3244e037 (patch)
treee68bbc4778921d2cb1e41cfcf1b70bd65e543711 /apps/app_disa.c
parent57f6e97c91ec1dd01dfaca2a3de486a5222d209c (diff)
Fix DISA with callerid (bug #3058)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4460 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_disa.c')
-rwxr-xr-xapps/app_disa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 1beb09fe5..3413d6efd 100755
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -114,7 +114,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
int digittimeout = 10000;
struct localuser *u;
char tmp[256],arg2[256]="",exten[AST_MAX_EXTENSION],acctcode[20]="";
- char *ourcontext,*ourcallerid,*mailbox;
+ char *ourcontext,*ourcallerid,*ourcidname,*ourcidnum,*mailbox;
struct ast_frame *f;
struct timeval lastout, now, lastdigittime;
int res;
@@ -323,8 +323,8 @@ static int disa_exec(struct ast_channel *chan, void *data)
/* We're authenticated and have a valid extension */
if (ourcallerid && *ourcallerid)
{
- if (chan->cid.cid_num) free(chan->cid.cid_num);
- chan->cid.cid_num = strdup(ourcallerid);
+ ast_callerid_split(ourcallerid, ourcidname, sizeof(ourcidname), ourcidnum, sizeof(ourcidnum));
+ ast_set_callerid(chan, ourcidnum, ourcidname, ourcidnum);
}
strncpy(chan->exten, exten, sizeof(chan->exten) - 1);
strncpy(chan->context, ourcontext, sizeof(chan->context) - 1);