Commit Graph

21902 Commits

Author SHA1 Message Date
Jonathan Rose 8d994bed55 Fix a segmentation fault when using an extension with CID matching and no CID.
Attempting to call an extension which used Caller ID matching with a channel that
has an empty caller id string would result in a segmentation fault.

(closes issue ASTERISK-18392
Reported By: Ales Zelenik
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11 15:47:39 +00:00
Richard Mudgett 751488b84c Fix app_macro.c MODULEINFO section termination.
(closes issue ASTERISK-18848)
Reported by: Tony Mountifield
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 23:21:30 +00:00
Richard Mudgett 46089f6b51 Fix potential deadlock calling ast_call() with channel locks held.
Fixed app_queue.c:ring_entry() calling ast_call() with the channel locks
held.  Chan_local attempts to do deadlock avoidance in its ast_call()
callback and could deadlock if a channel lock is already held.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 23:02:46 +00:00
Richard Mudgett 464b337b3c Make AMI event AgentCalled get CallerID/ConnectedLine info from the incoming channel.
It was strange that the AgentCalled AMI event would get most of its
information from the incoming channel but then get the CallerID
information from the outgoing channel.  Before connected line support was
added, this information was always the same at this point.

(closes issue ASTERISK-18152)
Reported by: Thomas Farnham
Tested by: rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 22:38:29 +00:00
David Vossel 0a2a79c94b Merged revisions 344493 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r344493 | dvossel | 2011-11-10 15:54:42 -0600 (Thu, 10 Nov 2011) | 12 lines
  
  Fixes issue with ConfBridge participants hanging up during DTMF feature menu usage getting stuck in conference forever.
  
  When a conference user enters the DTMF menu they are suspended from the
  bridge while the channel is handed off to the DTMF feature code.  If a
  user entered this state and hungup, there existed a race condition where
  the channel could not exit the conference because it was waiting on a
  signal that would never arrive.  This patch fixes that, because it would
  stupid for me to talk about the problem and commit a patch for something else.
  
  (closes issue ASTERISK-18829)
  Reported by: zvision
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 21:56:16 +00:00
Kinsey Moore dc05ce5e4f Fix another incorrect case with meetme's PIN logic and add documentation
This fixes an issue where a user of a dynamic conference was asked for a PIN
twice.  This also adds documentation to assist in future modifications to the
piece of code responsible for PIN checking.

(closes issue AST-670)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 21:15:39 +00:00
Kinsey Moore c225800646 Fix several bugs with SDP parsing and well-formedness of responses
Fix bug ASTERISK-16558 which dealt with the order of responses to incoming
streams defined by SDP.

Fix unreported bug where offering multiple same-type streams would cause
Asterisk to reply with an incorrect SDP response missing one or more streams
without a proper declination.

Fix bugs related to a single non-audio stream being offered with responses
requesting codecs that were not offered in the initial invite along with an
additional audio stream that was not in the initial invite.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 18:15:02 +00:00
Matthew Nicholson 3d44965e70 only attempt to do stun handling on ipv4 or ipv4 mapped to ipv6 addresses
Patch by: jkonieczny (modified)
ASTERISK-18490
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 16:29:13 +00:00
Richard Mudgett 6d481420ce Fix deadlock during dialplan reload.
Another deadlock between the conlock/hints and channels/channel locking
orders.

* Don't hold the channel and private lock in sip_new() when calling
ast_exists_extension().

(closes issue ASTERISK-18740)
Reported by: Byron Clark
Patches:
      sip_exists_exten_dlock_3.diff (license #5041) patch uploaded by Gregory Hinton Nietsky
      ASTERISK-18740.patch (license #6157) patch uploaded by Byron Clark
Tested by: Byron Clark
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 20:55:43 +00:00
Terry Wilson 04f04ff39d Don't treat a host:port string as a domain
The domain matching code prior to 1.8 used to manually remove the port
from the host:port string when determining if an incoming request
matched the list of domains. When switching to the new parsing
functions, the documentation implied that the "domain" was being
returned by these functions, when instead it was returning the
"hostport" as defined by RFC 3261. This led to confusion and resulted
in 1.8+ rejecting an incoming request from x.x.x.x:xxxxx when
domain=x.x.x.x was set in sip.conf.

This patch renames the "domain" variables in the parsing functions to
"hostport" to more accurately describe what it is that they are
returning and also properly truncates the resulting hostport strings
when dealing with domain matching.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 20:10:52 +00:00
Terry Wilson fa57bbe17c Add a unit test for ast_sockaddr_split_hostport
Review: https://reviewboard.asterisk.org/r/1575/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 19:31:27 +00:00
Alexandr Anikin 31ee82863c Generate response to Status Enquiry message with Status q.931 message.
Some PBXes require this for call status checking

(closes issue ASTERISK-18748)
Reported by: Fabrizio Lazzaretti
Patches:
      ASTERISK-18748-5.patch (License #5415) patch uploaded by may213
Tested by: Fabrizio Lazzaretti
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 19:08:44 +00:00
Kinsey Moore c1647ab33a Fix pin parameter behavior regression in MeetMe
The last time this code was touched (by me), a subtlety was missed based on the
difference between needing to check a pin's validity and the need to prompt
for a pin.

(closes issue ASTERISK-18488)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 17:15:44 +00:00
Matthew Nicholson 5203e0f552 don't call ltohl() twice on the same value
ASTERISK-18739
Patch by: pawel (modified)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 15:28:33 +00:00
Richard Mudgett 9537f22c54 Residual changes for Asterisk v10 branch from ASTERISK-18747.
Residual changes for Asterisk v10 branch from ASTERISK-18747 after
https://reviewboard.asterisk.org/r/1564/ commit and associated dialogs
callid hash key change fix.

* Make check_rtp_timeout() return CMP_MATCH if need to delete dialog from
dialogs_rtpcheck.  This is an optimization to avoid an unneeded
lock/unlock and object search when using ao2_unlink.

* Prevent crash in check_rtp_timeout() if dialog->rtp is NULL.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 22:14:38 +00:00
Walter Doekes bc370b5462 Fix crash when dialplan remove include is called with too few arguments.
"dialplan remove include x from y" crashed when the amount of arguments
was less than 6.

(closes issue ASTERISK-18762)
Reported by: Andrey Solovyev
Tested by: Andrey Solovyev
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 19:29:25 +00:00
David Vossel 5cb719acec Merged revisions 343900 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r343900 | dvossel | 2011-11-08 12:29:33 -0600 (Tue, 08 Nov 2011) | 11 lines
  
  Fixes regression caused by r343635
  
  There was a missing unlock for a function return that is only
  present in Asterisk 10 and Asterisk Trunk.
  
  (closes issue ASTERISK-18839)
  Reported by: Michael L. Young
  Patches:
      asterisk-18839-missing-lock-trunk-v2.diff (License #5026) patch uploaded by Michael L. Young
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 18:35:19 +00:00
Richard Mudgett cee432c9d8 Fixed reference to incorrect variable if unknown host configured crash.
* Fixed a LOG_ERROR message referencing the config variable list v that
had previously been processed and became NULL.

* Added error return value set that was missing in an ast_append_ha()
error return path.

(closes issue ASTERISK-18743)
Reported by: Michele
Patches:
      issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes
Tested by: Michele
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 18:02:51 +00:00
Leif Madsen a46f6d142c Fix boo-boo in prep_tarball script.
A hardcoded a branch number was in the prep_tarball which could not work. Changed
it to the  variable.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 13:23:27 +00:00
Kinsey Moore 5249a147b8 Make "sip show settings" CLI command get RPID flags from the right global page
The "Trust RPID" and "Send RPID" entries in the "sip show settings" CLI command
pulled the flags from the incorrect global flags page.  These are now read from
sip global flags page 0.

(closes issue AST-711)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 22:37:51 +00:00
Leif Madsen 02f886b5a2 Allow built in variables to be used with dynamic weights.
You can now use the built in variables , , and 
within a dynamic weight. For example, this could be useful when you want
to pass requested lookup number to the SHELL() function which could be
used to execute a script to dynamically set the weight of the result.

(Closes issue ASTERISK-13657)
Reported by: Joel Vandal
Tested by: Leif Madsen, Russell Bryant
Patches:
     asterisk-1.6-dundi-varhead.patch uploaded by Joel Vandal (License #5374)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 21:58:14 +00:00
Matthew Nicholson 2b6ebcb9e9 respect case changes in peer names on sip reload
ASTERISK-18669
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 21:44:05 +00:00
Richard Mudgett 98e494d4a0 Fix __sip_subscribe_mwi_do() incorectly changing dialogs hash key callid.
Changing an object value used as a container key requires removing the
object from the container and reinserting it.

* Created change_callid_pvt() to call instead of build_callid_pvt().  The
change_callid_pvt() will correctly change the dialog callid so the ao2
conainter can explicitly unlink it.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 21:29:01 +00:00
Kinsey Moore 1c526d3d7d Prevent BLF subscriptions from causing deadlocks
Fix a locking inversion in sip_send_mwi_to_peer that was causing deadlocks.
This function now requires that both the peer and associated pvt be unlocked
before it is called for cases where peer and peer->mwipvt form a circular
reference.

(closes issue ASTERISK-18663)
Review: https://reviewboard.asterisk.org/r/1563/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 20:35:58 +00:00
Walter Doekes 00a522c000 Correct the default udptl port range.
The udptl port range was defined as 4000-4999 in the udptl.conf.sample,
as 4500-4599 if you didn't have a config and 4500-4999 if your config
was broken. Default is now 4000-4999.

(closes issue ASTERISK-16250)
Reviewed by: Tilghman Lesher

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 19:58:44 +00:00
Richard Mudgett 7a5f6684f0 Fix deadlock if peer is destroyed while sending MWI notice.
A dialog cannot be destroyed by the ao2_callback dialog_needdestroy
because of a deadlock between the dialogs container lock and the RWLOCK of
the events subscription list.

* Create dialogs_to_destroy container to hold dialogs that will be
destroyed.

* Ensure that the event subscription callback will never happen with an
invalid peer pointer by making the event callback removal the first thing
in the peer destructor callback.

NOTE: This particular deadlock will not happen with Asterisk 10, but some
of the changes still apply.

(closes issue ASTERISK-18747)
Reported by: Gregory Hinton Nietsky

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 19:54:09 +00:00
Matthew Nicholson f3c03ac1ec list all of the codecs associated with a particular format id for CLI command "core show codec"
AST-699
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 18:42:04 +00:00
Olle Johansson 816dc295c2 Formatting and doxygen improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-06 09:51:09 +00:00
Alexandr Anikin c580b163b5 Final fix memleaks in GkClient codes, same for Timer codes.
(these memleaks stop development of gk codes, now i can continue)
Fix printHandler 'Unbalanced Structure' issues with locking printHandler
data for single thread.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-04 19:50:10 +00:00
Walter Doekes 969f4aa3d6 Fix sqlite config driver segfault and broken queries
The sqlite realtime handler assumed you had a static config configured
as well. The realtime multientry handler assumed that you weren't using
dynamic realtime.

(closes issue ASTERISK-18354)
(closes issue ASTERISK-18355)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-03 20:37:50 +00:00
Richard Mudgett 5dbff9a2a8 Remove invalid flag given to iterator in func_dialgroup.c
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-03 19:57:49 +00:00
Terry Wilson e28d306387 Make room for the fax detect flags
The original REGISTERTRYING flag, in addition to being impossible to
check, also encroached on the space for the flag above it. This
patch moves the flags that were below REGISTERTRYING back to where
they were as though we had just removed the REGISTERTRYING option.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-03 15:40:49 +00:00
Terry Wilson 7f883ef495 Remove registertrying option in chan_sip
This option is not only useless, but has been broken since inception since
the flag was never copied from the peer where it is set to the pvt where
it was checked. RFC 3261 specificially states that you should not send a
provisional response to a non-INVITE request, and if we did fix the code
so that it worked, it would cause the same kind of user enumeration
vulnerability that we've discussed with the nat= setting. This patch
removes registertrying option and any code that would have sent a 100
response to a register.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 23:08:46 +00:00
Walter Doekes f7bdc835a4 Fix improper warning introduced by r342927 and more tweaks
Changeset r342927 introduced a warning which was only supposed to be
emitted when a found realtime peer had an empty (or no) name. It turned
out that there were some inconsistencies left. Now found peers with an
empty name are explicitly ignored like before r342927 but better.

Reviewed by: Stefan Schmidts, Terry Wilson

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 22:46:27 +00:00
Walter Doekes 7fd2a68b0e Ensure that string field lengths are properly aligned
Integers should always be aligned. For some platforms (ARM, SPARC) this
is more important than for others. This changeset ensures that the
string field string lengths are aligned on *all* platforms, not just on
the SPARC for which there was a workaround. It also fixes that the
length integer can be resized to 32 bits without problems if needed.

(closes issue ASTERISK-17310)
Reported by: radael, S Adrian
Reviewed by: Tzafrir Cohen, Terry Wilson
Tested by: S Adrian

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 22:02:07 +00:00
Leif Madsen 55ffab4cd9 Add note about how Authenticate() application with option 'd' works.
(closes issue ASTERISK-17422)
Reported by: Leif Madsen
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 19:33:49 +00:00
Leif Madsen 4b5702e52d Update documentation for leastrecent strategy.
In queues.conf.sample the leastrecent strategy was incorrectly described. Now updated
to reflect how the strategy actually checks peers.

(closes issue ASTERISK-17854)
Reported by: Sebastian Denz
Patches:
     queues.conf-doc_issue.patch (License #6139)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 18:11:12 +00:00
Kevin P. Fleming 784bbf70d7 Modify comments in MeetMe application documentation about DAHDI.
The MeetMe application documentation has some comments about usage of DAHDI,
and they were a bit outdated relative to modern DAHDI releases. This patch
changes the comment to just tell the user that a functional DAHDI timing
source is required, and no longer mention 'dahdi_dummy', since that module
does not exist in current DAHDI releases.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 13:46:15 +00:00
Walter Doekes b41b49ea0e Several fixes to the chan_sip dynamic realtime peer/user lookup
There were several problems with the dynamic realtime peer/user lookup
code. The lookup logic had become rather hard to read due to lots of
incremental changes to the realtime_peer function. And, during the
addition of the sipregs functionality, several possibilities for memory
leaks had been introduced. The insecure=port matching has always been
broken for anyone using the sipregs family. And, related, the broken
implementation forced those using sipregs to *still* have an ipaddr
column on their sippeers table.

Thanks Terry Wilson for comprehensive testing and finding and fixing
unexpected behaviour from the multientry realtime call which caused
the realtime_peer to have a completely unused code path.

This changeset fixes the leaks, the lookup inconsistenties and that
you won't need an ipaddr column on your sippeers table anymore (when
you're using sipregs). Beware that when you're using sipregs, peers
with insecure=port will now start matching!

(closes issue ASTERISK-17792)
(closes issue ASTERISK-18356)
Reported by: marcelloceschia, Walter Doekes
Reviewed by: Terry Wilson

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 21:02:56 +00:00
Walter Doekes 25ee5f83b5 Cleanup references to sipusers and sipfriends dynamic realtime families
Somewhere between 1.4 and 1.8 the sipusers family has become completely
unused. Before that, the sipfriends family had been obsoleted in favor
of separate sipusers and sippeers families. Apparently, they have been
merged back again into a single family which is now called "sippeers".

Reviewed by: irroot, oej, pabelanger

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 19:53:26 +00:00
Richard Mudgett ed1e02a4d3 Misc format capability fixes.
* Fixed typo in format_cap.c:joint_copy_helper() using the wrong variable.

* Fix potential race between checking if an interface exists and adding it
to the container in format.c:ast_format_attr_reg_interface().

* Fixed double rwlock destroy in format.c:ast_format_attr_init() error
exit path.

* Simplified format.c:find_interface() and format.c:has_interface().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-31 17:51:22 +00:00
Matthew Jordan 9333071c1f Fixed invalid memory access when adding extension to pattern match tree
When an extension is removed from a context, its entry in the pattern match
tree is not deleted.  Instead, the extension is marked as deleted.  When an
extension is removed and re-added, if that extension is also a prefix of
another extension, several log messages would report an error and did not
check whether or not the extension was deleted before accessing the memory.
Additionally, if the extension was already in the tree but previously
deleted, and the pattern was at the end of a match, the findonly flag was
not honored and the extension would be erroneously undeleted.  

Additionaly, it was discovered that an IAX2 peer could be unregistered
via the CLI, while at the same time it could be scheduled for unregistration
by Asterisk.  The unregistration method now checks to see if the peer
was already unregistered before continuing with an unregistration.

(closes issue ASTERISK-18135)
Reported by: Jaco Kroon, Henry Fernandes, Kristijan Vrban
Tested by: Matt Jordan

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-31 16:10:32 +00:00
Terry Wilson 4b826c46b3 Don't crash on empty notify channel
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-30 02:31:02 +00:00
Richard Mudgett 85dbd68f87 Whitespace and some better macro variable names.
* Renamed AST_LIST_TRAVERSE_SAFE_BEGIN __new_prev to __list_current.

* Renamed AST_LIST_MOVE_CURRENT __list_cur to __extracted.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-29 04:41:21 +00:00
Richard Mudgett f7ce570c35 Fix AST_LIST_INSERT_BEFORE_CURRENT() updating the wrong variable.
AST_LIST_INSERT_BEFORE_CURRENT() could not be used twice in an iteration
or before AST_LIST_REMOVE_CURRENT() without corrupting the list.
AST_LIST_INSERT_BEFORE_CURRENT() could also corrupt the list if
AST_LIST_INSERT_BEFORE_CURRENT() or AST_LIST_REMOVE_CURRENT() is used on
the next iteration.

* Fixed cut and paste error using the wrong variable in
AST_LIST_INSERT_BEFORE_CURRENT().

* Added linked list unit tests for AST_LIST_INSERT_BEFORE_CURRENT(),
AST_LIST_APPEND_LIST(), and AST_LIST_INSERT_LIST_AFTER().
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-29 04:31:51 +00:00
Matthew Nicholson 849992fde9 tweak the v21 detector to detect an additional pattern of hits and misses
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27 20:11:11 +00:00
Jonathan Rose e5ac65bb43 Fix sequence number overflow over 16 bits causing codec change in RTP packets.
Sequence number was handled as an unsigned integer (usually 32 bits I think, more
depending on the architecture) and was put into the rtp packet which is basically
just a bunch of bits using an or operation. Sequence number only has 16 bits
allocated to it in an RTP packet anyway, so it would add to the next field which
just happened to be the codec. This makes sure the sequence number is set to be
a 16 bit integer regardless of architecture (hopefully) and also makes it so the
incrementing of the sequence number does bitwise or at the peak of a 16 bit number
so that the value will be set back to 0 when going beyond 65535 anyway.

(closes issue ASTERISK-18291)
Reported by: Will Schick
Review: https://reviewboard.asterisk.org/r/1542/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27 19:48:23 +00:00
Jonathan Rose b61256c64b Cleanup reference leaks in res_jabber
res_jabber.c had a number of places where astobjs would be referenced and have their
reference counts bumped without having a dereference made before the object lost scope.
This patch adds a number of ASTOBJ_UNREFs to resolve that.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27 14:24:01 +00:00
Richard Mudgett ebf860e157 Check fopen return value for ao2 reference debug output.
Reported by: wdoekes
Patched by: wdoekes

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 22:06:43 +00:00
Richard Mudgett 6cf08ad550 Change D-channel warning to be less confusing on non-NFAS setups.
The "No D-channels available!  Using Primary channel as D-channel anyway!"
WARNING message has been confusing on non-NFAS setups.  The message refers
to things that are NFAS specific.

* Changed the warning to several different warnings to be more accurate
for the situation and less confusing as a result:
"No D-channels up!  Switching selected D-channel from X to Y.",
"No D-channels up!", and
"D-channel is down!".
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 21:54:31 +00:00