Constantly Reconnecting remote phones and vm problems

Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
Really destroying SIP dialog ‘38cc8c062b8e1b7e3ac44a6b695fd[email protected]’ Method: OPTIONS
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS

What’s going on? I can’t seem to figure this one out. Constantly, these messages is showing up from the CLI. Users have been complaining about various problems such as one way audio, extensions that won’t ring, go direct to vm, etc. Can someone help me by shedding some light on this. I’ll be happy to post what ever else is needed.

tb105*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
xx59/xx59 x.x.x.141 D N 5060 OK (12 ms)
xx56/xx56 x.x.x.73 D N 5060 OK (56 ms)
xx55/xx55 x.x.x.120 D N 5060 OK (64 ms)
xx53/xx53 x.x.x.95 D N 5060 UNREACHABLE
xx31/xx31 x.x.x.140 D N 5060 OK (12 ms)
xx25/xx25 x.x.x.47 D N 5060 UNREACHABLE
xx76/xx76 x.x.x.97 D N 5759 UNREACHABLE
xx61/xx61 x.x.x.156 D N 15060 OK (139 ms)
12 sip peers [Monitored: 5 online, 7 offline Unmonitored: 0 online, 0 offline]

You need to provide more information about your setup, and please use the code tags when copying output. It’s very difficult to read when the columns don’t line up.

What’s the hardware you’re running on? Are you running a distro? Which one? What’s the load on the server? What else is the server doing? Are the phones remote or local? What kind o phones are they? Etc… the more information you can provide the better.

Yup, as mentioned, more than happy to.

It’s the trixbox 2.6.1 ISO install version.
It’s an IBM x440 8-way SMP machine with 8GB of memory. Though, the rhino driver won’t allow PAE to work so it’s using 4BG for now.
There’s no load on the server to speak of.
The server isn’t doing anything else, providing service to some 5 users, that’s it.
Two phones are local, 4 or 5 are remote, all LinkSys SPA941 phones.

What else can I provide? Logs, something else?

Mike

Remote users remote over internet or remote via a VPN, either way I’d assume a different subnet of IP’s then the server. So did you setup the sip_nat.conf file (or place those values in the sip_general_custom.conf)? Many of your issues/complaints all fit under the “I’ve not setup the correct things for a remote extension” umbrella which means NAT and getting that setup correctly. So pelase also post changes made to firewalls and routers.

There was in fact a change. We moved to a multi-wan firewall but it works fine for a week, weeks, then all hell breaks loose and it’s problem after problem.

We don’t seem to be having NAT problems but I guess it could be. I’ve never touched the sip_nat.conf file so it’s empty since install.

The remote users are on cable modems behind LinkSys routers and the phones are of course using a NAT address behind each of their firewalls.

if the phone traffic goes through a NAT device (changes IP via masking) then you NEED to setup the nat info. If the phones are on different subnets then the server then you still need to do some setup that would be in the sip_nat.conf file by default as the server and asterisk only know about the local subnet.

So you need a sip_nat.conf file…

And include these lines
nat=yes
externip=xx.xx.xx.xx
localnet=yy.yy.yy.yy/24

where xx.xx.xx.xx is the external IP that the remote phones will see the server at
you can have more then one localnet, and it should be in the form of 192.168.1.0/24 if for example your server is on that subnet or any other subnet that is accessed via a local lan without being Nat’d at the firewall. In my office we have 3 subnets listed. the local office, and two remote offices that are VPN’d in.

once that is done do a reload in the asterisk cli and things should be much better.

externip tells asterisk that it should provide this IP address for all traffic it receives that is not on the same subnet as the server is on. localnet tells asterisk that these are other networks it can talk to directly and and should NOT use the externip address when talking to them.

Past that you need to be sure you have the proper udp ports open and forwarded at the firewall.

Thanks so much. It now looks as follows;

nat=yes
externip=x.x.x.59
localnet=192.168.1.0/24

I’ve updated to show the public (edited) IP and the localnet. I wasn’t aware of this file needing to be set up. So much that can be missed sometimes :).

externip tells asterisk that it should provide this IP address for all traffic it receives that is not >on the same subnet as the server is on. localnet tells asterisk that these are other networks it >can talk to directly and and should NOT use the externip address when talking to them.

Ok, so I can add additional externip and localnets if needed.

Past that you need to be sure you have the proper udp ports open and forwarded at the >firewall.

Yes, that was done right away when installing it. It covers SIP 5060/5061 and UDP 10000,20000.

Mike

Suddenly, they are all complaining that they can’t make calls, calls dropping, one way audio etc.

Is it related to having to put NAT = yes/no in the extensions perhaps?

that is the other place to put it, the extensions. If they are allowed to be nat’d then set the extensions nat to yes.

Since their phones are coming over a public IP, should the Device Options setting be yes or no for NAT? Either way isn’t working now.

I’ve had to clear out the sip_nat.conf file temporarily to allow them to call again.

Could any of these things have anything to do with the /var/www/html/recordings/modules/voicemail.module module? I ask because that’s something else we’re working on at the same time as this.

Currently, everyones device options NAT setting has always been set to yes. When I added the sip_nat.conf file, it killed their voice amail in the following manners;

NAT = yes = fast busy to vm, no answer.
NAT = no = no answer, no response what so ever.

It’s got to be something with NAT since I can make calls internally, check messages, etc etc.

Mike, If you can get on irc in the #FreePBX channel ping me or just post your question as there are many good people in that group that cantrouble shoot this faster that way.

It also dawns on me that the users phones also have the NAT enable or disable option. The phones are LinkSys SPA941 units.

So the users phone would have a NAT address from a LinkSys, to a cable modem, over the net, to us, then into our firewall, then the PBX is then on a NAT address itself.

Mike

So, to give a clearer picture of things;

Remote users phones are set to NAT enable = no
Phones have a NAT IP from a LinkSys router.
The LinkSys has port forwarding rules for 5060 and 10K/20K.
The phones connect to our PBX.
The PBX is on a NAT address behind our firewall.

Over and over again, I am watching peers connect and disconnect.
They go from OK to UNREACHABLE, then back to OK, then back, over and over again.

I’m guessing that is the reason behind calls being dropped etc. I can’t seem to find a reason for this, it’s not firewall related, it must be PBX related. What settings might have changed, even in error, which might cause this to happen?

Mike

Somewhere in the beginning of the sip.conf or in another sip*.conf (non sip_*_custom.conf) file you might at one point of had these settings, but when using FreePBX and it gets upgraded all files that don’t end in _custom.conf or sip_nat.conf can get overwritten/replaced when upgrades or updates are applied. When that happens you’ll loose these settings.

What you are describing exactly is what happens when sip nat info is not configured properly or lost.

We didn’t have any problems for over a year and a half. It’s as if it’s all coming apart now and I’m nervous that I might be losing track of the little changes I’ve made here and there in trying to find the problem.

When I add the settings in the sip_nat.conf file, the phones seem to register and stay registered but then new problems seem to arise. However, then users are saying that they can’t reach vm. Some are saying that they get no response at all from the vm, others are saying they need to enter their passwords a few times before they get in.

sip_nat.conf might be needed but it was never used until today and seems possible that it becomes a problem when I do use it.

Mike

You say you are a using a multi-wan router as in more than one wan connection??? like bonding or failover???
If so then shut down the bonding and see if that clears up the errors.

If you have a fail over device and a channel is kicking in and out you get some funky stuff going on. I use a RV082 and my links are wi-fi mesh and at times I must unplug one of the links because it go up and down, I get all kinds of error from the trunks, remote phones if I leave it up.

Test with software phone like SJ Phones and see if it gives the same results.

Good call but no, nothing like that. I have fail over on data but sip is strictly over one WAN, no load balancing or anything like that which would affect it.

That’s something I thought about also but made sure it was not the case :).

Mike

Yup, strange. When I have the data in sip_nat.conf, even internally, we can’t reach vm now. Password incorrect is all we can get. Same for remote users. Removing the data from sip_nat.conf fixes that problem but then the remotes continuously connect and disconnect.

Mike