Summary: | ASTERISK-09087: Asterisk doesn't send predefined Hangup causecode to sip_channel. | ||
Reporter: | Alexandr Dubovikov (baron) | Labels: | |
Date Opened: | 2007-03-23 12:03:45 | Date Closed: | 2011-06-07 14:08:27 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) causecode.patch | |
Description: | If I want to use Hangup(19) on sip channel, asterisk doesn't use it because the function "pbx_builtin_hangup" always set chan->hangupcause to 16. (normal call clearing). It should be something like this: --- pbx.c.orig 2007-03-23 17:54:21.231321320 +0100 +++ pbx.c 2007-03-23 17:54:48.975103624 +0100 @@ -5580,7 +5580,9 @@ static int pbx_builtin_setamaflags(struc static int pbx_builtin_hangup(struct ast_channel *chan, void *data) { /* Just return non-zero and it will hang up */ - if (!chan->hangupcause) + if (data) + chan->hangupcause = atoi(data); + else if (!chan->hangupcause) chan->hangupcause = AST_CAUSE_NORMAL_CLEARING; return -1; } The issue can be not only on SIP channels! | ||
Comments: | By: Joshua C. Colp (jcolp) 2007-03-23 12:13:59 This is a new feature that is already available in 1.4 and higher. Since it is a new feature, it wasn't eligible for 1.2 and thus wasn't put in there. |