Call connected but no audio, auto released in 30secs


(Corydon) #1

Hi,

I am a newbie, just installed FreePBX server( Asterisk Version: 16.6.2) with 2 Bria clients all on the same subnet. 2 clients can call each other, but once 2 parties getting connected , there is no audio(speaker/headphone modes) and after 30 secs the call is automatically released.

Please could you help what might be the root cause( nat issue) and how to fix it?

Thanks!

corydon

Here is the Asterisk Info of FreePBX GUI(Actually the 2 Bria clients are all online)

Ps: using # instead of @ to comply the post rule for new user.
This page supplies various information about Asterisk
Current Asterisk Version: 16.6.2
Channels
Tech Resource Status Channel Count
PJSIP dpma_endpoint OFFLINE 0
PJSIP 200 ONLINE 0
PJSIP 100 OFFLINE 0
Conferences
Conference Bridge Name Users Marked Locked Muted
================================ ====== ====== ====== =====
Peers
PJSIP

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: 100/100 Unavailable 0 of inf
InAuth: 100-auth/100
Aor: 100 1
Contact: 100/sip:100#192.168.0.20:64472;rinstance=7 d59345a651 Unavail nan

Endpoint: 200/200 Not in use 0 of inf
InAuth: 200-auth/200
Aor: 200 1
Contact: 200/sip:200#192.168.0.23:52095;rinstance=5 024b70b794 Avail 12.061

Endpoint: dpma_endpoint Unavailable 0 of inf

Objects found: 3

CHANSIP
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
IAX2
Name/Username Host Mask Port Status Description
0 iax2 peers [0 online, 0 offline, 0 unmonitored]
Queues
default has 0 calls (max unlimited) in ‘ringall’ strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
No Members
No Callers

Registries
PJSIP
No objects found.

SIP
Host dnsmgr Username Refresh State Reg.Time
0 SIP registrations.
Host dnsmgr Username Perceived Refresh State
0 IAX2 registrations.
Subscriptions

-= Registered Asterisk Dial Plan Hints =-
100#ext-local : PJSIP/100&Custom:DND State:Unavailable Presence: Watchers 0
*8575#park-hints : park:75#parkedcalls State:Unavailable Presence:not_set Watchers 0
*8574#park-hints : park:74#parkedcalls State:Unavailable Presence:not_set Watchers 0
200#ext-local : PJSIP/200&Custom:DND State:Idle Presence: Watchers 0
*8577#park-hints : park:77#parkedcalls State:Unavailable Presence:not_set Watchers 0
*8576#park-hints : park:76#parkedcalls State:Unavailable Presence:not_set Watchers 0
*8571#park-hints : park:71#parkedcalls State:Unavailable Presence:not_set Watchers 0
*8573#park-hints : park:73#parkedcalls State:Unavailable Presence:not_set Watchers 0
*8572#park-hints : park:72#parkedcalls State:Unavailable Presence:not_set Watchers 0
*8578#park-hints : park:78#parkedcalls State:Unavailable Presence:not_set Watchers 0
72#park-hints : park:72#parkedcalls State:Unavailable Presence:not_set Watchers 0
73#park-hints : park:73#parkedcalls State:Unavailable Presence:not_set Watchers 0
70#park-hints : park:71#parkedcalls& State:Unavailable Presence:not_set Watchers 0
71#park-hints : park:71#parkedcalls State:Unavailable Presence:not_set Watchers 0
76#park-hints : park:76#parkedcalls State:Unavailable Presence:not_set Watchers 0
77#park-hints : park:77#parkedcalls State:Unavailable Presence:not_set Watchers 0
74#park-hints : park:74#parkedcalls State:Unavailable Presence:not_set Watchers 0
75#park-hints : park:75#parkedcalls State:Unavailable Presence:not_set Watchers 0
78#park-hints : park:78#parkedcalls State:Unavailable Presence:not_set Watchers 0
_*96X.#ext-cf-hints : Custom:DEVCF${EXTEN: State:Unavailable Presence: Watchers 0
_*76X.#ext-dnd-hints: Custom:DEVDND${EXTEN State:Unavailable Presence: Watchers 0
_*80X.#ext-local : ${DB(AMPUSER/${EXTEN State:Unavailable Presence: Watchers 0
_*21X!#ext-findmefol: Custom:FOLLOWME${EXT State:Unavailable Presence: Watchers 0
_*98X.#app-dialvm : MWI:${EXTEN:3}#${DB( State:Unavailable Presence: Watchers 0

  • 24 hints registered
    Voicemail
    Context Mbox User Zone NewMsg
    default 100 100 0
    1 voicemail users configured.

#2

If server is in a VM (provide details), be sure that it’s using bridged networking.

In Bria, Topology tab, confirm that Firewall traversal method is set to None and Server Address is left blank.

If you still have trouble, at the Asterisk command prompt type
pjsip set logger on
make a test call, paste the relevant section of the Asterisk log at https://pastebin.freepbx.org and post the link here.


(Corydon) #3

Thanks Stewart1!,

The server is installed baremetal no vm is used. with one windows Bria and one MACOS.
Firewall traversal method is set to None and Server Address is left blank. Problem still.

As you suggested
Here plase find the URL of the log.
https://pastebin.freepbx.org/view/e6aa2514

Thanks!

corydon


#4

In Asterisk SIP Settings, confirm that External Address and Local Networks are correctly set.

From what I know so far, Local Networks should be 192.168.0.0 / 24

If you change these settings, you must restart (not just reload) Asterisk. If you still have trouble, please post a new log with 1000 lines (the default of 500 did not catch the beginning of the call, because of all the retries).


(Corydon) #5

Thanks Stewart!

I checked the Asterisk sip setting , found the external address was 141.xx.xx.xx and internal address was empty. After clicked the auto detect button, the external adder became my router wan IP and internal address became 192.168.0.0/24. The I submitted the changes and applied. In Asterisk CLI, core restart now. the terminal below showing loading and a warning popup for a while saying:" fclose() expects parameter 1 to be resource, boolean …". I am not sure whether the restart was done. But now there is bi-direction audio and no automatically termination.

Here is the log of 2000 lines including the latest successful test call. 50e550d6
(faint, the website doesn’t let me post an URL this time. It allowed a few hours ago)

Next step, I am going to test the external call using domain name and port forwarding. I tried it once yesterday, the call could be setup but no audio. let me see if it works now.

Thanks!


(Corydon) #6

It works with domain setting. I used Bria on my mobile calling via 4G cellular network.

I am going to try TDM410p with FXO card connecting to PSTN line. Does FreePBX support TDM410P with FXO?


(Corydon) #7

Hi Stewart1,

I tried the 2 Bria soft phones for inter-continent call, there is no audio again. The call can be established. If these 2 clients are inside country, they are working well. Is it due to the firewall?

here is the log file:
https://pastebin.freepbx.org/view/a82a3ced

Thanks!


(Dave Burgess) #8

Cliche answer is that one-way audio is almost always a NAT problem. You may need to use ‘sngrep’ to see what internal and external addresses are being used. Also, some countries do not allow unrestricted Internet traffic, so this might a country-specific “network issue”.

A firewall misconfiguration can be checked by calling the remote phone by extension number and seeing if there’s audio. If you can get audio to establish going out, but not on the way in, it could be a firewall redirection problem.


(Corydon) #9

Thanks! I tried to make the scenarios clear to see where I could start the troubleshooting. Today I used 2 Brias one on windows 10(desktop) and another on macOS (MacBook Pro).
Scenario 1: these 2 computers were all on same subnet(192.168.0.0/24) behind my home router and the 2 Brais used the domain name to resolve the Freepbx server address. I also have a Windows server on the same subnet which having a DDNS client. The DDNS is working well. The 2 Brias could call each other and there were bi-direction audio.

Scenario 2: by keeping the on going call of Scenario 1, I switched the internet access of MacBook Pro from home wifi to my iPhone 8+ hotspot which means the Bria on Macbook pro was using the 4G network. The after, the bi-direction audio was gone but call was still on.

Scenario 3: I switched the wifi access of MacBook Pro from iPhone’s hotspot back to home wifi. The bi-direction audio came back.

I did some research on google, same as you mentioned, it could be NAT issue. But I checked the Asterisk SIP setting of Freepbx GUI. The external address was my router wan port address and the internal address was 192.168.0.0/24.

There was a suggestion saying editing the sip_nat.conf by setting nat=yes. But configuration editor shows the sip_nat.conf has empty content and is not writable.

I was trying to edit the sip_nat.conf in Linux terminal using root, but I could not access any linux folders eg. cd/etc, var, usr…

I am lost. Please kindly help to guide!

Thanks!


(Dave Burgess) #10

OK, so the soft phone is no longer on the LAN, which means that the NAT connection for the phone is no longer NONE.

In my experience (which is a couple of versions out-of-date), you can’t use the same configuration of a soft phone from the LAN and from the WAN. There are too many changes to the settings for that to work.

Since your 4G connection is coming in from the routed side, you need to make sure that you are forwarding UDP port 10000-20000 from the firewall router to the PBX. I suspect that you have properly forwarded 5060 and 5160 on the external router, just not the RTP ports.

It is definitely a NAT issue.

In order for the audio to to get to the server, a SYN packet from the phone has to be sent to the PBX to establish the bidirectional audio. Without proper forwarding on the gateway router, the SYN packet that establishes which of the 5000 ports that are open (even numbered ports between 10000 and 20000) are going to be used is lost, since the gateway has no idea where to send the packet it receives.

If you are going to use FreePBX, you need to do this the way that FreePBX manages this. There are at least three places that need attention:

  1. On the SIP Phone, there is probably a NAT setting. This is mostly in the case that your phone is also behind a NAT, but know where it is so that you can toggle is as you are trying different scenarios.
  2. On FreePBX, under Advanced Settings, is a SIP Configuration setting page. It includes Chan-SIP and PJ-SIP settings for all sorts of things, including internal and external addresses for the server. Make sure those are correct, and in the case of Chan-SIP, make sure that NAT=Yes is set correctly.
  3. On the Extension, at least under Chan-SIP extensions, there is a NAT= setting that you may need to work with.

For all three of these, the NAT= setting is there to let that end identify what it needs to tell the other end how to get back. In the case of Bria, you may need to have two configs: one internally (where NAT is usually off) and one externally (where NAT is on and a STUN server may be required).

Incoming and outgoing legs of all calls are largely independent. In fact, it sometimes pays to think of a “call” in SIP as a group of four distinct datastreams (all four of which terminate at one end or the other at the PBX itself).

Of course, there are all of the standard “avoid SIP-ALG” warnings and caveats, as well as the realization that some Wireless providers block SIP calling over data.


(Corydon) #11

Thanks Dave.

I added tcp/udp port forwarding 10000-20000 to FreePBX server. Now the bi-direction audio is coming while using 4G network for the backhaul. And the video call also works well.

There are some questions I am trying to understand.

  1. What are the port 5060, 5161 and 10000-20000 used for? I assume the 5060 is for the call proceeding signaling and 10000-20000 are for the data plane(audio and video). I just added 5060 forwarding to FreePBX before , so call can be established but the data traffic is not routable if using external internet backhaul.

  2. Is there a standard sip call_flow I can study further?

I am waiting for the Digium TDMcard coming to test inbound/outbound Pstn call.

Thanks!

corydon


(Lorne Gaetz) #12
  1. SIP Port Forwarding
  2. Virtuous Signalling

(Corydon) #13

Thanks! Lome.

very helpful.

I am using sngrep and find
Current Mode: Online [any] Dialogs: 17
Match Expression: BPF Filter:
Display Filter:
^Idx Method SIP From SIP To Msgs Source Destination Call State
[ ] 1 INVITE 2001@192.168.0.38:5060 00441519470395@192.168.0. 1 198.144.177.187:57070 192.168.0.38:5060 CALL SETUP
[ ] 2 INVITE 1009@192.168.0.38:5060 900441415360093@192.168.0 1 198.144.177.187:50572 192.168.0.38:5060 CALL SETUP
[ ] 3 OPTIONS 201@192.168.0.38 201@192.168.0.1 2 192.168.0.38:5060 192.168.0.1:57872
[ ] 4 INVITE 2001@192.168.0.38:5060 +441519470395@192.168.0.3 1 198.144.177.187:64370 192.168.0.38:5060 CALL SETUP
[ ] 5 OPTIONS 200@192.168.0.38 200-bea8ea31f7e1e32cc6c4d 2 192.168.0.38:5060 35.185.177.49:5060
[ ] 6 INVITE 2001@192.168.0.38:5060 000441415360093@192.168.0 1 198.144.177.187:61768 192.168.0.38:5060 CALL SETUP
[ ] 7 INVITE 2002@192.168.0.38:5060 00441519470395@192.168.0. 1 198.144.177.187:51974 192.168.0.38:5060 CALL SETUP
[ ] 8 INVITE 2001@192.168.0.38:5060 900441415360093@192.168.0 1 198.144.177.187:52620 192.168.0.38:5060 CALL SETUP
[ ] 9 OPTIONS 100@192.168.0.38 100-2f3b242e818384cb9561c 2 192.168.0.38:5060 35.185.177.49:5060
[ ] 10 INVITE 2002@192.168.0.38:5060 +441519470395@192.168.0.3 1 198.144.177.187:56736 192.168.0.38:5060 CALL SETUP
[ ] 11 OPTIONS 300@192.168.0.38 300-5bdf8c4373496aa910223 2 192.168.0.38:5060 35.185.177.49:5060
[ ] 12 INVITE 2002@192.168.0.38:5060 000441415360093@192.168.0 1 198.144.177.187:53114 192.168.0.38:5060 CALL SETUP
[ ] 13 INVITE 2003@192.168.0.38:5060 00441519470395@192.168.0. 1 198.144.177.187:56221 192.168.0.38:5060 CALL SETUP
[ ] 14 OPTIONS 201@192.168.0.38 201@192.168.0.1 2 192.168.0.38:5060 192.168.0.1:57872
[ ] 15 INVITE 2003@192.168.0.38:5060 +441519470395@192.168.0.3 1 198.144.177.187:60970 192.168.0.38:5060 CALL SETUP
[ ] 16 OPTIONS 200@192.168.0.38 200-bea8ea31f7e1e32cc6c4d 2 192.168.0.38:5060 35.185.177.49:5060

is someone scanning my FreePBX server?

corydon


(Corydon) #14

One question, how could I delete the logs I posted on pastern? tsk!


(Dave Burgess) #15

I don’t use pastebin, but I can’t imagine a scenario where you shouldn’t be able to delete the files once there. Since it’s on the Sangoma pastebin instance, you could try sending in an Issues request (top of the screen) and ask one of the Sangoma pros to handle it.

Rather than worry about “if” someone is scanning your network (because they just are), set up your Integrated Firewall and exclude everyone that tries. Also, for safety, go into the Advanced Settings tab and make sure that “Anonymous” access is disabled. After that, make sure that port 5060 on your firewall is only open to people you want to have access.

For access to other services (none of which should be exposed to the Interwebs), make sure the Firewall router blocks everything incoming, and make sure the Integrated Firewall (in FreePBX) is set up so that nothing is in the Internet Zone. The Wiki has information on securing your network using FreePBX. Here are a couple of threads where we’ve talked about port security.


(Corydon) #16

Thanks Dave! I will go through the information you shared.

I just got a digium TDM400P with 3fxo and 1fxs and installed. It was shown in DAHDI Configuration/Analog hardware. The 3 fxo ports light green and one with 1 port connected to the PSTN line. I just added one rule in the Outbound routes. I tried to call a pstn number but the the Bria responded with " all circuits are busy".

I disconnected pstn line and dialed again, getting the same announcement. It seems the symptom is irrelavate to the PSTN line. I am sure the pstn line is working.

I think there might be some configurations not done properly. I got lost as I don’t which configurations need to be configured to let card work. Please could guide the major steps?

Btw, how could I check whether the card is working. I did check the Asterisk info. didn’t find card status.

Thanks!

Corydon


(Dave Burgess) #17

First things first - this should be it’s own thread since it’s a completely new issue.

There are lots of posts on the forum about using the TDM400 card in Asterisk. My first inclination is to always set it up using the ‘dahdi_*’ tools, get it working so that Asterisk recognizes it, then never look at it again with the FreePBX tools. While, in theory, the FreePBX DAHDI setup stuff should work, we’ve seen correspondents galore report that they had it working, then tried to check the config with the FreePBX stuff, only to find that it no longer worked.

The second is a knowledge bite: the card is operated using the DAHDI software which is not part of Asterisk or FreePBX. DAHDI is a separate package and, while it often works with both, it is independent of them. You’ll need to get that part working before you can get the card going.

Go ahead and look back through the forum posts on this and if you absolutely cannot get it going, start up a new thread.