diff options
author | Richard Mudgett <rmudgett@digium.com> | 2010-07-14 16:58:03 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2010-07-14 16:58:03 +0000 |
commit | cf7bbcc4c667a1fe907b0ec71e9a4fed506b8c23 (patch) | |
tree | 804c18f5b1b87b38928ba78b993358d14926f97e /channels/chan_skinny.c | |
parent | e2599bc42c07a6a5611a3804ce08495ccdc72b94 (diff) |
Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.
This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/
Review: https://reviewboard.asterisk.org/r/744/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r-- | channels/chan_skinny.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 3a99fbbcd..31f70ec46 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3774,7 +3774,7 @@ static void *skinny_newcall(void *data) ast_set_callerid(c, l->hidecallerid ? "" : l->cid_num, l->hidecallerid ? "" : l->cid_name, - c->caller.ani ? NULL : l->cid_num); + c->caller.ani.number.valid ? NULL : l->cid_num); #if 1 /* XXX This code is probably not necessary */ ast_party_number_free(&c->connected.id.number); ast_party_number_init(&c->connected.id.number); @@ -4573,7 +4573,10 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state, const ch /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - tmp->caller.ani = ast_strdup(l->cid_num); + if (!ast_strlen_zero(l->cid_num)) { + tmp->caller.ani.number.valid = 1; + tmp->caller.ani.number.str = ast_strdup(l->cid_num); + } tmp->priority = 1; tmp->adsicpe = AST_ADSI_UNAVAILABLE; |