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)
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.
Make the difference clear about what the responsibilities of the core and a spy are when it comes to spying on a channel. The core is responsible for adding a spy to a channel, feeding frames into the spy, removing the spy from the channel, and notifying the spy that is has been detached. The spy is responsible for reading frames in, and cleaning itself up. Each side will not try to do the other's job.
Russell Bryant [Sun, 3 Sep 2006 23:14:54 +0000 (23:14 +0000)]
Add the ability to specify that a frame should not be considered for caching
for uses in cases where you *know* that it will do no good. This patch was
inspired by file for use in some work of his on mixmonitor/chanspy.
Russell Bryant [Sun, 3 Sep 2006 22:56:01 +0000 (22:56 +0000)]
when calling this function to append to a dynamic string and the buffer was not
large enough and had to be reallocated, cut off the partially appended data.
Otherwise, the function will get called over and over again appending to the
end every time and never thinking it has enough room.
Thanks to jmls for access to his machine for debugging!
Provide a little more protection to make sure that a MOH class is specified when using the 'm' option with WaitExten, and prevent a segfault in the process.
Changes/fixes to the app_waitforsilence app to make it behave more the way the author originally intended for it
to function along with an option to keep backward compatible with "old-style" functionality in 1.2.
(#6595 - davetroy reported and patched w/some very minor mods/corrections)
This was added to app_dial a while back, and now it's in app_queue as well. Provide an option to prevent members of the queue from forwarding calls from the queue to somewhere else.
Some changes/fixes for func_curl. curl_global_init is only supposed to be called once, and if it returns non-zero, we need to give up on further executions with that instance. Additionally, let's set absolute timeout values for the CURL connections to try and prevent possible Zap (and possibly other channel tech) channel lockouts.
Russell Bryant [Sun, 3 Sep 2006 16:41:02 +0000 (16:41 +0000)]
Don't use ast_frdup() in the AST_LIST_INSERT_TAIL macro directly. That was a
very stupid thing to do. It ends up duplicating the frame twice, linking in
one of them and setting the tail pointer to the other one. Sorry ...
Thanks to file for pointing out the breakage!!! file rocks.
With the somewhat recent addition (from one of the Astridevcon Europe sessions) of more detailed device states, we need to change strategy in app_queue in how we determine whether a queue member is "in use" or not. Basically, instead of specifically looking for that device state as we did previously, now we're going to observe any other device state aside from the two that we know for sure are "not in use" as "in use". This will cause some other states to fall through that we know will never be available (eg - "INVALID","UNAVAILABLE",etc) but there's other code already within to handle those conditions. (#7433 - tgrman reporting)
If we are doing video and we can't reinvite, then resort to generic bridging instead of Packet2Packet since video isn't supported there yet. (reported by PCadach in #asterisk-bugs)
If no number is specified in the SIP_HEADER dialplan function, then just use the first one. (issue #7854 reported by sxpert and issue #7863 reported by hristo)
Matt O'Gorman [Thu, 31 Aug 2006 21:00:20 +0000 (21:00 +0000)]
everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it
had a non static function when it should.
Russell Bryant [Thu, 31 Aug 2006 20:39:12 +0000 (20:39 +0000)]
there is no need to use iax_frame_free here, as it will actually just end up
having a bunch of erroneous messages about attempting to double free frames
spammed to the console. Problem reported to me by file ...
Russell Bryant [Thu, 31 Aug 2006 04:07:35 +0000 (04:07 +0000)]
The behavior of REGEX when it did not match was not defined by the docs, so
define it to provide a result of "0" and change the code appropriately.
(issue #7805)
Joshua Colp [Thu, 31 Aug 2006 01:59:02 +0000 (01:59 +0000)]
Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
Joshua Colp [Thu, 31 Aug 2006 01:48:04 +0000 (01:48 +0000)]
Update configure script to check for Zaptel VLDTMF support since this will now be required. If you build and don't have Zap stuff, upgrade your zaptel copy. As well - change some minor things so that we get "checking for" and not "checking checking for".
Russell Bryant [Wed, 30 Aug 2006 19:02:34 +0000 (19:02 +0000)]
Blocked revisions 41411 via svnmerge
........
r41411 | russell | 2006-08-30 14:59:44 -0400 (Wed, 30 Aug 2006) | 6 lines
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)
Joshua Colp [Wed, 30 Aug 2006 15:15:06 +0000 (15:15 +0000)]
Print what read-only variable is being set so that the user doesn't have to guess and figure it out or look at the list in cdr.c and match it up (issue #7831 reported by sedwards)
Joshua Colp [Wed, 30 Aug 2006 03:16:03 +0000 (03:16 +0000)]
Use an API call (ast_rtp_get_bridged) to return the RTP stream we are bridged to, and also use it in chan_sip so we know to ignore the no RTP activity checking
Joshua Colp [Wed, 30 Aug 2006 01:29:59 +0000 (01:29 +0000)]
If the RTP stack is already being operated in callback mode, then suspend it upon switching to P2P callback bridging. Once P2P callback bridging has ended, then restore callback mode.
Joshua Colp [Wed, 30 Aug 2006 01:22:46 +0000 (01:22 +0000)]
This is the last round of RTP bridge optimizations. Basically it introduces a way that under a straight bridge (ie: no transcoding and no DTMF detection) the core is not touched at all and no frames pass through (not even null frames). This is accomplished by stealing the file descriptors from the channel and using the provided IO context with a custom callback. When a channel is placed on hold this bridge is broken so audio can flow from the core to the other side. When a channel is off hold this bridge is re-established.
Kevin P. Fleming [Tue, 29 Aug 2006 23:33:59 +0000 (23:33 +0000)]
make menuselect configure process be silent when possible
don't use #ifdef inside a macro call... it appears various versions of gcc have bugs related to this
Steve Murphy [Tue, 29 Aug 2006 23:08:42 +0000 (23:08 +0000)]
This change fixes bug 7820. Way back in April this bug was reintroduced, it appears, when a bunch of restructuring was done. This code was basically left out during the restructuring. In the case of the failure in 7820, it is trying to match the extension _x. with _x., and failing, because the 'x' should only match 0 thru 9. I **could** upgrade the code so that that N,Z, and X match not only their intended number ranges, but also N,Z,and X respectively. And, moreover, X could also match N and Z, and Z could also match N. I have no idea why this bug took so long to turn up. I have no idea what a more thorough treatment of the code would do to working code, either. So I left it as it ***was***.
Russell Bryant [Tue, 29 Aug 2006 20:50:36 +0000 (20:50 +0000)]
Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).
This code significantly improves the performance of ast_frame_header_new(),
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache
whenever possible instead of calling malloc/free every time.
This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.