Duplicate extension active

Hi I’m working with the Asterisk server and found a problem is that when I record from different devices but with the same username and password both devices are registered and need that does not happen the first Unregister. please i need help is very important

What do you want to do exaclty? If you are trying to register two devices with the same extensions then you should use make a pjsip extension, not sip.

the situation is that I have a computer with Zoiper connected to Asterisk server with my username and password and I need when I connect from a mobile Zoiper with the same username and password will automatically disconnect the computer session.

You cannot control it. If you are using a sip extension if you register with the same extension then the last registration will be valid. You don’t “kick” the other user but it has the same effect. If you try to do this then just wait for some that has a better idea what do you want to do! :stuck_out_tongue:

I need you when I register with the same extension in another device will automatically disconnect the first. there any way to do that?

If using PJSIP, you should be able to achieve that using the max_contacts setting and removing_existing setting on the PJSIP aor:





1 Like

I’m using only sip ie I have set the sip.conf file and extension.conf, is there any possible way to do just that removing the last extension when I connect?

There isn’t anything you can do in Asterisk. As @astbox mentioned, what you’re looking for will naturally occur if the second device sends a REGISTER request to Asterisk for the same chan_sip peer. This won’t affect any running calls, but any subsequent calls made from Asterisk to that peer will go to the device that registered last.

1 Like

So the only way to solve this problem is to change to pjsip ?? and there is no way to program it through some script or something?..