SIP working, but not everywhere

Hey everyone,

I’ve got a new asterisk server here at the office, and we’re trying to
set it up to replace our old one. We’ve set up the new machine with
the latest version of asterisk, since the old one was running
a pretty build.

I replicated the configuration on the new machine to match the old one
as much as possible. Same sip accounts, same dial plan, same mail
boxes. I even copied over the voice mail folders, and it all seems to
work fine. The phones I’ve tested with can call each other, can call out
to the world, and get calls coming in from the world.

So, after the testing seamed done we took down the old machine and
assigned the old machine’s IP address to the new machine. We hoped
that all the office phones would not even notice notice the change, and
would smoothly transition to talking to the new server instead. The
trouble is that only about 1/5th of the phones did this properly.
“sip show peers” shows the other 4/5th of our phones as not registered.

I did some packet sniffing with wire shark, and also some snooping
with “sip set debug on.” It seems that the problematic phones are
actually sending floods of sip REGISTER requests to our new server,
but then asterisk appears to just drop them silently. No error
messages in the console, no nothing.

If anybody could help me out with debugging this it would be much
appreciated. I can provide any relevant info here, if only I’m told
exactly what, and possibly how (since I’m still relatively new to
asterisk).

Anyway, many thanks in advance for any help I might be able to get :smile:
-Patrick

How many phones do you have connected?

Can you paste a trace of one of the failed REGISTER attempts?

Then a “sip show peer XXXX” for this same failed peer registration?

You might also consider TCP based registrations for the phones, instead of UDP.

Will do. Unfortunately I can’t play around with this stuff until everybody clears out of the office later at around 6 or 7. So, I’ll post back that trace and peer status sometime around then.

Thanks for the help,
-Patrick

Alright, here we go. I’ve redacted some parts of the IPs, hope you don’t mind:

<--- SIP read from UDP:REDACTED.186:38296 --->
REGISTER sip:REDACTED.188 SIP/2.0
Via: SIP/2.0/UDP REDACTED.186:5060;branch=z9hG4bK55c0186b
From: <sip:204@REDACTED.188;user=phone>
To: <sip:204@REDACTED.188;user=phone>
Call-ID: 00152b67-a83b0002-237f6986-6278f18d@10.0.1.19
Date: Thu, 07 Jul 2011 01:30:31 GMT
CSeq: 12497 REGISTER
User-Agent: CSCO/6
Contact: <sip:204@REDACTED.186:5060;user=phone>
Content-Length: 0
Expires: 120

<------------->
--- (11 headers 0 lines) ---
asterisk*CLI> sip set debug off
SIP Debugging Disabled
asterisk*CLI> sip show peer 204


  * Name       : 204
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : office-phone-context
  Subscr.Cont. : <Not set>
  Language     : 
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    : 
  Pickupgroup  : 
  MOH Suggest  : 
  Mailbox      : 204
  VM Extension : asterisk
  LastMsgsSent : 32767/65535
  Call limit   : 0
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "Michael T" <204>
  MaxCallBR    : 384 kbps
  Expire       : -1
  Insecure     : no
  Force rport  : Yes
  ACL          : Yes
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: -1
  DirectMedia  : No
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       : 
  Addr->IP     : (null)
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: 
  SIP Options  : (none)
  Codecs       : 0x80000008000e (gsm|ulaw|alaw|h263|testlaw)
  Codec Order  : (none)
  Auto-Framing :  No 
  100 on REG   : No
  Status       : Unmonitored
  Useragent    : 
  Reg. Contact : 
  Qualify Freq : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   : 
  Use Reason   : No
  Encryption   : No

asterisk*CLI> 

Thanks again :smile:
-Patrick

Oh, I almost forgot. Here’s wire shark sniff of a packet from another phone which fails to register, if that’s any help. Again, the IPs are redacted. (Note that I didn’t see anything in wire shark that looked like a server response, I think the register request is just ignored):

rutski89.com/register.png

Not sure why you blocked out your IPs ending in .186 and .188. Were those public addresses?

Looks like the REGISTER attempt says devices are at some private addresses:
10.0.1.19 for 204
10.0.1.21 for 200

It’s possible you have a strange NAT issue or some other limitation of ports by way of an intermediate router, switch or firewall. Or more than one network interface on the new PBX with some associated routing irregularities?

How fragmented is your network? Appears to be split address spaces, so you’ve got a whole host(s) of places to start looking for unexpected network service actors saying the wrong thing! DNS, VLAN, DHCP, etc.

Right, ok, I should definitely have explained this before hand. It’s not that bad of a fragmentation. The server is on an external IP, and all of our office phones connect to it via that external IP. And, of course, all of our phones are on a NATed connection when they talk to the outside world.

However, I didn’t expect this to cause major issues. That’s how our existing system is set up, and it’s working smoothly. Plus, on the new system that I’m having trouble with several phones do connect properly to the external IP of the asterisk server. So, I would expect the rest of the phones should be able to connect properly too (and they do, but the registration just gets silently ignored).

I’m not meaning to insist that this networking setup isn’t the problem, but I definitely want to stress that the smooth functioning of the existing system, along with a select several phones which work on the new system already indicates to me that either the problem is elsewhere, or that if the problem is with networking issues then at least not an insurmountable.

Still very confused about why things aren’t working,
(And not totally convinced it’s because of networking issues)
-Patrick

P.S.
And yep, the 188 IP is the external IP of the asterisk server. And the 186 IP is the IP our NATed phones use. Both the phones and the server are on the same internal network, but they talk externally. And yes, this seems silly now that I think about it, but that’s how the existing system was already set up (though not by me). And when replicating things on the new system I’ve kept things they way they are so that I wouldn’t have to go and change the configurations on our phones (though I can always do that if really necessary).

Also, I just changed the network configuration around such that the phones now talk to the asterisk server purely on the internal network. I now get similar registration requests like

<--- SIP read from UDP:10.0.1.21:5060 --->
REGISTER sip:10.0.1.69 SIP/2.0
Via: SIP/2.0/UDP 10.0.1.21:5060;branch=z9hG4bK4dfa3781
From: <sip:200@10.0.1.69;user=phone>
To: <sip:200@10.0.1.69;user=phone>
Call-ID: 001bd512-5e480002-40d47895-28c6d577@10.0.1.21
Date: Fri, 08 Jul 2011 00:08:58 GMT
CSeq: 105 REGISTER
User-Agent: CSCO/6
Contact: <sip:200@10.0.1.21:5060;user=phone>
Content-Length: 0
Expires: 120

But just as before, they are silently ignore:

asterisk*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status     
200                        (Unspecified)                            D   N   A  0        Unmonitored 
201                        (Unspecified)                            D   N   A  0        Unmonitored 
203                        (Unspecified)                            D   N   A  0        Unmonitored 
204                        (Unspecified)                            D   N   A  0        Unmonitored 
206                        (Unspecified)                            D   N   A  0        Unmonitored 
207                        (Unspecified)                            D   N   A  0        Unmonitored 
208                        (Unspecified)                            D   N   A  0        Unmonitored 
209                        (Unspecified)                            D   N   A  0        Unmonitored 
210                        (Unspecified)                            D   N   A  0        Unmonitored 
211                        (Unspecified)                            D   N   A  0        Unmonitored 
212                        (Unspecified)                            D   N   A  0        Unmonitored 
213                        (Unspecified)                            D   N   A  0        Unmonitored 
214                        (Unspecified)                            D   N   A  0        Unmonitored 
215                        (Unspecified)                            D   N   A  0        Unmonitored 
216                        (Unspecified)                            D   N   A  0        Unmonitored 
218                        (Unspecified)                            D   N   A  0        Unmonitored 
219                        (Unspecified)                            D   N   A  0        Unmonitored 
220/220                    10.0.1.51                                D   N   A  5060     Unmonitored 
221                        (Unspecified)                            D   N   A  0        Unmonitored 
223                        (Unspecified)                            D   N   A  0        Unmonitored 
239                        (Unspecified)                            D   N   A  0        Unmonitored 
300                        (Unspecified)                            D   N   A  0        Unmonitored 
22 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 21 offline]
asterisk*CLI> 

Also, yes, the phone 220 is indeed connecting. It’s one of the few that does. 214 and 216 would connect too (if they were turned on). As would a few others, but the vast majority of them don’t. Interestingly, the ones that asterisk turns a blind eye to are all of a different cisco model. That probably has something to do with it, but I have no idea as to the details of how or why.

Getting slightly frustrated :-p
-Patrick

So this works okay with some phones, call them model X, but not Cisco Phone Model Y ?

What is X ? What is Y ?

I think you made the right move by straightening out the network, but it seems like you are running into Cisco SIP incompatibility issues. Those can be frustrating and the lack of manufacturer documentation does not help.