Linksys spa3102 with asterisk

Hey,
Can anybody help me set-up a dial plan in asterisk to make a call from SIP phone to analog phone connected through Linksys spa3012 ATA?

Here’s what I have done so far, I set-up a dialplan for communications between SIP phones as below:
/etc/asterisk/sip.conf
[general]

[123]
type=friend
username=123
secret=my_pwd
host=dynamic
context=sip-call

[234]
type=friend
username=123
secret=my_pwd
host=dynamic
context=sip-call

etc/asterisk/extensions.conf
[sip-call]
exten => 123,1,Dial(SIP/123);
exten => 234,1,Dial(SIP/234);

This means I was able to call to my colleague 234 from my softphone registered with 123 as username and similarly vice-versa.

How can I have a dialplan to call from my 123 softphone extension to my analog/hardphone number (416-823-9756)?

Any help!

Add this to sip.conf.

[124]
username=124
secret=my_pwd
call-limit=1
type=peer
fullname=Analog
registersip=no
host=dynamic
context=sip-call
cid_number=124
hasvoicemail=no
threewaycalling=no
callwaiting=no
hasmanager=no
hasagent=yes
hassip=yes
hasiax=no
canreinvite=no
dtmfmode=rfc2833
insecure=no
autoprov=no
disallow=all
allow=alaw

add this to [sip-call]
exten => 124,1,Dial(SIP/124);

Configure SPA3102 as follows
1 Open up browser and load the web gui
2 Click on Admin Login
3 Click on advanced
4 Click on Line 1 tab
5 Set Proxy to the IP address of your asterisk box
6 Set the UserID, Auth ID to "124"
7 Set the Password to “my_pwd”

Make sure analoge phone is plugged in to the correct port. That should allow calls between all extenisons.

You should consult the Linksys guide and read about the Diall Plan.

Let us know how you get on :smiley:

Hey,

So the communication from analog phone by pressing 123 calls my softphone is working perfectly.
Here’s my dial plan:
/etc/sip.conf

[general]
context = anaphone

[123]
type = friend
username = 123
secret = my_pwd
host = dynamic
context = anaphone

;Asterisk will route calls out to the phone or phones
register= brat_phone@192.168.1.5/brat_phone

[an_phone]
type = friend
username = an_phone
secret = ph_pwd
host = dynamic
context = anaphone
dtmfmode = rfc2833
canreinvite = yes
disallow = all
nat = no
allow = ulaw
qualify = yes

/etc/asterisk/extensions.conf
[general]
[anaphone]
exten => 123,1,Dial(SIP/123)

Now I want to make calls to my home phone or cellphone using my softphone(123) through the PSTN of ATA. But this doesn’t seem to work.

Pstn added to the existing dial plan for outgoing calls:

/etc/asterisk/sip.conf
;Asterisk will route outgoing calls to this
[phone_pstn]
type = friend
username = phone_pstn
host = dynamic
port = 5061
secret = my_pstn
dtmfmode = rfc2833
nat = no
context = pstn
insecure = very

/etc/asterisk/extensions.conf

[general]

[pstn]
include => anaphone

exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@phone_pstn,60)

P.S: I have used _NXXNXXXXXX ( Coz I’m in North America )

Also username and password used for an-phone ( Line 1) and phone-pstn( PSTN line 0 in Linksys SPA 3102 web server.

Any help would be just great!

Your softphone (123) is set to use the [anaphone] context

But the definition for the making a call thru the PSTN is defined in the [pstn] context.

exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@phone_pstn,60) is in the wrong context… You need to add this to the [anaphone] context!

Try this, and see what happens.

[anaphone]
exten => 123,1,Dial(SIP/123)
exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@phone_pstn,60) ; <--------add this in here

Hey,

I tried as you had told me to. But all I could hear is a busy tone and also on my softphone I see call established and immediately after few secs it hungs up. How can I make the communication work?
What am I missing?

Probably a authorisation issue with the SPA3102.

Can you post the CLI output and SIP Debug please.

Hey,

My CLI:
*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
123/123 192.168.x.x D 51132 Unmonitored
phone-pstn/phone_pstn 92.168.x.xxx D 5061 Unmonitored
an_phone/an_phone 192.168.x.xxx D 5060 OK (9 ms)

[Nov 20 13:14:37] NOTICE[14739]: chan_sip.c:20837 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 123

Also I was informed that in able to dial out any outside numbers from my office I need to prefix 8.

Message on CLI

chan_sip.c:19547 handle_request_invite: Call from ‘123’ to extension ‘6474564790’ rejected because extension not found.

When I tried to call a cellphone from my softphone.