FreePBX | Register | Issues | Wiki | Portal | Support

Lost RTP 30s, disconnect after 300s


#1

Hi ,
Our systems topology and basic settings as following picture. Now we have an issue:
When user make a call to VoIP number Provide, VoIP will forward call to FreePBX.
In first 30 seconds, VoIP can receive RTP from FreePBX.
After that, VoIP couldn’t receive any RTP from PBX, then disconnect 300 seconds later.

Does my configure take something wrong?
Thanks,


#2

NAT is your most probable culprit here.


(Dave Burgess) #3

This could also be indicative of a router somewhere using a SIP “helper” like SIP-ALG or a firewall that is rewriting the port numbers on the traffic. We’ve had both of these issues come up in the past week, so check back through the archive and see if those discussions enlighten your quest.


(Daniel Friedman) #4

Hello @genscript,

You need to allow the following ports on the Azure firewall:
PJSIP: 5060-5061 TCP/UDP
SIP: 5160-5161 TCP/UDP
RTP: 10000-20000 UDP
T.38: 4000-4999 UDP

Also, if you have a NAT configuration on your server, make sure that you have configured a port forwarding of the above mentioned ports towards your PBX.

Thank you,

Daniel Friedman
Trixton LTD.


#5

@arielgrin @cynjut @danielf
Thanks all.
I think I need to provide additional information:

  1. Already setup the allow rules for TCP/UDP port.
  2. Forward call to FreePBX is always MUTE.
  3. NAT setting as follows, I think it’s different with network NAT.
    0113nat

In SIP settings, I already set “RTP Keep Alive” per 10s. It’ll send RTP stream every 10s. But it seems not working well.
Or it’s my misunderstanding on this option?


(Daniel Friedman) #6

@genscript,

What is your pbx’s ip address?

Thank you,

Daniel Friedman
Trixton LTD


#7

Is this a “typical” PBX, where live users with IP phones or VoIP apps make and receive phone calls? If so, please post:

Do calls from one extension to another work properly? If not, does calling the echo test (*43) work properly? Outbound calls? Inbound calls routed directly to an extension?

For the simplest case that fails, report details: Does called phone ring? Does calling phone show connected?
Can caller hear called party? Can called party hear caller? What happens after 30 seconds?

If this is an unusual application, provide some background information on what it is expected to do, and what troubleshooting you have already done.


#8

@danielf,
Public address?
You want to do some tests for it?

Thanks,

Tao


#9

@Stewart1,
This is not a typical PBX module.
It always forward calls from VoIP to our Skype for Business meeting system.
In our scene, one side join meeting by Skype for Business(SfB client), another side join meeting by dail VoIP number.
If we mute in SfB client side, another side will exit meeting after 5mins.
In this process, VoIP provider tell us that they never receive any RTP stream from us.

Hope this helps.
Thanks for your help!

Tao


#10

Sorry, I know nothing about SfB but have experience with other conference systems.

Normally, muting a participant would have no effect on RTP flow. All participants continue to hear audio from the users that are not muted. All users continue to send audio to the server, which ignores the muted users and combines audio from the others.

However, if this is a ‘meeting’ with only two users, it’s possible that when one is muted, SfB stops sending RTP to the other. And if Asterisk has no RTP coming in from the SfB server, it won’t send any to the VoIP trunk and your call will be dropped by the trunking provider.

Some conference systems have a ‘hold’ function that is different from ‘mute’. A held user is temporarily shut out from the meeting and can neither hear nor speak. For example, a broker may put the vendor on hold to speak privately with the client. It’s possible that a held user would not receive any RTP.

How is the SfB server connected to FreePBX (SIP trunk or something else)?

How is the incoming call routed to SfB, e.g. Inbound Route points to Misc Destination?

I suggest that you run tcpdump on the FreePBX machine to capture all traffic for a failing test call. Copy the pcap file to your PC and examine it with Wireshark. Possibly, when the incoming RTP stops, SfB is sending a re-invite or other SIP request that Asterisk may be able to use, e.g. to play hold music to the PSTN caller. Also, look at whether the keep-alive packets are really being sent to the VoIP provider and what, if anything, occurs after 30 seconds.

There may be a configuration option at the SfB end that will work around your issue. If not, it should be possible to configure Asterisk to set up the call through its own conference facility. It would then continue to send RTP to the trunking provider, even when none is being received from SfB. However, FreePBX does not provide a built-in way to set this up, so you would have to write some custom Asterisk dial plan code.


#11

We use Sip trunk between Sfb and FreePBX.
Incoming call route to SfB also use SIP trunk.


#12

Did you try tcpdump to see what happens when the call is muted, whether keepalives are being sent and what happens 30 seconds later?