Mr.DNS Network Tools v1.6
I've released a new version of the Mr.DNS Network Tools website.
New features include:
SPF Parsing and Validation:
DNS SRV Records:
HTTP Header Parsing for any HTTP/HTTPS URL:
and many other small changes and fixes.
Mr.DNS Network Tools v1.4
I've updated the Mr.DNS site and included several new features:
Visual Trace Routes - overlays each hop of the trace route on a google map:
Real-Time Multi-RBL and URIBL checks:
Real-Time SMTP Server Validation:
more features to come soon.
Almost Time to Invest
On a related note, BP's current share price of 42.95 might mean it's almost time to pickup some of the company on the cheap.
The company has had a five year low of 35.15/share- it'll be interesting to see how it opens on Tuesday given the failure of the Top Kill solution- I'd say depending on the feasibility of the next idea, if it gets into the low 30's, it's probably a good buy.
With the extra money, you can throw a really nice funeral for that part of you that dies.
Oil Makes People Forget
I recently made a trip to Seattle, and to nobodies surprise, the Deepwater Horizon Oil spill is all over the news- fed to the masses in a way only the US media can do.
When they first started talking about it, they referred to how it "could easily be the worst oil spill in history"- which is just an insane over-exaggeration of the facts- then they slowing started pulling that back, to "easily the worst spill in US history", using the Exxon Valdez spill as a barometer for "badness".
To put some perspective around this- the Exxon Valdez spill was 37,000 tonnes (~270,000 barrels), which is not even in the top 30 biggest oil spills on record, and it's only the 3rd worst in US history. The worst on record, was the Gulf War oil spill at ~1,500,000 tonnes (~10,995,000 barrels of oil).
The current, most widely accepted flow rate for the Horizon Oil spill is ~12,000 to 19,000 barrels/day (so ~15,500 barrels / day, or ~2,114 tonnes /day)- which means there has been ~86,000 tonnes (~635,500 barrels) to date- which would make it the third worst in US history next to the Greenpoint Brooklyn and Hawaiian Patriot spills, and around the 20th worst on record in the world.
Obviously, all these numbers are estimates, but the point is, while it's really really bad, and of course is something that needs to be stopped as soon as possible- it's happened before- it's not new- it's just the story of the moment, so people are instructed to be outraged right now- but people will lose interested and stop caring- especially if it takes until Aug to drill the relief wells.
Even better, the Ixtoc spill 31 years ago, which btw- is the second biggest spill ever.
Humans Fail.
Automatic Dial Resource Fail-over in Asterisk
Asterisk is generally pretty reliable, but termination providers aren't always so good; in a market where anybody can re-sell an upstream provider, or setup a few Asterisk boxes and start routing calls for people, it's generally a good idea to have a "backup" provider (or three) to route your calls through.
You can easily setup an Asterisk system, to fail-over to secondary systems, if your primary provider fails for some reason- and this can all be done right in the dial plan, using a simple MACRO.
Add this MACRO to your dial plan:
[macro-direct-dial]
exten => s,1,Set(CALL_ATTEMPT=1)
exten => s,2,Set(TERM_PROVIDER=${TERM_PROVIDER1})
exten => s,3,Dial(${TERM_PROVIDER}/${ARG1},60)
exten => s,4,GotoIf($["${CALL_ATTEMPT}" >= "${MAX_PROVIDERS}"]?s-CANCEL,1)
exten => s,5,Set(CALL_ATTEMPT=$[${CALL_ATTEMPT} + 1])
exten => s,6,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Noop()
exten => s-NOANSWER,1,Noop()
exten => s-CANCEL,1,Hangup()
exten => s-HANGUP,1,Hangup()
exten => s-CHANUNAVAIL,1,Set(TERM_PROVIDER=${EVAL(${TERM_PROVIDER${CALL_ATTEMPT}})})
exten => s-CHANUNAVAIL,2,Goto(s,3)
exten => s-CONGESTION,1,Set(TERM_PROVIDER=${EVAL(${TERM_PROVIDER${CALL_ATTEMPT}})})
exten => s-CONGESTION,2,Goto(s,3)
Now you'll need to route your calls into this MACRO; this can vary by dial plan, as you may have a special configuration for different area codes, or country codes, or based on some least-cost-routing business decisions, but a simple example would be something like this:
[default]
exten => _1NXXNXXXXXX,1,Answer()
exten => _1NXXNXXXXXX,2,Macro(direct-dial,${EXTEN})
exten => _1NXXNXXXXXX,3,Hangup()
This routes any NANPA numbers through the direct-dial MACRO above, passing in the phone number as the first argument to the MACRO.
Now, before this will work, you'll need to configure some variables; this can be done in many places- in my working configuration, I have these variables dynamically generated via an AGI script, based on the phone number being dialed. This way I can control dial-groups, by phone number, based on a cost/preference/etc.
In this example, we'll simply set these values in the globals section of the extensions.conf file:
[globals] TERM_PROVIDER1 = SIP/first_provider TERM_PROVIDER2 = IAX/second_provider TERM_PROVIDER3 = SIP/last_provider MAX_PROVIDERS = 3
So I've configured three fictitious termination providers; you can specify as many as you like, as long as the TERM_PROVIDER increments one for each, and you set the MAX_PROVIDERS value to the total number of providers listed.
This is obviously more useful if this list is automatically generated somehow, or changed based on the phone number being dialed, otherwise the retries could simply be hard-coded into the dial plan.
Now when you dial your number, it will start with the first (default) provider; if the dial() function returns a congestion or channel un-available error, the MACRO will cycle to the next provider, until it as gone through all of the providers listed.






Flash Player 9 or higher is required to view the chart Click here to download Flash Player now