I have a fresh setup of FreePBX 2.8.0.4 on Asterisk 1.6.2.15 which is handling about 130 calls per day. It works perfectly about 95% of the time. However, each day there are a few incoming calls where the outgoing audio stops working after the first few seconds. For example: an outside party calls in, John answers by saying “Hello, this is John” and the outside party hears John say this. Then the outside party asks John a question and John begins to answer but the outside party hears nothing. John can still hear the outside party fine. Eventually, they both hang up and the outside party calls back. The second call proceeds with no problem whatsoever. The problem has never occurred with outgoing calls, nor with internal (extension-to-extension) calls.
The PBX is running CentOS 5.5 with kernel 2.6.18-194.32.1.el5 on a single P4 at 2.2GHz with 1GB RAM.
eth0 is connected to VLAN 1 (Default Data LAN) with static address 10.10.50.5
eth0.2 is connected to VLAN 2 (Voice) with static address 10.10.55.5
eth1 is connected directly to WAN with static address 66.XXX.XXX.205
I currently have routing enabled but the problem also happens with it disabled.
The phones (two Aastra 6753i and 22 Aastra 6731i, all with latest firmware) are on VLAN 2 and they receive DHCP and DNS from dnsmasq which is listening to eth0.2 on the PBX. Every extension is configured in sip_additional.conf with canreinvite=no and nat=yes.
Asterisk SIP Settings (in sip_general_additional.conf) include:
nat=yes
externip=66.XXX.XXX.205
localnet=10.10.50.0/255.255.255.0
localnet=10.10.55.0/255.255.255.0
Our trunks are from Bandwidth.com (not the SIPStation type) and are defined in sip_additional.conf as:
[from-bandwidth-A]
disallow=all
host=216.82.224.202
fromdomain=216.82.224.202
type=peer
insecure=port,invite
qualify=yes
canreinvite=no
dtmfmode=rfc2833
allow=ulaw
context=from-pstn-e164-us
[from-bandwidth-B]
disallow=all
host=216.82.225.202
fromdomain=216.82.225.202
type=peer
insecure=port,invite
qualify=yes
canreinvite=no
dtmfmode=rfc2833
allow=ulaw
context=from-pstn-e164-us
[to-bandwidth-A]
disallow=all
host=216.82.224.202
type=peer
insecure=port,invite
qualify=yes
canreinvite=no
dtmfmode=rfc2833
allow=ulaw
context=from-trunk-sip-to-bandwidth-A
[to-bandwidth-B]
disallow=all
host=216.82.225.202
type=peer
insecure=port,invite
qualify=yes
canreinvite=no
dtmfmode=rfc2833
allow=ulaw
context=from-trunk-sip-to-bandwidth-B
Primary trunk is shown above; Secondary is same except for IP address.
The codecs enabled in Asterisk are the defaults installed by AsteriskNOW 1.7.1 (ulaw, alaw, gsm). In the Aastra configurations, I’ve got:
sip use basic codecs: 0
sip customized codec: payload=0;ptime=30;silsupp=off,payload=8;ptime=30;silsupp=off
whichs means that only G711u (8K) and G711a (8K) are enabled, both with silence suppression off. Every phone was purchased new this month.
Basically, there is no NAT involved between Asterisk and the phones, and there is no NAT involved between Asterisk and Bandwidth.com, and Asterisk’s SIP Peer status correctly shows “N” under NAT for phones as well as trunks. I have tried various combinations of nat=no and canreinvite=nonat but they have no effect.
As far as I can tell, an incoming call should always be using ulaw (G711u) and the RTP stream should always pass thru Asterisk to the phones with no transcoding and no reinvite.
According to both Webmin and FreePBX System Status, the CPU usage is usually 0-2% and never over 10%. There is never more than 300MB RAM in use (usually 210-220MB). However, I have disabled the Flash Operator Panel just to make absolutely sure that nothing is contending with Asterisk for system resources.
At this point, am I looking at a trunk problem?