Summary: | ASTERISK-07644: [patch][post-1.4] New AccountActive() function | ||
Reporter: | Justin R. Tunney (jtunney) | Labels: | |
Date Opened: | 2006-08-31 16:19:45 | Date Closed: | 2011-06-07 14:02:37 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Functions/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) func_accountactive.c | |
Description: | AccountActive() is a function that will return 1 if there are any active channels using an accountcode. This is useful if you are writing a calling card type thing where you want to limit an account to only having one user at time. Test code: exten => 666,1,Set(CDR(accountcode)=69) exten => 666,2,Playback(tt-monkeys) exten => 669,1,NoOp(${ACCOUNTACTIVE(69)}) exten => 669,2,NoOp(${ACCOUNTACTIVE(70)}) ****** ADDITIONAL INFORMATION ****** Disclaimer on file Keep it open source pigs | ||
Comments: | By: Serge Vecher (serge-v) 2006-08-31 16:28:14 extra karma for the correct title ;) By: Justin R. Tunney (jtunney) 2006-08-31 16:29:46 sorry about the hyphen ;\ :: blushes :: By: Tilghman Lesher (tilghman) 2006-08-31 18:23:08 I must be missing something, but this case is exactly what GROUPS were created to do. There is no need for this extra function. Set(GROUP()=${EXTEN}) GotoIf($[${GROUP_COUNT()} > 1]?noidontthinkso) By: Jason Parker (jparker) 2006-09-27 11:53:43 This seems like a good idea, but I'm going to have to agree with Corydon76. This can easily be done with groups. Please contact a bug marshal if you feel that this should be reopened. |