Outgoing Call no incoming voice ( PJSIP ISSUE! )

Hey there,

We’ve come up to a problem where outgoing calls to PSTN doesn’t let through incoming sound.
That means:

  1. Call from PSTN to PBX, Pick up. bidirectional communication is working fine!
  2. Call from PBX to PSTN, Pick up, voice from PBX to PSTN is running, from PSTN to PBX not.

We’ve set up the external address inside the config, as well as the internal network.
The RTP Ports has been reduced to Range 10000 - 10200.
NAT Rules on Firewall has been set correctly accordingly to the Ports used on PBX. (so RTP Port Range, SIP Ports UDP 5060-5090)

we’re unable to find a solution for that problem. And that so short before the switch from our old F650 Siemens to Asterisk 13…

Please help

How are you connected to the PSTN? It sounds like SIP, but historically, that would be DAHDI.

Reducing the size of your RTP redirect degrades system security and it not often consistent with the requirements of outside SIP services. I recommend you reopen your RTP port range to 10000-20000.

The audio failure you are describing is almost always either a firewall or NAT problem. It sounds like most of your settings are correct, so I’d start by looking more closely at your RTP traffic. If you can use wireshark or tcpdump for that, I’d start there.

We’re currently connected via SipGate.de as a PJSIP Trunk.
I reset the RTP Ports to the standard value 10k-20k. and as before, with the same result.
the DNAT and SNAT configuration is as before. It worked last week with exakt this Firewall configuration.
But now, after there were several updates for the FreePBX we have the previously described malfunction.

OK, so you did the easy part and it didn’t work.

Now for the hard parts.

Hi cynjut,

I’ve checked the RTP stream and got the following results:

Calling from Asterisk to PSTN: (No ringing tone, outgoing audio working, incoming audio not working)

[details=Summary]Got RTP packet from 192.168.22.180:11872 (type 09, seq 001600, ts 1648333848, len 000160)
Sent RTP packet to 217.116.117.68:24872 (type 00, seq 064730, ts 107856, len 000160)
Got RTP packet from 217.116.117.68:24872 (type 00, seq 021674, ts 1353410392, len 000160)
Sent RTP packet to 192.168.22.180:11872 (type 00, seq 034370, ts 1353410392, len 000160)
Got RTP packet from 192.168.22.180:11872 (type 09, seq 001601, ts 1648334008, len 000160)
Sent RTP packet to 217.116.117.68:24872 (type 00, seq 064731, ts 108016, len 000160)
Got RTP packet from 217.116.117.68:24872 (type 00, seq 021675, ts 1353410552, len 000160)
Sent RTP packet to 192.168.22.180:11872 (type 00, seq 034371, ts 1353410552, len 000160)
Got RTP packet from 192.168.22.180:11872 (type 09, seq 001602, ts 1648334168, len 000160)
Sent RTP packet to 217.116.117.68:24872 (type 00, seq 064732, ts 108176, len 000160)
Got RTP packet from 217.116.117.68:24872 (type 00, seq 021676, ts 1353410712, len 000160)
Sent RTP packet to 192.168.22.180:11872 (type 00, seq 034372, ts 1353410712, len 000160)
Got RTP packet from 192.168.22.180:11872 (type 09, seq 001603, ts 1648334328, len 000160)
Sent RTP packet to 217.116.117.68:24872 (type 00, seq 064733, ts 108336, len 000160)
Got RTP packet from 217.116.117.68:24872 (type 00, seq 021677, ts 1353410872, len 000160)
Sent RTP packet to 192.168.22.180:11872 (type 00, seq 034373, ts 1353410872, len 000160)
Got RTP packet from 192.168.22.180:11872 (type 09, seq 001604, ts 1648334488, len 000160)
Sent RTP packet to 217.116.117.68:24872 (type 00, seq 064734, ts 108496, len 000160)
Got RTP packet from 217.116.117.68:24872 (type 00, seq 021678, ts 1353411032, len 000160)
Sent RTP packet to 192.168.22.180:11872 (type 00, seq 034374, ts 1353411032, len 000160)
Got RTP packet from 192.168.22.180:11872 (type 09, seq 001605, ts 1648334648, len 000160)
Sent RTP packet to 217.116.117.68:24872 (type 00, seq 064735, ts 108656, len 000160)
Got RTP packet from 217.116.117.68:24872 (type 00, seq 021679, ts 1353411192, len 000160)
[/details]

Calling from PSTN to Asterisk:
( Audio working, RTP stream starts after picking up the call:)

[details=Summary]Sent RTP packet to 192.168.22.180:11880 (type 09, seq 051998, ts 008416, len 000160)
Got RTP packet from 192.168.22.180:11880 (type 09, seq 055360, ts 3719215711, len 000160)
Sent RTP packet to 217.10.77.53:26400 (type 00, seq 041587, ts 005920, len 000160)
Got RTP packet from 217.10.77.53:26400 (type 00, seq 005310, ts 1233296656, len 000160)
Sent RTP packet to 192.168.22.180:11880 (type 09, seq 051999, ts 008576, len 000160)
Got RTP packet from 192.168.22.180:11880 (type 09, seq 055361, ts 3719215871, len 000160)
Sent RTP packet to 217.10.77.53:26400 (type 00, seq 041588, ts 006080, len 000160)
Got RTP packet from 217.10.77.53:26400 (type 00, seq 005311, ts 1233296816, len 000160)
Sent RTP packet to 192.168.22.180:11880 (type 09, seq 052000, ts 008736, len 000160)
Got RTP packet from 192.168.22.180:11880 (type 09, seq 055362, ts 3719216031, len 000160)
Sent RTP packet to 217.10.77.53:26400 (type 00, seq 041589, ts 006240, len 000160)
Got RTP packet from 217.10.77.53:26400 (type 00, seq 005312, ts 1233296976, len 000160)
Sent RTP packet to 192.168.22.180:11880 (type 09, seq 052001, ts 008896, len 000160)
Got RTP packet from 192.168.22.180:11880 (type 09, seq 055363, ts 3719216191, len 000160)
Sent RTP packet to 217.10.77.53:26400 (type 00, seq 041590, ts 006400, len 000160)
Got RTP packet from 217.10.77.53:26400 (type 00, seq 005313, ts 1233297136, len 000160)
Sent RTP packet to 192.168.22.180:11880 (type 09, seq 052002, ts 009056, len 000160)
Got RTP packet from 192.168.22.180:11880 (type 09, seq 055364, ts 3719216351, len 000160)
Sent RTP packet to 217.10.77.53:26400 (type 00, seq 041591, ts 006560, len 000160)
Got RTP packet from 217.10.77.53:26400 (type 00, seq 005314, ts 1233297296, len 000160)
[/details]

Currently having the exact same issue. If I initiate a call from internally on the PBX to a mobile phone, my outbound audio works, but inbound from the mobile does not. If I initiate a call from the mobile to the DID of the PBX trunk (with a route to send it to my extension) the audio works both directions.

Are you using PJSIP or CHAN_SIP for your extensions? Oddly enough, I’ve found that using CHAN_SIP on my extension fixes the problem, and reverting back to PJSIP it breaks again.

1 Like

Hi tlarrea,

I’m using PJSIP for both the Trunk and Extensions, thanks for the hint, I’ll give it a try.

we’re also using PJSIP for the extensions. AND also for the trunk.
If this is causing the problem… man… why? it worked one and a half week ago… so some PBX Updates may cuase this issue?

I’d very interested to hear if this resolves your problem, or if it’s just me with some weirdo config issue.

Setting the extension to chan_sip solves the issue. The trunk is still using pjsip, but it’s working fine. Thanks for the help, I haven’t consider pjsip as a source for the problem.

So it’s working now with Chan_sip, like Asterix is saying.
but nevertheless it looks like a bug which has come in with one of the last PBX Updates.

They should review the regarding code and try to fix this issue asap ^^

I’ll keep digging and see if I can’t figure out anything further. All information that I’ve read about audio issues suggests that there’s a NAT issue, perhaps misconfiguration specifically on the PJSIP side of things? The Asterisk SIP settings screen does have NAT settings for Chan SIP but not PJSIP?

Hey Asterix,

how did you monitor the RTP traffic?

Go to: Reports -> Asterisk Log Files -> Full and type in RTP.

This should show you the RTP Packets

obviously the FreePBX team does not beleive this is a bug which came through one of the last module-Updates.

http://issues.freepbx.org/browse/FREEPBX-13221

Very strange. so they for sure want to force paied support I think.
Pitty in my eyes.

1 Like

At this time this does not appear to be a freepbx issue with the underlying code base as we are unable to replicate. The reports in this thread are also not consistent. Some people have issues with inbound audio and some people have issues with outbound audio. Therefore the ticket that was opened against this thread as been closed. Bug tickets need to have clear repeatable steps to be considered valid. There are thousands of ways to setup a pbx. We can only test a limited subset without more information.

Thank you for your understanding in this matter.

Hey Andrew,

Thanks for these words.
I will do a specific step-list if i post another bug (or something I think it’s a bug) in future.

But to be honest, on the 12th of september it worked still. But since the end of that week let’s say around the 15th of Sept. PJSIP stopped working. We were surprised. We were able to receive calls and have comm in both directions.
but if we set an outbound call to PSTN, we hear nothing. That’s why I think it’s seems to be a bug that may came with one of the last module Updates.

And then “only” get a macro as answer and issue was closed, that’s not the way I awaited to be treatened.
But ok. You have tons of work and for sure it looks like (in the first look over) an NAT issue. (not necessary to say that there is no separate NAT setting in PJSIP Settings)

As I wrote on the Ticket, We didn’t change anything in the NAT settings. and it worked before the module updates. That’s all.

2 Likes

How would you like to be treated? Please note that the bug tracker is not a support forum. Meaning it does not exist to walk through issues with setup. I am not saying you did that but it’s something everyone needs to consider.

The forums are for general discussion. Which is why when I saw the ticket I closed it and then replied here. You are essentially getting the SAME response you would if I kept the issue open.

It’s truly unfortunately that your eyes immediately jump to the paid section. There are three sections. 2 of the 3 are FREE. One is paid.

Self Service:
http://wiki.freepbx.org

Free

Community Forums with search
http://community.freepbx.org

Free

Paid support.
http://support.schmoozecom.com

Paid

Here are some questions for you that should have been placed in the ticket when it was opened.

  1. What does PSTN mean to you? If that means a POTS (copper/isdn) type setup that you’d do over dahdi then…
  2. Why do you have an issue over PSTN and then another user has an issue with PJSIP trunks?
  3. What version of FreePBX?
  4. What version of Asterisk?
  5. Are you using the distro? Or hand rolled?
  6. Whats the distro version?

Do you see the big problem here? You have an issue with PSTN. Another user has an issue with trunks. The code for that is in totally separate places.

One user here posted an Asterisk RTP capture. No user posted any sort of logs from Asterisk though. Keep the line open and see if Asterisk drops your call from a critical missing packet.

Anyways. here is my point. I can much easily go through and debug with you all here (2nd option in the ticket I closed) than on the ticket system. We try to keep the ticket system lean and mean so we can focus.

Thank you for your understand on this matter.

1 Like

Hi Andrew,

I think all 3 of us are experiencing the same base issue as follows.

  1. A call initiated from pbx to external destination (pstn, mobile, doesn’t seem to matter what)

  2. Extension that call is initiated from uses PJSIP.

  3. Outbound audio is fine, inbound audio does not work.

  4. Changing driver to Chan_sip fixes the problem. No other changes made.

  5. A call initiated from an external source inbound to pbx has correctly functioning bi-directional audio.

Now it may well be nat issues or some other configuration problem, but what suggests a bug to me is that the only thing I change is the driver type on extension and problem goes away. Drivers are using different ports, but I don’t believe my configuration for nat varies between the 2.

This is an extremely superficial description of the problem. I was able to reproduce what little you provided and confirm it ‘works for me’. So we will also need to know, trunk type, Asterisk Version, FreePBX core version, whether the PBX and/or extension is natted, type of routers (if applicable) and how they are configured. We need enough detail for the issue to be reproduced on another system.

1 Like