[asterisk-commits] russell: branch 1.4 r61870 - in /branches/1.4:
./ channels/chan_iax2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Apr 25 14:59:08 MST 2007
Author: russell
Date: Wed Apr 25 16:59:07 2007
New Revision: 61870
URL: http://svn.digium.com/view/asterisk?view=rev&rev=61870
Log:
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.
........
Modified:
branches/1.4/ (props changed)
branches/1.4/channels/chan_iax2.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=61870&r1=61869&r2=61870
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Wed Apr 25 16:59:07 2007
@@ -8456,16 +8456,28 @@
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 @@
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);
More information about the asterisk-commits
mailing list