One phone number for multiple lines? Can Asterisk do this?

Hi I have a small business that currently rents 6 lines with seperate numbers, the setup we have at the moment is that if a number is busy it rotates onto the next free line-----

I am wondering if a single number being picked up by an asterisk server would be able to handle this type of setup

if your wondering yes I am new to astrerisk so please forgive me if this is like a “man Asterisk can do this and sooo much more” question.

I’m trying to fastrtack myself into what it can and can’t do and just wanted to see if anyone could help

Thanks all

May not be the best way to accomplish this, but here would be a method.

exten => <number01>,1,Dial(<number01>)
exten => <number01>,n,Goto(<number02>-${DIALSTATUS},1)

exten => <number02>-BUSY,1,Dial(<number02>)
exten => <number02>,n,Goto(<number03>-${DIALSTATUS},1)

exten => <number03>-BUSY,1,Dial(<number03>)
exten => <number03>,n,Goto(<number04>-${DIALSTATUS},1)

... and so on ...

Basically, number01 will dial the first extension (which i’ve also labelled number01 (doesn’t have to be)), and if that extension picks up, then all is good, nothing else is executed.

If it fails, the ${DIALSTATUS} variable is filled with the reason. We’re interested if the status is BUSY. The next line will jump to the extension-BUSY.

This will work as long as your provider will send in multiple calls using the same number.