Asterisk prevent Multiple registration for one user

Hi,

I am having SIP user in sip.conf like this

[1001]
type=friend
host=dynamic
secret=1234

If i register first from a SIP client its getting registered, if i try again from another SIP client with id 9001 its again getting registered. How can i prevent registration on second client with same id. I tried changing type to peer but shows same behavior, also when i tried to change type to user the registration always fails with password error

Unless you use “permit” and “deny” lines to limit where traffic is allowed from, there isn’t a way. This is because with the correct username/password you don’t know who should or should not be allowed to register, and if it’s a new REGISTER replacing an existing one then that could actually mean the already registered device has a new IP address.

How can limit REGISTER using permit and deny provided the client IP address is dynamic and not static. If 9001 is registered from one phone next time it will be tried from another phone with different ip.

You can’t, then. If they have the correct username and password then you can’t know who is allowed to register and who isn’t.

You could move to PJSIP, which provides proper support for simultaneous registrations for the same address of record.

Is it a tedious process migrating to PJSIP?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.