I have a PBX that sits behind my network. Yesterday Spectrum came to my office and installed a new modem/router combo which has a static IP address scripted onto it. Before that I had just a modem with a dynamic IP that went into my edgerouter. Now I have their modem/router connected to my EdgeRouter. On my edgerouter I have all the needed ports forwarded to the PBX (5060, 10000-20000) on my edgerouter and I haven’t touched anything on theirs. Well I’ve moved everything over to the static IP and now none of my clients can hear audio through the phone. It’s not one-way audio either nobody can hear anything. They say the firewall on their router is off and all SIP-ALG settings are off as well.
call spectrum and have their device placed in bridge mode
then apply the static IP to the edgerouter
@dolesec I thought bridge mode just bridged the ports on their router? Would that affect how traffic is getting to my router? My ER is also already setup with a static IP that I received from spectrum.
If this works like my Spectrum setup with Ubee modem, you should see two IPv4 addresses when you log into the modem. The dynamic one is NATted and a DHCP client will get a 192.168.0.x address, which will see the dynamic public IP. Your ER should be set up with the static WAN address e.g. 18.104.22.168, gateway 22.214.171.124 and netmask 255.255.255.252.
Also, check that in Asterisk SIP Settings, External Address has the new value (126.96.36.199 in my example).
If your setup is similar to mine, you don’t need bridge mode – the non-NAT routed IPV4 is completely clean.
@Stewart1 Asterisk SIP settings’ external address does show my new static IP address.
Did you confirm that the ER actually has that address?
wget -O - http://checkip.dyndns.org
show it as Current IP Address?
OK, so time to see what is going wrong. Capture traffic at the PBX, make a brief outgoing call and confirm that RTP packets are being sent to the correct IP address and port that the 200 OK response to your INVITE has in the SDP. Depending on your provider, this will be an address of theirs, or of their upstream carrier.
If the above looks correct, do the capture on the WAN interface of the ER. If that is also correct, it does seem possible that the modem is dropping or misdirecting the traffic. Can you get the provider to do a trace at their end? Do you have trunks with multiple providers? If so, do they all fail in the same way?
I called Spectrum and they put the modem in bridge mode. The static IP is set to the ER so time to look into the logs…
From rasterisk (asterisk -r)
rtp set debug on
will reveal from and to where the media (audio) is being delivered
asterisk_log_file.tgz (7.0 KB)
I attached the log file (with my WAN IP removed) if anyone cares to look. I’m looking myself obviously but I really have no idea what to even look for. I really do appreciate all of the help.
annel.c: Channel PJSIP/999-000000fe joined ‘simple_bridge’ basic-bridge
[2020-05-20 23:40:21] VERBOSE[C-000000a8] bridge_channel.c: Channel PJSIP/Twilio-US1-North-America-Virginia-000000fd joined ‘simple_bridge’ basic-bridge
[2020-05-20 23:40:37] VERBOSE[C-000000a8] bridge_channel.c: Channel PJSIP/Twilio-US1-
there would be rtp traffic logged if enabled.
In it’s absence then we all remain uninformed.
The Asterisk log by itself is not very useful for troubleshooting a network issue.
At the Asterisk command prompt, type
pjsip set logger on
which will cause the SIP trace to be included in the log (for future calls).
On an outgoing call, you can confirm that your correct public IP appears in the SDP of the INVITE.
(By the way, did you restart (not just reload) Asterisk after changing External Address?)
To go further, you can use sngrep or dig even deeper by capturing with tcpdump and analyzing with Wireshark.
And, you might need to capture on the ER WAN interface to get the whole story.
To clarify, rtp debugging is not channel specific, either chan_sip or chan_pjsip will both result in ‘media’ if all is good, the rtp debug will identify all endpoints involved, successful connections will be obvious, as will in-completed ones . . .
Incomplete ones are always a network routing problem revealed
Not surprisingly, If you don’t enable rtp debug there wont be any
You must enable pjsip logger after restarting Asterisk, but as @dicko says, enable RTP debug also.
That’s certainly a problem; with luck, it’s the problem.
In Asterisk SIP Settings, make sure that the old IP doesn’t appear anywhere on any of the three tabs.
Reboot the entire server.
grep 188.8.131.52 /etc/asterisk/*conf
If anything appears in one of your custom files, fix it.
If anything appears in a FreePBX-managed file, report details.
Under transports the external IP address was set to my old IP causing the no audio issue. Big thanks to everyone in the thread especially @dicko and @Stewart1 you guys are awesome. Now I know how to properly debug asterisk as well. This shouldn’t have taken me so long but it’s finally done. I wish I could set multiple solutions to this problem…