Pre-emption calls in Asterisk


I would like to have pre-emption calls in Asterisk. With this I mean that if user A has priority/access-level 1 and wants to talk to user B, how could it preempt the call that user B is already having with user C which has only priority/access-level 2?

Does anyone know if this is supported by Asterisk or how this could be implemented?

Any idea would be very welcome.

thanks a lot for your help in advance,
best regards.

Asterisk provides the ChannelRedirect and Bridge primitives that could be used as part of such a solution. You would need to add logic to identify which channel was using the target device and decide on its relative priority. You would probably have to store information in astdb, or global variables.

I’m not sure there is any way of cleanly terminating the pre-emtped call without using AMI. Redirecting it will cause the destination to become “soft hungup”, but you wouldn’t be able to start a new call to them until they actually hungup