mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Merged revisions 61866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61866 | russell | 2007-04-25 16:55:23 -0500 (Wed, 25 Apr 2007) | 2 lines If the callerid= option is specified, but empty, clear any previous data. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -8456,16 +8456,28 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
|
||||
ast_string_field_set(peer, cid_name, name2);
|
||||
ast_string_field_set(peer, cid_num, num2);
|
||||
ast_set_flag(peer, IAX_HASCALLERID);
|
||||
} else {
|
||||
ast_clear_flag(peer, IAX_HASCALLERID);
|
||||
ast_string_field_set(peer, cid_name, "");
|
||||
ast_string_field_set(peer, cid_num, "");
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "fullname")) {
|
||||
if (!ast_strlen_zero(v->value)) {
|
||||
ast_string_field_set(peer, cid_name, v->value);
|
||||
ast_set_flag(peer, IAX_HASCALLERID);
|
||||
} else {
|
||||
ast_string_field_set(peer, cid_name, "");
|
||||
if (ast_strlen_zero(peer->cid_num))
|
||||
ast_clear_flag(peer, IAX_HASCALLERID);
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "cid_number")) {
|
||||
if (!ast_strlen_zero(v->value)) {
|
||||
ast_string_field_set(peer, cid_num, v->value);
|
||||
ast_set_flag(peer, IAX_HASCALLERID);
|
||||
} else {
|
||||
ast_string_field_set(peer, cid_num, "");
|
||||
if (ast_strlen_zero(peer->cid_name))
|
||||
ast_clear_flag(peer, IAX_HASCALLERID);
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "sendani")) {
|
||||
ast_set2_flag(peer, ast_true(v->value), IAX_SENDANI);
|
||||
@@ -8660,16 +8672,28 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, st
|
||||
ast_string_field_set(user, cid_name, name2);
|
||||
ast_string_field_set(user, cid_num, num2);
|
||||
ast_set_flag(user, IAX_HASCALLERID);
|
||||
} else {
|
||||
ast_clear_flag(user, IAX_HASCALLERID);
|
||||
ast_string_field_set(user, cid_name, "");
|
||||
ast_string_field_set(user, cid_num, "");
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "fullname")) {
|
||||
if (!ast_strlen_zero(v->value)) {
|
||||
ast_string_field_set(user, cid_name, v->value);
|
||||
ast_set_flag(user, IAX_HASCALLERID);
|
||||
} else {
|
||||
ast_string_field_set(user, cid_name, "");
|
||||
if (ast_strlen_zero(user->cid_num))
|
||||
ast_clear_flag(user, IAX_HASCALLERID);
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "cid_number")) {
|
||||
if (!ast_strlen_zero(v->value)) {
|
||||
ast_string_field_set(user, cid_num, v->value);
|
||||
ast_set_flag(user, IAX_HASCALLERID);
|
||||
} else {
|
||||
ast_string_field_set(user, cid_num, "");
|
||||
if (ast_strlen_zero(user->cid_name))
|
||||
ast_clear_flag(user, IAX_HASCALLERID);
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "accountcode")) {
|
||||
ast_string_field_set(user, accountcode, v->value);
|
||||
|
Reference in New Issue
Block a user