cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4514
Views
0
Helpful
24
Replies

SPA3000 not estabilishing PSTN incoming calls

Alan.Vinicius91
Level 1
Level 1

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 any issues like this?


Thanks!

24 Replies 24

There are lots of different things that could be your problem.  

The symptions that you are describing seem to indicate some misconfiguration causing sip signalling problems.

You say you have Line 1 and PSTN Line registered to your Asterisk server.  The two lines should be separate extensions each with different unique sip port numbers.  The Softphone should be registered as  a separate extension on your Asterisk server.

Before you test the incoming PSTN Line call, you should be able to pickup a phone attached to the SPA3000 and dial your softphone and have satisfactory two-way conversation.  In this case the conversation will be between Line 1 and the softphone.  This will more or less test your Asterisk routing.

For the incoming PSTN Line calls, the call will initially come to the PSTN Line Tab's PSTN-to-VoIP gateway after the expiration of any PSTN Answer Delay.  You should have a default dialplan setup on the PSTN Line Tab to then automatically dial your softphone and when the SPA3000 receives signalling confirmation from your Asterisk server it will take the PSTN line off hook to bridge the two calls (incoming PSTN Line call and outgoing Asterisk call.  The PSTN Caller Default DP would point to a dial plan and look like this: (S0<:1234567>) where 1234567 is the dialing sequence to reach your softphone.

The PSTN Line call is between the PSTN Line Tab configuration and your Asterisk server.  Line 1 is not involved.

Hello Howard!! Thanks for the reply.


Actually, most of what you said I've done already and forgot to mention.
I have an analog extension on FXS (Line 1) and I can call my softphone "6000" extension and I have no problem with that.

My Line 1 is already set to the port 5061 and PSTN to 5060. They're both registered in Asterisk.

My dialplan 8 routes to the SO<:192.168.1.105> that is the IP address of the my server. The extensions.conf has the internal context (the internal context is connected to the registration of FXS and FXO on sip.conf) that routes to the extension 6000. I can even include the 6000:192.168.1.105:5060 in the dialplan and get it "working" directly to my extension, but I receive the same problems, my originator phone keeps ringing, even when the softphone answers (and drops after second(s) and has noises).

One strange thing is when I reset the SPA and left it with the default dialplan <.xx>.
My originator phone called and could make a connection with the SPA, even though I received only noises.

Does it seem like a SPA problem?

Thanks!

If you leave the dial plan at (xx.) then the SPA3000 should answer the incoming phone call and give you a dial tone.  With the dial tone the calling phone would enter (key) 6000 (the extension number) and call the extension just like you said you could do with the Line 1 phone.

Normally you would put in the dial plan a number to be dialed.  The SPA3000 will pickup this number and send it to the server you have configured on the PSTN Line Tab.  This would be your Asterisk server and be similiar to what is happening if you dial the number from an analog phone.

When you put an ip address in the dial plan, like you said you are doing, you are making an ip call.  With an ip call the call is sent directly to the ip address.  I am not sure what happens if you put just the ip address without the number and the port.  Usually with ip calls they take the form 6000@192.168.1.105:5060.  

You can run the syslog and see the sip invite that is sent and see what the sip invite shows it is sending.  You can also see any sip return codes.  To run the debug trace you put your computer ip address under Debug Server on the System Tab, you set the debug level to 3 and on the PSTN Line Tab you set the Sip Debug Option to FULL, and run your syslog capture program on your computer.  

In addition, to make ip calls work properly you need to have a setting on the Line 1 Tab: Enable IP Dialing: Yes.

You originator phone keeps ringing because when you are automatically dialing the distant number the SPA3000 does not take the PSTN Line off hook until it gets a positive signal from the called phone that the call was answered.

Hello Howard,

This tab Enable IP Dialing is already set to Yes.


What I did was to run Wireshark at the receiving softphone (Extension 6000), that runs in a Windows XP Virtual Machine.

https://www.dropbox.com/s/rte2uftsofr43pc/Asterisk.pcapng?dl=0

I can see the status 100 trying, 180 ringing and 200 ok. Then, some RTP packets are sent and after some seconds I receive a BYE. All of this with the originator not estabilishing the call....

Very strange.

 

The WireShark trace shows 3 pairs of calls, I assume these are 3 call test attempts.  
 
It looks like 
192.168.1.107 is the SPA3000
192.168.1.105 is the Asterisk server (inbound ?)
192.168.1.103 is the Asterisk server (outbound ?)
182.168.1.117 is the softphone
 
You are running firmware v3.1.20 on the SPA3000 which I believe is the latest firmware.
 
Each pair of calls shows a call to the Asterisk server and then from the server to the softphone.  The WireShark VoIP Call Graphic feature shows the following call flow and signalling:

 

There is an initial call 

from 107 to 105  --> 192.168.1.105:5060
103 responds with the call signalling and the sip 200 OK to 107
103 responds with the rtp packets 107
Sip 200 OK is at 9.693 sec
107 responds with an ACK to the 200 OK to 103
107 responds with a BYE to 103
 
There is a 2d call
from 103 to 117  --> 6000@192.168.1.117 (no port)
117 responds 200 OK to 105
117 responds rtp pkts to 103
Sip 200 OK is at 9.691 sec
 
I believe the calls looks normal.  I do not know why the SPA3000 would not take the FXO port off hook.  Maybe there is something in the Sip 200 OK that causes the SPA3000 to fail to match the Sip 200 OK with the call it placed.  I would run a sip debug trace on the SPA3000 to see what the SPA3000 is receiving and if the sip debug trace shows the SPA3000 taking the FXO port off hook.
 
I would try some variations and see if they worked.  
Try sending the call just to 6000 in the dial plan.  Then the call will go to 6000 at the Proxy address you configured under the PSTN Line Tab.
 
Edit:  Does it work if on the PSTN Line Tab you make the following setting?
Off Hook While Calling VoIP: YES
This setting takes the FXO port off hook while placing the voip call to your Asterisk server.
 
 
 
 
 

Hi guys,

 

I´m from Brazil and I have the same problem.

When I answer a PSTN call with my softphone I have a loud noise at the established call moment .

- Line 1 and PSTN line are registered with my asterisk;

- Line 1 and PSTN line have been using different ports: 5061 and 5060.

- If I call from my analog phone to softphone I be able to listen the caller properly

I can see on my log asterisk the call flow working but when I answer the outbound call I have only noise in the connection. This situation happen for Outbound call to IVR too: I can see my IVR script playing the audio files but I have only noise in the line established.

 

Regards,

Jean, boa tarde.


Sou do Brasil também!

Tem alguma forma pra gente conversar? Whats, Face, etc, pra gente discutir isso?
To ficando doido já, não funciona de jeito nenhum.

Olá Alan,

Boa tarde.

Claro, vamos nos ajudar sim..

whats: 41 99418400.

Vamos seguir os comentários do Howard, importante. 

Aguardo.

Use English, please, and continue with discussion here if possible.

It will help other users with similar problem to solve it.

Thank you

Dan, the community moderator

 

Ok, For sure. No problem.

I will use english.

Hello Howard,

I've already tried to call directly to the 6000 or 6001 extension and set the off-hook to yes, but still can't estabilsh the call.

First I thought that it was because I was running asterisk in a Ubuntu VM. Yesterday I installed ubuntu in a physical machine. It didn't matter as I keep having the same problem.

Second, I thought that it could be a SPA problem and I'd try to buy a new one. However, as we just saw, there is another person that is having the same issue. I found another brazillian that had this same problem 5 years ago, emailed him and I've been waiting for his response. 
It's very strange that this only happens to brazillians.

I've already tried to call directly to the 6000 or 6001 extension and set the off-hook to yes, but still can't estabilsh the call. 

You posted the WireShark trace of the call.  WireShark shows what is happening on the eithernet link outside of the SPA3000.  Can you post a sip debug trace of the call to show what is happening inside the SPA3000?

As I said previously, To run the debug trace you put your computer ip address under Debug Server on the SPA3000 System Tab, you set the debug level to 3 on the System Tab, and on the PSTN Line Tab you set the Sip Debug Option to FULL. You run your syslog capture program on your computer.

 

 

 

 

Howard,

I ran this debun last week. I am not sure which dialplan I used, but it rang on my softphone and noise happened while ringback in the originator caller.

 

https://www.dropbox.com/s/qel8vhk7mxfkv71/syslog.514.log?dl=0

The sip debug trace shows the FXO is taken off hook just after the SPA3000 sends an acknowledgement (ACK) to the the Sip 200 OK from the asterisk server (103).  Then, it looks like immediately the SPA3000 receives a disconnect signal (CPC) from the PSTN line

FXO:Off Hook
FXO:Stop CNDD
[1:0]RTP Rx 1st PKT @16450(2)
[1:0]DEC INIT 8
FXO:CPC
AUD:Stop PSTN Tone
FXO:On Hook

This causes the call to end immediately.

And due to the disconnect signal the SPA3000 sends a "BYE"to the Asterisk server (103).

A second call on the trace is then initiated and receives a busy (SIP 486 Busy Here) from 103.

The CPC signal could be a false signal.  As you know, a CPC signal is a complete loss of voltage on the PSTN line and is the technique PSTN companies use to signal that the pstn caller has disconnected.  I would test for a false signal by changing the setting Detect CPC: from Yes to No.  If the CPC signal is a false signal, I would change the detection setting back to Yes but then increase the Min CPC Duration until I had the smallest minimum duration that did not trigger a disconnect.  The default setting is 0.2 seconds (200 ms).  I have read where normal CPC signals can range from 250 ms to 900 ms and are generally about 500 ms.

As for the "loud" noise, I'm not sure what causes that.  The noise clearly comes from the SPA3000 and evidenced by an analysis of the WireShark traces. WireShark has a "Player" option to listen to the rtp packet stream of VoIP calls.  If you use the "Player" to analyze the stream it shows the noise, you can listen to it, and it shows that the noise clearly comes from the SPA3000 (192.168.1.107) and is not being transmitted from the softphone or the asterisk server.