Intermittent and annoying inbound route issue

Hello all,

I am an asterisk /FreePBX/Trixbox/Elastix newbie and I have run into an issue that I’m having trouble solving. I have searched through the site and have not seen a thread with this issue, so hopefully this isn’t a topic already covered.

I have a pretty fresh install of Asterisk 1.8, PIAF Purple, and Incredible PBX 3. I have to say it’s fantastic, but intermittently when I place a call from my cell phone to my PBX DID I get a message saying the number is not in service. After 20 or so minutes, it will work just fine.

I thought it was my provider at first but then noticed if I change the destination in my inbound route, it would then work again right away. It does not matter the type of destination (IVR,Extension…etc). I also noticed in my SSH session there is no communication with the server when I place a call from my cell phone while it is in its “not in service” state.

I have not made any changes directly to conf files. All changes have been made though FreePBX.

Anyone have any ideas? I’m stumped.

Changing the destination is causing a SIP reload and “waking up” the NAT translation in your router.

If it’s a NAT/router issue, I’m confused as to how only this distro seems to be affected.

I’ve made some changes with my router and I’ll give it some time and try again.

Thanks for your help!

You did not mention that detail. What version of Asterisk worked and what didn’t?

No matter what I am sure if you look at the logs you will see timeouts trying to communicate with your SIP peer. You may want to review the logs for the time period you could not receive inbound calls.

I had something very, very similar. It turned out that the router (by default) was not being consistent with it’s registrations to the SIP provider, and they kept coming through on different ports. Different ports=reregistration, which meant a period while the number wasn’t usable. But once I enabled consistent NAT that all went away. Check the router SIP settings.

Different distros might use different re-registration timers? Not sure at all, but it might explain the issue.

I’m at work right now so I can’t check on the versions that worked well but I will look when I get home. These are all VM’s on Hyper-V. Aside from Elastix, all distros seemed to work well as VM’s.

I do know however that 1.6 with trixbox worked like a charm. I would stick with trixbox but Incredible PBX has spoiled me.

demani - I think that might be the issue; at least it makes sense. I have a semi-basic netgear home router so I’m not sure how in-depth I can get with SIP but I’ll look into it more when I get home.

Thanks guys.

An update:

So far so good. I finally decided to restore the VM to an earlier snapshot to see if any changes I made to Asterisk caused the issue.

Under “Asterisk SIP Settings > NAT Settings” I had pressed the Auto Configure button (because some e book I was reading told me to), and originally the two fields, External IP and Local Networks, were blank. Auto Configure of course fills in the fields with the internal and external IP addresses.

From what I assumed, for the first few weeks of running this system it worked fine (External IP and Local Networks = blank).

After the restore, these fields were again blank and everything seems to be working fine.

My newbie question is: First does this make sense as the cause, and why does this (if it actually is the problem) cause the NAT issue?


2nd Update:

Several hours later everything is still working fine. It seems this was the issue.