Home Ask Login Register

Developers Planet

Your answer is one click away!

Mani February 2016

Forward incoming call to free extension

I have configured asterisk and dahdi successfully in Centos 7.

My Incoming and Outgoing calls are working good.

But I have one problem configuring extensions.conf for incoming.

I have this code in extensions.conf for incoming

exten => _X.,1,Noop(Incoming call "from PSTN")
same =>   n,Dial(SIP/206)
same =>   n,Hangup()

It is currently forwarding all incoming calls on extension 206, but I want it to forward to those extension which are not on any call this time.

Any idea/help is appericiated


MichelV69 February 2016

Lets say you have extensions 201, 202, 203, 204, 205, and 206.

The DIAL command will let you call more than one device at once. So, you could do something like this:

exten => _X.,1,Noop(Incoming call "from PSTN")
same =>   n,Dial(SIP/201&SIP/202&SIP/203&SIP/204&SIP/205&SIP/206)
same =>   n,Hangup()

Alternately, and just as effective, you could use Asterisk's call queues / ACD system. See the link below.

Further reading:

Post Status

Asked in February 2016
Viewed 1,990 times
Voted 11
Answered 1 times


Leave an answer

Quote of the day: live life