[Asterisk-Users] pridialplan & prilocaldialplan

Peter Svensson psvasterisk at psv.nu
Mon May 30 12:10:28 MST 2005


On Mon, 30 May 2005, Remco Barende wrote:

> What exactly is the meaning / function of the pridialplan & 
> prilocaldialplan?

Both set the two fields Type Of Number (TON) and Numbering Plan (NPI)
markers on an outgoing isdn call. These two tell a receiving isdn switch 
how to interpret the accompanying digits. 

The "pridialplan" option controls the TON+NPI associated with the Called
Party information element. This is the recipient of the call.

The "prilocaldialplan" option controls the TON+NPI associated with the
Calling Party information element. This is the originator to be presented 
to the receiving user (think CallerId).

> I've been trying to find out what the different possibilities for these 
> settings are but couldn't find a clear answer.
> 
> The possible parameters I could find are are : 
> local,unknown,dynamic,national,international
> and maybe there are more?

"unknown" : set TON to unknown and NPI to unknown. This instructs the 
            receiving switch to interpret the digits according to the 
            standard used by the pstn in that country, leading zeroes
            etc included. E.g. "00461234567" for a call to Sweden.
            This is what one should normally use

"local"    : Almost never used unless requested by your pstn provider.

"national" : Interpret the digits as a national number, i.e. with an 
             area code at the beginning, but without any escape digits.
             I.e. no leading zero or similar for the area code. 
             International dial is not possible. 
             This is the default in Asterisk and almost always wrong. In
             some pstn networks in the USA this is actually interpreted 
             like "unknown" above and not according to the specification.

"international" : 
             A fully formed E.164 phone number. "461234567" would be a 
             call to Sweden. Usable.

"dynamic"  : Parse the dialed number and try to find a matching prefix in 
             the settings "internationalprefix", "nationalprefix",
             "localprefix", "privateprefix", "unknownprefix". If matched, 
             set the TON/NPI to the matched setting and strip the prefix. 
             Having set nationalprefix=0 allows you to call Dial with e.g. 
             0461234567 and have it sent as TON=national, digits=461234567.

Setting the *prefix variables listed in "dynamic" above will _add_ the 
prefix on inbound calls. This can make the parsing of incoming calls 
easier.

Peter





More information about the asterisk-users mailing list