Internal calls not working

I am new to all of this, but I have managed to get outbound calls to work fine, but for some reason I can not get internal calls to work between phones in the office, I have searched these forums to see if anyone else has had the same issue but can not find any answers, has any one got any ideas what might be causing the problem,
Thanks,
Richard

You haven’t given enough information for someone to help you.
What make/model phones are you using?
Is there a firewall between the phones and the PBX?
Do you have a firewall on the PBX turned on?
Are you running a distribution that came with Freepbx (if so which one) or did you build it yourself?
Do inbound calls to extensions work?
Have you looked in /var/log/asterisk/full or in the asterisk command line to see if there are any errors when you dial between phones?

We have a pair of phones that are linksys spa942
There is no firewall.
We are using Debian lenny,
Inbound calls to extensions do not work as yet.
There were no errors but running on debug level 9 a load of macros execute,
no errors on the phones,

the only thing to note is that we are running an x86-64 machine, we’ve had it previously working on a x86 machine. Both phones have been reset to factory settings
When you dial one phone to another we get the message "Im sorry that number is not valid"
Many thanks for your help, much appreciated

Richard, Still to way to little information provided to help.

Please read: http://freepbx.org/forum/freepbx/installation/so-you-have-a-problem-and-want-help

Please think about it. Without knowing EXCATLY the versions of things I could give you a set of instructions for asterisk to check some things. BUT those command might work on 1.4, but fail on 1.2 (As the command didn’t exist yet) or even 1.6 (because the decided to rename it or change the command structure), and some commands have even changed inside a given base version. For 1.4.x lines that deal with analog lines the driver set used to be called zaptel, but starting at 1.4.22 they changed it to Dadhi (legal reasons), so in 1.4.24 dadhi show channels will work, but at 1.4.21 it will fail.

You need the remember that 99.5 % of the people who help don’t know a single thing about your system except that you say it does NOT work. So if you really want some help you need to provide these details upfront and when asked then providing them all and not only giving a quick gloss over instead of what you did above which still lacks real details.