Asterisk Dialplan for analog phone

Hey,

I’m trying to connect Linksys SPA3012 ATA to work with my asterisk-1.6 running on Ubuntu-9.10 server distro. I already have dialplan setup for Softphone communications.

Now I’m trying to setup a dilaplan in such a way that to make a call from my analog phone(416-345-678) to my registered softphone through asterisk in my PBX with DTMF option, where the caller has to enter the extension fo the softphone they want to reach to. How can I do this? Also I want to do Vice-versa ( call from my registered softphone to the analog phone(416-345-678) )

If I’m not wrong, I’ve tried a dialplan as below:
sudo nano /etc/asterisk/sip.conf

[general]
context=default

;context for Analog phone
[bratanalog];Ex.789, SPA3102, IP addr od ATA port 5060
type=friend;device bratanalog can make and take calls
secret=brat_asterisk;
qualify=yes;Check if the device is alive from time to time
nat=no;No firewall between SPA3102 and Asterisk
port=5060;
canreinvite=no;We don’t use an external SIP provider
context=internal;

/etc/asterisk/extensions.conf

[globals];context global
[general];context general defined in sip.conf
autofallthrough=yes;

[internal];context defined in sip.conf

;bratanalog 789 SIP SPA3102
exten => 789,1,Answer();Answer the call
exten => 789,n,Verbose(1|Call bratanalog 789 SIP SPA3102);Log it
exten => 789,n,Dial(SIP/bratanalog,15);Ring the extension
exten => 789,n,Hangup();End the call

exten => i,1,Playback(pbx-invalid);
exten => i,2,Goto(internal,s,1);send them back to try again

exten => t,1,Playback(vm-goodbye);This is not working as expected. Help?
exten => t,2,Hangup;too slow, or no hangup

bratanalog is the username and brat_asterisk is the password for my analog phone using Linksys ATA.

And extensions of the softphones already registered are 123,456,897,345,339. Will the dialplan allow the analog phone to call any of these softphones extensions.

Please help me :frowning: