(closes issue #10268)
Reported by: mvanbaak
Patches:
chan_skinny_openbsd.diff uploaded by mvanbaak (license 7)
Add another OS that has to use the Macros for byte ordering.
Russell Bryant [Mon, 23 Jul 2007 12:25:01 +0000 (12:25 +0000)]
Use a signed integer for storing the number of bytes in the packet read from
the network. Using an unsigned value here made it impossible to handle an
error returned from recvfrom(). Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)
Backport a fix for a memory leak that was fixed in trunk in reivision 76221
by rizzo. The memory used for the localaddr list was not freed during a
configuration reload.
Mark Michelson [Fri, 20 Jul 2007 18:42:27 +0000 (18:42 +0000)]
When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available
in the directory.
(closes issue #10200, reported by mrskippy, patched by me)
Russell Bryant [Fri, 20 Jul 2007 18:22:24 +0000 (18:22 +0000)]
Use the define that specifies the default length of an artificially created
DTMF digit in the ast_senddigit() function. The define is set to 100ms by
default, which is the same thing that this function was using. But, using
the define lets changes take effect in this case, as well as the others where
it was already used.
(closes issue #10247)
Reported by: fkasumovic
Patches:
chan_sip.patch uploaded by fkasumovic (license #101)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.
(closes issue #10246)
Reported by: fkasumovic
Patches:
res_conver.patch uploaded by fkasumovic (license #101)
Use the last occurance of . to find the extension, not the first occurance.
Mark Michelson [Thu, 19 Jul 2007 16:26:10 +0000 (16:26 +0000)]
Changes in handling return values of several functions in app_queue. This all started as a fix for issue #10008
but now includes all of the following changes:
1. Simplifying the code to handle positive return values from ast API calls.
2. Removing the background_file function.
3. The fix for issue #10008
(closes issue #10008, reported and patched by dimas)
When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)
When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)
After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)
In ast_pbx_run(), mark a channel as hung up after an application returned -1,
or when it runs out of extensions to execute. This is so that code can detect
that this channel has been hung up for things like making sure DeadAGI is used
on actual dead channels, and is beneficial for other things, like making sure
someone doesn't try to start spying on a channel that is about to go away.
Mark Michelson [Mon, 16 Jul 2007 18:16:15 +0000 (18:16 +0000)]
Restoring functionality from 1.2 wherein Retrydial will not exit if there is no announce file specified.
This change makes it so that if there is no announce file specified, the application will continue until finished (or caller hangs up).
If a bogus announce file is specified, then a warning message will be printed saying that the file could not be found, but execution will
still continue.
(closes issue #10186, reported by jon, patched by me)
Fixed an issue where chanspy flags were uninitialized if no options were passed.
What triggered this investigation was an IRC chat where some people's quiet flags were
set while others' weren't even though none of them had specified the q option.
Ensure that adding a user to the list of users of a specific music on hold
class is not done at the same time as any of the other operations on this list
to prevent list corruption. Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.
When using a TDM400P (and probably other analog cards) there was a chance that
you could hang up and pick the phone back up where it has been long enough to
be not considered a flash hook, but too soon such that the device reports that
it is busy and the person on the phone will only hear silence. This patch
makes chan_zap more tolerant of this and gives the device a couple of seconds
to succeed so the person on the phone happily gets their dialtone.
Mark Michelson [Thu, 12 Jul 2007 23:00:32 +0000 (23:00 +0000)]
Change to my previous fix regarding agent logoff soft. Now uses deferlogoff instead of loginstart
since loginstart is used after logoff. Thanks to makoto for pointing this out and suggesting the fix.
(closes issue #10178, reported and patched by makoto, with modification by me)
The function make_trunk() can fail and return -1 instead of a valid new call
number. Fix the uses of this function to handle this instead of treating it
as the new call number. This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)
Make sure that the ESCAPE immediately follows the condition that uses LIKE.
This fixes realtime extensions with ODBC.
(closes issue #10175, reported by stuarth, patch by me)
Instead of figuring out kernel versions that have compiler.h and not... let's just use autoconf to check for it's presence. (issue #10174 reported by francesco_r)
Fix an issue where it was possible to have a service level of over 100%
Between the time recalc_holdtime and update_queue was called, it was possible that the call could have been hungup.
Move both additions to the same place, so this won't happen.
Issue 10158, initial patch by makoto, modified by me.
Only spit out an inringing warning message when it is applicable. Since call limits are already toast in realtime let's not scare the user if they are using it. (issue #10166 reported by bcnit)
Russell Bryant [Mon, 9 Jul 2007 21:31:30 +0000 (21:31 +0000)]
Update the configure script to check for a required function that is not present
in the 1.2 version of libpri. This will prevent the configure script from thinking
that it has compatible libpri support for Asterisk 1.4, when it actually does not
because the installed version is from 1.2.
When the specified class isn't found, properly fall back to the channel's music
class or the default.
(issue #10123, reported by blitzrage, patches from juggie, qwell, and me)
When trying to find a music on hold class to use, try all of the options,
instead of only the first one that is set. Also, change the MusicOnHold
applications to not hang up on the channel when a class can not be found.
Several chan_zap options were not working on reload because they were arbitrarily
disallowed when reloading some/most PRI options (such as signalling) was disallowed.
Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload.
This corrects that behavior.
Mark Michelson [Mon, 9 Jul 2007 18:32:50 +0000 (18:32 +0000)]
The n option for Queue should make the queue exit immediately after failure to reach any members and should not
be dependent on the timeout value passed to Queue
(closes issue #10127, reported by bcnit, repaired by me)
Mark Michelson [Mon, 9 Jul 2007 14:57:41 +0000 (14:57 +0000)]
Fixed a logic error in leave_voicemail. Pass the mailbox instead of the context to inbox_count when the context is "default."
(closes issue #10135, reported by yannj, repaired by me)
If a sip_pvt struct has already registered an extension state callback,
remove the old one before adding a new one. If this isn't done, Asterisk
will crash. (issue #10120)
Mark Michelson [Fri, 6 Jul 2007 16:36:17 +0000 (16:36 +0000)]
Fixing a rare case which causes voicemail to crash when compiled with IMAP storage.
inboxcount has the possibility of finding an "interactive" vm_state when no persistent "non-interactive"
vm_state exists for that mailbox. If this should happen when someone attempts to leave a message, it results in
a crash. This patch, along with my commit in revision 72670 fix issue 10053, reported by jaroth.
Russell Bryant [Thu, 5 Jul 2007 22:31:31 +0000 (22:31 +0000)]
* Store the call number that a thread is processing without the full frame bit
set to ease debugging
* When deferring a full frame for processing, stick it into the queue for the
thread that is processing frames for that call, not the one that read the
current frame and is about to go back into the idle list
(related to issue #9937)
Russell Bryant [Thu, 5 Jul 2007 20:50:08 +0000 (20:50 +0000)]
Pass HOLD and UNHOLD frames to the other channel when they are returned from a
native bridge function. This fixes a problem where when two zap channels are
natively bridged and one does a flash hook, the other channel did not receive
music on hold. (Reported to me directly by Doug Bailey at Digium)
Copy language information to the dialog structure when calling a peer for situations where a PBX may be started on the dialed channel. (issue #10121 reported by clegall_proformatique)
Mark Michelson [Thu, 5 Jul 2007 15:59:41 +0000 (15:59 +0000)]
Correcting a minor CLI bug I found. When issuing the queue show command, if you type
queue show and then press tab, you can continue pressing tab and it will keep auto-completing
queue names even though only 1 queue can be used as an argument.