Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Asterisk not registering to provider, but softphone does.

    Scheduled Pinned Locked Moved NAT
    13 Posts 3 Posters 7.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      inflamer
      last edited by

      Have you tried doing a packet capture on your WAN interface to see what SIP requests are being sent to your VoIP provider, and what the response to these requests are, if any?

      Since you're stating "it always timeout" I'm assuming you are not getting any response whatsoever from your provider, but it would be nice to get this confirmed.

      Perhaps it would be worthwhile to get a packet capture from your WAN interface containing both a REGISTER request from your softphone and from Asterisk, and compare the two, since the first one is working and the latter is not?

      I would be happy to take a look if you post the capture here or send me by PM.

      • Andreas
      1 Reply Last reply Reply Quote 0
      • S
        SamKook
        last edited by

        Turns out my asterisk server doesn't even reach the wan interface, it doesn't go further than the LAN one:

        11:10:40.747911 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:10:41.748023 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:10:43.748233 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:10:47.748617 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:10:51.749001 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:10:55.749385 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:10:59.800043 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        11:11:00.799187 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 418
        

        And here what the softphone does on the WAN(11.11.11.11 being my WAN IP):

        11:04:56.775563 IP 209.217.98.194.5060 > 11.11.11.11.5060: UDP, length 537
        11:04:57.776354 IP 209.217.98.194.5060 > 11.11.11.11.5060: UDP, length 537
        11:04:58.775918 IP 209.217.98.194.5060 > 11.11.11.11.5060: UDP, length 537
        11:04:59.185321 IP 11.11.11.11.5060 > 209.217.98.194.5060: UDP, length 430
        11:04:59.218913 IP 209.217.98.194.5060 > 11.11.11.11.5060: UDP, length 567
        11:04:59.305823 IP 11.11.11.11.5060 > 209.217.98.194.5060: UDP, length 605
        11:04:59.341830 IP 209.217.98.194.5060 > 11.11.11.11.5060: UDP, length 537
        11:04:59.343091 IP 209.217.98.194.5060 > 11.11.11.11.5060: UDP, length 581
        11:04:59.355200 IP 11.11.11.11.5060 > 209.217.98.194.5060: UDP, length 466
        
        1 Reply Last reply Reply Quote 0
        • I
          inflamer
          last edited by

          What happens if you disable siproxd? Does the Asterisk traffic hit the WAN interface then?

          I assume you have a firewall rule on LAN allowing outbound UDP traffic for the Asterisk host?

          Anything useful in the system or firewall log regarding the Asterisk traffic?

          1 Reply Last reply Reply Quote 0
          • S
            SamKook
            last edited by

            Wow, I can't believe I never tried that combination before. I guess I always deleted the Port forwarding every time I disabled the proxy.

            Thank you so much, it's finally registering. It took a little while for my phone to actually be able to dial properly(maybe 5 minute), but it always does now(so far at least, but I'm optimistic).

            I just need to wait for someone to call me back to confirm I can receive calls and everything will be perfect.

            Edit: I just received a call so it really is working both ways. Thanks again for your help.

            1 Reply Last reply Reply Quote 0
            • S
              SamKook
              last edited by

              Hmm, not as solved as I thought. My internet connection got disconnected 3 times today for a few minutes(this isn't usual behavior so I hope the pfsense isn't causing it) and when it comes back, asterisk can't register anymore. The only way I found so far is to reboot the pfsense and then it works.

              1 Reply Last reply Reply Quote 0
              • D
                dhatz
                last edited by

                Is your WAN interface using a dynamic IP? (i.e. getting a different IP via DHCP every time you disconnect?)

                1 Reply Last reply Reply Quote 0
                • S
                  SamKook
                  last edited by

                  No, I have a static ip. From the system log, it seems that the disconnection problem might have been my ISP DNS that went down a couple time so I deactivated it and I'm only using the google ones.

                  If I make a capture on the wan interface, the source ip is my local ip instead of my WAN one:

                  17:40:51.615458 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 593
                  17:40:55.615153 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 593
                  17:40:59.921605 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 593
                  17:41:00.920728 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 593
                  17:41:01.920838 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 593
                  17:41:03.921049 IP 192.168.1.11.5060 > 209.217.98.194.5060: UDP, length 593
                  
                  1 Reply Last reply Reply Quote 0
                  • I
                    inflamer
                    last edited by

                    Can you post a screenshot of your outbound NAT rules?

                    1 Reply Last reply Reply Quote 0
                    • S
                      SamKook
                      last edited by

                      Here's what I have now(in case the picture doesn't show up: http://i.imgur.com/6YCd6.jpg):

                      1 Reply Last reply Reply Quote 0
                      • I
                        inflamer
                        last edited by

                        Can you verify that you haven't accidentally checked the 'Do not nat' checkbox for the bottom NAT rule in your screenshot?

                        It is quite strange that the SIP packets from 192.168.1.11 are egressing from the WAN interface un-NATed.

                        1 Reply Last reply Reply Quote 0
                        • S
                          SamKook
                          last edited by

                          It's not checked.

                          Once I reboot the pfsense after it getting disconnected, everything goes back to normal and the sip packets are nated again, but it is indeed really odd.

                          1 Reply Last reply Reply Quote 0
                          • S
                            SamKook
                            last edited by

                            This is becoming problematic. I though it would only happen once every few months, but my internet connection isn't very stable these days it seems and it just happened twice today.

                            I also noticed that asterisk isn't the only one who seem to never notice the connection was gone for a few seconds. I'm also connected to IRC and it will stay connected, but doesn't actually receive anything anymore until I reconnect it manually. I let it in that state for over 20 minutes and it never disconnected by itself(which is used to and should do).

                            What could be causing that in the router?

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.