Summary: | ASTERISK-11673: [patch] Add option to return all available channels on app_chanisavail | ||
Reporter: | Diego Aguirre (dagmoller) | Labels: | |
Date Opened: | 2008-03-18 07:18:51 | Date Closed: | 2008-05-23 16:15:34 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080522_bug12248.diff.txt ( 1) 20080522_bug12248-v2.diff.txt ( 2) app_chanisavail-backport-1.4.19-patch.txt ( 3) app_chanisavail-snv.patch-v2.txt | |
Description: | Added option 'a' that check and return all available channels, not only the first one. ****** ADDITIONAL INFORMATION ****** Executing: exten => *9999,1,ChanIsAvail(SIP/computer&SIP/cisco&SIP/infodag&ZAP/1,a) exten => *9999,n,NoOp(${AVAILCHAN}) exten => *9999,n,NoOp(${AVAILORIGCHAN}) exten => *9999,n,NoOp(${AVAILSTATUS}) exten => *9999,n,Hangup() Without option 'a' (return only the first available channel): -- Executing [*9999@default:1] ChanIsAvail("SIP/cisco-082c8cf0", "SIP/computer&SIP/cisco&SIP/infodag&ZAP/1") in new stack -- Executing [*9999@default:2] NoOp("SIP/cisco-082c8cf0", "SIP/computer-082cbea0") in new stack -- Executing [*9999@default:3] NoOp("SIP/cisco-082c8cf0", "SIP/computer") in new stack -- Executing [*9999@default:4] NoOp("SIP/cisco-082c8cf0", "0") in new stack With option 'a' (return all available channels): Executing [*9999@default:1] ChanIsAvail("SIP/cisco-082a49d0", "SIP/computer&SIP/cisco&SIP/infodag&ZAP/1,a") in new stack [Mar 18 09:07:00] WARNING[22409]: channel.c:3389 ast_request: No channel type registered for 'ZAP' -- Executing [*9999@default:2] NoOp("SIP/cisco-082a49d0", "SIP/computer-08291c68&SIP/cisco-08293ad8&SIP/infodag-082b1df8") in new stack -- Executing [*9999@default:3] NoOp("SIP/cisco-082a49d0", "SIP/computer&SIP/cisco&SIP/infodag") in new stack -- Executing [*9999@default:4] NoOp("SIP/cisco-082a49d0", "0&0&0&66") in new stack -- Executing [*9999@default:5] Hangup("SIP/cisco-082a49d0", "") in new stack | ||
Comments: | By: Caio Begotti (caio1982) 2008-03-18 07:40:34 I guess something's wrong with dagmoller's license agreement since he told me on IRC that he's indeed accepted it and marked the code checkbox when uploading these (duplicated) patches. Can somebody help him figuring out the problem? By: Joshua C. Colp (jcolp) 2008-03-18 08:18:33 The license is still pending, it has not yet been accepted. Give it time. By: Diego Aguirre (dagmoller) 2008-03-18 10:56:35 Please, remove this files: * app_chanisavail-snv.patch.txt * app_chanisavail-snv.patch By: Michiel van Baak (mvanbaak) 2008-05-22 15:15:22 Please generate the diff from the toplevel of the asterisk sources next time. This is an update patch that also puts the curly braces for every if statement in there (as discussed on #asterisk-dev when talking about the coding guidelines) By: Michiel van Baak (mvanbaak) 2008-05-22 16:12:33 new version that uses the ast_str_* api. Is this correct ? By: Russell Bryant (russell) 2008-05-23 07:07:05 One last suggestion ... + if (tmp_availchan->used) { + ast_str_append(&tmp_availchan, 0, "%s", "&"); + } + ast_str_append(&tmp_availchan, 0, "%s", tempchan->name); This could be .... ast_str_append(&tmp_availchan, 0, "%s%s", tmp_availchan->used ? "&" : "", tempchan->name); By: Digium Subversion (svnbot) 2008-05-23 12:05:57 Repository: asterisk Revision: 118101 U trunk/CHANGES U trunk/apps/app_chanisavail.c ------------------------------------------------------------------------ r118101 | mvanbaak | 2008-05-23 12:05:57 -0500 (Fri, 23 May 2008) | 15 lines add option 'a' to chanisavail. If you give chanisavail a list of channels, it will only return the first available channel. When this option is set, it will return all the available channels from the given list. (closes issue ASTERISK-11673) Reported by: dagmoller Patches: app_chanisavail-snv.patch-v2.txt uploaded by dagmoller (license 436) - major changes by me because russellb pointed out some buffer overflows and codeguideline issues. Converted it all to the ast_str_* api Tested by: dagmoller, mvanbaak ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=118101 By: Digium Subversion (svnbot) 2008-05-23 12:07:25 Repository: asterisk Revision: 118102 _U branches/1.6.0/ ------------------------------------------------------------------------ r118102 | mvanbaak | 2008-05-23 12:07:24 -0500 (Fri, 23 May 2008) | 22 lines Blocked revisions 118101 via svnmerge ........ r118101 | mvanbaak | 2008-05-23 19:12:04 +0200 (Fri, 23 May 2008) | 15 lines add option 'a' to chanisavail. If you give chanisavail a list of channels, it will only return the first available channel. When this option is set, it will return all the available channels from the given list. (closes issue ASTERISK-11673) Reported by: dagmoller Patches: app_chanisavail-snv.patch-v2.txt uploaded by dagmoller (license 436) - major changes by me because russellb pointed out some buffer overflows and codeguideline issues. Converted it all to the ast_str_* api Tested by: dagmoller, mvanbaak ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=118102 By: Digium Subversion (svnbot) 2008-05-23 16:15:34 Repository: asterisk Revision: 118162 _U team/seanbright/resolve-shadow-warnings/ U team/seanbright/resolve-shadow-warnings/CHANGES U team/seanbright/resolve-shadow-warnings/apps/app_chanisavail.c U team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c U team/seanbright/resolve-shadow-warnings/channels/chan_gtalk.c U team/seanbright/resolve-shadow-warnings/channels/chan_usbradio.c U team/seanbright/resolve-shadow-warnings/channels/chan_vpb.cc A team/seanbright/resolve-shadow-warnings/configs/pbx_realtime.conf A team/seanbright/resolve-shadow-warnings/doc/cli.txt U team/seanbright/resolve-shadow-warnings/include/asterisk/utils.h U team/seanbright/resolve-shadow-warnings/main/utils.c U team/seanbright/resolve-shadow-warnings/pbx/pbx_realtime.c U team/seanbright/resolve-shadow-warnings/res/res_jabber.c U team/seanbright/resolve-shadow-warnings/res/res_odbc.c ------------------------------------------------------------------------ r118162 | seanbright | 2008-05-23 16:15:24 -0500 (Fri, 23 May 2008) | 127 lines Merged revisions 117983,117986,117988,118020,118049,118053,118059,118101,118129,118157,118159 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r117983 | tilghman | 2008-05-22 17:27:00 -0400 (Thu, 22 May 2008) | 2 lines Fix trunk breakage ................ r117986 | tilghman | 2008-05-22 17:42:50 -0400 (Thu, 22 May 2008) | 2 lines Add a compatibility option for upgrading realtime extensions ................ r117988 | seanbright | 2008-05-22 17:43:54 -0400 (Thu, 22 May 2008) | 1 line Split the compile flags out and wire up some dependencies ................ r118020 | phsultan | 2008-05-23 06:33:21 -0400 (Fri, 23 May 2008) | 15 lines - remove whitespaces between tags in received XML packets before giving them to the parser ; - report Gtalk error messages from a buddy to the console. This patch makes Asterisk "Google Jingle" (chan_gtalk) implementation work with Empathy. Note that this is only true for audio streams, not video. Thank you to PH for his great help! (closes issue ASTERISK-12017) Reported by: PH Patches: trunk-12647-1.diff uploaded by phsultan (license 73) Tested by: phsultan, PH ................ r118049 | russell | 2008-05-23 08:37:31 -0400 (Fri, 23 May 2008) | 17 lines Merged revisions 118048 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r118048 | russell | 2008-05-23 07:30:53 -0500 (Fri, 23 May 2008) | 9 lines Don't declare a function that takes variable arguments as inline, because it's not valid, and on some compilers, will emit a warning. http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline (closes issue ASTERISK-11712) Reported by: francesco_r Patches by Tilghman, final patch by me ........ ................ r118053 | tilghman | 2008-05-23 09:00:10 -0400 (Fri, 23 May 2008) | 11 lines Merged revisions 118052 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r118052 | tilghman | 2008-05-23 07:59:16 -0500 (Fri, 23 May 2008) | 3 lines Add information on using the Asterisk console, including tab command line completion. (Closes issue ASTERISK-12044) ........ ................ r118059 | tilghman | 2008-05-23 09:20:13 -0400 (Fri, 23 May 2008) | 9 lines Blocked revisions 118055 via svnmerge ........ r118055 | tilghman | 2008-05-23 08:18:44 -0500 (Fri, 23 May 2008) | 2 lines Add format type checking for recently de-inlined function ........ ................ r118101 | mvanbaak | 2008-05-23 13:12:04 -0400 (Fri, 23 May 2008) | 15 lines add option 'a' to chanisavail. If you give chanisavail a list of channels, it will only return the first available channel. When this option is set, it will return all the available channels from the given list. (closes issue ASTERISK-11673) Reported by: dagmoller Patches: app_chanisavail-snv.patch-v2.txt uploaded by dagmoller (license 436) - major changes by me because russellb pointed out some buffer overflows and codeguideline issues. Converted it all to the ast_str_* api Tested by: dagmoller, mvanbaak ................ r118129 | tilghman | 2008-05-23 14:09:14 -0400 (Fri, 23 May 2008) | 3 lines Protect the object from changing while the 'odbc show' CLI command is running (Closes issue ASTERISK-12065) ................ r118157 | mmichelson | 2008-05-23 15:57:40 -0400 (Fri, 23 May 2008) | 10 lines Use a deep copy on strings that come from ast_events. Otherwise it is likely that after the event is freed, we no longer refer to valid memory. (closes issue ASTERISK-12073) Reported by: tomo1657 Patches: 12712.patch uploaded by putnopvut (license 60) Tested by: tomo1657 ................ r118159 | mmichelson | 2008-05-23 16:55:02 -0400 (Fri, 23 May 2008) | 4 lines Get rid of warnings for those silly compilers which warn when freeing a const pointer ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=118162 |