[svn-commits] russell: trunk r61864 - in /trunk: ./
channels/chan_iax2.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Apr 25 14:15:20 MST 2007
Author: russell
Date: Wed Apr 25 16:15:19 2007
New Revision: 61864
URL: http://svn.digium.com/view/asterisk?view=rev&rev=61864
Log:
Merged revisions 61863 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r61863 | russell | 2007-04-25 16:13:15 -0500 (Wed, 25 Apr 2007) | 10 lines
Merged revisions 61862 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r61862 | russell | 2007-04-25 16:06:22 -0500 (Wed, 25 Apr 2007) | 2 lines
Ensure that callerid settings are reset on a reload.
........
................
Modified:
trunk/ (props changed)
trunk/channels/chan_iax2.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=61864&r1=61863&r2=61864
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Apr 25 16:15:19 2007
@@ -8586,6 +8586,9 @@
peer->pokefreqnotok = DEFAULT_FREQ_NOTOK;
ast_string_field_set(peer,context,"");
ast_string_field_set(peer,peercontext,"");
+ ast_clear_flag(peer, IAX_HASCALLERID);
+ ast_string_field_set(peer, cid_name, "");
+ ast_string_field_set(peer, cid_num, "");
}
if (!v) {
@@ -8686,18 +8689,24 @@
} else if (!strcasecmp(v->name, "disallow")) {
ast_parse_allow_disallow(&peer->prefs, &peer->capability, v->value, 0);
} else if (!strcasecmp(v->name, "callerid")) {
- char name2[80];
- char num2[80];
- ast_callerid_split(v->value, name2, 80, num2, 80);
- ast_string_field_set(peer, cid_name, name2);
- ast_string_field_set(peer, cid_num, num2);
- ast_set_flag(peer, IAX_HASCALLERID);
+ if (!ast_strlen_zero(v->value)) {
+ char name2[80];
+ char num2[80];
+ ast_callerid_split(v->value, name2, 80, num2, 80);
+ ast_string_field_set(peer, cid_name, name2);
+ ast_string_field_set(peer, cid_num, num2);
+ ast_set_flag(peer, IAX_HASCALLERID);
+ }
} else if (!strcasecmp(v->name, "fullname")) {
- ast_string_field_set(peer, cid_name, v->value);
- ast_set_flag(peer, IAX_HASCALLERID);
+ if (!ast_strlen_zero(v->value)) {
+ ast_string_field_set(peer, cid_name, v->value);
+ ast_set_flag(peer, IAX_HASCALLERID);
+ }
} else if (!strcasecmp(v->name, "cid_number")) {
- ast_string_field_set(peer, cid_num, v->value);
- ast_set_flag(peer, IAX_HASCALLERID);
+ if (!ast_strlen_zero(v->value)) {
+ ast_string_field_set(peer, cid_num, v->value);
+ ast_set_flag(peer, IAX_HASCALLERID);
+ }
} else if (!strcasecmp(v->name, "sendani")) {
ast_set2_flag(peer, ast_true(v->value), IAX_SENDANI);
} else if (!strcasecmp(v->name, "inkeys")) {
@@ -8805,6 +8814,9 @@
ast_string_field_set(user, name, name);
ast_string_field_set(user, language, language);
ast_copy_flags(user, &globalflags, IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_CODEC_USER_FIRST | IAX_CODEC_NOPREFS | IAX_CODEC_NOCAP);
+ ast_clear_flag(user, IAX_HASCALLERID);
+ ast_string_field_set(user, cid_name, "");
+ ast_string_field_set(user, cid_num, "");
}
if (!v) {
v = alt;
@@ -8877,18 +8889,24 @@
} else
ast_string_field_set(user, secret, v->value);
} else if (!strcasecmp(v->name, "callerid")) {
- char name2[80];
- char num2[80];
- ast_callerid_split(v->value, name2, 80, num2, 80);
- ast_string_field_set(user, cid_name, name2);
- ast_string_field_set(user, cid_num, num2);
- ast_set_flag(user, IAX_HASCALLERID);
+ if (!ast_strlen_zero(v->value) && strcasecmp(v->value, "asreceived")) {
+ char name2[80];
+ char num2[80];
+ ast_callerid_split(v->value, name2, sizeof(name2), num2, sizeof(num2));
+ ast_string_field_set(user, cid_name, name2);
+ ast_string_field_set(user, cid_num, num2);
+ ast_set_flag(user, IAX_HASCALLERID);
+ }
} else if (!strcasecmp(v->name, "fullname")) {
- ast_string_field_set(user, cid_name, v->value);
- ast_set_flag(user, IAX_HASCALLERID);
+ if (!ast_strlen_zero(v->value)) {
+ ast_string_field_set(user, cid_name, v->value);
+ ast_set_flag(user, IAX_HASCALLERID);
+ }
} else if (!strcasecmp(v->name, "cid_number")) {
- ast_string_field_set(user, cid_num, v->value);
- ast_set_flag(user, IAX_HASCALLERID);
+ if (!ast_strlen_zero(v->value)) {
+ ast_string_field_set(user, cid_num, v->value);
+ ast_set_flag(user, IAX_HASCALLERID);
+ }
} else if (!strcasecmp(v->name, "accountcode")) {
ast_string_field_set(user, accountcode, v->value);
} else if (!strcasecmp(v->name, "mohinterpret")) {
More information about the svn-commits
mailing list