[asterisk-users] Connecting peer if the peer is already connected

Dave Platt dplatt at radagast.org
Wed Jun 10 12:22:26 CDT 2015


> Now I have the problem for my cellphone... I need to register from almost any
> IP (at least in Europe), so I can't restrict it.
> Well, the password is NOT simple and random.
> 
> Now, I tried to register the user of my cellphone using a PC, as my cellphone
> was already registered.
> And Asterisk accepted this registration... :(

Were you trying to register the PC using the *correct* credentials used
by your phone (the right username and password), or *incorrect*
credentials (wrong password)?

If your PC offered up the correct credentials, then I believe it's
entirely normal behavior for Asterisk to accept this registration, and
"bump off" the previous registration which used these same credentials.

Asterisk (and most SIP servers) will treat this situation as an "Oh,
this is a valid user of mine who has moved to a different IP address."

The same thing would happen if your cellphone were (for example) to
switch from cellular IP to WiFi, or vice versa, or (in many cases) moved
from one service area to another.

The way you avoid confusion between multiple devices, is use different
(unique) credentials for each SIP client... and, of course, use strong,
difficult-to-guess passwords.

Any time you try to share credentials between two or more distinct
devices, confusion *will* occur if both devices are on-line at the same
time.  You can never tell which of the two will succeed in establishing
and holding a registration... although it will typically be the one
which forces through a registration packet the most frequently.

If you were to somehow tell Asterisk "Don't accept a different
registration for my cellphone user XXXX, if user XXXX is already
registered", you could quite easily find yourself unable to register the
cellphone with Asterisk for a prolonged period of time... the PC could
lock you out, and the cellphone could lock *itself* out every time it
moved from one IP network to another.





More information about the asterisk-users mailing list