[svn-commits] rmudgett: branch group/ccss r1420 - /team/group/ccss/pri_cc.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jan 15 16:18:29 CST 2010


Author: rmudgett
Date: Fri Jan 15 16:18:26 2010
New Revision: 1420

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1420
Log:
The CCBS_T_Request originatingAddress and presentationAllowedIndicator values are optional so treat them that way.

Modified:
    team/group/ccss/pri_cc.c

Modified: team/group/ccss/pri_cc.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_cc.c?view=diff&rev=1420&r1=1419&r2=1420
==============================================================================
--- team/group/ccss/pri_cc.c (original)
+++ team/group/ccss/pri_cc.c Fri Jan 15 16:18:26 2010
@@ -2194,8 +2194,11 @@
 	}
 
 	q931_party_address_init(&party_a);
-	rose_copy_address_to_q931(ctrl, &party_a,
-		&invoke->args.etsi.CCBS_T_Request.originating);
+	if (invoke->args.etsi.CCBS_T_Request.originating.number.length) {
+		/* The originating number is present. */
+		rose_copy_address_to_q931(ctrl, &party_a,
+			&invoke->args.etsi.CCBS_T_Request.originating);
+	}
 	q931_party_address_init(&party_b);
 	rose_copy_address_to_q931(ctrl, &party_b,
 		&invoke->args.etsi.CCBS_T_Request.destination);
@@ -2214,6 +2217,22 @@
 	 * We already have the presentationAllowedIndicator in the cc_record
 	 * when we saved the original call information.
 	 */
+#if 0
+	if (invoke->args.etsi.CCBS_T_Request.presentation_allowed_indicator_present) {
+		if (invoke->args.etsi.CCBS_T_Request.presentation_allowed_indicator) {
+			if (party_a.number.str[0]) {
+				party_a.number.presentation =
+					PRI_PRES_ALLOWED | PRI_PRES_USER_NUMBER_UNSCREENED;
+			} else {
+				party_a.number.presentation =
+					PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_UNSCREENED;
+			}
+		} else {
+			party_a.number.presentation =
+				PRI_PRES_RESTRICTED | PRI_PRES_USER_NUMBER_UNSCREENED;
+		}
+	}
+#endif
 
 	/* Link the signaling link to the cc_record. */
 	call->cc.record = cc_record;




More information about the svn-commits mailing list