aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-14 16:58:03 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-14 16:58:03 +0000
commitd93fa33a75ef977b9425f11e4d9c69719fea0a9f (patch)
tree804c18f5b1b87b38928ba78b993358d14926f97e /channels/chan_misdn.c
parentc7be6954611c1b6ccfbf8a4f9ddf5f9e4f58a902 (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: http://svn.digium.com/svn/asterisk/trunk@276393 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 7e1f14af7..302c8541c 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -7893,7 +7893,8 @@ static void update_name(struct ast_channel *tmp, int port, int c)
static struct ast_channel *misdn_new(struct chan_list *chlist, int state, char *exten, char *callerid, int format, const char *linkedid, int port, int c)
{
struct ast_channel *tmp;
- char *cid_name = 0, *cid_num = 0;
+ char *cid_name = NULL;
+ char *cid_num = NULL;
int chan_offset = 0;
int tmp_port = misdn_cfg_get_next_port(0);
int bridging;
@@ -7938,10 +7939,11 @@ static struct ast_channel *misdn_new(struct chan_list *chlist, int state, char
chan_misdn_log(1, 0, "misdn_new: no exten given.\n");
}
- if (callerid) {
+ if (!ast_strlen_zero(cid_num)) {
/* Don't use ast_set_callerid() here because it will
* generate a needless NewCallerID event */
- tmp->caller.ani = ast_strdup(cid_num);
+ tmp->caller.ani.number.valid = 1;
+ tmp->caller.ani.number.str = ast_strdup(cid_num);
}
if (pipe(chlist->pipe) < 0) {