aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_unistim.c
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-24 22:16:48 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-24 22:16:48 +0000
commit94979a8bde5da5087e67261a4ff435aaff6188e4 (patch)
tree2c247ba7f500b9bdc0fa9867d833b6af194d7139 /channels/chan_unistim.c
parente8d5948d534e44d389e8ceab04c6e1b007b8fd6d (diff)
Pass the hangup cause all the way to the calling app/channel.
(closes issue #11328) Reported by: rain Patches: 20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14) brought up-to-date to trunk by me git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114637 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r--channels/chan_unistim.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 7318e7353..dca01ad31 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -1125,7 +1125,7 @@ static void close_client(struct unistimsession *s)
if (sub->owner) { /* Call in progress ? */
if (unistimdebug)
ast_verb(0, "Aborting call\n");
- ast_queue_hangup(sub->owner);
+ ast_queue_hangup(sub->owner, AST_CAUSE_NETWORK_OUT_OF_ORDER);
}
} else
ast_log(LOG_WARNING, "Freeing a client with no subchannel !\n");
@@ -1974,11 +1974,11 @@ static void close_call(struct unistimsession *pte)
if (attempt_transfer(sub, l->subs[SUB_THREEWAY]) < 0)
ast_verb(0, "attempt_transfer failed.\n");
} else
- ast_queue_hangup(sub->owner);
+ ast_queue_hangup(sub->owner, -1);
} else {
if (l->subs[SUB_THREEWAY]) {
if (l->subs[SUB_THREEWAY]->owner)
- ast_queue_hangup(l->subs[SUB_THREEWAY]->owner);
+ ast_queue_hangup(l->subs[SUB_THREEWAY]->owner, AST_CAUSE_NORMAL_CLEARING);
else
ast_log(LOG_WARNING, "threeway sub without owner\n");
} else
@@ -2312,7 +2312,7 @@ static void TransferCallStep1(struct unistimsession *pte)
if (unistimdebug)
ast_verb(0, "Transfer canceled, hangup our threeway channel\n");
if (p->subs[SUB_THREEWAY]->owner)
- ast_queue_hangup(p->subs[SUB_THREEWAY]->owner);
+ ast_queue_hangup(p->subs[SUB_THREEWAY]->owner, AST_CAUSE_NORMAL_CLEARING);
else
ast_log(LOG_WARNING, "Canceling a threeway channel without owner\n");
return;
@@ -2368,7 +2368,7 @@ static void HandleCallOutgoing(struct unistimsession *s)
/* start switch */
if (ast_pthread_create(&t, NULL, unistim_ss, c)) {
display_last_error("Unable to create switch thread");
- ast_queue_hangup(c);
+ ast_queue_hangup(c, AST_CAUSE_SWITCH_CONGESTION);
}
} else
ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n",