OBiTALK Community

General Support => Day-to-Day Use => Topic started by: Name on February 23, 2012, 09:04:36 PM

Title: what is "device registration" and how is it accomplished?
Post by: Name on February 23, 2012, 09:04:36 PM
I have a weird internet service that keeps resetting itself periodically.
Discussing the reasons why or why I did not change the provider by now is beyond the scope of my question.

I use my OBI110 with a paid phone service, Phone Power. By using an unsupported (by them) device, the user is limited to 4 registrations. Because my internet resets frequently during the day, my OBI does not get registered if 4 registrations have been made within the hour. As such, I am getting a denied service, Register Failed: 403 Forbidden, error message.

My questions are (off topic?) :
1. what does registration in this context mean?
2. how is it accomplished, ie., what parameters are requested by the server to register a device, the MAC, serial number, the IP address?
3. With every reset, the IP address does not change as it is static - why is my device registered as new each time my internet connection is reset?
4. What can be done (except for changing the ISP) to prevent OBi110 to be registered as new device each time the internet connection is restarted?
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 24, 2012, 04:32:57 AM
The idea behind a SIP registration is to let the server know how to find your device, i.e. where to send an incoming call.  The device presents the server with phone number and password.  If they match, the server records in a database, the IP address and port that the request came from.  The registration typically expires in one hour; shortly before expiration, the device re-registers.  Depending on the provider, several devices are permitted to register simultaneously, and incoming calls are sent to all active registrations.

For more detail, see http://en.wikipedia.org/wiki/Session_Initiation_Protocol .
For still more detail, see http://www.ietf.org/rfc/rfc3261.txt .

For help with your problem, please post:  ISP?  Modem make/model?  Router make/model?  Any special settings in modem or router?  Are you sure that your public IP address is not changing?  To confirm, visit http://www.whatismyip.com/ before and after a reset, and compare the IP addresses reported.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 09:14:38 AM
I have serious issues with OBI110 and Phone Power.

It appears that Obi110 registeres as new UA the same service, every time the service is turned on/off in Obi.
My IP stayed the same (static IP from ISP), ports are configured and do not change: 12060 for this service.

I use a netopia 2210 modem behind a router Draytek 2930. Obi110 has static IP on LAN.

Title: Re: what is "device registration" and how is it accomplished?
Post by: QBZappy on February 25, 2012, 09:46:55 AM
Name,

Multiple instances (registrations) are for users who want to register multiple devices at the same time. You might want a softphone and an IP phone to make and receive  calls. Not all service providers offer this. My Grandstream PBX can register upto 3 times on the same account. There is usually an option to Unregister On Reboot on an ATA. I don't seem to find it on the OBi. Can anyone find it?
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 10:00:40 AM
I have only 1 device which apparently registered as multiple UAs - the IP and port remain the same.
There are 4 allowed registrations with phone power after which device cannot register and user is denied service.
Title: Re: what is "device registration" and how is it accomplished?
Post by: RonR on February 25, 2012, 11:01:09 AM
The OBi sends a consistent UA value in its SIP registrations:

User-Agent: OBIHAI/OBi110-1.3.0.2675

The information sent in the SIP header is also sufficient to uniquely identify your particular unit:

Contact-URI User Part: 14157025555
Contact-URI Host Part: 192.168.1.127
Contact-URI Host Port: 5060
Contact parameter: +sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef012345>"

Consequently, PhonePower's server can tell that it's a single unit that's making the registration requests.

I suspect PhonePower is trying to protect itself from SIP clients who use a very short registration period and register way too often.  The OBi is one of those clients and tries to register every 60 seconds by default.

Try the making the following change:

Service Providers -> ITSP Profile x -> SIP -> RegistrationPeriod : 3600

where x is your PhonePower configuration.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 11:13:51 AM
I am sorry but this is not it.
My RegistrationPeriod is set to 86400.

There should be another issue. They claim Obi110 is changing ports with each request. I have 12060 set up, so I don;t know what to say at this point.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 11:18:01 AM
Is the 2210 in bridge mode, with PPPoE set up on the Draytek?  If not, please explain the setup.  If you have a problem with the 2210 losing sync, putting it in bridge mode may enable the Draytek to sustain the PPPoE connection over a sync loss.

Quote from: Name on February 25, 2012, 09:14:38 AMIt appears that Obi110 registeres as new UA the same service, every time the service is turned on/off in Obi.
What do you mean by that?  Once registration is established, nothing should be turned off.  Possibly, the Draytek assigns a different source port, after the NAT association is lost.  You can set up syslog in the OBi and set X_SipDebugOption to Log All Messages.  Then, look at the received and rport tags sent in the Via header in response to REGISTER requests (it should be present on both successful (200) and failing (403) responses.  Or, use the Port Redirection feature to forward the UDP port corresponding to X_UserAgentPort for the SPx in question.

Does your static IP service from AT&T include multiple IP addresses?  If so, it may be possible to dedicate one to the OBi, avoiding NAT altogether.

Why do you believe your Internet connection is unstable?  If the noise margins are consistently poor, perhaps an interleaved or slightly lower speed profile will improve performance as well as stability.  If margins are normally good, but burst noise causes the modem to lose sync, you are probably on a bad cable pair and should be able to get AT&T to fix it.  It's also possible that the trouble is in your in-home wiring, or caused by a missing or defective filter on some device.  Have you tried connecting your modem directly to the test jack at the NID?
Title: Re: what is "device registration" and how is it accomplished?
Post by: RonR on February 25, 2012, 11:20:50 AM
Quote from: Name on February 25, 2012, 11:13:51 AM
My RegistrationPeriod is set to 86400.

That's an absurd registration period : 24 hours

Quote from: Name on February 25, 2012, 11:13:51 AM
I have 12060 set up, so I don;t know what to say at this point.

Have you tried the standard configuration?:

http://www.obitalk.com/forum/index.php?topic=2643.msg17184#msg17184
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 11:23:32 AM
Quote from: Name on February 25, 2012, 11:13:51 AMThere should be another issue. They claim Obi110 is changing ports with each request. I have 12060 set up, so I don;t know what to say at this point.
12060 is the destination port of the REGISTER request, i.e. the port on Phonepower's server to which it is connecting. However, it's the source port that is changing, which is causing your problem.  Try setting up Port Redirection:  Mode: Range. Protocol: UDP.  WAN IP: All.  Public Port: 5060-5061.  Private IP: (the static IP of the OBi).  Private Port: 5060.
Title: Re: what is "device registration" and how is it accomplished?
Post by: QBZappy on February 25, 2012, 11:36:53 AM
Name,

If you have a dynamic ip address, try forcing a new ip by disconnecting and then reconnecting to the internet from inside the router. This usually forces a new ip address. I've used this on a few occasions. I don't know if you can deactivate/activate your account on their web site.

I'm not certain that this will work, because it is your service provider which has locked you out at 4 registrations using the same account. If locked up on my own PBX I simply reboot it or I reboot the ATA with the "unregister on reboot" switch.

Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 11:37:19 AM
Oops, I may have misunderstood the way range redirection works in the Draytek.  You actually need to forward only one port, which (by default) is 5060 for SP1 and 5061 for SP2.  According to which SPx you are using for Phonepower, redirect just that port in Single mode.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 11:39:07 AM
Quote from: RonR on February 25, 2012, 11:20:50 AM
My RegistrationPeriod is set to 86400.

That's an absurd registration period : 24 hours

I know, but I set it up like this to avoid getting too many registrations and lock the service out.

Quote from: RonR on February 25, 2012, 11:13:51 AM

Have you tried the standard configuration?:

http://www.obitalk.com/forum/index.php?topic=2643.msg17184#msg17184


I started with that one and did not work right.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 11:43:12 AM
Quote from: Name on February 25, 2012, 11:39:07 AM
I set it up like this to avoid getting too many registrations and lock the service out.
That simply will not work with Phonepower -- after one hour the server will delete your registration and you won't be able to receive calls (or make them; PP, unlike most providers, does not accept an outgoing call if you are not registered).  Please set it back to 3600 and work on the real problem.
Title: Re: what is "device registration" and how is it accomplished?
Post by: RonR on February 25, 2012, 11:45:14 AM
Quote from: Name on February 25, 2012, 11:39:07 AM
Quote from: RonR on February 25, 2012, 11:13:51 AM

Have you tried the standard configuration?:

http://www.obitalk.com/forum/index.php?topic=2643.msg17184#msg17184


I started with that one and did not work right.

No, you started out with a misconfigured OBi by having SP2 using ITSP A instead of ITSP B.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 11:47:02 AM
Quote from: Stewart on February 25, 2012, 11:37:19 AM
Oops, I may have misunderstood the way range redirection works in the Draytek.  You actually need to forward only one port, which (by default) is 5060 for SP1 and 5061 for SP2.  According to which SPx you are using for Phonepower, redirect just that port in Single mode.

Thanks for the suggestion.
I have the following setting in the router:

Port redirection
Single
protocol UDP
WAN 1 All
Public port 12060
Private IP: local IP for OBI
Private port 12060

I made the 12060 config in Obi

Still it does not help.

Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 11:49:31 AM
Quote from: RonR on February 25, 2012, 11:45:14 AM

No, you started out with a misconfigured OBi by having SP2 using ITSP A instead of ITSP B.


I am not sure you are right. I rechecked SP2 uses profile B.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 11:58:02 AM
Quote from: Stewart on February 25, 2012, 11:18:01 AM
Is the 2210 in bridge mode, with PPPoE set up on the Draytek?

yes, it is in bridged mode.
Quote


Quote from: Name on February 25, 2012, 09:14:38 AMIt appears that Obi110 registeres as new UA the same service, every time the service is turned on/off in Obi.
What do you mean by that?  Once registration is established, nothing should be turned off.  Possibly, the Draytek assigns a different source port, after the NAT association is lost.  You can set up syslog in the OBi and set X_SipDebugOption to Log All Messages.  Then, look at the received and rport tags sent in the Via header in response to REGISTER requests (it should be present on both successful (200) and failing (403) responses.  Or, use the Port Redirection feature to forward the UDP port corresponding to X_UserAgentPort for the SPx in question.

Does your static IP service from AT&T include multiple IP addresses?  If so, it may be possible to dedicate one to the OBi, avoiding NAT altogether.

Why do you believe your Internet connection is unstable?  If the noise margins are consistently poor, perhaps an interleaved or slightly lower speed profile will improve performance as well as stability.  If margins are normally good, but burst noise causes the modem to lose sync, you are probably on a bad cable pair and should be able to get AT&T to fix it.  It's also possible that the trouble is in your in-home wiring, or caused by a missing or defective filter on some device.  Have you tried connecting your modem directly to the test jack at the NID?

Due to the fact I had too many UAs in my account, voip access got disabled. I turned off SP2 in Obi not to make additional requests to phone power reg server. We just found out that the regs are not automatically deleted after 4 hours - phone power will look into this. To reinstate the service, I had to reactivate it in OBI110 then reboot. At OBI reboot, a new registered UA appears in my phone power account.

I am in contact with draytek support as it appears that the router assigns a different port each time despite the fact NAT redirection is enabled - they call it Pseudo Port.

Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 11:58:56 AM
Quote from: Name on February 25, 2012, 11:47:02 AM

I made the 12060 config in Obi


That is probably not correct.  Assuming that you have Phonepower on SP2, what do you have for X_UserAgentPort for SP2?  The default is 5061.  Whatever you have set there is the port that you need to redirect.  In the Draytek, set both Public Port and Private port to that value.

If still no luck, we'll try keep-alive next.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 12:03:11 PM
Quote from: Stewart on February 25, 2012, 11:58:56 AM
That is probably not correct.  Assuming that you have Phonepower on SP2, what do you have for X_UserAgentPort for SP2?  The default is 5061.  Whatever you have set there is the port that you need to redirect.  In the Draytek, set both Public Port and Private port to that value.

If still no luck, we'll try keep-alive next.


Phone power on SP2
X_UserAgentPort 12060
Draytek has NAT redirection rule private/public 12060

Phone power service works fine with these settings unless I have too many uAs in my account when it gets disabled
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 12:08:14 PM
SP2 settings with phone power
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 12:13:55 PM
Try setting:

X_KeepAliveEnable: (checked)
X_KeepAliveExpires: 30
X_KeepAliveServer: 208.64.8.6
X_KeepAliveMessageType: empty

I don't guarantee that this will work, because the PP server is quite fussy and may complain about the keep-alive packets!  If if doesn't, the next step is finding out why the Draytek is changing the port numbers.  Do you have another router you can try?
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 12:29:30 PM
Quote from: Stewart on February 25, 2012, 12:13:55 PM
Try setting:

X_KeepAliveEnable: (checked)
X_KeepAliveExpires: 30
X_KeepAliveServer: 208.64.8.6
X_KeepAliveMessageType: empty

I don't guarantee that this will work, because the PP server is quite fussy and may complain about the keep-alive packets!  If if doesn't, the next step is finding out why the Draytek is changing the port numbers.  Do you have another router you can try?

Thanks, I made the changes but I would have to wait as I am locked out by Phone Power. Wait time: 1 hour.
I do have a smaller, simpler router/modem combination. I'll try this later on and see what happens.

I use different DNSs in my modem than the ones from the ISP. Does this make any difference?
I have a SN Margin (dB)    28.0    21.0 on my modem. But I also had -21 26 a couple of hours ago.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 12:55:24 PM
If the modem/router works ok, you could connect both the OBi and the Draytek WAN port to it.  Then, your computers and other devices would still have the better firewall and wireless capabilities of the Draytek.

Your noise margins are excellent, but occasionally go negative?  I assume that you lose sync when that happens?  To me, that sounds like a bad splice, cable water ingress, etc.  Do you also have POTS voice service on that line?  Can you hear any noise when the trouble occurs?  Is an inside wiring problem likely?
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 03:09:37 PM
Quote from: Stewart on February 25, 2012, 12:55:24 PM
If the modem/router works ok, you could connect both the OBi and the Draytek WAN port to it.  Then, your computers and other devices would still have the better firewall and wireless capabilities of the Draytek.

Your noise margins are excellent, but occasionally go negative?  I assume that you lose sync when that happens?  To me, that sounds like a bad splice, cable water ingress, etc.  Do you also have POTS voice service on that line?  Can you hear any noise when the trouble occurs?  Is an inside wiring problem likely?

I sorted out the router issue, all ports go on 12060 (syslog). Registration on phone power seems still not to be working. ISP sent a team out a while ago (6 mths) to check wires before installing service. No noises. I'm gonna buy a new DSL modem. I have CAT 6 RJ45 cables, professional grade between networking devices, and professional RJ11 cabling (shielded) inside to avoid interference.

Do you have any recommendations? I would need one to allow MAC cloning, setting of DNS servers, and to support ADSL 2+.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Stewart on February 25, 2012, 07:54:39 PM
Quote from: Name on February 25, 2012, 03:09:37 PMI sorted out the router issue, all ports go on 12060 (syslog).
Please explain what you changed and what result you observed.  In particular, are you now seeing "received=yourpublicIPaddress" and "rport=12060" in incoming Via headers?  Does phonepower work with the alternate router?  What is make/model of the alternate device?

Do you have an ATA supplied by Phonepower?  If so, does it work properly with the Draytek, when OBi is disconnected? Does the OBi work properly, when the other ATA is not connected?

What do the stats in the modem show regarding sync loss?  If it occurs frequently, there is a problem with your line (or, less likely, with your modem or the DSLAM port at the central office).  If you are not losing sync, it's nearly certain that the problem is unrelated to the modem.

Quote from: Name on February 25, 2012, 03:09:37 PM
Do you have any recommendations? I would need one to allow MAC cloning, setting of DNS servers, and to support ADSL 2+.
I don't understand what you are asking.  If you buy a combination modem/router (which I normally would not recommend), then MAC cloning is not a meaningful option; most such devices do not have an Ethernet WAN port at all.  If you buy a separate router (and possibly a new modem, too), then ADSL 2+ support is a modem feature; the router should work with any form of DSL, cable, fiber, etc.
Title: Re: what is "device registration" and how is it accomplished?
Post by: Name on February 25, 2012, 11:21:39 PM
I used the same router, but I MAC cloned another Netopia 2210 modem (gift from previous att love) with previous modem's. I never buy/use modem router combos. Modem is in bridge mode but also works on PPPoA/E protocol, less stable, prolly unsupported. Adjusted VPI/VCI to achieve the best service.
I reset router to original configuration (from a backup) and opened required ports in router NAT (12060, I suspect it should also work with 5060). Monitored on syslog the registration of OBI110: all ports reported the same. I had to adjust keepalive as now phone power complained about registering the same device more than once within the hour.
Connection is made stable and on a forced static IP, I recycled both OBI and modem, no negative effects on power phone.

Thank you all for your suggestions and advice. God bless!