diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-02 00:58:31 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-02 00:58:31 +0000 |
commit | 6868babd229a635c5fd89c7b284025a92e0a3f9d (patch) | |
tree | 25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_setcallerid.c | |
parent | b201da1a3eb1cae654cdd3fe89ef8f9e55dd0b83 (diff) |
Huge callerid rework (might break H.323, others)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3874 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_setcallerid.c')
-rwxr-xr-x | apps/app_setcallerid.c | 7 |
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; } |