Hangup incoming call when either endpoint rejected

When there is an incoming call, my dialplan will dial to 2 endpoints
dial(SIP/1001&SIP/1002,,c)
So either one answered the call, another leg will be drop

Now I would like to achieve if either one rejects the call, hangup the incoming call.
Do you have any suggestion?

For you information, I’m using Asterisk 1.8

For your information, main stream support for Asterisk 1.8 ended on October 21st 2014.

Thanks David.

We can upgrade to any version but want to confirm the method to achieve the goal.
Checked the dial options and can’t find any simple option helps.

I’m not aware of any support for this. In fact I’m not aware of any support for “busy everywhere” in SIP, either.

Yeah, as David says there’s nothing built in to do this as it’s counter to what most individuals actually want. You’d have to modify Asterisk or write something external (perhaps using AMI) to hang up the other channels involved.

Thanks david and jcolp. I will study AMI then.

On some phones at least, you can configure the reject button to send the call to voicemail (or it will automatically), which will work because it is just your standard forking scenario with the second line being disconnected upon the first one answering.

I bet you could fake this.

Use two local channels, check dialstatus on the local channels and hang up the other local channel if needed

It’s a good idea. I tried and use SoftHangup to hangup the other line.

1 Like