[asterisk-commits] rmudgett: trunk r289552 - in /trunk: ./ channels/chan_misdn.c

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


Author: rmudgett
Date: Thu Sep 30 14:35:47 2010
New Revision: 289552

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=289552
Log:
Merged revisions 289549 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r289549 | rmudgett | 2010-09-30 14:28:36 -0500 (Thu, 30 Sep 2010) | 17 lines
  
  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:
    trunk/   (props changed)
    trunk/channels/chan_misdn.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=289552&r1=289551&r2=289552
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Thu Sep 30 14:35:47 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