Asterisk config help with cisco 7940 phones

Hi all, can anyone help with a basic config to get my cisco 7940 phones to talk to each other?

I have upgraded the firmware on my 2 phones to SIP 7.4

asterisk can see the phones.

when I attempt to dial from the asterisk console, it reports:

dial 3014
No such extension ‘3014’ in context ‘local’

when I try to dial an extension from either phone, it reports the following:

dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)

thanks for any help.

I have the sample configs installed but have re-written these 3. Here are my configs:

extensions.conf

[globals]
PHONES1=SIP/3014
PHONES1VM=3014

PHONES2=SIP/3015
PHONES2VM=3015

[macro-vmessage]
exten => s,1,VoiceMail2(u${ARG1})
exten => s,2,Playback(groovy)
exten => s,3,Playback(goodbye)
exten => s,4,Hangup

[home]
; Next, add an extension for voicemail .
; now if we dial 8, we can check voicemail.
;
exten => 8,1,VoiceMailMain2
exten => 8,2,Hangup
; Add some more extensions for the two lines. Now we’ll be able to call one line from the other.
; And if no one answers, it will go to the mailbox for that line.
;
; Line 1
;
exten => 3014,1,Dial(${PHONES1},20,Ttm)
exten => 3014,2,Macro(vmessage,${PHONES1VM})
exten => 3014,3,Hangup
;
; Line 2
;
exten => 3015,1,Dial(${PHONES2},20,Ttm)
exten => 3015,2,Macro(vmessage,${PHONES2VM})
exten => 3015,3,Hangup

sip.conf

[general]
;make sure to add this line, otherwise things dont work as proved by weeks of debugging
port=5060
;We want to configure each of the extensions we setup in extensions.conf like this one below (as a simple base)

[3014]
type=friend
username=3014
host=dynamic
context=home
secret=*****
callerid="Tom"
mailbox=3014
dtmfmode=rfc2833
nat=yes

[3015]
type=friend
username=3015
host=dynamic
context=home
secret=******
callerid="Tom"
mailbox=3015
dtmfmode=rfc2833
nat=yes

voicemail.conf

[general]
; Choose a format to save voicemails as, I use gsm format, it ends up with small files
format=gsm
;
; if you set this to yes, the voicemail is attached as a file (so you can play it from your email directly,
; you may want to turn this off if your email is on another server or limited for space or for various other reasons.
;
attach=yes
;
; Each mailbox is listed in the form =,
; if the e-mail is specified, a message will be sent when a message is received, to the given mailbox.
; If pager is specified, a message will be sent there as well.
;
[home]
3014 => 1234,Tom,name@yahoo.com
3015 => 1234,Deb,name@yahoo.com

I will suggest to go dynamic:

[home]

exten=>_XXXX,1,Dial(SIP/${extension},30)
exten=>_XXXX,2,Voicemail,u${extension}

In extensions.conf, under your “home” context as I have provided above, the first line matches any four digit extension number and dials it for 30 secs, and if unanswered it goes to the voice mail for the same matched 4-digit extension. With the above you do not have to create lines for each extension.
You will need to delete the following from extensions.conf home context:
; Line 1
;
exten => 3014,1,Dial(${PHONES1},20,Ttm)
exten => 3014,2,Macro(vmessage,${PHONES1VM})
exten => 3014,3,Hangup
;
; Line 2
;
exten => 3015,1,Dial(${PHONES2},20,Ttm)
exten => 3015,2,Macro(vmessage,${PHONES2VM})
exten => 3015,3,Hangup