mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-16 17:53:15 +00:00
Merged revisions 61870 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r61870 | russell | 2007-04-25 16:59:07 -0500 (Wed, 25 Apr 2007) | 10 lines 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/trunk@61876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -8696,16 +8696,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);
|
||||
@@ -8896,16 +8908,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