Inbound and outbound is working but is not audible on both sides

configuration
siptrunk
freepbx
Tags: #<Tag:0x00007f7025c58108> #<Tag:0x00007f7025c57fa0> #<Tag:0x00007f7025c57e10>

(Lemillion) #1

I am using Freepbx with Asterisk version 13 for connecting to the SIP Trunk. The trunk is registered and inbound routes and outbound routes are configured and working properly. On checking both inbound and outbound calls, the sound is not audible to both ends. I have attached the log of the call. Please help out here as I am very new to FreePBX.

I am using chan_sip in port 5060. The providers had provided the configuration to allow alaw, ulaw, g729 and g722. In the outbound configuration, I have following codecs allowed.

disallow=all
allow=alaw,ulaw,g722,g729
dtmfmode=auto

I have disabled the firewalld service and iptables in the Linux server. Also, I noticed call being automatically disconnecting after 31 seconds:

NOTICE[12142]: chan_sip.c:29644 check_rtp_timeout: Disconnecting call ‘SIP/NTC-00000063’ for lack of RTP activity in 31 seconds

Pastebin link: https:// pastebin .com/eJuvCUZx (Cannot post link as new user!)


(TheJames) #2

make sure you have ports 10000-20000 (or whatever is in /etc/asterisk/rtp_additional.conf) udp open on your firewall for rtp traffic.


(Matt Brooks) #3

In line with what @jfinstrom was saying, there is a guide you can follow to assist with NAT setup as well. Please read over this and make sure your settings are correct:
https://wiki.freepbx.org/display/FPG/NAT+Configuration+FreePBX+12


(Lemillion) #4

I disabled the firewalld service and iptables in the linux server and I am still getting the same error. Also, I noticed call being automatically disconnecting after 31 seconds:

NOTICE[12142]: chan_sip.c:29644 check_rtp_timeout: Disconnecting call ‘SIP/NTC-00000063’ for lack of RTP activity in 31 seconds


#5

Outgoing audio is much simpler than incoming, so let’s debug that first.

NTC is accepting only alaw (also called PCMA or G.711a), so please set extension, trunk and device to allow alaw only. Test calls from one extension to another and confirm that audio is working in both directions. If not, fix that first.

Next, I suspect that your hardware router/firewall may be blocking the audio. What device(s) do you have between 192.168.0.250 (Asterisk’s LAN address) and 10.59.249.22 (your external address)? If it has a SIP ALG function, try turning that off. Also, try forwarding UDP ports 10000 through 20000 to 192.168.0.250. If no luck, provide details about the router/firewall.

Is Asterisk running on a virtual machine? If so, the VM networking or the host’s software firewall could be causing trouble.


(Lemillion) #6

The calls from one extension to another extension are working fine. I will be testing the alaw format on all extensions.

192.168.0.250 is the FreePBX Server and is connected to the Cisco Router and 10.59.249.22 is the interface address provided by NTC and is directly connected from the device provided by the provider to the server. (192.168.0.250 and 10.59.249.22 is the interface address of FreePbx connected from 2 different devices). NTC has then provided the outbound proxy address which has been configured and is reachable. So should I be forwarding port 10000 through 20000 from 192.168.0.250 to 10.59.249.22?

Asterisk is a physical desktop. The internal firewalls of asterisk i.e. firewalld and iptables are disabled and Freepbx firewall has also been disabled.


#7

Sorry, I did not realize that your PBX has two NICs. I suspect a routing problem at the OS (not Asterisk) level. Please post the output of
ip route
(from a root shell prompt)


(Lemillion) #8

Sorry I cannot post the route tables right now! The client is having power problems and will be taking around 2 hours to resolve it.


(Lemillion) #9

Please find the result below:
[root@freepbx ~]# ip route
default via 192.168.0.1 dev eth0
default via 10.59.249.21 dev eth1 metric 100
10.40.30.4 via 10.59.249.21 dev eth1 (This is manually added in route-eth1 file to reach proxy)
10.59.249.20/30 dev eth1 proto kernel scope link src 10.59.249.22
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.250


(Lemillion) #10

The SIP Trunk provider has provided a port in their device to directly connect it to the server. They have a /30 network which can reach to thier SIP server after we configured a route in the linux.

I have disabled the firewall and IP tables in the linux. Is there any other thing I should be looking into? I think the ports will be handled by the Freepbx linux server itself.


#11

Try changing that to
10.40.0.0/16 via 10.59.249.21 dev eth1

With luck, that will fix the outbound audio. I don’t know what’s wrong with incoming, unless maybe NTC doesn’t send any until they receive some.

If you still have trouble, paste a new log (you should be able to post links now).


(Lemillion) #12

Thank You for your help here! I tested the outbound calls and the user is receiving audio (I have Anydesk Remote access and I can hear my voice from remote pc! :slight_smile: ) I think it will work. I will be able to test it fully after 12 hours only as it is night time here!

Thank You for your help @Stewart1! Much appreciated your help.

I am a complete beginner but I am getting chances to deploy SIP trunks in multiple Sites! SIP Trunks and VOIP is completely new here! Is there any recommendation for books or online materials for me to start on Asterisk and FreePBX? Please suggest as I want to explore more on it!


(system) closed #13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.