diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-03 04:19:09 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-03 04:19:09 +0000 |
commit | 60f32b41b9db75c382cc8339aa4e2c713b3b5b2a (patch) | |
tree | f3793ab046d5cd71925de15d7fd949e84ea541b9 /channels/chan_local.c | |
parent | c7bae4c5900fb330ea3125bb184ada50d929cea4 (diff) |
use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@36725 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 8dc46033c..069005902 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -336,26 +336,16 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout) size_t len, namelen; ast_mutex_lock(&p->lock); - if (p->owner->cid.cid_num) - p->chan->cid.cid_num = strdup(p->owner->cid.cid_num); - else - p->chan->cid.cid_num = NULL; - if (p->owner->cid.cid_name) - p->chan->cid.cid_name = strdup(p->owner->cid.cid_name); - else - p->chan->cid.cid_name = NULL; + ast_set_callerid(p->chan, + p->owner->cid.cid_num, p->owner->cid.cid_name, + p->owner->cid.cid_ani ? p->chan->cid.cid_ani : p->owner->cid.cid_num); if (p->owner->cid.cid_rdnis) p->chan->cid.cid_rdnis = strdup(p->owner->cid.cid_rdnis); else p->chan->cid.cid_rdnis = NULL; - if (p->owner->cid.cid_ani) - p->chan->cid.cid_ani = strdup(p->owner->cid.cid_ani); - else - p->chan->cid.cid_ani = NULL; - p->chan->cid.cid_pres = p->owner->cid.cid_pres; strncpy(p->chan->language, p->owner->language, sizeof(p->chan->language) - 1); |