Russell Bryant [Sun, 24 Sep 2006 13:50:30 +0000 (13:50 +0000)]
Check to see if the channel that is activating the IAXPEER function is actually
an IAX2 channel before proceeding to process it to avoid crashing.
(issue #8017, reported by admott, fixed by myself)
Yay another 'round of spy fixes! This fixes a small logic flaw with the cleanup function and a memory allocation issue. (issue #7960 reported by jojo & issue #7999 reported by aster1) Special thanks to csum77 for letting me into a box where this issue was happening.
When paging, only wait 5 seconds for the marked user to enter the conference.
After that, assume the paging already completed by the time the channel entered
the conference and drop back out. (Issue 7275)
Only truly consider the channel in the same format if the format matches the raw format OR if a translation path already exists to translate between them. (issue #7887 reported by softins & issue #7803 reported by alvaro_palma_aste). Thanks goes to stubert for giving me access to a box and showing me a scenario where this occured.
Steve Murphy [Thu, 7 Sep 2006 02:14:14 +0000 (02:14 +0000)]
This should fix the problem reported in 7564: logger config file errors getting lost because logging isn't configured yet. The problem was that the code that exists to handle this case was not getting reached, because other tests were causing an early return from ast_log().
Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)
As posted from #7458 and others similar to it in Mantis:
p->app_lock was a mutex really designed for use with agents not in callback mode. That being the case, I've tried to code it so that when callback mode is used, the app_lock mutex will not be locked/unlocked at all. Please let me know how you make out - and if you continue to deadlock now, please reproduce the deadlock logging information and post to Mantis.
Make realtime regseconds work as people expected (0 on registration expiration or release, and actual on normal state) (issue #7684 reported by kshumard)
Merge in last round of spy fixes. This should hopefully eliminate all the issues people have been seeing by distinctly separating what each component (core/spy) is responsible for. Core is responsible for adding a spy to a channel, feeding frames to the spy, removing the spy from a channel, and telling the spy to stop. Spy is responsible for reading frames in, and cleaning up after itself.
Don't keep trying the same member in certain strategies when members of the queue are unavailable (#7278 - diLLec reported and patched) - This should have been patched here first and then merged into /trunk. My bad!
Russell Bryant [Wed, 30 Aug 2006 18:59:44 +0000 (18:59 +0000)]
Restore original functionality of 1.2 in places where ANI was not set, but was
changed to be set. The original change was done to ensure that the behavior of
the "callerid" option in each channel driver was consistent, but it caused an
unexpected behavior change of CDR records for users, so this change is being
reverted in 1.2. (issue #7695)
Steve Murphy [Mon, 28 Aug 2006 20:51:08 +0000 (20:51 +0000)]
Removed from the docs the mention of the ! and =~ operators, as these
were knocked out of ast_expr2 because they were new features. Let's hope
I can keep them from getting knocked out of the trunk, too!
Russell Bryant [Thu, 24 Aug 2006 19:41:26 +0000 (19:41 +0000)]
Fix a few issues related to the handling of channel variables
- in pbx_builtin_serialize_variables(), the variable list traversal would stop
on a variables with empty name/values, which is not appropriate
- When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of
AST_LIST_REMOVE
- During masquerading, when copying the variables list from one channel to the
other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list.
It leaves the tail pointer of the list invalid. Introduce a new macro,
AST_LIST_APPEND_LIST that appends a list properly.
(issue #7802, softins)
Joshua Colp [Thu, 17 Aug 2006 16:22:58 +0000 (16:22 +0000)]
Use the last CDR entry instead of the first CDR entry for variable retrieving variables using the CDR dialplan function. (issue #7689 reported by voipgate)
Steve Murphy [Thu, 17 Aug 2006 16:07:21 +0000 (16:07 +0000)]
In app_macro, changed the previously changed upper recursion depth limit to a variable, default of the original val of 7. MACRO_RECURSION is a channel variable that will override the limit, but until I can understand and fix why this limit is neccessary, I am not advertising this variable in the docs. This fix mirrors the changes made in r40200 in trunk.
Steve Murphy [Tue, 15 Aug 2006 22:13:47 +0000 (22:13 +0000)]
This revision fixes bug 7731, the inability for macros to be called more than one level deep in the 'h' extension.
It also pushes up the limit of recursion depth from 7 to 20.
Russell Bryant [Mon, 7 Aug 2006 01:28:29 +0000 (01:28 +0000)]
Fix a crash reported to me by hads on IRC. This crash would occur with the use
of the "distinctiveringaftercid" option. Also, on this user's system, the crash
would only occur when built without optimizations. This is because the bug is
that the code would write past the end of an array that was allocated on the
stack, and the structure of the stack is different with or without optimizations
enabled.
Joshua Colp [Mon, 7 Aug 2006 00:15:51 +0000 (00:15 +0000)]
Reset our stream and vstream pointers back to NULL so that any generator that uses them (file based MOH) will not try to close them again. (issue #7668 reported by jmls)
Russell Bryant [Sat, 5 Aug 2006 09:01:37 +0000 (09:01 +0000)]
Always generate a Newstate event in ast_setstate() instead of making it a
Newchannel event if the state was AST_STATE_DOWN. The Newchannel event will
always be generated in ast_request(), so this just causes a duplicated
Newchannel event in some cases.
(issue #7506, repoted by capouch, fixed by me)
Russell Bryant [Sat, 5 Aug 2006 05:08:50 +0000 (05:08 +0000)]
Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event. This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before. This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)
Also, fix a couple minor bugs in usecount handling. chan_iax2 could have
increased the usecount but then returned an error. The place where chan_sip
increased the usecount did not call ast_update_usecount()
fix brain-damage I introduced when trying to fix the CANCEL/BYE sending mechanism for pending INVITES
accept unknown 1xx responses as 183 responses (as RFC3261 mandates we should do)
ensure that the 'feature digit timeout' value is taken into account when deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge)
Joshua Colp [Tue, 1 Aug 2006 19:20:05 +0000 (19:20 +0000)]
Close the stream when file based MOH stop. This won't get rid of their position in the file but it will cause the translation path to be setup again. (issue #7634 reported by asimpson)
Kevin P. Fleming [Mon, 31 Jul 2006 21:14:11 +0000 (21:14 +0000)]
don't reissue hangup requests for SIP channels that have expired their RTP timeouts (one time is enough)
don't rescan the SIP private structure list too fast, it can cause channels to not be able to hang up (issue #7495, and probably others)
use ast_softhangup_nolock() since we already hold the channel's lock
Add missing code to bring transferee channel out of MOH/autoservice under certain circumstance (issue #7611 reported by guillecabeza with minor mods by myself)
How many attempts does it take to make a SIP URI parser that works well? I'm up to 5 personally. On to the good stuff - parse the domain first, user second, and get rid of port & options/params last. (issue #7616 reported by andrew)
Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42)
Kevin P. Fleming [Thu, 27 Jul 2006 22:23:38 +0000 (22:23 +0000)]
use the enum that defines the option arguments, so that the likelihood of mismatched option indexes is reduced (which in this case was a bug, the volume argument was not checked properly)
Russell Bryant [Thu, 27 Jul 2006 04:25:41 +0000 (04:25 +0000)]
Fix crash when using the "regexten" option with MALLOC_DEBUG enabled. This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.