aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_setcallerid.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-02 00:58:31 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-02 00:58:31 +0000
commit6868babd229a635c5fd89c7b284025a92e0a3f9d (patch)
tree25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_setcallerid.c
parentb201da1a3eb1cae654cdd3fe89ef8f9e55dd0b83 (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-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;
}