That feature called call parking and it already present in most asterisk system
Or maybe you are reffering to call pickup(*8) - if so you have put same pickupgroup on all extensions.
Unfortanly no way say which system you have and how to enable it on your system.