Hi! I'm trying to understand how asterisk handles the TON (using the pridialplan=... directive). Setting the TON for outgoing calls using pridialplan and prilocaldialplan works fine. But how can I query and process the TON for incoming calls? e.g. in the follwing scenario: PBX---> asterisk ----> PSTN 1. The PBX sends SETUP messages with the appropriate TON. I want to rewrite the called number into a common format to make an ENUM lookup. Thus, I need to query the TON sent by the PBX and add the correct prefixes. 2. Further, in case of unsuccessful ENUM lookups, I want to forward the SETUP message to the PSTN, again using the appropriate TON. CVS version allows the setting of pridialplan=dynamic. But I want to use stable as this is for a stable machine. Can I implement this with stable asterisk? thanks, Klaus
Eric Wieling aka ManxPower
2005-Apr-26 04:59 UTC
[Asterisk-Users] pridialplan/TON question
Klaus Darilion wrote:> Hi! > > I'm trying to understand how asterisk handles the TON (using the > pridialplan=... directive). > > Setting the TON for outgoing calls using pridialplan and > prilocaldialplan works fine. But how can I query and process the TON for > incoming calls? > > e.g. in the follwing scenario: > PBX---> asterisk ----> PSTN > > 1. The PBX sends SETUP messages with the appropriate TON. I want to > rewrite the called number into a common format to make an ENUM lookup. > Thus, I need to query the TON sent by the PBX and add the correct prefixes. > > 2. Further, in case of unsuccessful ENUM lookups, I want to forward the > SETUP message to the PSTN, again using the appropriate TON. CVS version > allows the setting of pridialplan=dynamic. But I want to use stable as > this is for a stable machine. Can I implement this with stable asterisk?I always thought that if you set pridialplan=unknown the telco would not munge the digits.
Eric Wieling aka ManxPower wrote:> Klaus Darilion wrote: >> ... >> e.g. in the follwing scenario: >> PBX---> asterisk ----> PSTN >> >> 1. The PBX sends SETUP messages with the appropriate TON. I want to >> rewrite the called number into a common format to make an ENUM lookup. >> Thus, I need to query the TON sent by the PBX and add the correct >> prefixes. >> >> 2. Further, in case of unsuccessful ENUM lookups, I want to forward >> the SETUP message to the PSTN, again using the appropriate TON. CVS >> version allows the setting of pridialplan=dynamic. But I want to use >> stable as this is for a stable machine. Can I implement this with >> stable asterisk? > > I always thought that if you set pridialplan=unknown the telco would not > munge the digits.Anyway, if I set TON to unknown, I have to send the number according to the PSTN dialing plan (00 for int, 0 for national, ...). Thus, if the PBX does not use UNKNOWN, I have to translate the numbers out of their original TON to ton=unknown. Therefore, I need to process the incoming TON. How do I handle this? regards, klaus
On Tue, 26 Apr 2005, Klaus Darilion wrote:> Anyway, if I set TON to unknown, I have to send the number according to > the PSTN dialing plan (00 for int, 0 for national, ...). Thus, if the > PBX does not use UNKNOWN, I have to translate the numbers out of their > original TON to ton=unknown. Therefore, I need to process the incoming > TON. How do I handle this?You have two options: 1) Use the CALLINGTON variable in the dialplan. This is only for the calling party number, not the called party number. 2) Use the internationalprefix, nationalprefix, localprefix etc settings in the zapata.conf file. I _think_ this will affect both the interpretation of calling and called party and possibly also the TON of the called number for outgoing links. I am nut sure under which circumstances these variables are applied. Isdn handling in Asterisk tends to be these kinds of hacks. Peter
Hi Peter! FYI: Yesterday i put Asterisk between a Hicom 350E and a Telekom Austria (TA) PRI. Both use TON=unknown for called number, but Hicom always uses TON=international for calling number whereas TA uses a dynamic TON for calling number. Thus, for incoming calls (PSTN->PBX) the presented caller number will be incorrect => CALLINGTON is needed to fix this. Peter, please send me the patch. regards, Klaus Peter Svensson wrote:> On Tue, 26 Apr 2005, Marc Storck wrote: > > >>I have a Digium E100P card, with an EuroISDN PRI E1. On incoming calls >>the CALLINGTON variable is empty. I have the latest stable version of >>asterisk. Do I have to use another variable or is the TON only support >>in CVS? > > > CALLINGTON was not populated in -stable. Tha patch was only added to > -head. > > It is not that hard to add, I can send you our old patch if you want it. > > Peter > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >