[asterisk-commits] rmudgett: branch 1.8 r289549 - /branches/1.8/channels/chan_misdn.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 30 14:28:40 CDT 2010


Author: rmudgett
Date: Thu Sep 30 14:28:36 2010
New Revision: 289549

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=289549
Log:
Merged revision 289547 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r289547 | rmudgett | 2010-09-30 14:16:36 -0500 (Thu, 30 Sep 2010) | 10 lines

  In chan_misdn, the DivertingLegInformation2 DivertingNr is garbage when the number is restricted.

  The same thing happens with DivertingLegInformation1 DivertedTo number.

  The misdn_PresentedNumberUnscreened_extract() extracted the Unscreened
  PartyNumber field unconditionally.  It now checks the presented number
  unscreened type to see if the PartyNumber was even present.

  JIRA ABE-2595
..........

Modified:
    branches/1.8/channels/chan_misdn.c

Modified: branches/1.8/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_misdn.c?view=diff&rev=289549&r1=289548&r2=289549
==============================================================================
--- branches/1.8/channels/chan_misdn.c (original)
+++ branches/1.8/channels/chan_misdn.c Thu Sep 30 14:28:36 2010
@@ -2454,7 +2454,20 @@
 {
 	id->presentation = PresentedNumberUnscreened_to_misdn_pres(presented->Type);
 	id->screening = 0;/* unscreened */
-	misdn_PartyNumber_extract(id, &presented->Unscreened);
+	switch (presented->Type) {
+	case 0:/* presentationAllowedNumber */
+	case 3:/* presentationRestrictedNumber */
+		misdn_PartyNumber_extract(id, &presented->Unscreened);
+		break;
+	case 1:/* presentationRestricted */
+	case 2:/* numberNotAvailableDueToInterworking */
+	default:
+		/* Number not present (And uninitialized so do not even look at it!) */
+		id->number_type = NUMTYPE_UNKNOWN;
+		id->number_plan = NUMPLAN_ISDN;
+		id->number[0] = 0;
+		break;
+	}
 }
 #endif	/* defined(AST_MISDN_ENHANCEMENTS) */
 




More information about the asterisk-commits mailing list