Files
telephony/net/asterisk-chan-lantiq/patches/0005-inform-requester-about-busy-channel.patch
Daniel Golle d1123a245b asterisk-chan-lantiq: import patches improving log output
Output channel state in log message if a digit ends up not being handled.
Report USER_BUSY as cause in case a phone is not on hook while being
called.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-29 02:14:04 +01:00

24 lines
887 B
Diff

From cdc77d6f9388c42bd6e21666b8a4d5789e93d05e Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sat, 29 Jun 2024 01:20:16 +0100
Subject: [PATCH] inform requester about busy channel
Set cause to AST_CAUSE_USER_BUSY if requesting the channel failed
due to being offhook already.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
src/channels/chan_lantiq.c | 1 +
1 file changed, 1 insertion(+)
--- a/src/channels/chan_lantiq.c
+++ b/src/channels/chan_lantiq.c
@@ -1283,6 +1283,7 @@ static struct ast_channel *ast_lantiq_re
/* Bail out if channel is already in use */
struct lantiq_pvt *pvt = &iflist[port_id];
if (! pvt->channel_state == ONHOOK) {
+ *cause = AST_CAUSE_USER_BUSY;
ast_debug(1, "TAPI channel %i alread in use.\n", port_id+1);
} else {
chan = lantiq_channel(AST_STATE_DOWN, port_id, NULL, NULL, cap, assigned_ids, requestor);