summaryrefslogtreecommitdiff
path: root/main/stasis_channels.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-11-05 20:59:39 +0000
committerMatthew Jordan <mjordan@digium.com>2013-11-05 20:59:39 +0000
commitaff0faf6ba69fb2dcd29034bb481deceffbe663a (patch)
treec4fe254d3756e3b41f545c9f673cc80360674918 /main/stasis_channels.c
parentfe47684b43eb7d7c5739b3cb2e8147beb29092ab (diff)
stasis_channels: Don't give preference to ANI info in channel snapshots
When publishing channel snapshots, we currently compute the caller ID name and number by giving preference first to ani.{name|number}, then to id.{name|number}. However, when a channel driver (such as chan_sip) updates the caller ID, it typically only updates the caller ID stored in id.{name|number}. This means that we are currently giving preference to stale information. When looking at the rest of the code base, the only other place where we appear to use this same logic is in app_amd. Everywhere else, we treat the party information in ani as being separate to the party information in id. This patch publishes only the caller ID name and number in the snapshot field for caller_name and caller_num. Note that the information in ANI is still available in caller_ani. Review: https://reviewboard.asterisk.org/r/2992/ ........ Merged revisions 402501 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/stasis_channels.c')
-rw-r--r--main/stasis_channels.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/stasis_channels.c b/main/stasis_channels.c
index e1a3853e0..f178df35b 100644
--- a/main/stasis_channels.c
+++ b/main/stasis_channels.c
@@ -208,15 +208,12 @@ struct ast_channel_snapshot *ast_channel_snapshot_create(struct ast_channel *cha
ast_string_field_set(snapshot, exten, ast_channel_exten(chan));
ast_string_field_set(snapshot, caller_name,
- S_COR(ast_channel_caller(chan)->ani.name.valid, ast_channel_caller(chan)->ani.name.str,
- S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, "")));
+ S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, ""));
ast_string_field_set(snapshot, caller_number,
- S_COR(ast_channel_caller(chan)->ani.number.valid, ast_channel_caller(chan)->ani.number.str,
- S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, "")));
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, ""));
ast_string_field_set(snapshot, caller_dnid, S_OR(ast_channel_dialed(chan)->number.str, ""));
ast_string_field_set(snapshot, caller_subaddr,
- S_COR(ast_channel_caller(chan)->ani.subaddress.valid, ast_channel_caller(chan)->ani.subaddress.str,
- S_COR(ast_channel_caller(chan)->id.subaddress.valid, ast_channel_caller(chan)->id.subaddress.str, "")));
+ S_COR(ast_channel_caller(chan)->id.subaddress.valid, ast_channel_caller(chan)->id.subaddress.str, ""));
ast_string_field_set(snapshot, dialed_subaddr,
S_COR(ast_channel_dialed(chan)->subaddress.valid, ast_channel_dialed(chan)->subaddress.str, ""));
ast_string_field_set(snapshot, caller_ani,