Asterisk - VOIP - SIP Registration time out - NAT problem?



  • Hello,

    I cannot successfully make SIP registrations from my FreePBX/Asterisk server through pfsense.

    I have carefully followed the 'How can I forward ports' and a really useful pfsense how to: 'Asterisk VoIP'

    But SIP registrations are timing out. They registered OK before I started using the fw.

    I can resolve the SIP host from the FreePBX server. pfsense logs don't seem to show any traffic reaching the FreePBX.

    A copy of my NAT rules attached. I have tried siproxd (and abandoned it - as all my sip registrations are coming from a single ip - should be possible to port forward with rules?)

    Any help where to start troubleshooting gratefully rxd.



  • The port forwarding should not be the cause for this. This is because the SIP registrations are triggered by your Asterisk server. Port forwarding is needed for connections initiated from the outside. This just does not apply for the registration.

    As a first measure I would recommend to open the firewall completely (allow all outbound connections) and add logging to all rules. Then check whether it works.

    The port forwarding is required for inbound calls. I don't have Asterisk, just a simple ATA, but I made a static port setting in the Outbound NAT rules. You could try this:

    In Firewall: NAT: Outbound switch to Manual and add a rule on top:

    Interface: WAN, Source: 192.168.2.104/32, NAT address: WAN address, Static Port: Yes

    Such a rule as well as the port forwards you already have are sufficient in my configuration. No STUN server needed, no siproxd required.



  • Many thanks for your advice. Your instincts were helpful and correct.

    It was a config problem with Asterisk the eternip variable being incorrectly set to an IP address. Setting it to my dyndns hostname resolved issue.