Asterisk with Linksys SPA3102

Hello,

I have created a basic asterisk system and I works fine on IP phones. Now I want to integrate asterisk server with PSTN connectivity. For that I got a Linksys ATA, model no: SPA3102.

So, what configuration should I made on both these devices (Asterisk server & SPA3102) for analog and PSTN connectivity???

First recommendation if you want to use analog lines, try Digium Cards, which is very well docummented and you will get direct Digium support and a great call quality, SPA3102 tend to cause issues and it is very old hardware,quality it is not good, you will need to search on google for the setup, here we just can help you with the Asterisk part

Can you please guide me for the Asterisk configuration only?
Do I need DAHDI for that device too???

Dahdi is needed when PCI card will be installed, this device it is a gateway it is pure SIP, guide there are lot a google

1 Like

Hello,

This is my sip.conf configuration :

[user1]
type=friend
context=phones
secret=secretpassword
allow=ulaw,alaw
host=dynamic

[user2]
type=friend
context=phones
secret=secretpassword
allow=ulaw,alaw
host=dynamic

; Line1 on SPA3102
;
[line1]
type=friend
host=dynamic
context=internal
username=line1
secret=secretpassword
nat=yes
canreinvite=no
dtmfmode=rfc2833
qualify=yes
disallow=all
allow=ulaw

; PSTN on SPA3102
;
[pstn]
type=friend
host=dynamic
context=pstn
username=pstn
secret=secretpassword
nat=yes
canreinvite=no
dtmfmode=rfc2833
qualify=yes
insecure=port,invite
disallow=all
allow=ulaw

And this is extensions.conf configuration:
[phones]
exten => 101,1,Dial(SIP/user1)
exten => 101,n,Hangup

[Phones]
exten => 102,1,Dial(SIP/user2)
exten => 102,n,Hangup

[pstn]
exten => 123,1,NoOP(${CALLERID}) ; show the caller ID info in the console
exten => 123,n,Ringing()
exten => 123,n,Answer()
exten => 123,n,Playback(silence/1)
exten => 123,n,Playback(pls-wait-connect-call)
exten => 123,n,Wait(3)
exten => 123,n,Dial(SIP/line1,60)
exten => 123,n,Congestion

I did all configuration according to my sip.conf in SPA 3102. But it wont register on Asterisk. While other IP phones are properly working, what is the problem???

I successfully connected IP phones and analog phones in internal network.
Now I also want to communicate with outside world using PSTN line.
But I got the following error on Asterisk CLI:

== Using SIP RTP CoS mark 5
> 0x7f485c004990 – Strict RTP learning after remote address set to: 192.168.1.10:16406
– Executing [9867015439@internal:1] Dial(“SIP/line1-00000018”, “SIP/9867015439@pstn,60”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/9867015439@pstn
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘SIP/line1-00000018’ status is ‘CHANUNAVAIL’

Can you please help me to sort out this?

Turn up the logging. The primary cause of the chanunavail has not been logged.

For SIP “trunk” it is likely to be a qualify failure (no response to OPTIONs requests being used to test the connectivity). It can also happen when sending to an unregistered host=dynamic device, or to a device that doesn’t exist in sip.conf.

So, what should I do in my configuration???