[Home]

Summary:ASTERISK-06959: [branch] Ability to set HANGUPCAUSE sent by Hangup() to channel manually
Reporter:Kai Militzer (kmilitzer)Labels:
Date Opened:2006-05-15 02:29:11Date Closed:2006-05-25 15:52:42
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) hangup_causecode_for_1.2.7.1.diff
( 1) hangup_causecode_trunk.diff
Description:Hello,

I would really like to see the ability to set the Hangupcause manually. It could look like this:

exten => Hangup(21)

This would be really helpfull in a dialplan with a catch all extension where you still want to signal a number unallocated in certain cases, or to signal certain Causecodes that would not be created by asterisk automatically (for example number changed "22").

Right now there is no possibility to set the Hangupcause, it's only readable through the variable ${HANGUPCAUSE}

Regards,
Kai
Comments:By: Kai Militzer (kmilitzer) 2006-05-15 04:03:16

I was just told by oej that feature requests should not be filed as bugs opossed to Qwests statement on #asterisk-dev, so please close this report without further investigation.

I am sorry for being too fast with opening this. :(

Regards,
Kai

By: Serge Vecher (serge-v) 2006-05-15 09:17:33

No problem, Kai. Please feel free to reopen this bug report when a disclaimed patch is available. Thanks.

By: Kai Militzer (kmilitzer) 2006-05-16 04:11:47

I just faxed a disclaimer to digium and will upload the patch now.

By: Andrey S Pankov (casper) 2006-05-16 09:07:09

> feature requests should not be filed as bugs

Only if you do not provide a patch implementing that feature.
Otherwise it's OK ;)

By: Serge Vecher (serge-v) 2006-05-16 09:16:08

may I suggest the following text change "If an option is given, HANGUPCAUSE will be set to the given numeric value." -> "If an optional 'causecode' is given, HANGUPCAUSE will be set to its value."

By: Andrey S Pankov (casper) 2006-05-16 09:20:41

1. You do not need braces there...
2. It would be nice to avoid double call of atof()
3. Are you sure you need to cast data to (char *) at all?
  It's prototype - double atof(const char *nptr); - is anyway different...

By: Andrey S Pankov (casper) 2006-05-16 09:23:19

vechers: and there should be a note that the value is decimal because
people used to hexadecimal values for Q.931 cause codes...



By: Andrey S Pankov (casper) 2006-05-16 09:24:51

May be that should be implemented as a dialplan function in func_channel?
Will it work like that?

By: Jeffrey C. Ollie (jcollie) 2006-05-16 14:30:23

I've opened up a branch to track progress on this bug:

http://svn.digium.com/svn/asterisk/team/jcollie/bug7160

The changes in the trunk include some error detection as well as the ability to specify symbolic constants.

By: Jeffrey C. Ollie (jcollie) 2006-05-16 14:32:21

Also, since this is a new feature, this shouldn't go into the 1.2 branch.

By: Kai Militzer (kmilitzer) 2006-05-16 14:59:02

I filed it for trunk and not for 1.2, as you are right and it is a new feature, but added the patch for 1.2 too for people that (like me) use 1.2 and want/need the feature too. It should not go into 1.2 code.

By: Jeffrey C. Ollie (jcollie) 2006-05-22 10:52:24

kmilitzer could you update the bug with the status of your testing?

By: Serge Vecher (serge-v) 2006-05-22 10:59:42

marking "assigned" as per jcollie's report on IRC of successful testing by kmilitzer by email :)

By: Joshua C. Colp (jcolp) 2006-05-25 15:52:41

In trunk as of revision 30390. Thanks!