aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-22Merged revisions 295843 via svnmerge from rmudgett1-12/+12
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines Merged revisions 295790 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call. To recreate the problem: 1) Party A calls Party B 2) Invoke CLI "channel redirect" command to redirect channel call leg associated with A. 3) All associated channels are hung up. Note that if the CLI command were done on the channel call leg associated with B it works. This regression was a result of the fix for issue #16946 (https://reviewboard.asterisk.org/r/740/). The regression affects all features that use an async goto to execute the dialplan because of an external event: Channel redirect, AMI redirect, SIP REFER, and FAX detection. The struct ast_channel._softhangup code is a mess. The variable is used for several purposes that do not necessarily result in the call being hung up. I have added doxygen comments to describe how the various _softhangup bits are used. I have corrected all the places where the variable was tested in a non-bit oriented manner. The primary fix is the new AST_CONTROL_END_OF_Q frame. It acts as a weak hangup request so the soft hangup requests that do not normally result in a hangup do not hangup. JIRA SWP-2470 JIRA SWP-2489 (closes issue #18171) Reported by: SantaFox (closes issue #18185) Reported by: kwemheuer (closes issue #18211) Reported by: zahir_koradia (closes issue #18230) Reported by: vmarrone (closes issue #18299) Reported by: mbrevda (closes issue #18322) Reported by: nerbos Review: https://reviewboard.asterisk.org/r/1013/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@295866 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-11Merged revisions 294639 via svnmerge from jpeeler1-113/+190
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r294639 | jpeeler | 2010-11-11 13:31:00 -0600 (Thu, 11 Nov 2010) | 53 lines Merged revisions 294384 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r294384 | jpeeler | 2010-11-09 11:37:59 -0600 (Tue, 09 Nov 2010) | 47 lines Fix a deadlock in device state change processing. Copied from some notes from the original author (Russell): Deadlock scenario: Thread 1: device state change thread Holds - rdlock on contexts Holds - hints lock Waiting on channels container lock Thread 2: SIP monitor thread Holds the "iflock" Holds a sip_pvt lock Holds channel container lock Waiting for a channel lock Thread 3: A channel thread (chan_local in this case) Holds 2 channel locks acquired within app_dial Holds a 3rd channel lock it got inside of chan_local Holds a local_pvt lock Waiting on a rdlock of the contexts lock A bunch of other threads waiting on a wrlock of the contexts lock To address this deadlock, some locking order rules must be put in place and enforced. Existing relevant rules: 1) channel lock before a pvt lock 2) contexts lock before hints lock 3) channels container before a channel What's missing is some enforcement of the order when you involve more than any two. To fix this problem, I put in some code that ensures that (at least in the code paths involved in this bug) the locks in (3) come before the locks in (2). To change the operation of thread 1 to comply, I converted the storage of hints to an astobj2 container. This allows processing of hints without holding the hints container lock. So, in the code path that led to thread 1's state, it no longer holds either the contexts or hints lock while it attempts to lock the channels container. (closes issue #18165) Reported by: antonio ABE-2583 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@294640 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-07Merged revisions 290712 via svnmerge from russell1-2/+9
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r290712 | russell | 2010-10-07 12:53:56 +0200 (Thu, 07 Oct 2010) | 4 lines Don't crash when Set() is called without a value. Review: https://reviewboard.asterisk.org/r/949/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@290713 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-04Merged revisions 290254 via svnmerge from tilghman1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r290254 | tilghman | 2010-10-04 18:14:59 -0500 (Mon, 04 Oct 2010) | 11 lines Change new pattern matcher to regard dashes the same as the old pattern matcher -- as visual candy to be ignored. Also change the AEL parser to not generate dashes within extensions, as those dashes would be ignored. Update the AEL tests to match this behavior. (closes issue #17366) Reported by: murf Patches: 20100727__issue17366.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@290255 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-20Merged revisions 287558 via svnmerge from mnicholson1-6/+10
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r287558 | mnicholson | 2010-09-20 10:56:21 -0500 (Mon, 20 Sep 2010) | 14 lines Use ast_str when processing hint state changes Merged revisions 287555 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r287555 | mnicholson | 2010-09-20 10:48:14 -0500 (Mon, 20 Sep 2010) | 5 lines Use ast_dynamic_str when processing hint state changes (related to issue #17928) Reported by: mdu113 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@287559 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-17Merged revisions 287308 via svnmerge from mnicholson1-2/+7
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r287308 | mnicholson | 2010-09-17 08:36:07 -0500 (Fri, 17 Sep 2010) | 12 lines Merged revisions 287307 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r287307 | mnicholson | 2010-09-17 08:34:34 -0500 (Fri, 17 Sep 2010) | 5 lines Use ast_strdup() instead of ast_strdupa() while processing in ast_hint_state_changed(). (related to issue #17928) Reported by: mdu113 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@287309 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-16Merged revisions 287119 via svnmerge from mnicholson1-3/+1
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r287119 | mnicholson | 2010-09-16 15:06:16 -0500 (Thu, 16 Sep 2010) | 15 lines Merged revisions 287118 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r287118 | mnicholson | 2010-09-16 15:04:46 -0500 (Thu, 16 Sep 2010) | 8 lines Don't limit hint processing in ast_hint_state_changed() to AST_MAX_EXTENSION length strings. (closes issue #17928) Reported by: mdu113 Patches: 20100831__issue17928.diff.txt uploaded by tilghman (license 14) Tested by: mdu113 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@287120 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-09Merged revisions 285710 via svnmerge from bbryant1-36/+21
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent. (closes issue #16903) Reported by: Nick_Lewis Patches: pbx.c-specificity.patch uploaded by Nick Lewis (license 657) Tested by: Nick_Lewis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16Merged revisions 277327 via svnmerge from mnicholson1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r277327 | mnicholson | 2010-07-16 13:30:22 -0500 (Fri, 16 Jul 2010) | 8 lines Interpret device state AST_DEVICE_UNKNOWN as extension state AST_EXTENSION_NOT_INUSE. (closes issue #16035) Reported by: francesco_r Patches: pbx.c.patch uploaded by viniciusfontes (license 978) Tested by: francesco_r, agx, lawbar ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277331 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14ast_callerid restructuringrmudgett1-35/+70
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-08Implement AstData API data providers as part of the GSOC 2010 project,eliel1-0/+52
midterm evaluation. Review: https://reviewboard.asterisk.org/r/757/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274727 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-06Uh, yeah.tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274053 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-29Send DialPlanComplete as a response, not as a separate event.tilghman1-1/+1
Otherwise, it goes to all manager sessions and may exclude the current session, if the Events mask excludes it. (closes issue #17504) Reported by: rrb3942 Patches: showdialplan_patch.diff uploaded by rrb3942 (license 1003) Tested by: rrb3942 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273054 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-15Merged revisions 270583 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r270583 | tilghman | 2010-06-15 13:25:12 -0500 (Tue, 15 Jun 2010) | 5 lines Variables have always been case-sensitive, so we should not be removing case-insensitive matches. Bug reported via the -dev list. See http://lists.digium.com/pipermail/asterisk-dev/2010-June/044510.html ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270584 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-08Fix some doxygen warnings.lmadsen1-0/+1
(closes issue #17336) Reported by: snuffy Patches: doxygen-fixes1.diff uploaded by snuffy (license 35) Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268969 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-20Let ExtensionState resolve dynamic hints.tilghman1-0/+11
(closes issue #16623) Reported by: tilghman Patches: 20100116__issue16623.diff.txt uploaded by tilghman (license 14) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264779 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-24Fix potential invalid reads that could occur in pbx.cmmichelson1-2/+21
Here is a cut and paste of my review request for this change: This past weekend, Russell ran our current suite of unit tests for Asterisk under valgrind. The PBX pattern match test caused valgrind to spew forth two invalid read errors. This patch contains two changes that shut valgrind up and do not cause any new memory leaks. Change 1: In ast_context_remove_extension_callerid2, valgrind reported an invalid read in the for loop close to the function's end. Specifically, one of the the strcmp calls in the loop control was reading invalid memory. This was because the caller of ast_context_remove_extension_callerid2 (__ast_context destroy in this case) passed as a parameter a shallow copy of an ast_exten's exten field. This same ast_exten was what was destroyed inside the for loop, thus any iterations of the for loop beyond the destruction of the ast_exten would result in invalid reads. My fix for this is to make a copy of the ast_exten's exten field and pass the copy to ast_context_remove_extension_callerid2. In addition, I have also acted similarly with the ast_exten's matchcid field. Since in this case a NULL is handled quite differently than an empty string, I needed to be a bit more careful with its handling. Change 2: In __ast_context_destroy, we iterated over a hashtab and called ast_context_remove_extension_callerid2 on each item. Specifically, the hashtab over which we were iterating was an ast_exten's peer_table. Inside of ast_context_remove_extension_callerid2, we could possibly destroy this ast_exten, which also caused the hashtab to be freed. Attempting to call ast_hashtab_end_traversal on the hashtab iterator caused an invalid read to occur when trying to read the iterator->tab->do_locking field since iterator->tab had already been freed. My handling of this problem is a bit less straightforward. With each iteration over the hashtab's contents, we set a variable called "end_traversal" based on the return of ast_context_remove_extension_callerid2. If 0 is ever returned, then we know that the extension was found and destroyed. Because of this, we cannot call ast_hashtab_end_traversal because we will be guaranteeing a read of invalid memory. In such a case, we forego calling ast_hashtab_end_traversal and instead call ast_free on the hashtab iterator. Review: https://reviewboard.asterisk.org/r/585 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254362 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-08Use memmove() instead of memcpy() for a case where the buffers overlap.russell1-1/+1
Once again, valgrind is freaking awesome. That is all. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245610 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-27Merged revisions 243486 via svnmerge from mmichelson1-2/+3
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/trunk@243487 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-25Change api for pbx_builtin_setvar to actually return error code if a ↵oej1-3/+3
function can't be written to. This patch removes code that was duplicated from pbx.c to manager.c in order to prevent API change in released versions of Asterisk. There are propably also other places that would benefit from reading the return code and react if a function returns error codes on writing a value into it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242919 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. Reverts sig_pri changes in trunk that are specific to isdn technology only. (closes 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/trunk@241416 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-19Initialize data on the stack so that Park doesn't interpret random arguments.jpeeler1-1/+3
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/trunk@241366 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-17Avoid a crash on Solaris when running 'core show functions.'seanbright1-1/+4
(closes issue #16309) Reported by: asgaroth git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240717 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-15Convert a few places to use ast_calloc_with_stringfields where applicable.seanbright1-7/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240368 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-14Similarly, ensure that matchcid is duplicated correctly when merging contexts.tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240175 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-14Ensure that the callerid is NULL when the parent is effectively NULL.tilghman1-1/+1
This applies only to pattern-match hints, which create exact-match hints on the fly. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240129 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-13Oops, another tag errortilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239997 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-13Oops, missed a closing tagtilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239996 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-13Add the TESTTIME() dialplan function, which permits testing GotoIfTime.tilghman1-4/+81
Specifically, by setting TESTTIME() to a particular date and time, you can test whether a dialplan correctly branches as was intended. This was developed after recent questions on the -users list on how to test their holiday dialplan logic. (closes issue #16464) Reported by: tilghman Patches: 20100112__issue16464.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/458/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239957 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-12Blank callerid and NULL callerid should not compare equal.tilghman1-1/+3
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/trunk@239571 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05fixes subscriptions being lost after 'module reload'dvossel1-3/+4
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/trunk@237839 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Merged revisions 237493 via svnmerge from tilghman1-22/+20
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/trunk@237494 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Merged revisions 237405 via svnmerge from tilghman1-1/+6
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/trunk@237406 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-17Merged revisions 235421 via svnmerge from tilghman1-3/+13
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/trunk@235422 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-13Trim leading/trailing spaces from the filename, to deal with common user error.tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@234458 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01Merged revisions 231853 via svnmerge from dvossel1-1/+1
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/trunk@231867 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-11Merged revisions 229498 via svnmerge from dbrooks1-4/+5
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/trunk@229499 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-10Merged revisions 229360 via svnmerge from tilghman1-18/+36
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/trunk@229361 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Expand codec bitfield from 32 bits to 64 bits.tilghman1-4/+4
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-22Merged revisions 225105 via svnmerge from tilghman1-1/+1
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/trunk@225360 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-15Create an API for adding an optional time unit onto the ends of time periods.tilghman1-8/+6
Two examples of its use are included, and the usage could be expanded in some cases into certain configuration options where time periods are specified. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@224225 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-07Deadlock in channel masquerade handlingdvossel1-3/+5
Channels are stored in an ao2_container. When accessing an item within an ao2_container the proper locking order is to first lock the container, and then the items within it. In ast_do_masquerade both the clone and original channel must be locked for the entire duration of the function. The problem with this is that it attemptes to unlink and link these channels back into the ao2_container when one of the channel's name changes. This is invalid locking order as the process of unlinking and linking will lock the ao2_container while the channels are locked!!! Now, both the channels in do_masquerade are unlinked from the ao2_container and then locked for the entire function. At the end of the function both channels are unlocked and linked back into the container with their new names as hash values. This new method of requiring all channels and tech pvts to be unlocked before ast_do_masquerade() or ast_change_name() required several changes throughout the code base. (closes issue #15911) Reported by: russell Patches: masq_deadlock_trunk.diff uploaded by dvossel (license 671) Tested by: dvossel, atis (closes issue #15618) Reported by: lmsteffan Patches: deadlock_local_attended_transfers_trunk.diff uploaded by dvossel (license 671) Tested by: lmsteffan, dvossel Review: https://reviewboard.asterisk.org/r/387/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222761 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-24Merged revisions 220288 via svnmerge from tilghman1-2/+0
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/trunk@220289 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-16Merged revisions 218867 via svnmerge from dbrooks1-1/+1
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/trunk@218868 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-11Check the origination priority for more matches, not the current priority.tilghman1-1/+1
Found by Pavel Troller on the -dev list. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@218050 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-04Enable turning off the application delimiter warning with the 'dontwarn' option.tilghman1-1/+1
Suggested on the -dev list, and implemented in an alternate way by me. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@216547 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-04Merged revisions 216430 via svnmerge from oej1-0/+2
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/trunk@216438 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-25Merged revisions 213970 via svnmerge from tilghman1-2/+2
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/trunk@213971 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-08Fix a CEL related regression with hints updating by subscribing to ↵mnicholson1-1/+1
AST_DEVICE_STATE instead of AST_DEVICE_STATE_CHANGED. (closes issue #15440) Reported by: lmsteffan git-svn-id: http://svn.digium.com/svn/asterisk/trunk@205469 f38db490-d61c-443f-a65b-d21fe96a405b