summaryrefslogtreecommitdiff
path: root/apps/app_setcallerid.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-10-02 00:58:31 +0000
committerMark Spencer <markster@digium.com>2004-10-02 00:58:31 +0000
commit04fc29c8b2e7db9b66a138f47412770867819f7f (patch)
tree25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_setcallerid.c
parent9b926b1d644c49c0e8bbe7cbc02aeb60ccc3c8ef (diff)
Huge callerid rework (might break H.323, others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_setcallerid.c')
-rwxr-xr-xapps/app_setcallerid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c
index 069c2af98..100fb813c 100755
--- a/apps/app_setcallerid.c
+++ b/apps/app_setcallerid.c
@@ -89,7 +89,7 @@ static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
return 0;
}
LOCAL_USER_ADD(u);
- chan->callingpres = pres;
+ chan->cid.cid_pres = pres;
LOCAL_USER_REMOVE(u);
return res;
}
@@ -110,6 +110,8 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
{
int res = 0;
char tmp[256] = "";
+ char name[256];
+ char num[256];
struct localuser *u;
char *opt;
int anitoo = 0;
@@ -123,7 +125,8 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
anitoo = 1;
}
LOCAL_USER_ADD(u);
- ast_set_callerid(chan, strlen(tmp) ? tmp : NULL, anitoo);
+ ast_callerid_split(tmp, name, sizeof(name), num, sizeof(num));
+ ast_set_callerid(chan, num, name, anitoo ? num : NULL);
LOCAL_USER_REMOVE(u);
return res;
}