Pjsip trunk to freepbx behind DHCP/NAT

I looked at this thread: FreePBX 15 behind NAT: HowTo setup dynamic external IP config?

And I think it specifies what I need to do. Basically my freepbx is behind a NAT firewall and my WAN address is DHCP from my provider.

I do have a dyndns entry that is auto-updated for my WAN-address. Should I enter that dyndns FQDN in “SIP Settings” -> “SIP Settings [chan_pjsip]” in the “udp External IP Address”?

I have experienced occasional one-way audio and abrupt call disconnects when testing this new trunk. Maybe this would help?

EDIT: Seems when someone calls-in on this trunk’s DID the call disconnects after about 30sec - that’s suspiciously like a network timeout, right? Should I look somewhere for that and adjust it?
Found this: https://www.twilio.com/docs/sip-trunking/troubleshooting#problem9 where would I update on my side? Was I on the right track?

Thanks in advance,
AJ

FreePBX 15.0.17.53

Does your ISP use DHCP properly, i.e. refresh, rather than replace the address when the lease expires? If not, there is no completely satisfactory way of running a servers, as every address change will take time to ripple through the system. As well as calls in progress failing, you may need to update your registration with the provider before you will be able to receive further inbound calls.

One theory that was prevalent a few years ago is that addresses were deliberately changed on refreshes, to frustrate the use of servers on what are, basically client only accounts, and encourage the use of, more expensive, server capable accounts. (Remember that, for SIP inbound calls, you are the server.

I believe that chan_pjsip does refresh IP addresses, periodically, but I doin’t believe that it does a DNS query before every SIP or RTP packet send.

Haven’t honestly checked recently, but my recollection is that they DO start with a DHCP refresh so the IP stays “fairly static” - maybe until I have an extended outage on my side, etc.

Would it “hurt” to try putting the FQDN where I think it’s supposed to go? Was I on the right path?

I have a feeling that you need to set both signalling and media addresses with chan_pjsip, although it is possible that a single GUI field changes both.

Note that the media addresses are always sent as IP addresses in the SDP, So, unless the ITSP is using comedia, it won’t tolerate any change mid-call, and if it is using comedia, it may take long enough for there to be a brief drop in audio, before it learns the new addresses. That’s if you are wrong and the addresses are replaced, rather than refreshed.

Understand that IP Addresses are always sent in the headers. Just wondering if putting the FQDN in the “External IP Address” field of the GUI works (and it’s auto-translated). Would obviously be highly-preferable if that translation at least updated periodically.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.