Olle Johansson [Tue, 14 Nov 2006 11:06:31 +0000 (11:06 +0000)]
Avoid collissions between the peerpoke system and the retransmits. Issue #8272.
In some cases, changed timers caused the retransmit system to destroy the dialog before peerpoke_expire
got a chance.
Russell Bryant [Sun, 12 Nov 2006 06:09:03 +0000 (06:09 +0000)]
Only do the check to determine whether the channel calling this function is an
IAX2 channel when getting the IP address using the special argument,
CURRENTCHANNEL. (issue #8341, jcovert)
Joshua Colp [Thu, 9 Nov 2006 16:48:05 +0000 (16:48 +0000)]
Don't include compiler.h on kernels 2.6.18 and higher as, well, it's apparently going to be removed. This should make all you FC6 fans happy as your Asterisk will now build without any mods.
Russell Bryant [Tue, 7 Nov 2006 01:22:58 +0000 (01:22 +0000)]
If random order is enabled for files mode music on hold, set a random initial
position, instead of always starting at the first file, and doing the random
operation only when switching to the next file.
(bug reported by John Lange on the asterisk-dev mailing list)
Russell Bryant [Wed, 1 Nov 2006 18:24:17 +0000 (18:24 +0000)]
soxmix and Asterisk expect different file extensions for certain formats. This
was already handled for the wav49 format. However, it was not handled for
ulaw and alaw. I fixed this in such a way that using the alternate extensions
for ulaw and alaw will only happen if we know we're calling soxmix, and not a
custom script defined using the MONITOR_EXEC variable. The wav49 processing
was left alone so that external scripts will see no behavior change.
(issue #7550, reported by mnicholson, proposed patch by junky, committed fix
is a bit different)
Russell Bryant [Fri, 27 Oct 2006 17:36:07 +0000 (17:36 +0000)]
We should always be using _exit() after a fork() or vfork() instead of exit().
This is because exit() does some extra cleanup which in some implementations
of vfork(), for example, can actually modify the state of the parent process,
causing very weird bugs or crashes. (issue #7971, Nick Gavrikov)
fixed a bug which caused chan_misdn to try to allocate 2 times the same channel on high load, which then caused instability of mISDN. removed a useless function from isdn_lib.c
Joshua Colp [Tue, 17 Oct 2006 20:37:17 +0000 (20:37 +0000)]
Don't create a "real" pvt structure for requests that shouldn't be able to create one. Instead use a temporary pvt and fill it with enough information so we can send a reply.
Olle Johansson [Tue, 17 Oct 2006 15:50:32 +0000 (15:50 +0000)]
After some research, we realized that the default behaviour since a long
time was doing the right thing, even though the change optimized a bit
and removed a lot of potential risks.
Conclusion: No need for a configuration option at all.
Steve Murphy [Sat, 14 Oct 2006 00:16:58 +0000 (00:16 +0000)]
Made a small update to solve bug 8128; The switch-case fallthru goto to a pattern extension needed to resolved the wildcards to an appropriate digit for extension matching to work
Joshua Colp [Fri, 13 Oct 2006 15:49:53 +0000 (15:49 +0000)]
Pass the right value to usleep for sleeping, and always add the background refresh item back into the scheduler if enabled since it is deleted during reload. (issue #8142 reported by p_lindheimer)
remove workaround for old Polycom firmware SUBSCRIBE requests
add workaround for new Polycom firmware SUBSCRIBE requests (bug is known to exist in 2.0.1 firmware)
added the option 'reject_cause' to make it possible to set the RELEASE_COMPLETE - cause on the 3. incoming PMP channel, which is automatically rejected because chan_misdn does not support that kind of callwaiting. Therefore chan_misdn supports now 3 incoming channels on a PMP BRI Port. misdn_lib_get_free_bc now gets the info if the requested channel is incoming or outgoing to make the 3. channel possible
app_queue is comparing the device names incorrectly while checking their statuses. It's internal list of interfaces includes the dial string, while the argument passed to this function does not have the dial string (/n for a local channel). This causes it to ignore the device state changes because it thinks it belongs to none of its members. (#8040 reported and patch by tim_ringenbach)
Russell Bryant [Wed, 27 Sep 2006 16:54:30 +0000 (16:54 +0000)]
Fix a problem that occurred if a user entered a digit that matched a bridge
feature that was configured using multiple digits, and the digit that was
pressed timed out in the feature digit timeout period. For example, if blind
transfer is configured as '##', and a user presses just '#'. In this situation,
the call would lock up and no longer pass any frames.
(issue #7977 reported by festr, and issue #7982 reported by michaels and
valuable input provided by mneuhauser and kuj. Fixed by me, with testing help
and peer review from Joshua Colp).
There are a couple of issues involved in this fix:
1) When ast_generic_bridge determines that there has been a timeout, it returned
AST_BRIDGE_RETRY. Then, when ast_channel_bridge gets this result, it calls
ast_generic_bridge over again with the same timestamp for the next event.
This results in an endless loop of nothing until the call is terminated.
This is resolved by simply changing ast_generic_bridge to return
AST_BRIDGE_COMPLETE when it sees a timeout.
2) I also changed ast_channel_bridge such that if in the process of calculating
the time until the next event, it knows a timeout has already occured, to
immediately return AST_BRIDGE_COMPLETE instead of attempting to bridge the
channels anyway.
3) In the process of testing the previous two changes, I ran into a problem in
res_features where ast_channel_bridge would return because it determined
that there was a timeout. However, ast_bridge_call in res_features would
then determine by its own calculation that there was still 1 ms before the
timeout really occurs. It would then proceed, and since the bridge broke
out and did *not* return a frame, it interpreted this as the call was over
and hung up the channels.
The reason for this was because ast_bridge_call in res_features and
ast_channel_bridge in channel.c were using different times for their
calculations. channel.c uses the start_time on the bridge config, which
is the time that the feature digit was recieved. However, res_features
had another time, 'start', which was set right before calling
ast_channel_bridge. 'start' will always be slightly after start_time in the
bridge config, and sometimes enough to round up to one ms.
This is fixed by making ast_bridge_call use the same time as
ast_channel_bridge for the timeout calculation.
fixed a bug which led to chan_list zombies, when the call could not be properly established in misdn_call. also removed the ACK_HDLC stuff which is not really needed.
Russell Bryant [Tue, 26 Sep 2006 20:49:21 +0000 (20:49 +0000)]
Back in revision 4798, this message was changed from using ast_cli() to directly
calling write(). During this change, checking if this was a remote console was
removed. This caused this message about using "exit" or "quit" to exit an
Asterisk console to come up in times where it did not make sense. This change
restores the check to see if this is a remote console before printing the
message. (fixes BE-4)
Russell Bryant [Tue, 26 Sep 2006 20:23:15 +0000 (20:23 +0000)]
When parsing the sections of voicemail.conf that contain mailbox definitions,
don't introduce a length limit on the definition by using a 256 byte temporary
storage buffer. Instead, make the temporary buffer just as big as it needs
to be to hold the entire mailbox definition.
(fixes BE-68)
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.