Remote Aastra 6757 -- Can call internal but not external numbers

I am currently running Freepbx with Asterisk 1.4. I also have 35 Aastra 6757 phones on a local network with the phone system working fine. I have been using the Linksys 942 phones for remote locations and they are working great. The problem I have is with remote Aastra 6757 phones. For simplicity, I set up an aastra 6757 at a remote location with the public address directly on the phone. The phone registers and can receive calls just fine. I can also call internal extensions on the phone system. When I try to call an external number the phone sits for a couple seconds and just says “call failed.” The Linksys phone in the same scenario works just fine calling either internal or external numbers. For a second test I connected the Aastra to another server I have that runs FreePBX 2.4. The remote Aastra can then call internal and external numbers. NAT at the remote office seems to have no impact on the problem at all as the Aastra works exactly the same when I place it behind a NAT or put a public address on it. Another odd thing I noticed is that I get no activity in the Asterisk CLI when calling external numbers from the remote Aastra phone. There is nothing logged to my remote syslog server from the Aastra either. I’m stumped. Can anyone help?

Did you try a softphone like x-lite at the remote location as a sanity test ?

Yes, I have Xlite softphone and the Linksys 942 hardphone working just fine remotely on this setup. I have also just discovered that if I dial 7 digits from the remote Aastra instead of 10 digits the call goes through just fine. I have the outbound route in FreePBX setup to catch both 10 digit dialing as well as 7 digit dialing. It seems like FreePBX doesn’t recognize 10 digit dial patterns from the remote Aastra. The Aastras that are on the local network with the phone system work fine with 10 digit or 7 digit.

After mucking about with the Aastra local dialplan a bit and reading some really old posts about aastra dialplan problems I upgraded the phone’s firmware to I then did a factory reset on the phone (that was key). Before I tried any custom XML I tried just inputting the settings manually through the phones menu. To my surprise I could dial 7/10 digit numbers without a problem. I then setup a TFTP server out here at the remote location and used a modified version of the Aastra XML scripts 2.2.1 to program the phone. The problem came back…I noticed the difference was that when you manually enter the SIP setting into the phone they ONLY get set to the “Global SIP” fields on the phone. The aastra.cfg that came with Aastra XML scripts 2.2.1 puts the initial setting on line 1. I changed the aastra.cfg to set GLOBAL SIP fields and kept the same MAC.cfg file. This works perfectly. NAT-T seems to be working perfectly with the Aastra firmware as well.