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
..........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@289549
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
{
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) */