[solved] no outgoing calls spa3102

Hi guys, i’m new in the asterisk world.

What I can do:
call from 302 to 303
recieve external calls via asterisk on 302. (works great)

But I’m having trouble making my first outgoing call, here’s my setup:

asterisk 1.8 (on PFsense/FreeBSD 32bits)
Linksys SPA3102 (for incoming and outgoing calls via Telecom)

sip.conf

[code][general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=192.168.3.1
srvlookup=no
disallow=all
allow=ulaw,alaw
alwaysauthreject=yes
canreinvite=no
nat=yes
session-timers=refuse
localnet=192.168.3.0/255.255.255.0

[302];spa1
type=friend
host=dynamic
secret=1234
context=internal
qualify=yes

[303];sebaphone
type=friend
host=dynamic
secret=1234
context=internal
qualify=yes

[pstn]
disallow=all ; Turn off all codex
allow=all ; Turn them all back on
type=friend
host=dynamic
context=pstn-1
;username=pstn
secret=1234
dtmfmode=auto ; How Touch Tones are transmitted
incominglimit=1[/code]

extensions.conf

[code][internal]

exten => 302,1,Answer()
exten => 302,2,Dial(SIP/302,60)
exten => 302,3,Hangup()

exten => 303,1,Answer()
exten => 303,2,Dial(SIP/303,60)
exten => 303,3,Hangup()

;outgoing calls NOT_WORKING!
exten => _XXXXX.,1,Dial(SIP/${EXTEN}@pstn,60,)
;exten => _XXXXX,2,Congestion

[pstn-1]
;incoming calls!! WORKS!
;http://stackoverflow.com/questions/14158334/asterisk-forwarding-a-call-without-answering-immediately
exten => s,1,Dial(SIP/302, 600, A(beeperr))
exten => s,2,Goto(["{DIALSTATUS}" = “ANSWER”])
exten => s,3,Hangup()[/code]

and here’s my SPA3102 config:

what I’m doing wrong? Thank you!

ps: sorry for my english.

Please show your asterisk CLI when making a call.

And I have configured these devices before. But the quality is not the best. Try to upgrade to Digium cards

This is what happens when I try to call 55555555 from 302:

-- Executing [55555555@internal:1] Dial("SIP/302-0000000b", "SIP/55555555@pstn,60,") in new stack -- Called SIP/55555555@pstn == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/302-0000000b' status is 'CHANUNAVAIL'

Thank you for the help

Check the config between Asterisk and the SPA3100. I dont have the exact config now, but there are many tutorials in google for trunk SPA310 with Asterisk

i’ve been trying random settings for 1 hour. I fixed it and now it’s working like a charm.
I’ve changed the pstn port from 5060 to 5061. It seems that spa3102 doesn’t support using the same port for the line and the pstn.


The previous config works if you change port=5060 to port=5061 under [pstn] on sip.conf

Thank you for teaching me the cli stuff :stuck_out_tongue: