[asterisk-users] PRI dialplan/prefix
Tony Mountifield
tony at softins.clara.co.uk
Mon Feb 18 04:30:50 CST 2008
In article <20080218061138.GA23463 at officegeneral.com>,
<elam at officegeneral.com> wrote:
> hi.
>
> could somebody explain how exactly the following parameters
> in zapata.conf work:
>
> pridialplan
> prilocaldialplan
> internationalprefix
> nationalprefix
> localprefix
> privateprefix
> unknownprefix
They are all to do with the ToN (Type of Number) field that is carried
along with the number in the called-number and caller-number information
elements in the ISDN PRI protocol.
For numbers supplied by the remote device (i.e. incoming extension and
caller's number), the ToN is examined. If ToN is "international", then
the value of "internationalprefix" is prepended to the supplied number.
If ToN is "national", then the value of "nationalprefix" is prepended,
and so on.
I don't know about US numbering, but in the UK, we would set:
nationalprefix=0
internationalprefix=00
Then a UK number received as 1234567890 with ToN=national would be
converted to 01234567890. A US number received as 12345678999 with
ToN=international would be converted to 0012345678999.
For outgoing calls, I haven't any direct experience, but the following
is my belief from reading the code in chan_zap.c:
The value of pridialplan specifies the ToN that will accompany
the dialled number, and prilocaldialplan specifies the ToN that will
accompany the caller-ID. If the dialplan value is "unknown", "private",
"local", "national" or "international", I don't think the actual number
gets changed - just the ToN is specified. However, if "dynamic" is
specified, then the number is compared with the list of prefixes.
If the international prefix matches, the prefix is stripped from the
number, and a ToN of "international" is attached. Else if the national
prefix matches, that is stripped and a ToN of "national" is used.
Otherwise the number is left unchanged an a ToN of "local" is used.
Hope this helps!
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-users
mailing list