Index: channels/chan_zap.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.293 diff -u -r1.293 chan_zap.c --- channels/chan_zap.c 9 Jul 2004 10:46:50 -0000 1.293 +++ channels/chan_zap.c 14 Jul 2004 13:25:29 -0000 @@ -319,6 +319,7 @@ int switchtype; /* Type of switch to emulate */ int nsf; /* Network-Specific Facilities */ int dialplan; /* Dialing plan */ + int localdialplan; /* Local dialing plan */ int dchannels[NUM_DCHANS]; /* What channel are the dchannels on */ int trunkgroup; /* What our trunkgroup is */ int mastertrunkgroup; /* What trunk group is our master */ @@ -359,6 +360,7 @@ static int switchtype = PRI_SWITCH_NI2; static int nsf = PRI_NSF_NONE; static int dialplan = PRI_NATIONAL_ISDN + 1; +static int localdialplan = PRI_NATIONAL_ISDN + 1; #else /* Shut up the compiler */ @@ -1750,7 +1752,7 @@ (p->digital ? -1 : ((p->law == ZT_LAW_ALAW) ? PRI_LAYER_1_ALAW : PRI_LAYER_1_ULAW))); pri_sr_set_called(sr, c + p->stripmsd, p->pri->dialplan - 1, s ? 1 : 0); - pri_sr_set_caller(sr, l, n, p->pri->dialplan - 1, + pri_sr_set_caller(sr, l, n, p->pri->localdialplan - 1, l ? (ast->restrictcid ? PRES_PROHIB_USER_NUMBER_PASSED_SCREEN : (p->use_callingpres ? ast->callingpres : PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN)) : PRES_NUMBER_NOT_AVAILABLE); @@ -5919,6 +5921,7 @@ pris[span].switchtype = myswitchtype; pris[span].nsf = nsf; pris[span].dialplan = dialplan; + pris[span].localdialplan = localdialplan; pris[span].pvts[pris[span].numchans++] = tmp; pris[span].minunused = minunused; pris[span].minidle = minidle; @@ -8860,6 +8863,20 @@ dialplan = PRI_INTERNATIONAL_ISDN + 1; } else if (!strcasecmp(v->value, "local")) { dialplan = PRI_LOCAL_ISDN + 1; + } else { + ast_log(LOG_WARNING, "Unknown PRI dialplan '%s' at line %d.\n", v->value, v->lineno); + } + } else if (!strcasecmp(v->name, "prilocaldialplan")) { + if (!strcasecmp(v->value, "national")) { + localdialplan = PRI_NATIONAL_ISDN + 1; + } else if (!strcasecmp(v->value, "unknown")) { + localdialplan = PRI_UNKNOWN + 1; + } else if (!strcasecmp(v->value, "private")) { + localdialplan = PRI_PRIVATE + 1; + } else if (!strcasecmp(v->value, "international")) { + localdialplan = PRI_INTERNATIONAL_ISDN + 1; + } else if (!strcasecmp(v->value, "local")) { + localdialplan = PRI_LOCAL_ISDN + 1; } else { ast_log(LOG_WARNING, "Unknown PRI dialplan '%s' at line %d.\n", v->value, v->lineno); } Index: configs/zapata.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/zapata.conf.sample,v retrieving revision 1.27 diff -u -r1.27 zapata.conf.sample --- configs/zapata.conf.sample 29 Jun 2004 11:45:51 -0000 1.27 +++ configs/zapata.conf.sample 14 Jul 2004 13:25:29 -0000 @@ -66,6 +66,16 @@ ; ;pridialplan=national ; +; PRI Local Dialplan: Only RARELY used for PRI (sets the calling number's numbering plan) +; +; unknown: Unknown +; private: Private ISDN +; local: Local ISDN +; national: National ISDN +; international: International ISDN +; +;prilocaldialplan=national +; ; Overlap dialing mode (sending overlap digits) ; ;overlapdial=yes