enum.conf: [general] search => enum.kci.net extensions.conf (pertinent sections): [ob-local-tollfree] ; we can dial out the local trunk if it's toll free exten => _18XXNXXXXXX,1,EnumLookup(${EXTEN}) exten => _18XXNXXXXXX,52,Dial(${TRK1}/${ENUM}) exten => _18XXNXXXXXX,53,Hangup [ob-local-nxx] ; looks in nxx that are local to us, if matches dials out the trunk ; notice that we needn't strip the areacode, but do need strip the 1 exten => _NXXNXXXXXX,1,EnumLookup(${EXTEN}) exten => _NXXNXXXXXX,2,Dial(${ENUM}) exten => _NXXNXXXXXX,3,NoOp(${CALLERIDNUM}) exten => _NXXNXXXXXX,4,Hangup exten => _NXXNXXXXXX,52,Dial(${TRK1}/${ENUM}) exten => _NXXNXXXXXX,53,NoOp(${CALLERIDNUM}) exten => _NXXNXXXXXX,54,Hangup exten => _1NXXNXXXXXX,1,EnumLookup(${EXTEN:1}) exten => _1NXXNXXXXXX,2,Dial(${ENUM}) exten => _1NXXNXXXXXX,3,NoOp(${CALLERIDNUM}) exten => _1NXXNXXXXXX,4,Hangup exten => _1NXXNXXXXXX,52,Dial(${TRK1}/${ENUM}) exten => _1NXXNXXXXXX,53,NoOp(${CALLERIDNUM}) exten => _1NXXNXXXXXX,54,Hangup now some entries from the dns zone: $ORIGIN enum.kci.net. ; if we get a 52124xx request, send to the pbx ; currently only short circuiting this in the context _from_ the pbx *.4.2.1.2.5.0.7.9 IN NAPTR 100 10 "u" "E2U+sip" "!^(.*)(970)(52124..)(.*)$!\\3!" . *.4.2.1.2.5 IN NAPTR 100 10 "u" "E2U+sip" "!^(.*)(52124..)(.*)$!\\2!" . ; outbound calls that are local should go out the trunk ;akron 345 554 *.5.4.3.0.7.9 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)(970)(.......)(.*)$!+\\3!" . *.4.5.5.0.7.9 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)(970)(.......)(.*)$!+\\3!" . ;brush 842 *.2.4.8.0.7.9 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)(970)(.......)(.*)$!+\\3!" . ;crook 886 *.6.8.8.0.7.9 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)(970)(.......)(.*)$!+\\3!" . ;toll free 800 866 877 888 *.0.0.8.1 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)$!\\1!" . *.6.6.8.1 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)$!\\1!" . *.7.7.8.1 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)$!\\1!" . *.8.8.8.1 IN NAPTR 100 10 "u" "E2U+TEL" "!^(.*)$!\\1!" . ; action *.8.8.7.7.0.3 IN NAPTR 100 10 "u" "E2U+iax2" "!^(.*)(307)(.......)(.*)$!action/\\3!" . *.0.2.2.8.0.3 IN NAPTR 100 10 "u" "E2U+iax2" "!^(.*)(308)(.......)(.*)$!action/\\3!" . *.5.2.2.8.0.3 IN NAPTR 100 10 "u" "E2U+iax2" "!^(.*)(308)(.......)(.*)$!action/\\3!" . the first section (52124XX) is our DID pool, so we keep them internally second section is just a few of the entries that represent local NXX third section is toll free stuff, we route out our trunk to save carrier fees last section is a "sister" company that we peer with, so anybody local to them we deliver to their asterisk box