]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
12 years agoFix core dump on CLI usage
Igor Goncharovskiy [Tue, 12 Mar 2013 08:53:09 +0000 (08:53 +0000)] 
Fix core dump on CLI usage

Fix issue with 'unistim show info' CLI command when device connected not configured

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382827 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: Update the via header when relaying SMS MESSAGE
Jonathan Rose [Fri, 8 Mar 2013 20:16:43 +0000 (20:16 +0000)] 
chan_sip: Update the via header when relaying SMS MESSAGE

Prior to this change, certain conditions for sending the message would
result in an address of '(null)' being used in the via header of the
SIP message because a NULl value of pvt->ourip was used when initially
generating the via header. This is fixed by adding a call to build_via
when the address is set before sending the message.

(closes issue ASTERISK-21148)
Reported by: Zhi Cheng
Patches:
700-sip_msg_send_via_fix.patch uploaded by Zhi Cheng (license 6475)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382739 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoLet vm_mailbox_snapshot combine "Urgent" when no folder is specified
Matthew Jordan [Thu, 7 Mar 2013 17:57:08 +0000 (17:57 +0000)] 
Let vm_mailbox_snapshot combine "Urgent" when no folder is specified

r381835 fixed a bug in vm_mailbox_snapshot where combining INBOX and Old forgot
that Urgent also "counts" as new messages. This fixed the problem when any of
the three folders was specified and the combine option was used.

It missed the case where the folder isn't specified and we build a snapshot of
all folders. This patch corrects that.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382617 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoEnsure that logmsgs are freed properly
Kinsey Moore [Thu, 7 Mar 2013 15:08:26 +0000 (15:08 +0000)] 
Ensure that logmsgs are freed properly

Messages sent while the logger thread is shutting down will now have
their associated callid freed properly.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd a 'secret' probation strictrtp mode to handle delayed changes in RTP source
Matthew Jordan [Thu, 7 Mar 2013 14:58:23 +0000 (14:58 +0000)] 
Add a 'secret' probation strictrtp mode to handle delayed changes in RTP source

Often, Asterisk may realize that a change in the source of an RTP stream is
about to occur and ask that the RTP engine reset it's lock on the current RTP
source. In certain scenarios, it may take awhile for the new remote system to
send RTP packets, while the old remote system may continue providing RTP during
that time period. This causes Asterisk to re-lock onto the old source, thereby
rejecting the new source when the old source stops sending RTP and the new
source begins.

This patch prevents that by having a constant secondary, 'secret' probation
mode enabled when an RTP source has been chosen. RTP packets from other sources
are always considered, but never chosen unless the current RTP source stops
sending RTP.

Review: https://reviewboard.asterisk.org/r/2364

(closes issue AST-1124)
Reported by: John Bigelow
Tested by: John Bigelow

(closes issue AST-1125)
Reported by: John Bigelow
Tested by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382573 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRecorded merge of revisions 382513 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Kinsey Moore [Wed, 6 Mar 2013 18:28:06 +0000 (18:28 +0000)] 
Recorded merge of revisions 382513 from http://svn.asterisk.org/svn/asterisk/branches/1.8

........
Correct app_page documentation

The 'A' and 'n' options for Page() mention that the announcement will
be played simultaneously. This is not necessarily the case.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382514 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix several unreleased mutex locks that cause problem with processing calls
Igor Goncharovskiy [Tue, 5 Mar 2013 03:51:48 +0000 (03:51 +0000)] 
Fix several unreleased mutex locks that cause problem with processing calls

(Closes issue ASTERISK-21119)
Reported by: Daniel Bohling
Tested by: Daniel Bohling

........

Merged revisions 382409 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382410 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix comparison of presence state in event subsystem.
Jason Parker [Mon, 4 Mar 2013 21:12:45 +0000 (21:12 +0000)] 
Fix comparison of presence state in event subsystem.

Several new IEs were not given types (or names), causing the comparison
function to improperly succeed.  This adds those.

(closes issue AST-1128)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382390 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoConfbridge CLI new record file name check.
Kevin Harwell [Mon, 4 Mar 2013 20:03:09 +0000 (20:03 +0000)] 
Confbridge CLI new record file name check.

This fix checks to make sure that if a confbridge record start command is issued
from the CLI it will always use the file name given on the CLI even if it
changes between start/stop records for a conference.  Previously it had been
reusing the same file between start/stops even if a new filename was given.

(issue AST-1088)
Reported by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382385 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix / Clean Up Some Items To Handle The New auto_* NAT Options
Michael L. Young [Fri, 1 Mar 2013 04:28:22 +0000 (04:28 +0000)] 
Fix / Clean Up Some Items To Handle The New auto_* NAT Options

The original report had to do with a realtime peer behind NAT being pruned and
the peer's private address being used instead of its external address.  Upon
debugging, it was discovered that this was being caused by the addition of
the auto_force_rport and auto_comedia settings.

This patch does the following:

* Adds a missing note to the CHANGES file indicating that the default global nat
  setting is auto_force_rport

* Constify the 'req' parameter for check_via()

* Add calls to check_via() in a couple of places in order for the auto_*
  settings to do their job in attempting to determine if NAT is involved

* Set the flags SIP_NAT_FORCE_RPORT and SIP_PAGE2_SYMMETRICRTP if the auto_*
  settings are in use where it was needed

* Moves the copying of peer flags up in build_peer() to before they are used;
  this fixes the realtime prune issue

* Update the contrib/realtime schemas to allow the nat column to handle the
  different nat setting combinations we have

This patch received a review and "Ship It!" on the issue itself.

(closes issue ASTERISK-20904)
Reported by: JoshE
Tested by: JoshE, Michael L. Young
Patches:
  asterisk-20904-nat-auto-and-rt-peersv2.diff Michael L. Young (license 5026)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382322 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoWhile the ICE negotiation is occurring leave strictrtp in an open state, media can...
Joshua Colp [Thu, 28 Feb 2013 21:58:55 +0000 (21:58 +0000)] 
While the ICE negotiation is occurring leave strictrtp in an open state, media can and will come from different places.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382298 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix a bug with ICE and strictrtp where media could get dropped.
Joshua Colp [Thu, 28 Feb 2013 21:37:01 +0000 (21:37 +0000)] 
Fix a bug with ICE and strictrtp where media could get dropped.

If the end result of the ICE negotiation resulted in the path for media
changing it was possible for the strictrtp code to discard the RTP packets.
This change causes strictrtp to enter learning mode once again when the
ICE negotiation has completed successfully.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382296 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoPrevent deadlock in chan_iax2 when attempting to set caller ID
Matthew Jordan [Thu, 28 Feb 2013 17:16:31 +0000 (17:16 +0000)] 
Prevent deadlock in chan_iax2 when attempting to set caller ID

A deadlock can occur in chan_iax2 when it attempts to set the caller ID, as it
already holds the iax2 private lock and improperly fails to obtain the channel
lock before calling ast_set_callerid. By not safely obtaining the channel lock,
a locking inversion can take place, causing a deadlock.

This patch solves this by calling the required deadlock avoidance functions
that obtain the channel lock before setting the caller ID.

Thanks to Pavel for fixing my syntax errors and testing this patch out.

(closes issue ASTERISK-21128)
Reported by: Pavel Troller
Tested by: Pavel Troller
patches:
  ASTERISK-21128-1.8.diff uploaded by mjordan (license 6283)
  ASTERISK-21128-modified-1.8.diff uploaded by Pavel Troller (license 6302)
........

Merged revisions 382233 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382234 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoLet channels joining a MeetMe conference opt out of the denoiser
Matthew Jordan [Thu, 28 Feb 2013 16:52:34 +0000 (16:52 +0000)] 
Let channels joining a MeetMe conference opt out of the denoiser

For some channel drivers, specifically those that have a varying rate in the
number of audio samples, the audio quality for a MeetMe conference can be
exceedingly poor. This is due to a unilateral application of the DENOISE
function in func_speex to channels joining the conference.

The denoiser function in the speex library is initialized with the number of
audio samples in each sample that will be provided to it. If the number of
audio samples changes, the denoiser has to be thrown away and re-initialized.

While this could be worked around by removing func_speex, that doesn't help
if you actually use the denoiser with other channels on the system.

This patches does the following:
 * Checks for the presence of func_speex as opposed to codec_speex when
   determining if the DENOISE function is present (which is where the function
   is actually implemented)
 * Adds an option to MeetMe 'n' that causes the denoiser to not be applied
   to a channel when it joins. This keeps the current behavior the default, but
   let's users disable the denoiser if it causes problems on their system.

Review: https://reviewboard.asterisk.org/r/2358

(closes issue AST-1062)
Reported by: Thomas Arimont
........

Merged revisions 382227 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382230 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRelax dialog checking in get_sip_pvt_byid_locked so it works when the dialog is forked.
Joshua Colp [Wed, 27 Feb 2013 16:17:50 +0000 (16:17 +0000)] 
Relax dialog checking in get_sip_pvt_byid_locked so it works when the dialog is forked.

(closes issue ASTERISK-20638)
Reported by: eelcob
Patches:
      pedantic-call-pickup-from-tag.patch uploaded by eelcob (license 6442)
........

Merged revisions 382171 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382174 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRegenerate the configure script. The one in the tree was not working for me at all.
Joshua Colp [Wed, 27 Feb 2013 12:22:30 +0000 (12:22 +0000)] 
Regenerate the configure script. The one in the tree was not working for me at all.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382151 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoConsider linux-gnuspe as linux-gnu
Tzafrir Cohen [Tue, 26 Feb 2013 19:45:09 +0000 (19:45 +0000)] 
Consider linux-gnuspe as linux-gnu

* The powerpcspe Linux port uses linux-gnuspe as the OS string.
* Our build system shouldn't really care for that, so just call it linux-gnu.
* Original report: Roland Stigge , http://bugs.debian.org/701505

Review: https://reviewboard.asterisk.org/r/2357/
........

Merged revisions 382110 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382111 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCorrect RPID parsing for unquoted display-name.
Walter Doekes [Tue, 26 Feb 2013 19:34:59 +0000 (19:34 +0000)] 
Correct RPID parsing for unquoted display-name.

Parsing Remote-Party-ID will now succeed if display-name is of the
*(token LWS) kind and not just the quoted-string kind.

Review: https://reviewboard.asterisk.org/r/2341/
........

Merged revisions 382107 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382108 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRemove unneeded linux-gnueabi*
Tzafrir Cohen [Tue, 26 Feb 2013 19:19:51 +0000 (19:19 +0000)] 
Remove unneeded linux-gnueabi*

As of r380521 the configure scripts converts the value of linux-gnueabi*
of OSARCH to "linux-gnu". So no point in testing for those values.
........

Merged revisions 382087 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix typo in r382068
Matthew Jordan [Tue, 26 Feb 2013 15:38:05 +0000 (15:38 +0000)] 
Fix typo in r382068

Well, that was embarrassing. Removed an '-l' that somehow got in there.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382069 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoClean up ConfBridge commands to account for wait_marked users
Matthew Jordan [Tue, 26 Feb 2013 15:35:05 +0000 (15:35 +0000)] 
Clean up ConfBridge commands to account for wait_marked users

When ConfBridge was refactored to better handle the concept of marked,
wait_marked, and normal users co-existing in a conference (thereby implementing
a state machine for the conference), the wait_marked users were put into their
own list of conference participants, separate from the active users. This list
is used for wait_marked users when they are waiting in a conference but no
marked user has joined; normal users may have joined at this point however.
There are several AMI/CLI commands that affect conference users that were not
checking the wait_marked users list:
* CLI/AMI commands that mute/unmute a participant. In this case, wait_marked
  users have to remain in their particular state and should not be affected -
  however, the commands would return "Channel not found" as opposed to the
  appropriate error condition.
* CLI/AMI commands that kick a participant. An admin should always be able to
  kick a participant out of the conference.

This patch fixes both sets of commands, and cleans up the CLI commands slightly
by allowing them to complete a participant name (this was supposed to have been
added, but the function call was commented out and wasn't implemented).

Review: https://reviewboard.asterisk.org/r/2346/

(closes issue AST-1114)
Reported by: John Bigelow
Tested by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382068 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoEnsure that the default bridge/user profiles are always available
Matthew Jordan [Tue, 26 Feb 2013 15:24:35 +0000 (15:24 +0000)] 
Ensure that the default bridge/user profiles are always available

ConfBridge and Page require that there always be a default bridge and user
profile available. While properties of the default profiles can be overriden
in the configuration file, removing them can create situations where neither
application can function properly.

This patch ensures that if an administrator removes the profiles from the
confbridge.conf configuration file, the profiles are added upon load.
Documentation clarifying this has been added to the confbridge.conf.sample file.

Review: https://reviewboard.asterisk.org/r/2356/

(closes issue AST-1115)
Reported by: John Bigelow
Tested by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382066 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoClean up use of va_end/va_args in res_config_mysql
Matthew Jordan [Mon, 25 Feb 2013 12:50:07 +0000 (12:50 +0000)] 
Clean up use of va_end/va_args in res_config_mysql

There were several problems using variadic argument macros in res_config_mysql.
 * Improper use of va_end. Multiple calls to va_end were possible resulting in
   an unbalanced matching of va_start/va_end.
 * Calls to va_arg after a possible encounter of a SENTINEL value.

This patch corrects those errors.

(closes issue ASTERISK-19451)
Reported by: wdoekes
patches:
  ASTERISK-19451-1.8--2.diff uploaded by wdoekes (License 5674)
........

Merged revisions 382021 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382022 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoSet the sin_family on the bind address socket during initialization
Matthew Jordan [Sun, 24 Feb 2013 23:00:05 +0000 (23:00 +0000)] 
Set the sin_family on the bind address socket during initialization

Somehow, chan_jingle has managed to operate for years without setting the
sin_family on its bindaddr socket. This patch properly sets the field during
initial module load to AF_INET.

Note that the patch on the issue was modified slightly to change the
initialization of the socket from allocation of a chan_jingle private to the
module initialization, as the bindaddr object (which is static) only needs to
have the address set once.

(closes issue ASTERISK-19341)
Reported by: andre valentin
patches:
  0105-chan_jingle.patch uploaded by avalentin (License 6064)
........

Merged revisions 381975 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381976 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDon't display the AMI ALL class authorization for users if they don't have it
Matthew Jordan [Sun, 24 Feb 2013 16:26:10 +0000 (16:26 +0000)] 
Don't display the AMI ALL class authorization for users if they don't have it

When converting AMI class authorizations to a string representation, the
method always appends the ALL class authorization. This is especially
important for events, as they should always communicate that class
authorization - even if the event itself does not specify ALL as a class
authorization for itself. (Events have always assumed that the ALL class
authorization is implied when they are raised)

Unfortunately, this did mean that specifying a user with restricted class
authorizations would show up in the 'manager show user' CLI command as
having the ALL class authorization.

Rather then modifying the existing string manipulation function, this patch
adds a function that will only return a string if the field being compared
explicitly matches class authorization field it is being compared against.
This prevents ALL from being returned unless it is actually specified for
the user.

(closes issue ASTERISK-20397)
Reported by: Johan Wilfer
........

Merged revisions 381939 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381943 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake ParkAndAnnounce return to priority + 1 when return context is not defined
Matthew Jordan [Sun, 24 Feb 2013 15:37:26 +0000 (15:37 +0000)] 
Make ParkAndAnnounce return to priority + 1 when return context is not defined

The ParkAndAnnounce application documentation for the optional return_context
parameter states the following:

return_context
    The goto-style label to jump the call back into after timeout. Default
    'priority+1'.

Unfortunately, the application was sending the channel back into the dialplan
at 'priority', which is the ParkAndAnnounce application call. This causes an
infinite loop of the channel constantly being parked, announced, timed out,
parked, announced, timed out... while fun, especially for those callers you
wish to drive to the end of madness, this was not the intent of the
application.

(closes issue ASTERISK-20113)
Reported by: serginuez
patches:
  app_parkandannounce.diff uploaded by serginuez (License 6405)
........

Merged revisions 381916 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381917 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix FastAGI To Properly Check For A Connection
Michael L. Young [Fri, 22 Feb 2013 19:38:06 +0000 (19:38 +0000)] 
Fix FastAGI To Properly Check For A Connection

When IPv6 support was added to FastAGI, the intent was to have the ability to
check all addresses resolved for a host since we might receive an IPv4 address
and an IPv6 address.  The problem with the current code, is that, since we are
doing O_NONBLOCK, we get EINPROGRESS when calling ast_connect() but are ignoring
this instead of handling it.  We break out of the loop and continue on.  When we
later call ast_poll(), it succeeds but we never check if we have a connection or
not on the socket level.  We then attempt to send data to the host address that
we think is setup and it fails.  We then check the errno and see that we have
"connection refused" and then return with agi failed.

This patch does the following:

* Handles EINPROGRESS by creating the function handle_connection()
  - ast_poll() was moved into this function
  - This function checks the results of the connection on the socket level after
    calling ast_poll()
* Continues to the next address if the above fails to create a connection
* Once all addresses resolved are tried and we still are unable to establish a
  connection, then we return that the FastAGI call failed

(closes issue ASTERISK-21065)
Reported by: Jeremy Kister
Tested by: Jeremy Kister, Michael L. Young
Patches:
  asterisk-21065_poll_correctly_v4.diff Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2330/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381893 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_dial: Honor the 'c' flag when the calling party hangs up
Jonathan Rose [Fri, 22 Feb 2013 15:41:31 +0000 (15:41 +0000)] 
app_dial: Honor the 'c' flag when the calling party hangs up

Apparently this feature became broken in 11, probably as a result
of the Hangup Cause project.

(closes issue ASTERISK-21113)
Reprted by: Heiko Wundram
Patches:
app_dial.patch uploaded by Heiko Wundram (license 5822)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381880 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoProperly detect launchd
Matthew Jordan [Thu, 21 Feb 2013 22:48:14 +0000 (22:48 +0000)] 
Properly detect launchd

Asterisk was a little too pro-active in claiming that it found launchd. On
systems without launchd - such as FreeBSD - this resulted in certain items
in Asterisk that conflict with launchd to not be selectable, such as
res_timing_kqueue.

(closes issue ASTERISK-20749)
Reported by: Oleg Baranov
........

Merged revisions 381847 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381848 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoLet vm_mailbox_snapshot_create's combine option apply to "Urgent" as well
Matthew Jordan [Wed, 20 Feb 2013 19:14:32 +0000 (19:14 +0000)] 
Let vm_mailbox_snapshot_create's combine option apply to "Urgent" as well

The vm_mailbox_snapshot_create function has an option that combines the
contents of INBOX and Old into a single snapshot. The intent of this is that
both 'new' messages and 'deleted' messages are given in a single snapshot, as
some applications prefer this view of the voicemail world. Unfortunately, the
initial implementation ignored the "Urgent" folder. The "Urgent" folder is a
pseudo-INBOX, in that new messages left with the 'U' flag will be placed in
that folder as opposed to INBOX. Thus, the option failed the intent with which
it was added.

This patch makes it so that the "Urgent" folder is included in the snapshot
when that option is used.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381835 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoWrite the correct callid to the data1 field in queue_log for transfer events.
Kevin Harwell [Tue, 19 Feb 2013 19:44:58 +0000 (19:44 +0000)] 
Write the correct callid to the data1 field in queue_log for transfer events.

The incorrect callid was being written to the "data1" field in queue_log table
for transfer events.  The callid of the queue was being written instead of the
transfer target's callid.  This now gets the correct "transfer to" number and
places that in the "data1" field of the queue_log table when a transfer event
is triggered.

(closes issue ASTERISK-19960)
Reported by: vladimir shmagin
........

Merged revisions 381770 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381791 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoConfbridge channels staying active when all participants leave.
Kevin Harwell [Tue, 19 Feb 2013 16:21:18 +0000 (16:21 +0000)] 
Confbridge channels staying active when all participants leave.

If you started/stopped recording of a conference multiple times channels
would remain active even when all participants left the conference.  This
was due to the fact that a reference to the confbridge was being added
every time a start record command was issued, but when the recording was
stopped there was no matching de-reference thus keeping the conference alive.
Made sure only a single reference is added for the record thread no matter how
many times recording is started/stopped.  A de-reference is issued upon thread
ending.

Note, this issue is being fixed under AST-1088 since it relates to it and
should have been corrected along with those modifications.

(issue AST-1088)
Reported by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381737 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFixed Confbridge file recording deadlock and appending.
Kevin Harwell [Mon, 18 Feb 2013 22:21:10 +0000 (22:21 +0000)] 
Fixed Confbridge file recording deadlock and appending.

A deadlock occurred after starting/stopping and then restarting a confbridge
recording.  Upon starting a recording a record thread is created that holds a
lock until just before exiting.  Stopping the recording does not stop/exit the
thread or release the lock.  The thread waits until recording begins again.
Starting a stopped recording signals the thread to continue and start recording
again.  However restarting the recording also created another record thread
resulting in a deadlock.  The fix was to make sure the record thread was only
created once.

Also it was noted that filenames for the recordings were being concatenated for
each start/stop.  This was fixed by creating a new file for each conference
session and appending the actual recorded data within the file (e.g. passing
the 'a' option to MixMonitor).

(issue AST-1088)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/374/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381702 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRemove "registertrying" and add "rtp_engine" from/to sip.conf.sample
Walter Doekes [Mon, 18 Feb 2013 20:30:32 +0000 (20:30 +0000)] 
Remove "registertrying" and add "rtp_engine" from/to sip.conf.sample

The "registertrying" option was removed in r343220. The "rtp_engine"
option was added in r186078 but erroneously named "engine" in the sample.
Note that there is no global sip setting for a different engine.
........

Merged revisions 381668 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381669 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoPRESENCE_STATE: Provide better documentation for the 'e' option.
Jonathan Rose [Mon, 18 Feb 2013 19:43:10 +0000 (19:43 +0000)] 
PRESENCE_STATE: Provide better documentation for the 'e' option.

Notes that the 'e' option actually decodes data when used as a write function
such as with the SET application while it encodes data when used to read.

Review: https://reviewboard.asterisk.org/r/2335/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381655 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDon't send presencestate information if the state is invalid
Matthew Jordan [Sat, 16 Feb 2013 16:22:37 +0000 (16:22 +0000)] 
Don't send presencestate information if the state is invalid

Previously, presencestate information was sent whenever the state was not
NOT_SET. When r381594 actually returned INVALID presence state in all the
places it was supposed to, it caused chan_sip to start adding presence
state information to NOTIFY requests that it previously would not have
added. chan_sip shouldn't be adding presence state information when the
provider is in an invalid state; users can't set the state to invalid and
an invalid state always implies that the provider is in an error condition.

(issue AST-1084)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381613 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix crash in PresenceState AMI action when specifying an invalid provider
Matthew Jordan [Fri, 15 Feb 2013 23:23:49 +0000 (23:23 +0000)] 
Fix crash in PresenceState AMI action when specifying an invalid provider

This patch fixes a crash in Asterisk that could be caused by using the
PresenceState AMI action while providing an invalid provider. This patch
also adds some additional warnings when a user attempts to provide the
PresenceState action with invalid data, and removes some NOTICE statements
that were still lurking in the code from testing.

(closes issue AST-1084)
Reported by: John Bigelow
Tested by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381594 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix a crash that occurred when a BYE was received on a replaced dialog.
Mark Michelson [Fri, 15 Feb 2013 18:42:02 +0000 (18:42 +0000)] 
Fix a crash that occurred when a BYE was received on a replaced dialog.

Reference counting for the channel and its tech_pvt got messed up at
some point between 1.8 and 11. The result was that if a BYE for a dialog
that had been replaced (via an INVITE with Replaces) was received, Asterisk
would crash due to trying to access data on a channel that was no longer there.

The fix I introduced is to remove code that both unrefs the sip_pvt and sets
the channel's tech_pvt to NULL when an INVITE with Replaces is handled. This
way when a BYE is received, the tech_pvt will be non-NULL and so the BYE can
be processed and not cause a crash.

(closes issue ASTERISK-20929)
reported by Kristopher Lalletti
patches:
ASTERISK-20929.patch uploaded by Mark Michelson (License #5049)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381566 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoStopped spamming of debug messages during attended transfer.
Kevin Harwell [Fri, 15 Feb 2013 17:17:27 +0000 (17:17 +0000)] 
Stopped spamming of debug messages during attended transfer.

While autoservice is running and servicing a channel the callid is being stored
and removed in the thread's local storage for each iteration of the thread loop.
If debug was set to a sufficient level the log file would be spammed with callid
thread local storage debug messages.

Added a new function that checks to see if the callid to be stored is different
than what is already contained (if anything).  If it is different then
store/replace and log, otherwise just leave as is.  Also made it so all logging
of debug messages pertaining to the callid thread storage outputs only when
TEST_FRAMEWORK is defined.

(issue ASTERISK-21014)
(closes issue ASTERISK-21014)
Report by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2324/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381554 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_sip: Use video and text crypto attributes to append RTP profiles to SDP
Jonathan Rose [Fri, 15 Feb 2013 17:12:20 +0000 (17:12 +0000)] 
chan_sip: Use video and text crypto attributes to append RTP profiles to SDP

Some bad copy/pasting resulted in using the audio crypto attribute for both
text and video RTP. Also the audio crypto isn't set until after these, so it
was really just bad all around.

(closes ASTERISK-20905)
Reported by: Kristopher Lalletti
patches:
rtp_crypto_video_text.diff uploaded by Jonathan Rose (license 6182)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381553 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoEnd stuck DTMF if AST_SOFTHANGUP_ASYNCGOTO because it isn't a real hangup.
Richard Mudgett [Thu, 14 Feb 2013 19:44:39 +0000 (19:44 +0000)] 
End stuck DTMF if AST_SOFTHANGUP_ASYNCGOTO because it isn't a real hangup.

It doesn't hurt to check AST_SOFTHANGUP_UNBRIDGE either, but it should not
be set outside of a bridge.

(issue ASTERISK-20492)
........

Merged revisions 381466 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381467 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDon't throw a spurious error when using DBdeltree
Matthew Jordan [Thu, 14 Feb 2013 03:48:39 +0000 (03:48 +0000)] 
Don't throw a spurious error when using DBdeltree

The function call ast_db_deltree returns the number of row deleted, or a
negative number if it failed. DBdeltree was treating any non-zero return
as an error, causing a spurious verbose error message to be displayed.

This patch handles the return code of ast_db_deltree correctly.

(closes issue ASTERISK-21070)
Reported by: ianc
patches:
  dbdeltree.diff uploaded by ianc (License #5955)
........

Merged revisions 381364 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDo not allow native RTP bridging if packetization of media streams differs.
Mark Michelson [Tue, 12 Feb 2013 20:31:52 +0000 (20:31 +0000)] 
Do not allow native RTP bridging if packetization of media streams differs.

The RTP engine will no longer allow for local and remote native RTP bridges
if packetization of streams differs. Allowing native bridging in this scenario
has been known to cause FAX failures.

(closes ASTERISK-20650)
Reported by: Maciej Krajewski
Patches:
ASTERISK-20659.patch uploaded by Mark Michelson (License #5049)

Review: https://reviewboard.asterisk.org/r/2319
........

Merged revisions 381281 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381306 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix some more REF_DEBUG-related build errors
Kinsey Moore [Tue, 12 Feb 2013 20:16:45 +0000 (20:16 +0000)] 
Fix some more REF_DEBUG-related build errors

When sip_ref_peer and sip_unref_peer were exported to be usable in
channels/sip/security_events.c, modifications to those functions when
building under REF_DEBUG were not taken into account. This change
moves the necessary defines into sip.h to make them accessible to
other parts of chan_sip that need them.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381282 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoProperly load say.conf upon reload of module app_playback.
Kevin Harwell [Mon, 11 Feb 2013 20:55:04 +0000 (20:55 +0000)] 
Properly load say.conf upon reload of module app_playback.

If say.conf did not exists prior to originally loading module app_playback it
would not load on subsequent reloads of the module once it had been created.
This occurred because upon reload of the app_playback module it would only
load a new configuration if an old one had previously existed.  This fix simply
removed the association between checking if an old configuration existed and
the loading of the new one.

(closes issue ASTERISK-20800)
Reported by: pgoergler
........

Merged revisions 381216 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381217 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix crash in res_xmpp when deleting pubsub node from CLI
Matthew Jordan [Mon, 11 Feb 2013 15:03:40 +0000 (15:03 +0000)] 
Fix crash in res_xmpp when deleting pubsub node from CLI

An error existed in res_xmpp where it would attempt to delete attributes from
a node that itself was also deleted. Per the iksemel documentation, attributes
added using iks_insert are copied to the parent node's stack, and will be
reclaimed when that node is itself destroyed.

(closes issue ASTERISK-20982)
Reported by: marcelloceschia
patches:
  delete-node-fix.diff uploaded by marcelloceschia (License 6036)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381159 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_confbridge: Fix crash from receiving an AMI action after ConfBridge unloaded.
Richard Mudgett [Fri, 8 Feb 2013 17:29:40 +0000 (17:29 +0000)] 
app_confbridge: Fix crash from receiving an AMI action after ConfBridge unloaded.

Unloading ConfBridge caused the next AMI action received to crash
Asterisk.

* Add the missing unregister of AMI action ConfbridgeSetSingleVideoSrc
when ConfBridge is unloaded.

(closes issue ASTERISK-20994)
Reported by: Jeremy Kister
Patches:
      jira_asterisk_20994_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: Rusty Newton, Jeremy Kister

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381067 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFixed failing test from r380696.
David M. Lee [Wed, 6 Feb 2013 20:14:32 +0000 (20:14 +0000)] 
Fixed failing test from r380696.

When I added my extensive suite of session timer unit tests, apparently one of
them was failing and I never noticed. If neither Min-SE nor Session-Expires is
set in the header, it was responding with a Session-Expires of the global
maxmimum instead of the configured max for the endpoint.

(issue ASTERISK-20787)
........

Merged revisions 380973 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380974 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix reload skinny with active devices.
Damien Wedhorn [Wed, 6 Feb 2013 08:42:09 +0000 (08:42 +0000)] 
Fix reload skinny with active devices.

Patch ensures that d->activeline and l->activesub are moved over to the
new device and line so that on callend the appropriate subs can be found
to complete hangup before device resets.

(closes issue ASTERISK-16610)
Reported by: wedhorn
Tested by: snuffy, myself
Patches:
    skinny-reloadactive01.diff uploaded by wedhorn (license 5019)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380942 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoReset skinny vmexten on reload.
Damien Wedhorn [Wed, 6 Feb 2013 07:00:39 +0000 (07:00 +0000)] 
Reset skinny vmexten on reload.

Make skinny reset vmexten '\0' on reload to ensure that
it is set to '\0' if the appropriate item is removed/commented in
skinny.conf. part of ASTERISK-21037

Reported by: snuffy
Tested by: snuffy, myself
Patches:
    part of immed_dial_fix.diff uploaded by snuffy (license 5024)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380926 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_page and app_confbridge: Fix custom announcement on entering conference.
Richard Mudgett [Tue, 5 Feb 2013 19:09:40 +0000 (19:09 +0000)] 
app_page and app_confbridge: Fix custom announcement on entering conference.

The Page and ConfBridge custom announcement did not play when users
entered the conference.

* Fix the CONFBRIDGE(user,announcement) file not getting played.  The code
to do this got removed accidentally when the ConfBridge code was
restructured to be more state machine like.

* Fixed play_prompt_to_user() doxygen comments.

* Fixed the Page A(x) and n options for the caller.  The caller never
played the announcement file and totally ignored the n option.  The code
to do this was lost when the application was converted to use ConfBridge.

* Factored out setup_profile_bridge(), setup_profile_paged(), and
setup_profile_caller() routines to setup ConfBridge profiles.  Made each
profile setup routine use the default template if one has not already been
setup by dialplan.

(closes issue ASTERISK-20990)
Reported by: Jeremy Kister
Tested by: rmudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380894 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_confbridge: Fix error messages on exiting conference.
Richard Mudgett [Tue, 5 Feb 2013 18:49:32 +0000 (18:49 +0000)] 
app_confbridge: Fix error messages on exiting conference.

A marked user ending a conference with only end_marked users generates
error messages:
ERROR[0000][C-00000000]: confbridge/conf_state.c:47 conf_invalid_event_fn: Invalid event for confbridge user ''

* The MULTI_MARKED state was doing too much when it was kicking out the
end_marked users from the conference.  The kicked out users will clean up
after themselves when they exit the conference.

(closes issue ASTERISK-20991)
Reported by: Jeremy Kister
Tested by: rmudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380892 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_page: Fixup application XML documentation typos and inaccuracies.
Richard Mudgett [Tue, 5 Feb 2013 18:22:05 +0000 (18:22 +0000)] 
app_page: Fixup application XML documentation typos and inaccuracies.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380869 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoBecause the compiler can check types with a struct copy and memcpy() cannot.
Richard Mudgett [Tue, 5 Feb 2013 18:16:55 +0000 (18:16 +0000)] 
Because the compiler can check types with a struct copy and memcpy() cannot.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380856 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoSeparate option_types[] from the struct definition.
Richard Mudgett [Tue, 5 Feb 2013 18:10:46 +0000 (18:10 +0000)] 
Separate option_types[] from the struct definition.

Updated the option_types[] doxygen comment.
........

Merged revisions 380853 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380854 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix how we build pjproject.
Jason Parker [Mon, 4 Feb 2013 19:50:52 +0000 (19:50 +0000)] 
Fix how we build pjproject.

Allow parallel builds, better tolerate failures, build faster.

This also stops running dependencies before top-level configure has been run.

(closes issue ASTERISK-20815)

Review: https://reviewboard.asterisk.org/r/2292/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380816 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoIgnore warnings caused by PJ_TODO()s in pjproject.
Jason Parker [Thu, 31 Jan 2013 21:42:34 +0000 (21:42 +0000)] 
Ignore warnings caused by PJ_TODO()s in pjproject.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380736 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix a few compiler warnings.
Jason Parker [Thu, 31 Jan 2013 21:40:09 +0000 (21:40 +0000)] 
Fix a few compiler warnings.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380735 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoProcess session timers, even if Session-Expires header is missing
David M. Lee [Thu, 31 Jan 2013 20:10:23 +0000 (20:10 +0000)] 
Process session timers, even if Session-Expires header is missing

Previously, Asterisk only processed session timer information if both the
'Supported: timer' and 'Session-Expires' headers were present. However, the
Session-Expires header is optional. If we were to receive a request with a
Min-SE greater than our configured session-expires, we would respond with a
'Session-Expires' header that was too small.

This patch cleans the situation up a bit, always processing timer information
if the 'Supported: timer' header is present.

(closes issue ASTERISK-20787)
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/2299/
........

Merged revisions 380696 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380698 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd support for parallel builds of pjproject.
Jason Parker [Thu, 31 Jan 2013 19:03:03 +0000 (19:03 +0000)] 
Add support for parallel builds of pjproject.

Also adds proper dependency checking, and direct .a file targets.  We don't
take advantage of this currently, but we will soon.

(issue ASTERISK-20815)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380673 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAlways check for libm, regardless of configure options.
Jason Parker [Thu, 31 Jan 2013 19:00:38 +0000 (19:00 +0000)] 
Always check for libm, regardless of configure options.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380672 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRemove a cross-compile workaround.
Jason Parker [Thu, 31 Jan 2013 18:59:28 +0000 (18:59 +0000)] 
Remove a cross-compile workaround.

ar and ranlib can be easily detected with autoconf.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380671 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake CHECK_BLOCKING() debug message more useful.
Richard Mudgett [Thu, 31 Jan 2013 00:30:53 +0000 (00:30 +0000)] 
Make CHECK_BLOCKING() debug message more useful.

Change the displayed pthread value to hex format so it can be easily
matched with CLI core show threads or gdb.
........

Merged revisions 380611 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380612 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_dahdi: Fix "dahdi show channels group" for groups greater than 31.
Richard Mudgett [Wed, 30 Jan 2013 21:51:12 +0000 (21:51 +0000)] 
chan_dahdi: Fix "dahdi show channels group" for groups greater than 31.

The variable type used was not large enough to hold a group bit field.
........

Merged revisions 380572 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380575 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoSupport building Asterisk for Raspberry Pi/Raspbian with hard-float support
Matthew Jordan [Wed, 30 Jan 2013 17:46:52 +0000 (17:46 +0000)] 
Support building Asterisk for Raspberry Pi/Raspbian with hard-float support

Building Asterisk on Raspbian with hard-float support fails as it uses the
string 'linux-gnueabihf' for host os, as opposed to 'linux-gnueabi'. This patch
modifies the configure script for Asterisk such that it will match on any
string beginning with 'linux-gnueabi', as opposed to requiring an explicit
match.

(closes issue ASTERISK-21006)
Reported by: Christian Hesse
Tested by: Christian Hesse
patches:
  linux-gnueabihf.patch uploaded by Christian Hesse (license 6459)
  linux-gnueabihf-autoconf.patch uploaded by Christian Hesse (license 6459)
........

Merged revisions 380520 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380521 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUnregister SIP provider API if module load is declined
Matthew Jordan [Wed, 30 Jan 2013 15:07:59 +0000 (15:07 +0000)] 
Unregister SIP provider API if module load is declined

A user in #asterisk ran into a problem where a configuration error prevented
the chan_sip module from being loaded. Upon fixing their configuratione error,
they could no longer load the chan_sip module. This was because the
configuration checking happened after the SIP provider was registered with the
Asterisk core, and subsequent attempts to load the SIP module failed as the
provider was already registered.

Since we want to detect any failure in registering chan_sip as early as
possible (as that could be emblematic of a deeper mismatch between module
and Asterisk core), this patch does not change the registration location, but
does ensure that if a module load is declined, we unregister the module as
the SIP api provider.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380480 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoPerform case insensitive comparisons for T.38 attributes
Matthew Jordan [Wed, 30 Jan 2013 14:20:47 +0000 (14:20 +0000)] 
Perform case insensitive comparisons for T.38 attributes

RFC5347 section 2.5.2 states the following:
...
The attribute "T38MaxBitRate" was once incorrectly registered with
IANA as "T38maxBitRate" (lower-case "m"). In accordance with T.38
examples and common implementation practice, the form "T38MaxBitRate"
SHOULD be generated by implementations conforming to this package.
In general, it is RECOMMENDED that implementations of this package
accept lowercase, uppercase, and mixed upper/lowercase encodings of
all the T.38 attributes.
...

Asterisk currently does not perform case insensitive matching on the T.38
attributes. This causes the T38MaxBitRate attribute to be negotiated at
2400 baud instead of 14400 (or whatever value you actually wanted).

This patch makes it so that when we compare T.38 attributes, we do so in a case
insensitive fashion.

Note that while the issue reporter did not directly write the patch, they
contributed to it (and would have provided one themselves if the license had
gone through a tad faster), and hence get attribution for it.

Review: https://reviewboard.asterisk.org/r/2298/

(closes issue ASTERISK-20897)
Reported by: Eric Hill
Tested by: Eric Hill
patches:
  -- uploaded by Eric Hill
........

Merged revisions 380458 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380465 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix memory leak in res_calendar_icalendar
Matthew Jordan [Wed, 30 Jan 2013 14:15:27 +0000 (14:15 +0000)] 
Fix memory leak in res_calendar_icalendar

The ICalendar module had a systemic memory leak on each fetch of data from
the ICalendar source. The previous fetched data was not being properly
disposed. This patch makes it so that before each fetch of data, we dispose
of the previously fetched data.

(closes issue ASTERISK-21012)
Reported by: Joel Vandal
Tested by: Joel Vandal
........

Merged revisions 380451 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380452 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_agent: Prevent multiple channels from logging in as the same agent.
Richard Mudgett [Tue, 29 Jan 2013 17:54:17 +0000 (17:54 +0000)] 
chan_agent: Prevent multiple channels from logging in as the same agent.

Multiple channels logging in as the same agent can result in dead channels
waiting for a condition signal that will never come because another
channel thread stole it.  A symptom is chan_sip repeatedly generating
warning messages about rescheduling autodestruction of dialogs with an
agent channel owner.

* Made only login_exec() (the app AgentLogin) clear the agent_pvt->chan
pointer to prevent multiple channels from logging in as the same agent.
agent_read(), agent_call(), and agent_set_base_channel() no longer
disconnect the agent channel from the agent_pvt.  This also eliminates the
need to keep checking for agent_pvt->chan being NULL.

* Made agent_hangup() not wake up the AgentLogin agent thread until it is
done.

* Made agent_request() not able to get the agent until he has logged in
and any wrapup time has expired.

* Made agent_request() use ast_hangup() instead of agent_hangup() to
correctly dispose of a channel.

* Removed agent_set_base_channel().  Nobody calls it and it is a bad thing
in general.

* Made only agent_devicestate() determine the current device state of an
agent.  Note: Agent group device states have never been supported.

Review: https://reviewboard.asterisk.org/r/2260/
........

Merged revisions 380364 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380384 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCorrected crypto tag in SDP ANSWER for SRTP. (again)
David M. Lee [Tue, 29 Jan 2013 17:14:51 +0000 (17:14 +0000)] 
Corrected crypto tag in SDP ANSWER for SRTP. (again)

The original fix (r380043) for getting Asterisk to respond with the correct
tag overlooked some corner cases, and the fact that the same code is in 1.8.

This patch moves the building of the crypto line out of
sdp_crypto_process(). Instead, it merely copies the accepted tag. The call to
sdp_crypto_offer() will build the crypto line in all cases now, using a tag of
"1" in the case of sending offers.

(closes issue ASTERISK-20849)
Reported by: José Luis Millán
Review: https://reviewboard.asterisk.org/r/2295/
........

Merged revisions 380347 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380350 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agocall_parking: Make sure fallbacks are used when lacking a flat channel exten
Jonathan Rose [Tue, 29 Jan 2013 17:05:23 +0000 (17:05 +0000)] 
call_parking: Make sure fallbacks are used when lacking a flat channel exten

A regression was introduced which removed automatic fallback behavior from
the PBX. This behavior was used by call parking (or at least documented as
how the feature works) in order to select an extension when the flat channel
extension wasn't available from the comebackcontext. Parking now handles
the fallbacks internally in order to keep behavior matching with how it is
documented.

(closes issue ASTERISK-20716)
Reported by: Chris Gentle
Review: https://reviewboard.asterisk.org/r/2296/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380348 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoEnsure that a declined media stream is terminated with a '\r\n'
Matthew Jordan [Tue, 29 Jan 2013 14:45:46 +0000 (14:45 +0000)] 
Ensure that a declined media stream is terminated with a '\r\n'

In r369028, chan_sip's processing of media streams in an SDP was modified to
better handle multiple offered media streams. Part of that change modified
how streams were declined. Previously, declined media streams were not
handled in an RFC compliant manner; now, we set the port number to 0 in the
media stream definition and proceed on with the next media stream.

Unfortunately, the formatting of the declined media stream forgot to append a
'\r\n' to the end of the media stream. This is normally added to the accepted
media streams later on in the processing of the SDP. Since the declined media
stream uses a different buffer than the accepted media streams (and is a
malloc'd buffer as opposed to a struct ast_str), it's easier to just slap the
'\r\n' on the declined media stream buffer rather than attempt to append it
later on.

So, that's what we do. And now some devices (and probably some providers) will
be a bit happier (but probably not terribly happy, since we just rejected
something they offered).

Review: https://reviewboard.asterisk.org/r/2297/

(closes issue ASTERISK-20908)
Reported by: Dennis DeDonatis
Tested by: Dennis DeDonatis

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380331 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate configure script to be compatible with ptlib 2.10.9
Matthew Jordan [Tue, 29 Jan 2013 02:09:51 +0000 (02:09 +0000)] 
Update configure script to be compatible with ptlib 2.10.9

With ptlib 2.10.9, the configure script fails due to grep returning multiple
matches for the pattern it searches for. This patch updates the pattern
matching to return only the actual version for the symbol searched for,
PTLIB_VERSION.

(closes issue ASTERISK-20980)
Reported by: Stefan Reuter
patches:
  ASTERISK-20980-1.patch uploaded by Stefan Reuter (license 5339)
........

Merged revisions 380297 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380298 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCorrect the number of available call numbers in IAX2.
Sean Bright [Mon, 28 Jan 2013 21:08:04 +0000 (21:08 +0000)] 
Correct the number of available call numbers in IAX2.

There is currently an edge case where call number 32768 might be allocated for
a call, even though the IAX2 protocol requires call numbers be only 15 bits.
This resulted in some unpredictable behavior when call number 32678 is chosen.

This patch was mostly written by Richard Mudgett via ReviewBoard.  I'm just
committing it.

Review: https://reviewboard.asterisk.org/r/2293/
........

Merged revisions 380254 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380255 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChange cleanup ordering in filestream destructor.
Russell Bryant [Mon, 28 Jan 2013 01:57:26 +0000 (01:57 +0000)] 
Change cleanup ordering in filestream destructor.

This patch came about due to a problem observed where wav files had an
empty header.  The header is supposed to be updated in wav_close().  It
turns out that this was broken when the cache_record_files option from
asterisk.conf was enabled.  The cleanup code was moving the file to its
final destination *before* running the close() method of the file
destructor, so the header didn't get updated.

Another problem here is that the move was being done before actually
closing the FILE *.

Finally, the last bug fixed here is that I noticed that wav_close()
checks for stream->filename to be non-NULL.  In the previous cleanup
order, it's checking a pointer to freed memory.  This doesn't actually
cause anything to break, but it's treading on dangerous waters.  Now the
free() of stream->filename is happening after the format module's
close() method gets called, so it's safer.

Review: https://reviewboard.asterisk.org/r/2286/
........

Merged revisions 380210 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380211 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix Some Configured Conference Bridge Sounds Not Being Set
Michael L. Young [Sun, 27 Jan 2013 20:31:39 +0000 (20:31 +0000)] 
Fix Some Configured Conference Bridge Sounds Not Being Set

The "sound_only_one" sound was not being set even though it was configured.  In
looking into this, I found that the "join" and "leave" prompts were not being
set either.

(closes issue ASTERISK-20898)
Reported by: Stephan
Tested by: Stephan
Patches:
    asterisk-20898-custom-sounds-ignored.diff uploaded by
                                                 Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2289/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380193 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCorrected crypto tag in SDP ANSWER for SRTP.
David M. Lee [Thu, 24 Jan 2013 16:39:33 +0000 (16:39 +0000)] 
Corrected crypto tag in SDP ANSWER for SRTP.

When Asterisk responds with an SDP ANSWER for SRTP, it had the code to
correctly fill in the crypto data, which was overwritten by a call to
sdp_crypto_offer. Corrected the situation by changing sdp_crypto_offer
to not replacing crypto data if it already exists.

(closes issue ASTERISK-20849)
Reported by: José Luis Millán
Tested by: Iñaki Baz Castillo
Patches:
fix_sdp_crypto_tags.diff uploaded by Pedro Kiefer (license 6407)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380043 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCorrect documentation for ConfbridgeList AMI action
Matthew Jordan [Thu, 24 Jan 2013 04:01:27 +0000 (04:01 +0000)] 
Correct documentation for ConfbridgeList AMI action

The documentation for ConfbridgeList states that the Conference field is
optional. That's not really the case: if you fail to provide a Conference
number, the command will kick back an error.

(closes issue AST-1090)
Reported by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380028 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAttempt to be more helpful when using a bad ao2 object pointer.
Richard Mudgett [Wed, 23 Jan 2013 00:23:26 +0000 (00:23 +0000)] 
Attempt to be more helpful when using a bad ao2 object pointer.

Put the external obj pointer in the message instead of the internal version.
........

Merged revisions 379963 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379964 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agores_fax_spandsp: fix t38 transmission bug caused by not returning success
Jonathan Rose [Tue, 22 Jan 2013 22:05:14 +0000 (22:05 +0000)] 
res_fax_spandsp: fix t38 transmission bug caused by not returning success

This patch fixes the problem, but the issue includes a test which is still
being considered for the automated test suite.

(issue ASTERISK-20919)
Reported by: NITESH BANSAL
Patches:
patch_ast_fax_spandsp.patch uploaded by NITESH BANSAL (license 6418)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379949 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_meetme: Use new prompts for administrator menu
Jonathan Rose [Tue, 22 Jan 2013 19:07:42 +0000 (19:07 +0000)] 
app_meetme: Use new prompts for administrator menu

The old prompts for the administrator menu were inadequate. They didn't mention
that the menu had additional options through the 8 key and pressing the 8 key
wouldn't reveal what those options were. This patch fixes all of that while
also organizing code pertaining to each individual menu type which was
previously all stored in one gigantic function along with many of the basic
conference functions.

(closes issue AST-996)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/360/
........

Merged revisions 379885 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379892 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix station ringback; trunk hangup issues in SLA
Matthew Jordan [Tue, 22 Jan 2013 14:51:54 +0000 (14:51 +0000)] 
Fix station ringback; trunk hangup issues in SLA

This patch fixes two bugs:
 * If an outbound call is made from a SLA phone using SLAStation, then there is
   no ringtone audible to the phone that originates the call. The indication of
   the ringing was not being passed to the SLA station; this patch fixes that
   by passing through the progress indications.
 * If an SLA station hangs up before the called party answers, then the channel
   to the called party continues to ring until a timeout occurs. If the called
   party manages to answer, Asterisk attempts to connect the called party to
   a non-existant MeetMe room. This patch corrects the behavior by abandoning
   the call attempt if it detects that the SLA station is no longer in use
   while attempting to call the called party.

Review: https://reviewboard.asterisk.org/r/2275/

(closes issue ASTERISK-20462)
Reported by: dkerr
patches:
  asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
  asterisk-11-bugid20462.patch uploaded by dkerr (license 5558)

(closes issue ASTERISK-20440)
Reported by: dkerr
patches:
  asterisk-11-bugid20440.patch uploaded by dkerr (license 5558)
  asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
........

Merged revisions 379825 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379826 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoconfbridge: Minor fixes playing user counts to the conference.
Richard Mudgett [Tue, 22 Jan 2013 00:35:34 +0000 (00:35 +0000)] 
confbridge: Minor fixes playing user counts to the conference.

* Generate a warning message if sound files do not exist when trying to
play the user count to the conference.  Use the new helper routine
sound_file_exists() for consistency.

* Put the new user into autoservice when playing user counts to the
conference.

* Check the return value of ast_bridge_impart().

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUpdate init.d scripts to handle stderr; readd splash screen for remote consoles
Matthew Jordan [Mon, 21 Jan 2013 20:40:13 +0000 (20:40 +0000)] 
Update init.d scripts to handle stderr; readd splash screen for remote consoles

When r376428 was commited to re-order start up sequences to be more tolerant of
forking with thread primitives, a few items were changed that caused changes
in behavior on some distros. This includes:
 * Not displaying the splash screen on a remote console.
 * Displaying an error message on stderr when a remote console cannot connect
   to a running instance of Asterisk.

In the first case, the splash screen was re-added (thanks to Michael L. Young).
In the second case, the various init.d scripts were modified to pipe stderr
to /dev/null, as the error message is useful - if you execute a remote
console or a remote console command execution and it fail, it should tell
you. Note that the error message was always present, it just failed to be
printed prior to r376428.

Much thanks to the folks who quickly reported this problem, provided solutions,
and promptly tested the various init.d scripts on a variety of distros.

(closes issue ASTERISK-20945)
Reported by: Warren Selby
Tested by: Michael L. Young, Jamuel Starkey, kaldemar, Danny Nicholas, mjordan
patches:
  asterisk-20945-remote-intro-msg.diff uploaded by elguero (license 5026)
  ASTERISK-20945-1.8-mjordan.diff uploaded by mjordan (license 6283)
........

Merged revisions 379760 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 379777 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379790 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoPrevent segfault for interpolated iLBC frames
Kinsey Moore [Mon, 21 Jan 2013 18:33:12 +0000 (18:33 +0000)] 
Prevent segfault for interpolated iLBC frames

When iLBC is being used with a jitter buffer and the jb has to
interpolate frames, it generates frames with a null pointer and a
non-zero datalen. This is now handled properly.

(closes issue ASTERISK-20914)
Reported By: John McEleney
Patches:
  ASTERISK-20914-1.8.diff uploaded by Matt Jordan (license 6283)
........

Merged revisions 379718 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379719 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix device call logging issues in skinny
Damien Wedhorn [Mon, 21 Jan 2013 06:27:24 +0000 (06:27 +0000)] 
Fix device call logging issues in skinny

Skinny device call logging (ie missed, place and received calls) has issues
because the incorrect sequence of callstates is/can be sent to the device.
This patch removes some extra callstate updates driven by forces external
to skinny and ensures the needed intermediary callstate messages are sent.

(closes issue ASTERISK-20964)
Reported by: wedhorn
Tested by: snuffy, myself
Patches:
    ast11-skinny-calllog01.diff uploaded by wedhorn (license 5019)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379677 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd LDAP libraries to install script
Andrew Latham [Mon, 21 Jan 2013 04:39:23 +0000 (04:39 +0000)] 
Add LDAP libraries to install script

Add LDAP dev package to Debian/Ubuntu install list.  Existed in Redhat already.

(issue ASTERISK-20886)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379643 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix crash in app_minivm when mime encoding string
Matthew Jordan [Mon, 21 Jan 2013 04:07:05 +0000 (04:07 +0000)] 
Fix crash in app_minivm when mime encoding string

An incorrect string initializations was left in ast_str_encode_mime from the
patch that converted string manipulations to use ast_str strings (r191140).
The string initialization causes a crash when ast_str_set is called on
the string later on in the function.

(closes issue ASTERISK-18697)
Reported by: Chris Boot
patches:
  minivm-null-pointer-dereference-fix.patch uploaded by bootc (license 6309)

(issue ASTERISK-20854)
Reported by: Chris Warr
Tested by: Chris Warr
........

Merged revisions 379608 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379609 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix issues with skinny sessions
Damien Wedhorn [Sun, 20 Jan 2013 02:53:29 +0000 (02:53 +0000)] 
Fix issues with skinny sessions

Fixes a couple of issues with the way skinny handles sessions by ensuring
sessions aren't used after being freed. Some other minor changes.

Review: https://reviewboard.asterisk.org/r/2272/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379582 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd builtin roundf() for systems lacking it.
Walter Doekes [Sat, 19 Jan 2013 20:49:43 +0000 (20:49 +0000)] 
Add builtin roundf() for systems lacking it.

(closes issue ASTERISK-16854)
Review: https://reviewboard.asterisk.org/r/2276
Reported-by: Ovidiu Sas
........

Merged revisions 379547 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379548 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix astcanary startup problem due to wrong pid value from before daemon call
Matthew Jordan [Sat, 19 Jan 2013 00:17:53 +0000 (00:17 +0000)] 
Fix astcanary startup problem due to wrong pid value from before daemon call

When Asterisk forks itself into the background via a call to daemon, it must
re-set the pid value of the new process. Otherwise, astcanary gets the pid
value of the process before the fork, which prevents it from running. Asterisk
eventually starts lowering its priority, as it can no longer communicate
with the proverbial canary in the coal mine.

This patch ensures that the correct process identifier is used by astcanary.

Note that this is getting committed to 10 as a regression fix.

(closes issue ASTERISK-20947)
Reported by: Jakob Hirsch
Tested by: mjordan
patches:
  asterisk-10.12.0.astcanary_ppid.diff uploaded by Jakob Hirsch (license 6113)
........

Merged revisions 379509 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 379510 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379513 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix regression in Confbridge user count
Kinsey Moore [Fri, 18 Jan 2013 21:46:58 +0000 (21:46 +0000)] 
Fix regression in Confbridge user count

When the restructuring work got committed to Confbridge in r375470 to
fix many open issues, it caused a regression in the reported count of
users when conference information was requested via CLI or manager.
This corrects the user count and user information displayed when
listing conference information from the CLI and manager.

(closes issue ASTERISK-20938)
Reported By: Timo Teras
Patches:
  confbridge-list.patch uploaded by Timo Teras (license 5409)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379478 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoSpecify the -rpath linker flag when prefix != /usr.
David M. Lee [Fri, 18 Jan 2013 21:10:23 +0000 (21:10 +0000)] 
Specify the -rpath linker flag when prefix != /usr.

This allows Asterisk to start without having to specify the
LD_LIBRARY_PATH. This can be disabled by passing --disable-rpath to
configure.

(closes issue ASTERISK-20407)
Reported by: David M. Lee
Review: https://reviewboard.asterisk.org/r/2132/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379475 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoapp_voicemail: Improve msg_id handling
Jonathan Rose [Fri, 18 Jan 2013 18:13:58 +0000 (18:13 +0000)] 
app_voicemail: Improve msg_id handling

app_voicemail will no longer issue error messages when it retrieves an msg_id
with a NULL value from realtime and will instead simply populate the msg_id
field with a newly generated msg_id. In addition, this patch changes the way
msg_ids are generated to eliminate certain causes of duplicate IDs appearing
within a single system. In addition, when messages are copied, they will now
receive a new msg_id.

(closes issue ASTERISK-20717)
Reported by: Alec Davis
Review: https://reviewboard.asterisk.org/r/2220/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379460 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix Record-Route parsing for large headers.
David M. Lee [Fri, 18 Jan 2013 05:26:56 +0000 (05:26 +0000)] 
Fix Record-Route parsing for large headers.

Record-Route parsing copied the header into a char[256] array, which can
be a problem if the header is longer than that. This patch parses the
header in place, without the copy, avoiding the issue.

In addition to the original patch, I added a unit test for the new
get_in_brackets_const function.

(closes issue ASTERISK-20837)
Reported by: Corey Farrell
Patches:
chan_sip-build_route-optimized-rev1.patch uploaded by Corey Farrell (license 5909)
(with minor changes by dlee)
........

Merged revisions 379392 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379393 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix issue where chan_mobile fails to bind to first available port
Matthew Jordan [Thu, 17 Jan 2013 02:30:29 +0000 (02:30 +0000)] 
Fix issue where chan_mobile fails to bind to first available port

Per the bluez API, in order to bind to the first available port, the rc_channel
field of the socket addressing structure used to bind the socket should be set
to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
to connect to whatever happens to be on port 1.

We could probably not explicitly set rc_channel to 0 since we memset the struct
earlier, but explicitly setting it will hopefully prevent someone from coming
in and setting it to some explicit port in the future.

(closes issue ASTERISK-16357)
Reported by: challado
Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn
patches:
  ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253)
........

Merged revisions 379342 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379343 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFurther fix misinformation in the description of manager MailboxStatus command.
Mark Michelson [Wed, 16 Jan 2013 22:49:59 +0000 (22:49 +0000)] 
Further fix misinformation in the description of manager MailboxStatus command.

The description still claimed that it returned the number of messages rather than
whether there were messages waiting.
........

Merged revisions 379310 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoReduce number of packages install_prereq installs on Debian systems.
Jason Parker [Wed, 16 Jan 2013 21:13:15 +0000 (21:13 +0000)] 
Reduce number of packages install_prereq installs on Debian systems.

'search' will look for any package containing the name provided, so we need to
force a more exact search.
........

Merged revisions 379276 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379277 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoReduce call-id logging resource usage.
Richard Mudgett [Wed, 16 Jan 2013 18:08:27 +0000 (18:08 +0000)] 
Reduce call-id logging resource usage.

Since there is no need for the call-id logging ao2 object to have a lock,
don't create it with one.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379232 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agochan_misdn: Fix compile error.
Richard Mudgett [Wed, 16 Jan 2013 17:48:29 +0000 (17:48 +0000)] 
chan_misdn: Fix compile error.

(issue ASTERISK-15456)
........

Merged revisions 379226 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379230 65c4cc65-6c06-0410-ace0-fbb531ad65f3