Asterisk not estabilishing inbound PSTN calls

Good morning everyone!

I’m from Brazil and I currently having many problems to provide a solution for my University’s Final Project.

Currently I have the following:
Softphone/Analog Phone <<< >>> Asterisk <<< >>> SPA3000 <<< >>> PSTN line.

I configured and register both PSTN and LINE 1 ports on Asterisk and it’s fine in this sense.
However, everytime that I try calling my softphone/analog phone through PSTN, the SPA3000 routes the call to the softphone/analogphone, it rings, answers, but the call has huge noises and drops after seconds. Sometimes it keeps rings before it drops.
The strangest thing is that the originator equipment that calls my PSTN number (Cellphone or telelphone), doesn’t seem to estabilsh the call, even when the softphone answers it, because the originator keeps receiving the ringing tone.

I ran syslog in the pstn port and when the softphone answered and dropps after seconds, one of the outputs that I received in the log was: “x-asterisk-hangupcausecode=17”

Did anyone have similiar issues?
Does it look like Asterisk or SPA problems?

Regards

Hi,

Can you please share your dialplan and PSTN configuration?

Regards,
Kashif

Here is my sip.conf. Both ports shows up as Registered in SPA3000.

[fxs]
type=friend
host=dynamic
port=5061
context=internal
username=fxs
secret=12345678
nat=no
canreinvite=no
dtmfmode=inband
qualify=yes
disallow=all
allow=ulaw
allow=alaw

[fxo]
type=friend
username=fxo
port=5060
secret=123456789
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; located in the same LAN as Asterisk
dtmfmode=inband
host=dynamic; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
context=internal ; the internal context controls what we can do
disallow=all
allow=ulaw
allow=alaw

Here is extensions.conf
[internal]
exten => 6000,1,Dial(SIP/6000)
exten => s,1,Dial(SIP/6000)

My dial plan 8 at SPA3000 targets the Asterisk IP ADDRESS, (SO<s:192.168.1.105>)