Hi there, full disclosure -- on ENUM, I'm biased :). Seriously, if you think you'll have a lot of users, and those users will be spread over the map, a relatively straightforward way of doing this is to have your own private ENUM tree in DNS (apex of which could be in e164.vex.net, for example). You provision the sub-domains matching your user's numbers with E2U+sip NAPTRs pointing at your server. If there IS no hit in this private ENUM tree, fire the call off to your provider. Your users dial the "full" number, that full number hits the ENUM tree, and if the DN is one of yours, mod_enum will extract the SIP URL from the matching DNS domain and does its stuff. Done. (you can do this with a very basic XML dialplan -- just make sure that the ENUM lookup comes ->first<-, and that the dialplan processing continues if there is no ENUM hit). Cost -- a local DNS server plus some script to provision the DNS record into your private DNS tree. [and a mental squint headache when writing the script to converting from a phone number like +15552345987 to 7.8.9.5.4.3.2.5.5.5.1.e164.vex.net.] I've used BIND/DLZ&PSQL, but Bert's PowerDNS should be fine as well. Remember that you'll be doing a DNS query for every call attempt, so DO keep the DNS server "close", and don't use some "less than perfect" DNS software. Is it worth it for a few 10s of users? Nah (unless you're a propellor head, or expect to grow). Is it worth it for hundreds of users? Yup. Is it worth it for thousands or millions of users? [I have reason to believe this is what a certain nationwide cable company C does internally for its customers across the 'States -- avoiding number dips saves a shedload of money] Just a thought. all the best, Lawrence [author of RFC6116 ;] On 23 Sep 2012, at 21:04, D'Arcy Cain wrote:
On Sun, 23 Sep 2012 11:17:37 -0700 (PDT) Stanislav Sinyagin <ssinyagin@yahoo.com> wrote:
here's a piece of my dialplan in "default" context. It simply catches such calls and transfers them directly to the public context. The public context matches local DID numbers and transfers them to corresponding extensions in default context:
<extension name="internal_did"> <condition field="destination_number" expression="^($${default_did_prefix}\d+)$"> <action application="transfer" data="$1 XML public"/> </condition> </extension>
The "default_did_prefix" variable holds my DID number block.
Looks good but my problem is that I do not have a DID block. Clients are porting their numbers so they are all over the place. My first three numbers in the system are from three different area codes. I would need to include all of my numbers in the expression somehow. Wit just three I can use '|' but that won't be practical when I have hundreds or thousands.
-- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy@Vex.Net