X-Git-Url: http://git.asterisk.org/gitweb/?p=asterisk%2Fasterisk.git;a=blobdiff_plain;f=channels%2Fchan_sip.c;h=4ce8a121f19ee048818bd04cefef6beb613b6ea7;hp=c16817dfa8879c2053014384a87ca03e33793e1a;hb=2c4ebe356e19b02617fbaffe95d03610aeb6182e;hpb=0c134c5cba0113f23dd4894dc89c61c3878792e8 diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c16817d..4ce8a12 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7234,7 +7234,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme *c = '\0'; tmp = ast_strdupa(of); if (tmp) { - ast_shrink_phone_number(tmp); + if (ast_is_shrinkable_phonenumber(tmp)) + ast_shrink_phone_number(tmp); ast_string_field_set(p, cid_num, tmp); } else { ast_string_field_set(p, cid_num, of); @@ -7265,7 +7266,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme ast_string_field_set(p, cid_name, calleridname); tmp = ast_strdupa(rpid_num); if (tmp) { - ast_shrink_phone_number(tmp); + if (ast_is_shrinkable_phonenumber(tmp)) + ast_shrink_phone_number(tmp); ast_string_field_set(p, cid_num, tmp); } else { ast_string_field_set(p, cid_num, rpid_num); @@ -7301,7 +7303,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme if (!ast_strlen_zero(user->cid_num) && !ast_strlen_zero(p->cid_num)) { char *tmp = ast_strdupa(user->cid_num); if (tmp) { - ast_shrink_phone_number(tmp); + if (ast_is_shrinkable_phonenumber(tmp)) + ast_shrink_phone_number(tmp); ast_string_field_set(p, cid_num, tmp); } else { ast_string_field_set(p, cid_num, user->cid_num); @@ -7376,7 +7379,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme if (*calleridname) ast_string_field_set(p, cid_name, calleridname); if (tmp) { - ast_shrink_phone_number(tmp); + if (ast_is_shrinkable_phonenumber(tmp)) + ast_shrink_phone_number(tmp); ast_string_field_set(p, cid_num, tmp); } else { ast_string_field_set(p, cid_num, rpid_num); @@ -7430,7 +7434,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme if (!ast_strlen_zero(peer->cid_num) && !ast_strlen_zero(p->cid_num)) { char *tmp = ast_strdupa(peer->cid_num); if (tmp) { - ast_shrink_phone_number(tmp); + if (ast_is_shrinkable_phonenumber(tmp)) + ast_shrink_phone_number(tmp); ast_string_field_set(p, cid_num, tmp); } else { ast_string_field_set(p, cid_num, peer->cid_num);