[asterisk-commits] russell: branch 1.2 r61866 -
/branches/1.2/channels/chan_iax2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Apr 25 14:55:24 MST 2007
Author: russell
Date: Wed Apr 25 16:55:23 2007
New Revision: 61866
URL: http://svn.digium.com/view/asterisk?view=rev&rev=61866
Log:
If the callerid= option is specified, but empty, clear any previous data.
Modified:
branches/1.2/channels/chan_iax2.c
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?view=diff&rev=61866&r1=61865&r2=61866
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Wed Apr 25 16:55:23 2007
@@ -8416,6 +8416,10 @@
ast_callerid_split(v->value, peer->cid_name, sizeof(peer->cid_name),
peer->cid_num, sizeof(peer->cid_num));
ast_set_flag(peer, IAX_HASCALLERID);
+ } else {
+ ast_clear_flag(peer, IAX_HASCALLERID);
+ peer->cid_name[0] = '\0';
+ peer->cid_num[0] = '\0';
}
} else if (!strcasecmp(v->name, "sendani")) {
ast_set2_flag(peer, ast_true(v->value), IAX_SENDANI);
@@ -8582,6 +8586,10 @@
if (!ast_strlen_zero(v->value)) {
ast_callerid_split(v->value, user->cid_name, sizeof(user->cid_name), user->cid_num, sizeof(user->cid_num));
ast_set_flag(user, IAX_HASCALLERID);
+ } else {
+ ast_clear_flag(user, IAX_HASCALLERID);
+ user->cid_name[0] = '\0';
+ user->cid_num[0] = '\0';
}
} else if (!strcasecmp(v->name, "accountcode")) {
ast_copy_string(user->accountcode, v->value, sizeof(user->accountcode));
More information about the asterisk-commits
mailing list