[asterisk-commits] mmichelson: trunk r393793 - /trunk/res/res_sip_caller_id.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 8 08:57:31 CDT 2013


Author: mmichelson
Date: Mon Jul  8 08:57:28 2013
New Revision: 393793

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393793
Log:
Fix some broken logic in sending outbound caller ID.

* trust_id_outbound was required even when the caller ID was not marked
private. This is against intentions and documentation.
* We now check both name and number privacy instead of checking name privacy
twice.


Modified:
    trunk/res/res_sip_caller_id.c

Modified: trunk/res/res_sip_caller_id.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_sip_caller_id.c?view=diff&rev=393793&r1=393792&r2=393793
==============================================================================
--- trunk/res/res_sip_caller_id.c (original)
+++ trunk/res/res_sip_caller_id.c Mon Jul  8 08:57:28 2013
@@ -646,9 +646,9 @@
 
 	connected_id = ast_channel_connected_effective_id(session->channel);
 	if (session->inv_session->state < PJSIP_INV_STATE_CONFIRMED &&
-			session->endpoint->trust_id_outbound &&
-			(connected_id.name.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED &&
-			(connected_id.name.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED) {
+			(session->endpoint->trust_id_outbound ||
+			((connected_id.name.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED &&
+			(connected_id.number.presentation & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED))) {
 		/* Only change the From header on the initial outbound INVITE. Switching it
 		 * mid-call might confuse some UAs.
 		 */




More information about the asterisk-commits mailing list