[svn-commits] mjordan: trunk r402502 - in /trunk: ./ main/stasis_channels.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 5 14:59:41 CST 2013


Author: mjordan
Date: Tue Nov  5 14:59:39 2013
New Revision: 402502

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402502
Log:
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

Modified:
    trunk/   (props changed)
    trunk/main/stasis_channels.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Tue Nov  5 14:59:39 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402367,402387,402398,402416,402427,402429,402438,402452
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402367,402387,402398,402416,402427,402429,402438,402452,402501

Modified: trunk/main/stasis_channels.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/stasis_channels.c?view=diff&rev=402502&r1=402501&r2=402502
==============================================================================
--- trunk/main/stasis_channels.c (original)
+++ trunk/main/stasis_channels.c Tue Nov  5 14:59:39 2013
@@ -208,15 +208,12 @@
 	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,




More information about the svn-commits mailing list