Outgoing Call no incoming voice ( PJSIP ISSUE! )

FreePBX Version: 13.0.188.8
Current Asterisk Version: 13.11.2
PBX Firmware: 10.13.66-16
PBX Service Pack: 1.0.0.0
Trunk Type: SIP

PBX on IP range 172.16.0.0/24
Extensions on IP range 192.168.6.0/23

Both extensions and PBX sit inside local network, layer 3 switch routing between the VLANs. PBX is NAT’ed out through firewall (linux IP tables). Is there other NAT config info that would be useful here?

In Asterisk settings, correct external IP is listed, and both local networks mentioned above are listed in local network field.

I’ve also copied and pasted the module version information below.
Admin
Module Version Publisher License Status Track
Asterisk CLI 13.0.4 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Backup & Restore 13.0.25 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Blacklist 13.0.14 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Bria Cloud Solutions 13.0.20 Stable Sangoma Technologies Corporation Commercial Enabled
Bulk Handler 13.0.13 Stable Sangoma Technologies Corporation GPLv3+ Enabled
CID Superfecta 13.0.3.19 Stable Sangoma Technologies Corporation GPLv2+ Enabled
CallerID Lookup 13.0.11 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Certificate Manager 13.0.34 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Class of Service 13.0.9 Stable Sangoma Technologies Corporation Commercial Enabled
Config Edit 13.0.7 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Contact Manager 13.0.33 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Custom Applications 13.0.5 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Digium Addons 2.11.0.12 Stable Digium GPLv2 Enabled
Feature Code Admin 13.0.6 Stable Sangoma Technologies Corporation GPLv3+ Enabled
FreePBX Framework 13.0.188.8 Stable Sangoma Technologies Corporation GPLv2+ Enabled
Localization Updates 12.0.7 Stable Schmooze Com Inc GPLv3+ Enabled
Online Support 2.11.0.7 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Phone Apps 13.0.76 Stable Sangoma Technologies Corporation Commercial Enabled
Phonebook 13.0.5.5 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Phonebook Directory 2.11.0.5 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Presence State 13.0.7 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Preserve Accountcode 13.0.2 Stable Sangoma Technologies Corporation GPLv2 Enabled
REST API 13.0.19 Stable Sangoma Technologies Corporation AGPLv3 Enabled
Recordings 13.0.28 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Sangoma MCU 13.0.5 Stable Sangoma Technologies Corporation Commercial Enabled
Sound Languages 13.0.17 Stable Sangoma Technologies Corporation GPLv3+ Enabled
System Admin 13.0.67 Stable Sangoma Technologies Corporation Commercial Enabled
UCP Node Server 13.0.31 Stable Sangoma Technologies Corporation Commercial Enabled
User Control Panel 13.0.41 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
User Management 13.0.73.3 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
XMPP 13.0.14 Stable Sangoma Technologies Corporation AGPLv3 Enabled
Zulu 13.0.43 Stable Sangoma Technologies Corporation Commercial Enabled

iSymphonyV3 4.1.18 Stable i9 Technologies GPLv3 Enabled
Applications
Module Version Publisher License Status Track
Announcements 13.0.6 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Appointment Reminder 13.0.9 Stable Sangoma Technologies Corporation Commercial Enabled

Broadcast 13.0.11 Stable Sangoma Technologies Corporation Commercial Enabled

Bulk DIDs 13.0.2 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Bulk Extensions 13.0.3 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Call Flow Control 13.0.13 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Call Forward 13.0.4 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Call Recording 13.0.11 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Call Waiting 13.0.4 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Callback 13.0.5 Stable Sangoma Technologies Corporation GPLv3+ Enabled
CallerID Managment 13.0.6 Stable Sangoma Technologies Corporation Commercial Enabled

Conference Pro 13.0.25 Stable Sangoma Technologies Corporation Commercial Enabled
Conferences 13.0.22 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Core 13.0.113 Stable Sangoma Technologies Corporation GPLv3+ Enabled
DISA 13.0.6 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Dictation 13.0.5 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Directory 13.0.16 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Do-Not-Disturb (DND) 13.0.3 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Follow Me 13.0.37 Stable Sangoma Technologies Corporation GPLv3+ Enabled
IVR 13.0.25 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Info Services 13.0.1 Stable Sangoma Technologies Corporation GPLv2+ Enabled
Languages 13.0.6 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Misc Applications 13.0.2.4 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Misc Destinations 13.0.4 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Paging Pro 13.0.17 Stable Sangoma Technologies Corporation Commercial Enabled
Paging and Intercom 13.0.24 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Parking Lot 13.0.17 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Parking Pro 13.0.26 Stable Sangoma Technologies Corporation Commercial Enabled
Queue Priorities 13.0.2 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Queues 13.0.30 Stable Sangoma Technologies Corporation GPLv2+ Enabled
Queues Pro 13.0.24 Stable Sangoma Technologies Corporation Commercial Enabled

Ring Groups 13.0.21 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Set CallerID 13.0.5 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Text To Speech 13.0.8 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Time Conditions 13.0.32 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Voicemail Blasting 13.0.8 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Voicemail Notifications 13.0.17 Stable Sangoma Technologies Corporation Commercial Enabled

Wake Up Calls 13.0.16 Stable Sangoma Technologies Corporation GPLv2 Enabled
Web Callback 13.0.10 Stable Sangoma Technologies Corporation Commercial Enabled

Connectivity
Module Version Publisher License Status Track
DAHDi Config 13.0.33 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Digium Phones Config 13.0.2 Stable Digium GPLv2 Enabled
Extension Routes 13.0.9.2 Stable Sangoma Technologies Corporation Commercial Enabled
Outbound Call Limit 13.0.3 Stable Sangoma Technologies Corporation Commercial Enabled

SIPSTATION 13.0.13.13 Stable Sangoma Technologies Corporation Commercial Enabled
SMS 13.0.9 Stable Sangoma Technologies Corporation Commercial Enabled
System Firewall 13.0.37.1 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
WebRTC Phone 13.0.28 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Dashboard
Module Version Publisher License Status Track
System Dashboard 13.0.24 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Reports
Module Version Publisher License Status Track
Asterisk Info 13.0.7 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Asterisk Logfiles 13.0.10 Stable Schmooze Com. Inc. GPLv3+ Enabled
CDR Reports 13.0.29.8 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Call Event Logging 13.0.25 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Call Recording Report 13.0.23 Stable Sangoma Technologies Corporation Commercial Enabled
PHP Info 13.0.2 Stable Sangoma Technologies Corporation GPLv2+ Enabled
Pinsets Pro 13.0.8 Stable Sangoma Technologies Corporation Commercial Enabled

Print Extensions 13.0.3 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Queue Reports 13.0.14 Stable Sangoma Technologies Corporation Commercial Enabled

Voicemail Reports 13.0.12 Stable Sangoma Technologies Corporation Commercial Enabled

Weak Password Detection 13.0.1alpha1 Stable Schmooze Com Inc GPLv3+ Enabled
Settings
Module Version Publisher License Status Track
Asterisk API 13.0.2.5 Stable Sangoma Technologies Corporation GPLv2+ Enabled
Asterisk IAX Settings 13.0.5 Stable Sangoma Technologies Corporation AGPLv3 Enabled
Asterisk REST Interface Users 13.0.4 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Asterisk SIP Settings 13.0.23.10 Stable Sangoma Technologies Corporation AGPLv3+ Enabled
Camp-On 13.0.3 Stable Sangoma Technologies Corporation GPLv3+ Enabled
EndPoint Manager 13.0.84.3 Stable Sangoma Technologies Corporation Commercial Enabled
Fax Configuration 13.0.38 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Fax Configuration Professional 13.0.34 Stable Sangoma Technologies Corporation Commercial Enabled
High Availability Services 13.0.9.2 Stable Sangoma Technologies Corporation Commercial Enabled

Music on Hold 13.0.22 Stable Sangoma Technologies Corporation GPLv3+ Enabled
PIN Sets 13.0.8 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Route Congestion Messages 13.0.2 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Speed Dial Functions 2.11.0.4 Stable Sangoma Technologies Corporation GPLv3+ Enabled
Text To Speech Engines 13.0.6 Stable Sangoma Technologies Corporation AGPLv3 Enabled
Voicemail 13.0.53 Stable Sangoma Technologies Corporation GPLv3+ Enabled

Hello Andrew,

Please accept my apologies.
I don’t want to make stress or something like that.

To explay our case more specifically:

We have the Distro running in Version: 13.0.188.8
Asterisk is Version 13.9.1

We have a general problem with the PJSIP Extensions, which are using a PJSIP Trunk, which is established to our Provider via Internet. There’s no landline involved in our case.

So two weeks ago, we were able to make calls to the landline network and everything works fine.
later, I’m not that exactly sure when, because the system is in build up phase to replace our Octopus F650 System, we figured out, that we now can’t talk to those with landline phones anymore, because we can’t hear them.
In the first place, we checked the NAT Settings in the FreePBX and inside our firewall.
Nothing was changed.

The issue shows up as follows:

1st. we call a landline phone via the established PJSIP trunk from a PJSIP Extension. The result is, they can hear us, we can’t hear them or even a signal while calling.

2nd. internally all calls are working fine (all extensions are set up as PJSIP. about 80 units)

3rd. When we receive a call from a landline phone outside our networks, we’re able to communicate into both directions.
Which tells me, that this not really can be a NAT issue

4th. we switched 2 extensions to CHAN_SIP and they can problemfree call out and receive calls with bi-directional communication.

this is our actual situation. And we want to use PJSIP.

tlarrea brought it also to this point together.
So we definitely need help and I would be glad you can help us to find a solution, Andrew.
And sorry again, if i’d sound provocative. That was not my intention

[EDIT]

Our Firewall is a Sophos UTM 9.406-3
We have two NAT rules.
1st. SNAT - All Traffic from Asterisk to any network is masked with the destined external IP address.
2nd. DNAT - All Traffic regarding Ports 5060-5090 and RTP Ports as well as 5009 (for our provider) incoming on that external IP is forwarded to the Asterisk Server

[/EDIT]

I have tested this using PJSIP extensions with a PJSIP trunk all behind the same NAT router with no issues. Asterisk 13.11.2, FreePBX 13.0.188.8. The assumption throughout this thread is that this is a NAT issue, but codec misconfig can also be a source of 1 way audio. For those having issues, force the trunks and devices to use only ulaw and see if that changes anything.

A pcap of this happening might reveal some secrets.

2 Likes

Hi Lorne,

I’ve adjusted the available codecs under Asterisk SIP settings and allowed only alaw and ulaw. (Located in Australia, so apparently I need alaw). I’ve also modified my SIP trunk config under outgoing SIP settings with the lines:
disallow=all
allow=alaw&ulaw

Seems to be functional now under both PJSIP and Chan SIP as the extension driver. Thank you for your assistance.

I can confirm this, too.
Trunk and Extensions are set to alaw and ulaw, now the ringing is there and two way audio also works.

Edit: It’s still weird, why does this work with chan_sip using G.722, but pjsip fails at it ?

So this is not a new phenomenon there is this thread from a year ago:

It is a long thread with no solutions beyond what is known here, namely that disabling all but one codec on certain phones will fix the audio.

It appears from this thread, that not all versions of Asterisk have this issue, unless there is another explanation to why working systems suddenly started having this issue after an update. I had understood this to be a phone issue, not an Asterisk issue. There is a brand new Asterisk ticket (watch it for updates) discussing this here:
https://issues.asterisk.org/jira/browse/ASTERISK-26423

Yes, this is an old issue. Recently it was discussed in the thread linked below and it was that thread that finally motivated Asterisk devs to look into it. Also, it is not 100% clear if PJSIP is behaving correctly (the issue description in that thread shows tha the phone reinvites to ask for different codec and Asterisk fails to switch codec).

About a month ago Yealink issued a test firmware that effectively corrected the issue on their phones, but many other brands are still affected. Grandstream as far as I know has not bothered to fix it yet.

https://community.asterisk.org/t/pjsip-codec-negotiation-issue/68119

1 Like