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?
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.
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.