summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2010-07-14 16:58:03 +0000
committerRichard Mudgett <rmudgett@digium.com>2010-07-14 16:58:03 +0000
commitcf7bbcc4c667a1fe907b0ec71e9a4fed506b8c23 (patch)
tree804c18f5b1b87b38928ba78b993358d14926f97e /channels/chan_mgcp.c
parente2599bc42c07a6a5611a3804ce08495ccdc72b94 (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_mgcp.c')
-rw-r--r--channels/chan_mgcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index b0bd1cc97..2f4aa4aea 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1533,7 +1533,10 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state, cons
/* Don't use ast_set_callerid() here because it will
* generate a needless NewCallerID event */
- tmp->caller.ani = ast_strdup(i->cid_num);
+ if (!ast_strlen_zero(i->cid_num)) {
+ tmp->caller.ani.number.valid = 1;
+ tmp->caller.ani.number.str = ast_strdup(i->cid_num);
+ }
if (!i->adsi) {
tmp->adsicpe = AST_ADSI_UNAVAILABLE;
@@ -3002,7 +3005,7 @@ static void *mgcp_ss(void *data)
ast_set_callerid(chan,
p->hidecallerid ? "" : p->cid_num,
p->hidecallerid ? "" : p->cid_name,
- chan->caller.ani ? NULL : p->cid_num);
+ chan->caller.ani.number.valid ? NULL : p->cid_num);
ast_setstate(chan, AST_STATE_RING);
/*dahdi_enable_ec(p);*/
if (p->dtmfmode & MGCP_DTMF_HYBRID) {