diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index cbdaa076f64f0c8154c4580998f56c051efa120c..b4306fefec7125f350909b9a2bbb3d02a587a19f 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -979,9 +979,7 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i, cid = data; } cid = strsep(&cid, "@"); - tmp->cid.cid_num = ast_strdup(cid); tmp->cid.cid_ani = ast_strdup(cid); - tmp->cid.cid_name = ast_strdup(i->them); if (!ast_strlen_zero(i->exten) && strcmp(i->exten, "s")) tmp->cid.cid_dnid = ast_strdup(i->exten); tmp->priority = 1; diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 434d210d218be126bc219ea8769794e4fb569f90..36f42e878a2bb031feb2be0ded85293734fd5c83 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -1079,9 +1079,7 @@ static struct ast_channel *__oh323_new(struct oh323_pvt *pvt, int state, const c /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - ch->cid.cid_num = ast_strdup(cid_num); ch->cid.cid_ani = ast_strdup(cid_num); - ch->cid.cid_name = ast_strdup(cid_name); if (pvt->cd.redirect_reason >= 0) { ch->cid.cid_rdnis = ast_strdup(pvt->cd.redirect_number); diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 30c79e47cde00a4537fd7e28967d0fb136946e22..c6ea721bdd81a96fb6af9910dc0e09c027e353f6 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -3569,8 +3569,6 @@ static struct ast_channel *ast_iax2_new(int callno, int state, int capability) /* Don't use ast_set_callerid() here because it will * generate a NewCallerID event before the NewChannel event */ - tmp->cid.cid_num = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); if (!ast_strlen_zero(i->ani)) tmp->cid.cid_ani = ast_strdup(i->ani); else diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c index e45724f041da99df5f7acb94c290cf1a733e15db..8a3321c055a5c063d443a1fd023f05ccc7e5246d 100644 --- a/channels/chan_jingle.c +++ b/channels/chan_jingle.c @@ -827,9 +827,7 @@ static struct ast_channel *jingle_new(struct jingle *client, struct jingle_pvt * ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten)); /* Don't use ast_set_callerid() here because it will * generate an unnecessary NewCallerID event */ - tmp->cid.cid_num = ast_strdup(i->cid_num); tmp->cid.cid_ani = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); if (!ast_strlen_zero(i->exten) && strcmp(i->exten, "s")) tmp->cid.cid_dnid = ast_strdup(i->exten); tmp->priority = 1; diff --git a/channels/chan_local.c b/channels/chan_local.c index 30ad2203be6ac2bba09031e9965a633c48c694d7..46015a14e1e41d6920c7978c75ea5198abef39e7 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -453,8 +453,6 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout) ast_mutex_lock(&p->lock); - p->chan->cid.cid_num = ast_strdup(p->owner->cid.cid_num); - p->chan->cid.cid_name = ast_strdup(p->owner->cid.cid_name); p->chan->cid.cid_rdnis = ast_strdup(p->owner->cid.cid_rdnis); p->chan->cid.cid_ani = ast_strdup(p->owner->cid.cid_ani); p->chan->cid.cid_pres = p->owner->cid.cid_pres; diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index f5e38ddf1f69b5dd5f9958f31c3db39e19336a72..64d300faf9caf69069acb8a716879df1fb928cb2 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1495,9 +1495,7 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state) /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - tmp->cid.cid_num = ast_strdup(i->cid_num); tmp->cid.cid_ani = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); if (!i->adsi) tmp->adsicpe = AST_ADSI_UNAVAILABLE; diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index ad4d5a5a903f21ab77fc8c97251b9366a618c6e8..17c6d09c91d6f1bf9f97dc3ca747764287bc05b4 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -3206,16 +3206,10 @@ static struct ast_channel *misdn_new(struct chan_list *chlist, int state, char else chan_misdn_log(1, 0, "misdn_new: no exten given.\n"); - if (callerid) { - char *cid_name, *cid_num; - - ast_callerid_parse(callerid, &cid_name, &cid_num); + if (callerid) /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - tmp->cid.cid_num = ast_strdup(cid_num); tmp->cid.cid_ani = ast_strdup(cid_num); - tmp->cid.cid_name = ast_strdup(cid_name); - } if (pipe(chlist->pipe) < 0) ast_log(LOG_ERROR, "Pipe failed\n"); diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 317873759927ddbb2b005ad076e9ae0d315d3624..6256deb37a6888975c7749e7838768fa2808729e 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -1036,9 +1036,7 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx, ast_string_field_set(c, language, o->language); /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - c->cid.cid_num = ast_strdup(o->cid_num); c->cid.cid_ani = ast_strdup(o->cid_num); - c->cid.cid_name = ast_strdup(o->cid_name); if (!ast_strlen_zero(ext)) c->cid.cid_dnid = ast_strdup(ext); diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 6a51b6dd68b02b69076af9a7620b52da420661d9..e99b74ee95fdab46f724e7213c013bee5780bf48 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -890,9 +890,7 @@ static struct ast_channel *phone_new(struct phone_pvt *i, int state, char *conte /* Don't use ast_set_callerid() here because it will * generate a NewCallerID event before the NewChannel event */ - tmp->cid.cid_num = ast_strdup(i->cid_num); tmp->cid.cid_ani = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); i->owner = tmp; ast_module_ref(ast_module_info->self); diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f3c1985d6fe544e7090852148de225f9790fd26b..ca3e6d3ff70c84b91c6861fde93878100d7d6332 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4622,9 +4622,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit /* Don't use ast_set_callerid() here because it will * generate an unnecessary NewCallerID event */ - tmp->cid.cid_num = ast_strdup(i->cid_num); tmp->cid.cid_ani = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); if (!ast_strlen_zero(i->rdnis)) tmp->cid.cid_rdnis = ast_strdup(i->rdnis); diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 78fce94387d22eaaacc69c665a1b902cafd3b734..d9629ed2f625b22171ed7bc35567a348bc2c45e4 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3229,9 +3229,7 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state) /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - tmp->cid.cid_num = ast_strdup(l->cid_num); tmp->cid.cid_ani = ast_strdup(l->cid_num); - tmp->cid.cid_name = ast_strdup(l->cid_name); tmp->priority = 1; tmp->adsicpe = AST_ADSI_UNAVAILABLE; diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 4152f0e192d390558f0e24d6e1e17f4541020002..e4304a55693108fc701b09fe382ad284d10f5a6f 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5616,16 +5616,12 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ #ifdef PRI_ANI - tmp->cid.cid_num = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); if (!ast_strlen_zero(i->cid_ani)) tmp->cid.cid_ani = ast_strdup(i->cid_ani); else tmp->cid.cid_ani = ast_strdup(i->cid_num); #else - tmp->cid.cid_num = ast_strdup(i->cid_num); tmp->cid.cid_ani = ast_strdup(i->cid_num); - tmp->cid.cid_name = ast_strdup(i->cid_name); #endif tmp->cid.cid_pres = i->callingpres; tmp->cid.cid_ton = i->cid_ton;