PSTN line Vodafone Home doesn't work in FreePBX (Linksys SPA3000)

Hi everyone!

I’ve made a post before this post about to connect a PSTN to Freepbx, but I do not get it working.

I’ve installed FreePBX on my Raspberry Pi. This works perfectly. I can dial internal to my phones, but i want to dial to the outside world. I live in the Netherlands, and have a analog telephone line. At least, i have a Draytek modem which works as a ATA-adapter. That modem is from my ISP, Vodafone. The modem connects to the SIP-servers from vodafone and converts it to PSTN (so i can connect my analog phones to the modem).

Now, i want to connect that ‘‘PSTN-line’’ (which is actually a VOIP line, converted to analog), to FreePBX. I’ve read on the Internet, that i can use a FXO-adapter. I’ve purchased a Linksys SPA3000, and try to get it worked. But without succes. I have readed several tutorials, but it won’t work. I get a message when i try to call. ‘‘All circuits are busy now, please try your call again later’’. I don’t know what the problem is because i’ve followed all steps axactly.

My trunk SIP settings in FreePBX are these (the SPA3000 has a static ip-address, in this case a 172.x.x.x ip-range, and FreePBX has ip-address 172.16.2.112):
host=172.16.2.113 (the ipaddress of the SPA3000)
username=username
secret=password
type=friend
qualify=yes
port=5062
nat=no
dtmfmode=inband
context=from-pstn
canreinvite=no

My head explodes, because I 've been busy for weeks to get this worked.

Can anyone help me? Inbound calls also don’t work.

First of all what you bought is a clone device and it might not work properly. SPA3000 has stopped being produced many years now.

Add in your trunk
insecure=port,invite

Post a print screen from the line tab of the spa3000, usually the settings there is the problem not the sip trunk.

Thanks, astbox, for your response! :slight_smile:

I’ve added ‘‘insecure=port,invite’’ to the trunk settings, but without succes. I get the message ‘‘All circuits are busy now…’’. These screenshots are from my ‘‘SPA3000’’. Honestly i bought the device from Aliexpress.com, for 22 euros. Very stupid of me. :sweat:

Because i can’t upload pictures directly, here are the images stored.
stichting-lnl.nl/service/images/public/ISA/spa1.png
stichting-lnl.nl/service/images/public/ISA/spa2.png
stichting-lnl.nl/service/images/public/ISA/spa3.png
stichting-lnl.nl/service/images/public/ISA/spa4.png
stichting-lnl.nl/service/images/public/ISA/spa5.png

I hope you can see the pictures.

The Info page of the device shows me ‘‘failed’’ as PSTN-line status. When i try to register the PSTN-line as a extension, then it shows ‘‘registered’’. I’ve configured Line 1 of the device so i can connect an analog phone to it. I hope you understand me…

Thank you very much, astbox, for your help en response! :smile:

Ooh, before i forget: when i go to the Dashboard of Freepbx, it shows me that the Trunk is online… very strange.

Change the following in the spa3000 settings

Register=No
Use OB proxy in dialog=no
PSTN CID for VOIP CID=yes
PSTN answer delay =3

Be sure user id and password match the ones in the sip trunk.
You might need to configure the busy tone if the phones keep ringing.

I would suggest just removing the analog link all together, and just register directly to the Vodafone SIP Servers.

Thanks everyone for your responses. I’ve edit te settings in the SPA3000, but without succes. I get the message ‘all circuits are busy now…’. :sweat:

I’ve contacted Vodafone, but they don’t give the login settings to connect to their SIP servers. I don’t know why, but it is very, very, very stupid. I think it will not work with the SPA3000. It shows registered in FreePBX, but outbound/inbound calling don’t works. Not now, not about 1 year. If anyone has ideas to get it (maybe) working, let me know. :slight_smile:

Start with from the Asterisk CLI:-

sip set debug ip 172.16.2.113

until you do that you are just guessing.
When you do that you will see what is failing, either the network, the auth or the port.

Then stop using them. Don’t give money to people who go out of their way to make your life difficult. You do have other options, and you’ll probably find they’ll be cheaper, too.

3 Likes

Wow! I don’t know why, but i can recieve calls! I’ve tried it 10 minutes before i write this message, and it works! The SPA3000 says on the Info page that the last recieved number my cellphone is. Wow! I’m really happy now!
But… i can’t make outbound calls. I’ve runned the command in the Asterisk CLI, but it only says ‘sip debugging enabled for 172.16.2.113’. Do i need to see the logfiles in the report section in FreePBX? I’m sorry for my questions. Thanks everyone for your responses! It really helps me to fix this problem. :grin:

Do you have the sip trunk in the trunk sequence of the outbound route?

What do you mean? I have selected the trunk in the outbound settings and i need to dial a 0 before the trunk is used. I’m sorry for my bad English, i’m very bad in English, haha.:sweat_smile:

I’m a little confused about your setup.

If I understand, you have a Vodaphone box plugged into the Internet. This provides two phone lines for you that you have plugged into a FAX machine and your server? If so, you are using a DAHDI connection to talk to the POTS line that your Vodaphone provides.

If that’s the case, your incoming trunk setup would be using the Vodaphone POTS line as your only way into or out of the PBX.

If that’s true, then you will need to make sure your outbound dial patterns are correct for what Vodaphone is expecting you to send.

Is the “0” you have to dial a Vodaphone requirement? If so, you can add it to the “prepend” setting in your manipulation rules for the outgoing call on the trunk.

If you do that, you will need to make sure that the Outbound Route sets up the call so that the trunk can do what it needs to do to the outbound call.

There are lots of ways to set up outbound routes and trunks that will probably all work fine. It would help us if you could post the section of the file “/var/log/asterisk/full” that is produced when you try to place an outbound call. From there, we can probably see what’s going wrong.

Thanks, Dave, for your response. I have looked in the reports, and i saw some lines with the IPadress of the SPA3000 in it. These are the reports:

Show

<— Transmitting (no NAT) to 172.16.2.113:4000 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.16.2.113:4000;branch=z9hG4bK-f81fcf21;received=172.16.2.113
From: sip:[email protected]:4000;tag=733e02e321b6d5ceo0
To: sip:[email protected]:4000;tag=as00990072
Call-ID: [email protected]
CSeq: 23769 REGISTER
Server: FPBX-13.0.74(11.21.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="67e0d536"
Content-Length: 0

<------------>
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c: Really destroying SIP dialog ‘[email protected]:4000’ Method: INVITE
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c:
<— SIP read from UDP:172.16.2.113:4000 —>
REGISTER sip:172.16.2.112:4000 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.113:4000;branch=z9hG4bK-55bf6156
From: sip:[email protected]:4000;tag=733e02e321b6d5ceo0
To: sip:[email protected]:4000
Call-ID: [email protected]
CSeq: 23770 REGISTER
Max-Forwards: 70
Authorization: Digest username=“8404”,realm=“asterisk”,nonce=“67e0d536”,uri=“sip:172.16.2.112:4000”,algorithm=MD5,response="418bd7547ef6bab46479675499303b22"
Contact: sip:[email protected]:4000;expires=3600
User-Agent: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c: — (13 headers 0 lines) —
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c: Sending to 172.16.2.113:4000 (no NAT)
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c:
<— Transmitting (no NAT) to 172.16.2.113:4000 —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 172.16.2.113:4000;branch=z9hG4bK-55bf6156;received=172.16.2.113
From: sip:[email protected]:4000;tag=733e02e321b6d5ceo0
To: sip:[email protected]:4000;tag=as00990072
Call-ID: [email protected]
CSeq: 23770 REGISTER
Server: FPBX-13.0.74(11.21.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
[2016-05-25 22:03:33] NOTICE[1871] chan_sip.c: Registration from ‘sip:[email protected]:4000’ failed for ‘172.16.2.113:4000’ - Wrong password
[2016-05-25 22:03:33] VERBOSE[1871] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)
[2016-05-25 22:03:34] VERBOSE[1871] chan_sip.c: Reliably Transmitting (no NAT) to 172.16.2.113:4000:
OPTIONS sip:172.16.2.113 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.112:4000;branch=z9hG4bK08a6b78e
Max-Forwards: 70
From: “Unknown” sip:[email protected]:4000;tag=as67c3ba38
To: sip:172.16.2.113
Contact: sip:[email protected]:4000
Call-ID: [email protected]:4000
CSeq: 102 OPTIONS
User-Agent: FPBX-13.0.74(11.21.0)
Date: Wed, 25 May 2016 21:03:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[2016-05-25 22:03:34] VERBOSE[1871] chan_sip.c:
<— SIP read from UDP:172.16.2.113:4000 —>
SIP/2.0 200 OK
To: sip:172.16.2.113;tag=26c8a7df7df61502i1
From: “Unknown” sip:[email protected]:4000;tag=as67c3ba38
Call-ID: [email protected]:4000
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.16.2.112:4000;branch=z9hG4bK08a6b78e
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
[2016-05-25 22:03:34] VERBOSE[1871] chan_sip.c: — (10 headers 0 lines) —
[2016-05-25 22:03:34] VERBOSE[1871] chan_sip.c: Really destroying SIP dialog ‘[email protected]:4000’ Method: OPTIONS
[2016-05-25 22:03:34] VERBOSE[5584][C-0000001e] file.c: – <SIP/8405-00000028> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
[2016-05-25 22:03:36] VERBOSE[1871] chan_sip.c: Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Executing [s@macro-outisbusy:5] Congestion(“SIP/8405-00000028”, “20”) in new stack
[2016-05-25 22:03:37] WARNING[5584][C-0000001e] channel.c: Prodding channel ‘SIP/8405-00000028’ failed
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] app_macro.c: == Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘SIP/8405-00000028’ in macro ‘outisbusy’
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: == Spawn extension (from-internal, 0639051650, 8) exited non-zero on ‘SIP/8405-00000028’
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Executing [h@from-internal:1] Macro(“SIP/8405-00000028”, “hangupcall”) in new stack
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Executing [s@macro-hangupcall:1] ExecIf(“SIP/8405-00000028”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Executing [s@macro-hangupcall:2] GotoIf(“SIP/8405-00000028”, “1?theend”) in new stack
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Goto (macro-hangupcall,s,4)
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Executing [s@macro-hangupcall:4] ExecIf(“SIP/8405-00000028”, “0?Set(CDR(recordingfile)=)”) in new stack
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: – Executing [s@macro-hangupcall:5] Hangup(“SIP/8405-00000028”, “”) in new stack
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] app_macro.c: == Spawn extension (macro-hangupcall, s, 5) exited non-zero on ‘SIP/8405-00000028’ in macro ‘hangupcall’
[2016-05-25 22:03:37] VERBOSE[5584][C-0000001e] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/8405-00000028’

I don’t know what it means, but some things i understand. But the solution: i didn’t have te conclusion.

If this is your “SIP” connection to the Vodafone box, then you are not authorized to connect your PBX to it. That means the trunk is not set up correctly.

Fix that and let us know when you’ve got that working.

There’s more that probably needs to be done, but without this first step, there’s no point in anyone troubleshooting.

One important part - if the Vidafone box is in your local network, you should turn SIP NAT off - there shouldn’t be any NAT traversal if all of your stuff is on the same network.

No, that “SIP” connection is the connection to the SPA3000 with IPAddress 172.16.2.113. Do you mean that the Vodafone box blocks the connection to the SPA3000? Or do i have the wrong settings applied to the SPA3000 and FreePBX? I will try this weekend to get it work, so i hope it will work! :slight_smile:

Hi everyone! I’ve tried several times this day to get it work, and i got in the right direction. The connection (trunk) to my FreePBX system and the SPA3000 registers. In the FreePBX Dashboard, it shows me ‘‘1 trunk online’’. In the SPA3000 it says me ‘‘registered’’. I didn’t get the message (when i want to call outbound) ‘‘all circuits are busy now’’. But, i get a unavailable tone when i dial the number i want to dial. My Openstage 20 shows me on the display a ‘‘cross’’ when i try to dial. In the log files of FreePBX, it shows me this:


[2016-05-28 19:54:02] VERBOSE[31825][C-00000014] app_dial.c: – Called SIP/31464377605/0639051650
[2016-05-28 19:54:02] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5060 —>
SIP/2.0 100 Trying
To: sip:[email protected]:5060
From: sip:[email protected];tag=as6f5f61c2
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK42116cc7
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0

<------------->
[2016-05-28 19:54:02] VERBOSE[1947] chan_sip.c: — (8 headers 0 lines) —
[2016-05-28 19:54:02] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5060 —>
SIP/2.0 504 Service Unavailable
To: sip:[email protected]:5060;tag=5d4d02738be15b62i1
From: sip:[email protected];tag=as6f5f61c2
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK42116cc7
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0

Sometimes, it shows me this (a OK message):


[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5060 —>
SIP/2.0 200 OK
To: sip:172.16.2.113;tag=5d4d02738be15b62i1
From: “Unknown” sip:[email protected];tag=as0f6c8239
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK761bd8bc
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c: — (10 headers 0 lines) —
[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c: Reliably Transmitting (no NAT) to 172.16.2.113:5060:
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK15207316
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as72398964
To: sip:[email protected]:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-13.0.74(11.21.0)
Date: Sat, 28 May 2016 19:04:28 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5060 —>
SIP/2.0 200 OK
To: sip:[email protected]:5060;tag=5d4d02738be15b62i1
From: “Unknown” sip:[email protected];tag=as72398964
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK15207316
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c: — (10 headers 0 lines) —
[2016-05-28 20:04:28] VERBOSE[1947] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c: Reliably Transmitting (no NAT) to 172.16.2.113:5060:
OPTIONS sip:172.16.2.113 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK74bbfb74
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as0af35be8
To: sip:172.16.2.113
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-13.0.74(11.21.0)
Date: Sat, 28 May 2016 19:05:28 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5060 —>
SIP/2.0 200 OK
To: sip:172.16.2.113;tag=5d4d02738be15b62i1
From: “Unknown” sip:[email protected];tag=as0af35be8
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK74bbfb74
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c: — (10 headers 0 lines) —
[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c: Reliably Transmitting (no NAT) to 172.16.2.113:5060:
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK5b5cdbb4
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as46d024f0
To: sip:[email protected]:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-13.0.74(11.21.0)
Date: Sat, 28 May 2016 19:05:28 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5060 —>
SIP/2.0 200 OK
To: sip:[email protected]:5060;tag=5d4d02738be15b62i1
From: “Unknown” sip:[email protected];tag=as46d024f0
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK5b5cdbb4
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

<------------->
[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c: — (10 headers 0 lines) —
[2016-05-28 20:05:28] VERBOSE[1947] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS

I don’t know what this means, but i think that the connection between the SPA3000 and FreePBX works, but the SPA3000 can’t dial the number
whereby i got the ‘‘504 service unavailable’’’ message. Ofcourse i can recieve calls, but outbound? No, that’s without any reason, not possible.

What you have register is the FXS port of the spa3000, not the FXO. The settings of your line are in the PSTN tab. The Line1 tab are the settings of the port that you can connect an analog phone.

In the last sip trace that you posted, you are sending the call to port 5060 of the SPA3000. This means that you are trying to access the Line1 port and not the PSTN port where your vodafone line is connected. The PSTN port uses the 5062 by default. So in your sip trunk you change the port to 5062. If in your sip trunk have used as username and secret the ones that are in the Line tab of the spa3000, change them to the ones on the PSTN tab.

Thanks, astbox, for your help! It helps me very well :grinning:

I’ve changed the port to 5062, in SPA3000 and FreePBX, but it will no help… :cry:

These are te logfiles i get:
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] chan_sip.c: Reliably Transmitting (no NAT) to 172.16.2.113:5062:
INVITE sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK3ae1e088
Max-Forwards: 70
From: sip:[email protected];tag=as5414efd7
To: sip:[email protected]:5062
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-13.0.74(11.21.0)
Date: Mon, 30 May 2016 19:07:21 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 256

v=0
o=root 552356126 552356126 IN IP4 172.16.2.112
s=Asterisk PBX 11.21.0
c=IN IP4 172.16.2.112
t=0 0
m=audio 15562 RTP/AVP 0 8 3 111
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=ptime:20
a=sendrecv


[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] app_dial.c: – Called SIP/inkomend/number
[2016-05-30 20:07:21] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5062 —>
SIP/2.0 100 Trying
To: sip:[email protected]:5062
From: sip:[email protected];tag=as5414efd7
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK3ae1e088
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0

<------------->
[2016-05-30 20:07:21] VERBOSE[1947] chan_sip.c: — (8 headers 0 lines) —
[2016-05-30 20:07:21] VERBOSE[1947] chan_sip.c:
<— SIP read from UDP:172.16.2.113:5062 —>
SIP/2.0 504 Service Unavailable
To: sip:[email protected]:5062;tag=a55455c24fbe085fi1
From: sip:[email protected];tag=as5414efd7
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK3ae1e088
Server: Linksys/SPA3000-3.1.20(GW)
Content-Length: 0

<------------->
[2016-05-30 20:07:21] VERBOSE[1947] chan_sip.c: — (8 headers 0 lines) —
[2016-05-30 20:07:21] VERBOSE[1947][C-000000e1] chan_sip.c: – Got SIP response 504 “Service Unavailable” back from 172.16.2.113:5062
[2016-05-30 20:07:21] VERBOSE[1947][C-000000e1] chan_sip.c: Transmitting (no NAT) to 172.16.2.113:5062:
ACK sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 172.16.2.112:5060;branch=z9hG4bK3ae1e088
Max-Forwards: 70
From: sip:[email protected];tag=as5414efd7
To: sip:[email protected]:5062;tag=a55455c24fbe085fi1
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-13.0.74(11.21.0)
Content-Length: 0


[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] app_dial.c: – SIP/inkomend-00000160 is circuit-busy
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s@macro-dialout-trunk:24] NoOp(“SIP/8401-0000015f”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 102”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s@macro-dialout-trunk:25] GotoIf(“SIP/8401-0000015f”, “0?continue,1:s-CONGESTION,1”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Goto (macro-dialout-trunk,s-CONGESTION,1)
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“SIP/8401-0000015f”, “RC=102”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“SIP/8401-0000015f”, “102,1”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Goto (macro-dialout-trunk,102,1)
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [102@macro-dialout-trunk:1] Goto(“SIP/8401-0000015f”, “continue,1”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Goto (macro-dialout-trunk,continue,1)
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [continue@macro-dialout-trunk:1] NoOp(“SIP/8401-0000015f”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 102 - failing through to other trunks”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [continue@macro-dialout-trunk:2] ExecIf(“SIP/8401-0000015f”, “1?Set(CALLERID(number)=8401)”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [00464336599@from-internal:7] Macro(“SIP/8401-0000015f”, “outisbusy,”) in new stack
[2016-05-30 20:07:21] WARNING[25727][C-000000e1] app_macro.c: No such context ‘macro-outisbusy’ for macro ‘outisbusy’. Was called by 00464336599@from-internal
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [00464336599@from-internal:8] Congestion(“SIP/8401-0000015f”, “20”) in new stack
[2016-05-30 20:07:21] VERBOSE[1947] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: INVITE
[2016-05-30 20:07:21] WARNING[25727][C-000000e1] channel.c: Prodding channel ‘SIP/8401-0000015f’ failed
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: == Spawn extension (from-internal, 00464336599, 8) exited non-zero on ‘SIP/8401-0000015f’
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [h@from-internal:1] Macro(“SIP/8401-0000015f”, “hangupcall”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s@macro-hangupcall:1] ExecIf(“SIP/8401-0000015f”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s@macro-hangupcall:2] GotoIf(“SIP/8401-0000015f”, “1?theend”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Goto (macro-hangupcall,s,4)
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s@macro-hangupcall:4] ExecIf(“SIP/8401-0000015f”, “0?Set(CDR(recordingfile)=)”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: – Executing [s@macro-hangupcall:5] Hangup(“SIP/8401-0000015f”, “”) in new stack
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] app_macro.c: == Spawn extension (macro-hangupcall, s, 5) exited non-zero on ‘SIP/8401-0000015f’ in macro ‘hangupcall’
[2016-05-30 20:07:21] VERBOSE[25727][C-000000e1] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/8401-0000015f’

I have changed numbers i dialed to ‘‘number’’. Incoming calls works fine. These are my trunk settings:

context=from-pstn
host=172.16.2.113
nat=no
port=5062
type=peer
username=inkomend
secret=inkomend
canreinvite=no
dtmfmode=inband
qualify=yes
insecure=port,invite

I haven’t any idea to fix this. I will try a few times again.

Post again print screen from the PSTN line tab of the spa3000.

Thanks for your help, astbox. :slight_smile:

I can’t upload pictures, so here are the new printscreens stored:
stichting-lnl.nl/service/images/public/ISA/prints2/spa1.png
stichting-lnl.nl/service/images/public/ISA/prints2/spa2.png
stichting-lnl.nl/service/images/public/ISA/prints2/spa3.png
stichting-lnl.nl/service/images/public/ISA/prints2/spa4.png
stichting-lnl.nl/service/images/public/ISA/prints2/spa5.png

I don’t know if it matter that i use CHAN_SIP in FreePBX? I’m not be able to use PJSIP. It looks that FreePBX can register to the SPA, but the SPA is not be able to complete the call to vodafone.

(update, 14:26)
I’ve tried something in the Asterisk CLI. I’ve entered ‘‘sip show peers’’. This is what it says:
stichting-lnl.nl/service/images/public/ISA/prints2/spa6.png

It looks like the SPA3000 (ip address 172.16.2.113) is correctly registered. When i shutdown the SPA3000 (to remove the Ethernet cable), it shows me ‘‘unreachable’’ in the Asterisk CLI. And, i get a ‘‘the number is not answering’’ message when i call my cellphone on my OpenStage phone. The problem is the SPA3000, not freepbx. I think.