]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/dial.c: Set channel hangup cause on timeout in handle_timeout_trip
authorsarangr7 <sarangraj@carestack.com>
Thu, 18 Dec 2025 06:04:14 +0000 (11:34 +0530)
committersarangr7 <sarangraj@carestack.com>
Mon, 29 Dec 2025 19:37:32 +0000 (19:37 +0000)
commit349d52edaa758fd2f0ccdbce7c298e4bd75f596f
tree5adb89f89e3df9c0ae3604f2ba7bbbb595893522
parent7366b640e1f3c763a4ac376997395afda5e93c40
main/dial.c: Set channel hangup cause on timeout in handle_timeout_trip

When dial attempts timeout in the core dialing API, the channel's hangup
cause was not being set before hanging up. Only the ast_dial_channel
structure's internal cause field was updated, but the actual ast_channel
hangup cause remained unset.

This resulted in incorrect or missing hangup cause information being
reported through CDRs, AMI events, and other mechanisms that read the
channel's hangup cause when dial timeouts occurred via applications
using the dialing API (FollowMe, Page, etc.).

The fix adds proper channel locking and sets AST_CAUSE_NO_ANSWER on
the channel before calling ast_hangup(), ensuring consistent hangup
cause reporting across all interfaces.

Resolves: #1660
main/dial.c