I have two freshly installed FreePBX 15 systems. Trunks are setup using PJSIP with default settings. I’m using Zapateller for testing.
If I connect my PSTN provider to System A, and I point the Inbound Route on System A to Zapateller, I get the audio feedback from Zapateller.
If I connect my PSTN provider to System B, and I point the Inbound Route on System B to Zapateller, I get the audio feedback from Zapateller.
If I connect my PSTN provider to System A, and then setup a trunk between System A and System B, and I point the Inbound Route of System A to the trunk of System B, and finally the Inbound Route of System B to Zapateller, I do not get audio. (The call is connected however, which I can confirm with SIP traces and CDRs.)
Working: [ Provider => System A => Zapateller ]
Working: [ Provider => System B => Zapateller ]
Not Working: [ Provider => System A => System B => Zapateller ]
The same setup does work with chan_sip (oddly enough).
Networking is probably the issue here, are you running System A and system B behind a firewall / NAT? If the answer here is yes, then System A is probably trying to use the Public Address of System B.
On both systems, at the Asterisk command prompt, type pjsip set logger on
Make a failing incoming call, paste the Asterisk logs from both systems at https://pastebin.freepbx.org and post the links here.
RTP is crazy man. SIP will tell System A and B which IP to connect to for RTP and it will try. The problem we need to find out is if it’s the correct IP address.
Are both Systems on the same network? Which path does System A need to take to get to System B? Does System A need to connect to the private IP or the public one of System B and visa versa?
There is also a possibility of RTP just skipping System A and B all together, and having the providers talk to each other. Or System A telling a provider it needs to connect to a private IP address.
Both systems are on the same network and do not have any issues when reached directly, individually, from the outside. Only have this issue when I try to route from the provider to A to B.
The above traces are of a single call attempt.
I only see one thing that’s unusual. 206.x.x.x/209.x.x.x IP addresses are from my provider. 172.16.1.x IP addresses are from my network. But there is a 104.x.x.x IP address that’s being tossed around which does not belong to my provider, nor does it belong to my network. I can’t for the life of me understand where that’s coming from. Its certainly not configured in anywhere within my systems.