A → inbound call (= channel1) → asterisk → outbound call( = channel2) → B
On channel1 is hanguphandler1
On channel2 is hanguphandler2
If B does a hangup of the call, the hanguphandler2 is processed first and hanguphandler1 is processed afterwards.
If A does a hangup of the call, the hanguphandler1 is processed first and hanguphandler2 is processed afterwards.
What can I do to have always processed the hanguphandler2 first and hanguphandler 1 last.