Summary:ASTERISK-00634: [patch] Improve ENUM handling for national numbers (patch)
Reporter:iain (iain)Labels:
Date Opened:2003-12-07 03:40:33.000-0600Date Closed:2011-06-07 14:05:14
Versions:Frequency of
Environment:Attachments:( 0) enum.patch
Description:In the UK, at least, dialling a national number with the full international format fails.  Hence it's useful to be able to have an option whereby the international prefix can be removed  from an ENUM lookup and processing diverted to a different priority.  Extensions.conf can then easily add the appropriate international (ie 00) or national (ie 0) dialling prefix.   The patch attached implements this functionality.
Comments:By: Olle Johansson (oej) 2003-12-07 04:07:58.000-0600

This can be handled with substring and gotoif processing, can't it? You still have to process it for least cost routing and picking the outbound channel...

Also, you have to check for a + sign at start of countrycode and produce error if not found. Otherwise, it's a general TEL uri for local calls, not specified as an international E.164 number.

We should only match first case by countrycode.

By: iain (iain) 2003-12-07 05:08:05.000-0600

Well, yes, you could do the same thing with gotoif - but that leads to a very cluttered extensions.conf and requires users to learn the expression handling format for gotoif.  Personally, I found it easier to write this C code and it leads to a very simple extensions.conf (following the examples from the Austrian ENUM trial).  I think this patch can live alongside the other method.

I wasn't aware that you didn't have to specify a full E.164 format number in tel:.  I've been writing about ENUM for work and I've never seen anything other than the full format used as examples with tel: in an IETF document.  

Asterisk already checks for the presence of a '+' in the tel: NAPTR entry and rejects numbers without it.  So it's basically assuming a full number.

By: Olle Johansson (oej) 2003-12-07 07:12:09.000-0600

For the e164.arpa, I believe a + is a requirement, but not for TEL urls. Building a private enum-like structure, you're fully allowed to build TEL urls assuming your English or live in the Stockholm region (+468). There's a big difference between ENUM - e164.arpa - and what you're allowed to do yourself with NAPTR in your own DNS. EnumLookup should support both.

I have a filed bug report for the '+' check in TEL url. Will fix that a.s.a.p., could merge it with your fix when you're done with fixing thte check for a countrycode.

By: Brian West (bkw918) 2003-12-08 22:46:01.000-0600

This can be done with extension logic.  Not sure this will make it into cvs but I will have Mark look at it.

By: Olle Johansson (oej) 2004-03-21 08:54:16.000-0600

Time to close this bug report.