aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-27Merged revisions 243487 via svnmerge from mmichelson1-2/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r243487 | mmichelson | 2010-01-27 12:08:02 -0600 (Wed, 27 Jan 2010) | 9 lines Merged revisions 243486 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r243486 | mmichelson | 2010-01-27 12:06:43 -0600 (Wed, 27 Jan 2010) | 3 lines Use a safe list traversal while checking for duplicate vars in pbx_builtin_setvar_helper. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@243489 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-20Update CDR variables as pbx startsalecdavis1-0/+4
Allows CDR variables added in cdr.c:set_one_cid to become visable during the call, by executing ast_cdr_update() early in __ast_pbx_run. Based on cdr_update.diff3.txt (issue #16638) Reported by: alecdavis Patches: cdr_update.diff3.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@241456 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-19Merged revisions 241366 via svnmerge from jpeeler1-1/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r241366 | jpeeler | 2010-01-19 16:59:53 -0600 (Tue, 19 Jan 2010) | 13 lines Initialize data on the stack so that Park doesn't interpret random arguments. passdata was only being set in pbx_substitue_variables when arguments were passed. (closes issue #16406) (closes issue #16586) Reported by: DLNoah Patches: bug16586v2.patch uploaded by jpeeler (license 325) Tested by: DLNoah ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@241368 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-17Merged revisions 240717 via svnmerge from seanbright1-1/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r240717 | seanbright | 2010-01-17 14:45:48 -0500 (Sun, 17 Jan 2010) | 5 lines Avoid a crash on Solaris when running 'core show functions.' (closes issue #16309) Reported by: asgaroth ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@240719 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-14Merged revisions 240175 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r240175 | tilghman | 2010-01-14 11:34:53 -0600 (Thu, 14 Jan 2010) | 2 lines Similarly, ensure that matchcid is duplicated correctly when merging contexts. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@240177 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-14Merged revisions 240129 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r240129 | tilghman | 2010-01-14 10:52:22 -0600 (Thu, 14 Jan 2010) | 4 lines Ensure that the callerid is NULL when the parent is effectively NULL. This applies only to pattern-match hints, which create exact-match hints on the fly. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@240131 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-12Merged revisions 239571 via svnmerge from tilghman1-1/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r239571 | tilghman | 2010-01-12 13:58:00 -0600 (Tue, 12 Jan 2010) | 5 lines Blank callerid and NULL callerid should not compare equal. The second is the default state for matching CID in the dialplan (no matching) while the first matches one particular CallerID. This is a regression. (fixes AST-314, SWP-611) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@239574 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05Merged revisions 237839 via svnmerge from dvossel1-3/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r237839 | dvossel | 2010-01-05 13:29:47 -0600 (Tue, 05 Jan 2010) | 19 lines fixes subscriptions being lost after 'module reload' During a module reload if multiple extension configs are present, such as both extensions.conf and extensions.ael, watchers for one config's hints will be lost during the merging of the other config. This happens because hint watchers are only preserved for the current config being merged. The old context list is destroyed after the merging takes place, meaning any watchers that were not perserved will be removed. Now all hints are preserved during merging regardless of what config file is being merged. These hints are only restored if they are present within the new context list. (closes issue #16093) Reported by: jlaroff ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@237841 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Merged revisions 237494 via svnmerge from tilghman1-22/+20
https://origsvn.digium.com/svn/asterisk/trunk ................ r237494 | tilghman | 2010-01-04 14:59:01 -0600 (Mon, 04 Jan 2010) | 15 lines Merged revisions 237493 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r237493 | tilghman | 2010-01-04 14:57:35 -0600 (Mon, 04 Jan 2010) | 8 lines Regression in issue #15421 - Pattern matching (closes issue #16482) Reported by: wdoekes Patches: astsvn-16482-betterfix.diff uploaded by wdoekes (license 717) 20091223__issue16482.diff.txt uploaded by tilghman (license 14) Tested by: wdoekes, tilghman ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@237496 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Merged revisions 237406 via svnmerge from tilghman1-1/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r237406 | tilghman | 2010-01-04 12:28:28 -0600 (Mon, 04 Jan 2010) | 23 lines Merged revisions 237405 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r237405 | tilghman | 2010-01-04 12:19:00 -0600 (Mon, 04 Jan 2010) | 16 lines Add a flag to disable the Background behavior, for AGI users. This is in a section of code that relates to two other issues, namely issue #14011 and issue #14940), one of which was the behavior of Background when called with a context argument that matched the current context. This fix broke FreePBX, however, in a post-Dial situation. Needless to say, this is an extremely difficult collision of several different issues. While the use of an exception flag is ugly, fixing all of the issues linked is rather difficult (although if someone would like to propose a better solution, we're happy to entertain that suggestion). (closes issue #16434) Reported by: rickead2000 Patches: 20091217__issue16434.diff.txt uploaded by tilghman (license 14) 20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14) Tested by: rickead2000 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@237408 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-17Merged revisions 235422 via svnmerge from tilghman1-3/+13
https://origsvn.digium.com/svn/asterisk/trunk ................ r235422 | tilghman | 2009-12-17 11:19:08 -0600 (Thu, 17 Dec 2009) | 15 lines Merged revisions 235421 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r235421 | tilghman | 2009-12-17 11:17:51 -0600 (Thu, 17 Dec 2009) | 8 lines Use context from which Macro is executed, not macro context, if applicable. Also, ensure that the extension COULD match, not just that it won't match more. (closes issue #16113) Reported by: OrNix Patches: 20091216__issue16113.diff.txt uploaded by tilghman (license 14) Tested by: OrNix ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@235424 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01Merged revisions 231867 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r231867 | dvossel | 2009-12-01 15:20:19 -0600 (Tue, 01 Dec 2009) | 9 lines Merged revisions 231853 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r231853 | dvossel | 2009-12-01 15:14:31 -0600 (Tue, 01 Dec 2009) | 3 lines WaitExten m option with no parameters generates frame with zero datalen but non-null data ptr ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@231876 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-11Merged revisions 229499 via svnmerge from dbrooks1-4/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r229499 | dbrooks | 2009-11-11 13:48:18 -0600 (Wed, 11 Nov 2009) | 15 lines Merged revisions 229498 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r229498 | dbrooks | 2009-11-11 13:46:19 -0600 (Wed, 11 Nov 2009) | 8 lines Solaris doesn't like NULL going to ast_log Solaris will crash if NULL is passed to ast_log. This simple patch simply uses S_OR to get around this. (closes issue #15392) Reported by: yrashk ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@229501 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-10Merged revisions 229361 via svnmerge from tilghman1-18/+36
https://origsvn.digium.com/svn/asterisk/trunk ................ r229361 | tilghman | 2009-11-10 16:14:22 -0600 (Tue, 10 Nov 2009) | 19 lines Merged revisions 229360 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r229360 | tilghman | 2009-11-10 16:09:16 -0600 (Tue, 10 Nov 2009) | 12 lines If two pattern classes start with the same digit and have the same number of characters, they will compare equal. The example given in the issue report is that of [234] and [246], which have these characteristics, yet they are clearly not equivalent. The code still uses these two characteristics, yet when the two scores compare equal, an additional check will be done to compare all characters within the class to verify equality. (closes issue #15421) Reported by: jsmith Patches: 20091109__issue15421__2.diff.txt uploaded by tilghman (license 14) Tested by: jsmith, thedavidfactor ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@229364 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-22Merged revisions 225360 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r225360 | tilghman | 2009-10-22 12:11:23 -0500 (Thu, 22 Oct 2009) | 11 lines Merged revisions 225105 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r225105 | tilghman | 2009-10-21 11:02:12 -0500 (Wed, 21 Oct 2009) | 4 lines Fix documentation for ast_softhangup() and correct the misuse thereof. (closes issue #16103) Reported by: majorbloodnok ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@225362 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-24Merged revisions 220289 via svnmerge from tilghman1-2/+0
https://origsvn.digium.com/svn/asterisk/trunk ................ r220289 | tilghman | 2009-09-24 14:41:02 -0500 (Thu, 24 Sep 2009) | 13 lines Merged revisions 220288 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r220288 | tilghman | 2009-09-24 14:39:41 -0500 (Thu, 24 Sep 2009) | 6 lines Implicitly sending a progress signal breaks some applications. Call Progress() in your dialplan if you explicitly want progress to be sent. (Reverts change 216430, closes issue #15957) Reported by: Pavel Troller on the Asterisk-Dev mailing list http://lists.digium.com/pipermail/asterisk-dev/2009-September/039897.html ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@220291 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-16Merged revisions 218868 via svnmerge from dbrooks1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r218868 | dbrooks | 2009-09-16 13:06:42 -0500 (Wed, 16 Sep 2009) | 20 lines Merged revisions 218867 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r218867 | dbrooks | 2009-09-16 13:00:45 -0500 (Wed, 16 Sep 2009) | 13 lines Fixes CID pattern matching behavior to mirror that of extension pattern matching. Pattern matching for extensions uses a type of scoring system, giving values for specificity to each character in the pattern. Unfortunately, this is done character by character, in order. This does lead to some less specific patterns being first in line for matching, but it will usually get the job done. This patch merely brings CID matching to the same level as extension matching. This patch does not attempt to tackle the problem shared by extension matching. (closes issue #14708) Reported by: klaus3000 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@218890 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-11Merged revisions 218050 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r218050 | tilghman | 2009-09-11 00:58:11 -0500 (Fri, 11 Sep 2009) | 3 lines Check the origination priority for more matches, not the current priority. Found by Pavel Troller on the -dev list. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@218054 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-07Merged revisions 216438 via svnmerge from oej1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r216438 | oej | 2009-09-04 16:02:34 +0200 (Fre, 04 Sep 2009) | 35 lines Merged revisions 216430 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r216430 | oej | 2009-09-04 15:45:48 +0200 (Fre, 04 Sep 2009) | 27 lines Make apps send PROGRESS control frame for early media and fix too early media issue in SIP The issue at hand is that some legacy (dying) PBX systems send empty media frames on PRI links *before* any call progress. The SIP channel receives these frames and by default signals 183 Session progress and starts sending media. This will cause phones to play silence and ignore the later 180 ringing message. A bad user experience. The fix is twofold: - We discovered that asterisk apps that support early media ("noanswer") did not send any PROGRESS frame to indicate early media. Fixed. - We introduce a setting in chan_sip so that users can disable any relay of media frames before the outbound channel actually indicates any sort of call progress. In 1.4, 1.6.0 and 1.6.1, this will be disabled for backward compatibility. In later versions of Asterisk, this will be enabled. We don't assume that it will change your Asterisk phone experience - only for the better. We encourage third-party application developers to make sure that if they have applications that wants to send early media, add a PROGRESS control frame transmission to make sure that all channel drivers actually will start sending early media. This has not been the default in Asterisk previous to this patch, so if you got inspiration from our code, you need to update accordingly. Sorry for the trouble and thanks for your support. This code has been running for a few months in a large scale installation (over 250 servers with PRI and/or BRI links to old PBX systems). That's no proof that this is an excellent patch, but, well, it's tested :-) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@216646 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-04Merged revisions 216547 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r216547 | tilghman | 2009-09-04 12:31:44 -0500 (Fri, 04 Sep 2009) | 3 lines Enable turning off the application delimiter warning with the 'dontwarn' option. Suggested on the -dev list, and implemented in an alternate way by me. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@216549 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-25Merged revisions 213971 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r213971 | tilghman | 2009-08-25 01:35:37 -0500 (Tue, 25 Aug 2009) | 14 lines Merged revisions 213970 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r213970 | tilghman | 2009-08-25 01:34:44 -0500 (Tue, 25 Aug 2009) | 7 lines Improve error message by informing user exactly which function is missing a parethesis. (closes issue #15242) Reported by: Nick_Lewis Patches: pbx.c-funcparenthesis.patch2 uploaded by dbrooks (license 790) pbx.c-funcparenthesis-1.4.diff uploaded by loloski (license 68) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@213973 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-7/+7
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@211569 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-08Merged revisions 205412 via svnmerge from dvossel1-0/+26
https://origsvn.digium.com/svn/asterisk/trunk ................ r205412 | dvossel | 2009-07-08 17:15:06 -0500 (Wed, 08 Jul 2009) | 12 lines Merged revisions 205409 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r205409 | dvossel | 2009-07-08 16:35:12 -0500 (Wed, 08 Jul 2009) | 6 lines moving ast_devstate_to_extenstate to pbx.c from devicestate.c ast_devstate_to_extenstate belongs in pbx.c. This change fixes a compile time error with chan_vpb as well. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@205414 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-02Merged revisions 204710 via svnmerge from dvossel1-24/+34
https://origsvn.digium.com/svn/asterisk/trunk ................ r204710 | dvossel | 2009-07-02 11:03:44 -0500 (Thu, 02 Jul 2009) | 21 lines Merged revisions 204681 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r204681 | dvossel | 2009-07-02 10:05:57 -0500 (Thu, 02 Jul 2009) | 14 lines Improved mapping of extension states from combined device states. This fixes a few issues with incorrect extension states and adds a cli command, core show device2extenstate, to display all possible state mappings. (closes issue #15413) Reported by: legart Patches: exten_helper.diff uploaded by dvossel (license 671) Tested by: dvossel, legart, amilcar Review: https://reviewboard.asterisk.org/r/301/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@204736 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26Merged revisions 203702 via svnmerge from russell1-3/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r203702 | russell | 2009-06-26 14:31:14 -0500 (Fri, 26 Jun 2009) | 5 lines Make invalid hints report Unavailable instead of Idle. (closes issue #14413) Reported by: pj ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@203704 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-10Fixes the argument order in definition of new_find_extension().dbrooks1-1/+1
In the definition of new_find_extension(), the arguments 'callerid' and 'label' were swapped. The prototype declaration and all calls to the function are ordered 'callerid' then 'label', but the function itself was ordered 'label' then 'callerid'. (closes issue #15303) Reported by: JimDickenson git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@199996 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-18Merged revisions 195162 via svnmerge from eliel1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r195162 | eliel | 2009-05-18 10:45:23 -0400 (Mon, 18 May 2009) | 9 lines Warn about the use of the application WaitExten() within a Macro(). Update applications documentation to warn the user about the use of the WaitExten() application within a Macro(). Recommend the use of Read() instead. (closes issue #14444) Reported by: ewieling ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@195167 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-13Merged revisions 194138 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r194138 | tilghman | 2009-05-12 19:52:49 -0500 (Tue, 12 May 2009) | 14 lines Merged revisions 194137 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r194137 | tilghman | 2009-05-12 19:52:03 -0500 (Tue, 12 May 2009) | 7 lines Fix logic for how to proceed with a single digit extension. (closes issue #15091) Reported by: andrew Patches: 20090512__issue15091.diff.txt uploaded by tilghman (license 14) Tested by: andrew ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@194140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-07Merged revisions 193120 via svnmerge from tilghman1-2/+17
https://origsvn.digium.com/svn/asterisk/trunk ................ r193120 | tilghman | 2009-05-07 18:42:28 -0500 (Thu, 07 May 2009) | 26 lines Merged revisions 193119 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193119 | tilghman | 2009-05-07 18:41:11 -0500 (Thu, 07 May 2009) | 19 lines Fix Background within a Macro for FreePBX. If the single digit DTMF is an extension in the specified context, then go there and signal no DTMF. Otherwise, we should exit with that DTMF. If we're in Macro, we'll exit and seek that DTMF as the beginning of an extension in the Macro's calling context. If we're not in Macro, then we'll simply seek that extension in the calling context. Previously, someone complained about the behavior as it related to the interior of a Gosub routine, and the fix (#14011) inadvertently broke FreePBX (#14940). This change should fix both of these situations, but with the possible incompatibility that if a single digit extension does not exist (but a longer extension COULD have matched), it would have previously gone immediately to the "i" extension, but will now need to wait for a timeout. (closes issue #14940) Reported by: p_lindheimer Patches: 20090420__bug14940.diff.txt uploaded by tilghman (license 14) Tested by: p_lindheimer ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@193122 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-27Merged revisions 190726 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r190726 | tilghman | 2009-04-27 14:34:48 -0500 (Mon, 27 Apr 2009) | 4 lines Don't warn on pipe in the System call. (closes issue #14979) Reported by: pj ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@190728 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-23Merged revisions 190352 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r190352 | tilghman | 2009-04-23 15:42:11 -0500 (Thu, 23 Apr 2009) | 7 lines Labels are sometimes (most of the time?) NULL for extensions. (closes issue #14895) Reported by: chris-mac Patches: 20090423__bug14895__2.diff.txt uploaded by tilghman (license 14) Tested by: lmadsen ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@190354 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17Merged revisions 189010 via svnmerge from mnicholson1-1/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r189010 | mnicholson | 2009-04-17 10:44:18 -0500 (Fri, 17 Apr 2009) | 12 lines Merged revisions 189009 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r189009 | mnicholson | 2009-04-17 10:43:09 -0500 (Fri, 17 Apr 2009) | 5 lines Make Busy() application set the CDR disposition to BUSY. (closes issue #14306) Reported by: cristiandimache ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@189069 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14Merged revisions 188210 via svnmerge from tilghman1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r188210 | tilghman | 2009-04-14 00:45:13 -0500 (Tue, 14 Apr 2009) | 2 lines As suggested by Russell, warn users when their dialplan arguments contain pipes, but not commas. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@188212 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10Merged revisions 187599 via svnmerge from tilghman1-3/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r187599 | tilghman | 2009-04-09 22:55:27 -0500 (Thu, 09 Apr 2009) | 2 lines Modify headers and macros, according to Russell's suggestions on the -dev list ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@187600 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184630 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r184630 | russell | 2009-03-27 09:00:18 -0500 (Fri, 27 Mar 2009) | 2 lines Change g_eid to ast_eid_default. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@184631 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20Merged revisions 177787 via svnmerge from tilghman1-11/+11
https://origsvn.digium.com/svn/asterisk/trunk ................ r177787 | tilghman | 2009-02-20 17:02:35 -0600 (Fri, 20 Feb 2009) | 16 lines Merged revisions 177786 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r177786 | tilghman | 2009-02-20 16:59:52 -0600 (Fri, 20 Feb 2009) | 9 lines Don't print the CR-NL combination when we aren't outputting to the manager. An embedded CR-NL in a CLI command screws up several AMI parsers that don't expect to see that combination in the middle of output. (Closes issue #14305) Reported by: martins Patch by: tilghman ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@177789 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18Merged revisions 176943 via svnmerge from murf1-17/+110
https://origsvn.digium.com/svn/asterisk/trunk ........ r176943 | murf | 2009-02-18 08:35:26 -0700 (Wed, 18 Feb 2009) | 45 lines This patch fixes merge_contexts_and_delete so it does not deadlock when hints are present. Reason: when I re-engineered the merge_and_delete func to reduce its lock time, I failed to notice that the functions it calls still also do locking as before. This leads to deadlocks on dialplan reloads, when there are actually living, subscribed hints registered in the system. While the reporter come across this problem while using AEL, I might note that these deadlocks should also happen if extensions.conf were used. Here I added these routines to pbx.c: ast_add_extension_nolock add_pri_lockopt ast_add_extension2_lockopt find_context add_hint_nolock All of the above routines are static and restricted to be used only within pbx.c, and more specifically within the merge_contexts_and_delete routine. They are pretty much the same as their counterparts except they don't lock contexts or hints. Most of them now do the real work of their name-alike, with optional locking via extra arguments, and are called by their name-alike. The goal was to have the original functions so they would behave exactly as before. Both PJ and I tested these fixes, and the deadlocking problem is no longer encountered. (closes issue #14357) Reported by: pj Patches: 14357.diff uploaded by murf (license 17) Tested by: pj, murf ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@176946 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18Merged revisions 176901 via svnmerge from russell1-8/+15
https://origsvn.digium.com/svn/asterisk/trunk ........ r176901 | russell | 2009-02-18 00:00:40 -0600 (Wed, 18 Feb 2009) | 9 lines Fix a number of incorrect uses of strncpy(). The big problem here is that the 3rd argument provided in these uses of strncpy() did not reserve a byte for the null terminator, leaving the potential for writing one byte past the end of the buffer. Aside from this, there were coding guidelines violations with regards to spacing, as well as hard coded lengths being used instead of sizeof(). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@176903 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17Merged revisions 176557 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r176557 | russell | 2009-02-17 11:33:38 -0600 (Tue, 17 Feb 2009) | 12 lines Fix a race condition that caused device states to become incorrect for hints. The problem here is that the hint processing code was subscribed to the wrong event type. So, it started processing state for a hint too soon, before the device state cache had been updated. Also, fix a similar bug in app_queue, as it was also subscribed to the wrong event type. (closes issue #14461) Reported by: alecdavis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@176559 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11Merged revisions 174945 via svnmerge from mmichelson1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r174945 | mmichelson | 2009-02-11 16:41:01 -0600 (Wed, 11 Feb 2009) | 29 lines Fix 'd' option for app_dial and add new option to Answer application The 'd' option would not work for channel types which use RTP to transport DTMF digits. The only way to allow for this to work was to answer the channel if we saw that this option was enabled. I realized that this may cause issues with CDRs, specifically with giving false dispositions and answer times. I therefore modified ast_answer to take another parameter which would tell if the CDR should be marked answered. I also extended this to the Answer application so that the channel may be answered but not CDRified if desired. I also modified app_dictate and app_waitforsilence to only answer the channel if it is not already up, to help not allow for faulty CDR answer times. All of these changes are going into Asterisk trunk. For 1.6.0 and 1.6.1, however, all the changes except for the change to the Answer application will go in since we do not introduce new features into stable branches (closes issue #14164) Reported by: DennisD Patches: 14164.patch uploaded by putnopvut (license 60) Tested by: putnopvut Review: http://reviewboard.digium.com/r/145 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@174947 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Merged revisions 173311 via svnmerge from tilghman1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r173311 | tilghman | 2009-02-03 18:43:52 -0600 (Tue, 03 Feb 2009) | 10 lines Ensure that commas placed in the middle of extension character classes do not interfere with correct parsing of the extension. Also, if an unterminated character class DOES make its way into the pbx core (through some other method), ensure that it does not crash Asterisk. (closes issue #14362) Reported by: Nick_Lewis Patches: 20090129__bug14362.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@173313 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-28Merged revisions 172063 via svnmerge from murf1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r172063 | murf | 2009-01-28 13:31:06 -0700 (Wed, 28 Jan 2009) | 52 lines Merged revisions 172030 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r172030 | murf | 2009-01-28 11:51:16 -0700 (Wed, 28 Jan 2009) | 46 lines This patch fixes h-exten running misbehavior in manager-redirected situations. What it does: 1. A new Flag value is defined in include/asterisk/channel.h, AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the bridge hangup exten code not to run the h-exten there (nor publish the bridge cdr there). It will done at the pbx-loop level instead. 2. In the manager Redirect code, I set this flag on the channel if the channel has a non-null pbx pointer. I did the same for the second (chan2) channel, which gets run if name2 is set... and the first succeeds. 3. I restored the ending of the cdr for the pbx loop h-exten running code. Don't know why it was removed in the first place. 4. The first attempt at the fix for this bug was to place code directly in the async_goto routine, which was called from a large number of places, and could affect a large number of cases, so I tested that fix against a fair number of transfer scenarios, both with and without the patch. In the process, I saw that putting the fix in async_goto seemed not to affect any of the blind or attended scenarios, but still, I was was highly concerned that some other scenarios I had not tested might be negatively impacted, so I refined the patch to its current scope, and jmls tested both. In the process, tho, I saw that blind xfers in one situation, when the one-touch blind-xfer feature is used by the peer, we got strange h-exten behavior. So, I inserted code to swap CDRs and to set the HANGUP_DONT field, to get uniform behavior. 5. I added code to the bridge to obey the HANGUP_DONT flag, skipping both publishing the bridge CDR, and running the h-exten; they will be done at the pbx-loop (higher) level instead. 6. I removed all the debug logs from the patch before committing. 7. I moved the AUTOLOOP set/reset in the h-exten code in res_features so it's only done if the h-exten is going to be run. A very minor performance improvement, but technically correct. (closes issue #14241) Reported by: jmls Patches: 14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17) Tested by: murf, jmls ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@172067 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22Merged revisions 170051 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r170051 | file | 2009-01-22 11:14:50 -0400 (Thu, 22 Jan 2009) | 13 lines Merged revisions 170050 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r170050 | file | 2009-01-22 11:13:56 -0400 (Thu, 22 Jan 2009) | 6 lines Do a string comparison instead of pointer comparison since some people specify the context they are actually in as an argument to get around some funkiness. (closes issue #14011) Reported by: dveiga Patches: pbx.c.patch uploaded by dveiga (license 665) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@170053 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-21Merged revisions 169869 via svnmerge from file1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r169869 | file | 2009-01-21 19:25:27 -0400 (Wed, 21 Jan 2009) | 11 lines Merged revisions 169867 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r169867 | file | 2009-01-21 19:20:47 -0400 (Wed, 21 Jan 2009) | 4 lines Read lock the contexts to maintain the locking order when we are notified that the state of a device has changed. (closes issue #13839) Reported by: mcallist ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@169871 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13Merged revisions 168562 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r168562 | russell | 2009-01-13 13:22:13 -0600 (Tue, 13 Jan 2009) | 10 lines Merged revisions 168561 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines Revert unnecessary indications API change from rev 122314 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@168565 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-24Merged revisions 166665 via svnmerge from murf1-4/+0
https://origsvn.digium.com/svn/asterisk/trunk This merged from trunk with no conflicts. I tested mostly the 'tired' cases, and for the most part ignored the tests for reconnecting and dialing in to fetch a parked call, after the first case. ................ r166665 | murf | 2008-12-23 11:13:49 -0700 (Tue, 23 Dec 2008) | 153 lines Merged revisions 166093 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 In order to merge this 1.4 patch into trunk, I had to resolve some conflicts and wait for Russell to make some changes to res_agi. I re-ran all the tests; 39 calls in all, and made fairly careful notes and comparisons: I don't want this to blow up some aspect of asterisk; I completely removed the KEEPALIVE from the pbx.h decls. The first 3 scenarios involving feature park; feature xfer to 700; hookflash park to Park() app call all behave the same, don't appear to leave hung channels, and no crashes. ........ r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines This merges the masqpark branch into 1.4 These changes eliminate the need for (and use of) the KEEPALIVE return code in res_features.c; There are other places that use this result code for similar purposes at a higher level, these appear to be left alone in 1.4, but attacked in trunk. The reason these changes are being made in 1.4, is that parking ends a channel's life, in some situations, and the code in the bridge (and some other places), was not checking the result code properly, and dereferencing the channel pointer, which could lead to memory corruption and crashes. Calling the masq_park function eliminates this danger in higher levels. A series of previous commits have replaced some parking calls with masq_park, but this patch puts them ALL to rest, (except one, purposely left alone because a masquerade is done anyway), and gets rid of the code that tests the KEEPALIVE result, and the NOHANGUP_PEER result codes. While bug 13820 inspired this work, this patch does not solve all the problems mentioned there. I have tested this patch (again) to make sure I have not introduced regressions. Crashes that occurred when a parked party hung up while the parking party was listening to the numbers of the parking stall being assigned, is eliminated. These are the cases where parking code may be activated: 1. Feature one touch (eg. *3) 2. Feature blind xfer to parking lot (eg ##700) 3. Run Park() app from dialplan (eg sip xfer to 700) (eg. dahdi hookflash xfer to 700) 4. Run Park via manager. The interesting testing cases for parking are: I. A calls B, A parks B a. B hangs up while A is getting the numbers announced. b. B hangs up after A gets the announcement, but before the parking time expires c. B waits, time expires, A is redialed, A answers, B and A are connected, after which, B hangs up. d. C picks up B while still in parking lot. II. A calls B, B parks A a. A hangs up while B is getting the numbers announced. b. A hangs up after B gets the announcement, but before the parking time expires c. A waits, time expires, B is redialed, B answers, A and B are connected, after which, A hangs up. d. C picks up A while still in parking lot. Testing this throroughly involves acting all the permutations of I and II, in situations 1,2,3, and 4. Since I added a few more changes (ALL references to KEEPALIVE in the bridge code eliimated (I missed one earlier), I retested most of the above cases, and no crashes. H-extension weirdness. Current h-extension execution is not completely correct for several of the cases. For the case where A calls B, and A parks B, the 'h' exten is run on A's channel as soon as the park is accomplished. This is expected behavior. But when A calls B, and B parks A, this will be current behavior: After B parks A, B is hung up by the system, and the 'h' (hangup) exten gets run, but the channel mentioned will be a derivative of A's... Thus, if A is DAHDI/1, and B is DAHDI/2, the h-extension will be run on channel Parked/DAHDI/1-1<ZOMBIE>, and the start/answer/end info will be those relating to Channel A. And, in the case where A is reconnected to B after the park time expires, when both parties hang up after the joyful reunion, no h-exten will be run at all. In the case where C picks up A from the parking lot, when either A or C hang up, the h-exten will be run for the C channel. CDR's are a separate issue, and not addressed here. As to WHY this strange behavior occurs, the answer lies in the procedure followed to accomplish handing over the channel to the parking manager thread. This procedure is called masquerading. In the process, a duplicate copy of the channel is created, and most of the active data is given to the new copy. The original channel gets its name changed to XXX<ZOMBIE> and keeps the PBX information for the sake of the original thread (preserving its role as a call originator, if it had this role to begin with), while the new channel is without this info and becomes a call target (a "peer"). In this case, the parking lot manager thread is handed the new (masqueraded) channel. It will not run an h-exten on the channel if it hangs up while in the parking lot. The h exten will be run on the original channel instead, in the original thread, after the bridge completes. See bug 13820 for our intentions as to how to clean up the h exten behavior. Review: http://reviewboard.digium.com/r/29/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@166730 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Merged revisions 165723 via svnmerge from russell1-22/+27
https://origsvn.digium.com/svn/asterisk/trunk ........ r165723 | russell | 2008-12-18 13:33:42 -0600 (Thu, 18 Dec 2008) | 14 lines Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial. This is part of an effort to completely remove AST_PBX_KEEPALIVE and other similar return codes from the source. While this usage was perfectly safe, there are others that are problematic. Since we know ahead of time that we do not want to PBX to destroy the channel, the PBX API has been changed so that information can be provided as an argument, instead, thus removing the need for the KEEPALIVE return value. Further changes to get rid of KEEPALIVE and related code is being done by murf. There is a patch up for that on review 29. Review: http://reviewboard.digium.com/r/98/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@165728 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Merged revisions 164801 via svnmerge from murf1-6/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r164801 | murf | 2008-12-16 13:04:46 -0700 (Tue, 16 Dec 2008) | 36 lines (closes issue #14076) Reported by: toc Tested by: murf OK, Well this issue has had its share of flip-flopping. I found the following: 1. the code in question, in ext_cmp1 in pbx.c, would not allow two extensions that vary only by any dashes contained within them, to be defined in the same context. 2. for input dialstrings, dashes are NOT ignored. So, skipping them when sorting patterns seemed a bit silly. Thus, you might declare ext 891 in a context, but if you try dialing 8-9-1, it will NOT match 891. So, I proposed to remove the code from ext_cmp1 to skip the spaces and dashes. Just kept us from declaring 891 and 8-9-1 in the same context, forcing users to generate otherwise uselessly obfuscated dialplan code to get the same effect. Then, I tried out 1.4, and found that: 1. you can declare 891 and 8-9-1 in the same context! 2. You can't define 891, and have 8-9-1 match it! Nor can you define 8-9-1, and have 891 match it! So, it appears that my proposal simply restores the pbx to behaving as it did in 1.4. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@164805 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Merged revisions 164648 via svnmerge from murf1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r164648 | murf | 2008-12-16 08:31:54 -0700 (Tue, 16 Dec 2008) | 13 lines Merged revisions 164634 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164634 | murf | 2008-12-16 08:15:58 -0700 (Tue, 16 Dec 2008) | 5 lines I added a sentence to clarify why - and ' ' are ignored in patterns as per bug 14076. Leif says he'll put some stuff about it in the extensions.conf sample, etc. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@164658 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-10Merged revisions 162922,162930 via svnmerge from tilghman1-9/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r162922 | tilghman | 2008-12-10 16:48:09 -0600 (Wed, 10 Dec 2008) | 7 lines Checking global variables here actually overwrote the previous substitution by channel variables, and in any case, was redundant; pbx_substitute_variables_helper ALREADY does substitution for global variables. (closes issue #13327) Reported by: pj ........ r162930 | tilghman | 2008-12-10 17:01:14 -0600 (Wed, 10 Dec 2008) | 2 lines Previously missing line, now the substitution works correctly ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@162949 f38db490-d61c-443f-a65b-d21fe96a405b