Outbound Calls Fail Randomly

Need some help troubleshooting a strange outbound PSTN failure.
I have a fresh install of asterisk 1.4.21.1 on CentOS 5.1 with 2 TDM400P’s, very basic/default configuration.
Inbound calls work great, extension to extension calls work great, but outbound calls “mis-dial” 75% of the time. I’m using a simple “9|.” outbound route and single trunk.
If I redial the same number over and over, it goes through once in a while…and the failures come back with a “dialed incorrectly” response from the carrier. I’ve tried local, long distance and 800 numbers all with the same result.
The asterisk -r session lists the same thing every time I redial, and it appears to dial correctly. The response from the carrier seems to confirm that I am getting out successfully, the carrier just appears to receive an incorrect dial code.
I’ve tried this same configuration with the TDM400P and a TDM800P…same results.
This new system is replacing an old asterisk system that did dial correctly, so I’m fairly sure this isn’t directly related to the carrier.
Is there some type of protocol or signal tuning that can be done with PSTN trunks?
Any help would be greatly appreciated.
Thanks in advance!

Here’s an example of the asterisk -r read out for a call that failed…

– Executing [91847xxxxxxx@from-internal:1] Macro(“SIP/208-09a44a68”, “user-callerid|SKIPTTL|”) in new stack
– Executing [s@macro-user-callerid:1] NoOp(“SIP/208-09a44a68”, “user-callerid: device 208”) in new stack
– Executing [s@macro-user-callerid:2] Set(“SIP/208-09a44a68”, “AMPUSER=208”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“SIP/208-09a44a68”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“SIP/208-09a44a68”, “1|Set|REALCALLERIDNUM=208”) in new stack
– Executing [s@macro-user-callerid:5] NoOp(“SIP/208-09a44a68”, “REALCALLERIDNUM is 208”) in new stack
– Executing [s@macro-user-callerid:6] Set(“SIP/208-09a44a68”, “AMPUSER=208”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/208-09a44a68”, “AMPUSERCIDNAME=Workstation”) in new stack
– Executing [s@macro-user-callerid:8] GotoIf(“SIP/208-09a44a68”, “0?report”) in new stack
– Executing [s@macro-user-callerid:9] Set(“SIP/208-09a44a68”, “AMPUSERCID=208”) in new stack
– Executing [s@macro-user-callerid:10] Set(“SIP/208-09a44a68”, “CALLERID(all)=“Workstation” <208>”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/208-09a44a68”, “REALCALLERIDNUM=208”) in new stack
– Executing [s@macro-user-callerid:12] ExecIf(“SIP/208-09a44a68”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [s@macro-user-callerid:13] NoOp(“SIP/208-09a44a68”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing [s@macro-user-callerid:14] GotoIf(“SIP/208-09a44a68”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [s@macro-user-callerid:23] NoOp(“SIP/208-09a44a68”, “Using CallerID “Workstation” <208>”) in new stack
– Executing [91847xxxxxxx@from-internal:2] Set(“SIP/208-09a44a68”, “_NODEST=”) in new stack
– Executing [91847xxxxxxx@from-internal:3] Macro(“SIP/208-09a44a68”, “record-enable|208|OUT|”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/208-09a44a68”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/208-09a44a68”, “recordingcheck|20080723-173728|1216831048.13”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20080723-173728|1216831048.13: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] NoOp(“SIP/208-09a44a68”, “No recording needed”) in new stack
– Executing [91847xxxxxxx@from-internal:4] Macro(“SIP/208-09a44a68”, “dialout-trunk|1|1847xxxxxxx|”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/208-09a44a68”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] ExecIf(“SIP/208-09a44a68”, “0|Authenticate|”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/208-09a44a68”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/208-09a44a68”, “DIAL_NUMBER=1847xxxxxxx”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/208-09a44a68”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/208-09a44a68”, “GROUP()=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/208-09a44a68”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/208-09a44a68”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/208-09a44a68”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/208-09a44a68”, “outbound-callerid|1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/208-09a44a68”, “0|SetCallerPres|”) in new stack
– Executing [s@macro-outbound-callerid:2] GotoIf(“SIP/208-09a44a68”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,4)
– Executing [s@macro-outbound-callerid:4] NoOp(“SIP/208-09a44a68”, “REALCALLERIDNUM is 208”) in new stack
– Executing [s@macro-outbound-callerid:5] GotoIf(“SIP/208-09a44a68”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,10)
– Executing [s@macro-outbound-callerid:10] Set(“SIP/208-09a44a68”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:11] Set(“SIP/208-09a44a68”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:12] Set(“SIP/208-09a44a68”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:13] GotoIf(“SIP/208-09a44a68”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,17)
– Executing [s@macro-outbound-callerid:17] GotoIf(“SIP/208-09a44a68”, “1?usercid”) in new stack
– Goto (macro-outbound-callerid,s,19)
– Executing [s@macro-outbound-callerid:19] GotoIf(“SIP/208-09a44a68”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,23)
– Executing [s@macro-outbound-callerid:23] NoOp(“SIP/208-09a44a68”, “CallerID set to “Workstation” <208>”) in new stack
– Executing [s@macro-dialout-trunk:12] AGI(“SIP/208-09a44a68”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
fixlocalprefix: Could not open /etc/asterisk/localprefixes.conf
– AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/208-09a44a68”, “OUTNUM=1847xxxxxxx”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/208-09a44a68”, “custom=ZAP/g0”) in new stack
– Executing [s@macro-dialout-trunk:15] GotoIf(“SIP/208-09a44a68”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/208-09a44a68”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/208-09a44a68”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/208-09a44a68”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] Dial(“SIP/208-09a44a68”, “ZAP/g0/1847xxxxxxx|300|”) in new stack
– Called g0/1847xxxxxxx
– Zap/1-1 answered SIP/208-09a44a68

Call was placed from a softphone, extension 208 "Workstation"
Actual phone number is masked as “1847xxxxxxx”

Found the problem…we were dialing too quickly and loosing the first digit or two.

Prefacing “w” to the outbound number fixed it.