[asterisk-commits] file: branch file/pimp_sip_location r382598 - in /team/file/pimp_sip_location...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 7 10:21:50 CST 2013


Author: file
Date: Thu Mar  7 10:21:40 2013
New Revision: 382598

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382598
Log:
Multiple revisions 382196,382201,382206,382229,382237,382270,382301,382317,382326,382342,382362,382395,382413,382442,382473,382494,382544,382558,382578,382591

........
  r382196 | root | 2013-02-27 13:18:00 -0400 (Wed, 27 Feb 2013) | 20 lines
  
  Merged revisions 382182 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ................
    r382182 | file | 2013-02-27 10:19:51 -0600 (Wed, 27 Feb 2013) | 13 lines
    
    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
    ........
    
    Merged revisions 382174 from http://svn.asterisk.org/svn/asterisk/branches/11
  ................
........
  r382201 | file | 2013-02-27 13:38:04 -0400 (Wed, 27 Feb 2013) | 1 line
  
  Fix a bug where an INVITE without SDP would cause a crash.
........
  r382206 | root | 2013-02-27 17:17:59 -0400 (Wed, 27 Feb 2013) | 13 lines
  
  Merged revisions 382203-382204 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ........
    r382203 | rmudgett | 2013-02-27 14:21:40 -0600 (Wed, 27 Feb 2013) | 1 line
    
    Fix compiler warning by eliminating the need for a cast.
  ........
    r382204 | rmudgett | 2013-02-27 14:31:56 -0600 (Wed, 27 Feb 2013) | 1 line
    
    More places to eliminate the cast to argv but were not giving warnings.
  ........
........
  r382229 | mmichelson | 2013-02-28 12:50:27 -0400 (Thu, 28 Feb 2013) | 6 lines
  
  Initialize pass/fail result of ACL check.
  
  Calls were being denied because this variable was used
  uninitialized. This should prevent false positives in the ACL checking.
........
  r382237 | root | 2013-02-28 13:18:08 -0400 (Thu, 28 Feb 2013) | 67 lines
  
  Merged revisions 382232,382236 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ................
    r382232 | mjordan | 2013-02-28 10:56:20 -0600 (Thu, 28 Feb 2013) | 33 lines
    
    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
    ........
    
    Merged revisions 382230 from http://svn.asterisk.org/svn/asterisk/branches/11
  ................
    r382236 | mjordan | 2013-02-28 11:17:35 -0600 (Thu, 28 Feb 2013) | 25 lines
    
    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
    ........
    
    Merged revisions 382234 from http://svn.asterisk.org/svn/asterisk/branches/11
  ................
........
  r382270 | mmichelson | 2013-02-28 14:49:24 -0400 (Thu, 28 Feb 2013) | 18 lines
  
  Add options to determine how endpoints are identified.
  
  Prior to this commit, the method by which endpoints were identified was
  dependent on what endpoint identification modules were loaded. While this
  works, it's not likely to be useful for most deployments. Instead, having
  control within the configuration of how identification should occur per
  endpoint is more useful.
  
  There is now an "identify_by" option that accepts a comma-delimited list of
  methods by which the endpoint can be identified. By default, this is set to
  "username,location" which allows for the endpoint to be identified by both
  by username and by its IP address. The option can be changed to only allow
  one method or the other.
  
  Using this allows for easy expansion in case new methods of endpoint identification
  are devised.
........
  r382301 | mmichelson | 2013-02-28 18:17:52 -0400 (Thu, 28 Feb 2013) | 6 lines
  
  Fix size issue when converting UUID to string.
  
  We were passing the size of a pointer in, which is not
  appropriate.
........
  r382317 | root | 2013-02-28 19:17:31 -0400 (Thu, 28 Feb 2013) | 42 lines
  
  Multiple revisions 382292,382294-382295,382297,382299
  
  ........
    r382292 | qwell | 2013-02-28 15:21:50 -0600 (Thu, 28 Feb 2013) | 7 lines
    
    Don't undefine bzero()/bcopy().
    
    This was causing build failures against external libraries that happened to use
    them, unless silly hacks were added to the modules that used those headers.
    
    Review: https://reviewboard.asterisk.org/r/2359/
  ........
    r382294 | rmudgett | 2013-02-28 15:29:57 -0600 (Thu, 28 Feb 2013) | 1 line
    
    threadpool: Whitespace and comment corrections.
  ........
    r382295 | rmudgett | 2013-02-28 15:31:14 -0600 (Thu, 28 Feb 2013) | 1 line
    
    threadpool: Make ast_threadpool_push() return -1 if shutting_down
  ........
    r382297 | file | 2013-02-28 15:37:57 -0600 (Thu, 28 Feb 2013) | 10 lines
    
    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.
    ........
    
    Merged revisions 382296 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r382299 | file | 2013-02-28 15:59:56 -0600 (Thu, 28 Feb 2013) | 5 lines
    
    While the ICE negotiation is occurring leave strictrtp in an open state, media can and will come from different places.
    ........
    
    Merged revisions 382298 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 382292,382294-382295,382297,382299 from file:///srv/subversion/repos/asterisk/trunk
........
  r382326 | root | 2013-03-01 01:17:57 -0400 (Fri, 01 Mar 2013) | 40 lines
  
  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)
  ........
  
  Merged revisions 382322 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 382323 from file:///srv/subversion/repos/asterisk/trunk
........
  r382342 | root | 2013-03-01 14:18:32 -0400 (Fri, 01 Mar 2013) | 7 lines
  
  Add support for registering a sorcery handler which supports multiple fields using a regex.
  
  Review: https://reviewboard.asterisk.org/r/2332/
  ........
  
  Merged revisions 382340 from file:///srv/subversion/repos/asterisk/trunk
........
  r382362 | file | 2013-03-02 12:49:39 -0400 (Sat, 02 Mar 2013) | 2 lines
  
  Slightly reduce memory usage and copying.
........
  r382395 | root | 2013-03-04 17:18:11 -0400 (Mon, 04 Mar 2013) | 37 lines
  
  Multiple revisions 382386,382391-382392
  
  ........
    r382386 | kharwell | 2013-03-04 14:18:36 -0600 (Mon, 04 Mar 2013) | 13 lines
    
    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
    ........
    
    Merged revisions 382385 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r382391 | qwell | 2013-03-04 15:14:30 -0600 (Mon, 04 Mar 2013) | 10 lines
    
    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)
    ........
    
    Merged revisions 382390 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r382392 | rmudgett | 2013-03-04 15:15:36 -0600 (Mon, 04 Mar 2013) | 1 line
    
    Fixup some bridge and format capabilities comments and whitespace.
  ........
  
  Merged revisions 382386,382391-382392 from file:///srv/subversion/repos/asterisk/trunk
........
  r382413 | root | 2013-03-05 00:17:55 -0400 (Tue, 05 Mar 2013) | 16 lines
  
  
  Fix several unreleased mutex locks that cause problem with processing calls
  Reported by: Daniel Bohling
  Tested by: Daniel Bohling
  
  (Closes issue ASTERISK-21119)
  ........
  
  Merged revisions 382409 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 382410 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 382411 from file:///srv/subversion/repos/asterisk/trunk
........
  r382442 | root | 2013-03-05 09:18:27 -0400 (Tue, 05 Mar 2013) | 25 lines
  
  Add RFC 3327 Path header support to chan_sip
  
  This patch adds support for RFC 3327 "Path" headers. This can be enabled in
  sip.conf using the 'supportpath' setting, either on a global basis or on a
  peer basis. This setting enables Asterisk to route outgoing out-of-dialog
  requests via a set of proxies by using a pre-loaded route-set defined by the
  Path headers in the REGISTER request. This patch also adds Realtime support
  for dynamically updating the Path information for a peer.
  
  A huge thank-you to Klaus Darillion and Olle E Johansson for their efforts
  in writing this patch.
  
  Review: https://reviewboard.asterisk.org/r/2235/
  Review: https://reviewboard.asterisk.org/r/991/
  
  (closes issue ASTERISK-16884)
  Reported by: klaus3000
  Tested by: klaus3000, oej, mjordan
  patches:
    path-1.8.0-patch.txt uploaded by klaus3000 (License 5054)
    oolong-path-support-trunk in team branch by oej (License 5267)
  ........
  
  Merged revisions 382440 from file:///srv/subversion/repos/asterisk/trunk
........
  r382473 | file | 2013-03-05 18:02:47 -0400 (Tue, 05 Mar 2013) | 4 lines
  
  Move serialization to occur before invoking any main pjsip modules.
  
  Review: https://reviewboard.asterisk.org/r/2362/
........
  r382494 | root | 2013-03-06 12:18:29 -0400 (Wed, 06 Mar 2013) | 9 lines
  
  Resolve a ref leak in threadpool.c
  
  Ownership of the listener reference is not transferred because the
  listener is reffed when placed into the taskprocessor. Ensure that the
  listener is dereffed properly.
  ........
  
  Merged revisions 382489 from file:///srv/subversion/repos/asterisk/trunk
........
  r382544 | file | 2013-03-06 18:05:14 -0400 (Wed, 06 Mar 2013) | 1 line
  
  Disable res_sip_endpoint_identifier_constant by default and make it allocate from sorcery so default values get applied.
........
  r382558 | root | 2013-03-06 20:17:53 -0400 (Wed, 06 Mar 2013) | 8 lines
  
  Fix ref leak in threadpool.c
  
  If ast_threadpool_set_size with a size equal to the current size, a
  reference to a set_size_data structure would be leaked.
  ........
  
  Merged revisions 382555 from file:///srv/subversion/repos/asterisk/trunk
........
  r382578 | root | 2013-03-07 11:18:28 -0400 (Thu, 07 Mar 2013) | 11 lines
  
  Ensure that logmsgs are freed properly
  
  Messages sent while the logger thread is shutting down will now have
  their associated callid freed properly.
  ........
  
  Merged revisions 382574 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 382575 from file:///srv/subversion/repos/asterisk/trunk
........
  r382591 | root | 2013-03-07 12:17:55 -0400 (Thu, 07 Mar 2013) | 43 lines
  
  Multiple revisions 382587,382589
  
  ........
    r382587 | kmoore | 2013-03-07 09:36:52 -0600 (Thu, 07 Mar 2013) | 5 lines
    
    Fix minor memory leak in xmldoc
    
    Strings retrieved via ast_xml_get_text() must be freed with
    ast_xml_free_text().
  ........
    r382589 | mjordan | 2013-03-07 09:48:06 -0600 (Thu, 07 Mar 2013) | 28 lines
    
    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
    ........
    
    Merged revisions 382573 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 382587,382589 from file:///srv/subversion/repos/asterisk/trunk
........

Merged revisions 382196,382201,382206,382229,382237,382270,382301,382317,382326,382342,382362,382395,382413,382442,382473,382494,382544,382558,382578,382591 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip

Modified:
    team/file/pimp_sip_location/   (props changed)
    team/file/pimp_sip_location/CHANGES
    team/file/pimp_sip_location/CREDITS
    team/file/pimp_sip_location/apps/app_confbridge.c
    team/file/pimp_sip_location/apps/app_meetme.c
    team/file/pimp_sip_location/channels/chan_iax2.c
    team/file/pimp_sip_location/channels/chan_sip.c
    team/file/pimp_sip_location/channels/chan_skinny.c
    team/file/pimp_sip_location/channels/chan_unistim.c
    team/file/pimp_sip_location/channels/sip/include/sip.h
    team/file/pimp_sip_location/configs/res_ldap.conf.sample
    team/file/pimp_sip_location/configs/sip.conf.sample
    team/file/pimp_sip_location/contrib/realtime/mysql/sippeers.sql
    team/file/pimp_sip_location/contrib/realtime/postgresql/realtime.sql
    team/file/pimp_sip_location/contrib/scripts/asterisk.ldap-schema
    team/file/pimp_sip_location/contrib/scripts/asterisk.ldif
    team/file/pimp_sip_location/include/asterisk.h
    team/file/pimp_sip_location/include/asterisk/format_cap.h
    team/file/pimp_sip_location/include/asterisk/res_sip.h
    team/file/pimp_sip_location/include/asterisk/rtp_engine.h
    team/file/pimp_sip_location/include/asterisk/sorcery.h
    team/file/pimp_sip_location/include/asterisk/threadpool.h
    team/file/pimp_sip_location/main/bridging.c
    team/file/pimp_sip_location/main/event.c
    team/file/pimp_sip_location/main/logger.c
    team/file/pimp_sip_location/main/rtp_engine.c
    team/file/pimp_sip_location/main/sorcery.c
    team/file/pimp_sip_location/main/threadpool.c
    team/file/pimp_sip_location/main/xmldoc.c
    team/file/pimp_sip_location/res/res_rtp_asterisk.c
    team/file/pimp_sip_location/res/res_sip.exports.in
    team/file/pimp_sip_location/res/res_sip/sip_configuration.c
    team/file/pimp_sip_location/res/res_sip/sip_distributor.c
    team/file/pimp_sip_location/res/res_sip_acl.c
    team/file/pimp_sip_location/res/res_sip_authenticator_digest.c
    team/file/pimp_sip_location/res/res_sip_endpoint_identifier_constant.c
    team/file/pimp_sip_location/res/res_sip_endpoint_identifier_ip.c
    team/file/pimp_sip_location/res/res_sip_endpoint_identifier_user.c
    team/file/pimp_sip_location/res/res_sip_session.c
    team/file/pimp_sip_location/tests/test_sorcery.c

Propchange: team/file/pimp_sip_location/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/file/pimp_sip_location/
------------------------------------------------------------------------------
--- pimp-integrated (original)
+++ pimp-integrated Thu Mar  7 10:21:40 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-382136
+/team/group/pimp_my_sip:1-382594

Modified: team/file/pimp_sip_location/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_location/CHANGES?view=diff&rev=382598&r1=382597&r2=382598
==============================================================================
--- team/file/pimp_sip_location/CHANGES (original)
+++ team/file/pimp_sip_location/CHANGES Thu Mar  7 10:21:40 2013
@@ -50,6 +50,13 @@
 
  * Added ECAM command support for Sony Ericsson phones.
 
+chan_sip
+------------------
+ * Added support for RFC 3327 "Path" headers. This can be enabled in sip.conf
+   using the 'supportpath' setting, either on a global basis or on a peer basis.
+   This setting enables Asterisk to route outgoing out-of-dialog requests via a
+   set of proxies by using a pre-loaded route-set defined by the Path headers in
+   the REGISTER request. See Realtime updates for more configuration information.
 
 Features
 -------------------
@@ -72,6 +79,14 @@
 
  * Added the 'queue_log_realtime_use_gmt' option to have timestamps in GMT
    for realtime queue log entries.
+
+MeetMe
+-------------------
+* Added the 'n' option to MeetMe to prevent application of the DENOISE function
+  to a channel joining a conference. Some channel drivers that vary the number
+  of audio samples in a voice frame will experience significant quality problems
+  if a denoiser is attached to the channel; this option gives them the ability
+  to remove the denoiser without having to unload func_speex.
 
 Queue
 -------------------
@@ -86,6 +101,15 @@
    that the REDIRECTING dialplan function can be used to set the redirecting
    reason to any string. It also allows for custom strings to be read as the
    redirecting reason from SIP Diversion headers.
+
+Realtime
+------------------
+ * Dynamic realtime tables for SIP Users can now include a 'path' field. This
+   will store the path information for that peer when it registers. Realtime
+   tables can also use the 'supportpath' field to enable Path header support.
+
+ * LDAP realtime configurations for SIP Users now have the AstAccountPathSupport
+   objectIdentifier. This maps to the supportpath option in sip.conf. 
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 10 to Asterisk 11 --------------------
@@ -389,6 +413,9 @@
    which set the force_rport and comedia options automatically if Asterisk
    detects that an incoming SIP request crossed a NAT after being sent by
    the remote endpoint.
+
+ * The default global nat setting in sip.conf has been changed from force_rport
+   to auto_force_rport.
 
  * NAT settings are now a combinable list of options. The equivalent of the
    deprecated nat=yes is nat=force_rport,comedia. nat=no behaves as before.

Modified: team/file/pimp_sip_location/CREDITS
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_location/CREDITS?view=diff&rev=382598&r1=382597&r2=382598
==============================================================================
--- team/file/pimp_sip_location/CREDITS (original)
+++ team/file/pimp_sip_location/CREDITS Thu Mar  7 10:21:40 2013
@@ -22,7 +22,7 @@
 	* John Todd, TalkPlus, Inc.  and JR Richardson, Ntegrated Solutions. 
 		for funding the development of SIP Session Timers support.
 
-	* Omnitor AB, Gunnar Hellström, for funding work with videocaps, 
+	* Omnitor AB, Gunnar Hellstr�m, for funding work with videocaps, 
 		T.140 RED, originate with video/text and many more 
 		contributions.
 
@@ -54,7 +54,7 @@
 
 === HARDWARE DONORS === 
 
- We'd like to thank the followwing for granting access to hardware for testing.
+ We'd like to thank the following for granting access to hardware for testing.
 
 	* Thanks to QuickNet Technologies for their donation of an Internet
 		PhoneJack and Linejack card to the project.  
@@ -63,13 +63,12 @@
 	* Thanks to VoipSupply for their donation of Sipura ATAs to the project
 		for T.38 testing. (http://www.voipsupply.com)
 
-
 	* Thanks to Grandstream for their donation of ATAs to the project for
 		T.38 testing. (http://www.grandstream.com)
 
 === MISCELLANEOUS PATCHES ===
 
- We'd like to thank the flollowing for their patches
+ We'd like to thank the following for their patches
 
 	* Jim Dixon - Zapata Telephony and app_rpt
 		http://www.zapatatelephony.org/app_rpt.html
@@ -240,7 +239,8 @@
 		ControlPlayback, and multiple bug fixes See 
 		http://voip-info.org/users/view/sergee serg(AT)voipsolutions.ru
 
-	* Klaus Darillon - the SIPremoveHeader function in chan_sip
+	* Klaus Darillon - the SIPremoveHeader function in chan_sip and SIP Path
+		Support.
 
 	* Moises Silva (moy) - for writing LibOpenR2, and providing support for
 		it in chan_dahdi moises.silva(AT)gmail.com
@@ -252,7 +252,7 @@
 		cdr_tds rewrite, countless other improvements, fixes, and good
 		ideas. sean(AT)malleable.com
 
-	* Jan Kaláb - Calendaring support for Exchange Server 2007+ via 
+	* Jan Kal�b - Calendaring support for Exchange Server 2007+ via 
 		Exchange Web Services.
 
 	* University of Oslo (uio.no), Norway - SIP Max-Forwards setting 

Modified: team/file/pimp_sip_location/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_location/apps/app_confbridge.c?view=diff&rev=382598&r1=382597&r2=382598
==============================================================================
--- team/file/pimp_sip_location/apps/app_confbridge.c (original)
+++ team/file/pimp_sip_location/apps/app_confbridge.c Thu Mar  7 10:21:40 2013
@@ -596,13 +596,13 @@
 	return tmp;
 }
 
-static void set_rec_filename(struct conference_bridge *bridge, struct ast_str **filename)
+static void set_rec_filename(struct conference_bridge *bridge, struct ast_str **filename, int is_new)
 {
 	char *rec_file = bridge->b_profile.rec_file;
 	time_t now;
 	char *ext;
 
-	if (ast_str_strlen(*filename) && ast_test_flag(&bridge->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
+	if (ast_str_strlen(*filename) && ast_test_flag(&bridge->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND) && !is_new) {
 		    return;
 	}
 
@@ -627,12 +627,28 @@
 	}
 }
 
+static int is_new_rec_file(const char *rec_file, struct ast_str **orig_rec_file)
+{
+	if (!ast_strlen_zero(rec_file)) {
+		if (!*orig_rec_file) {
+			*orig_rec_file = ast_str_create(PATH_MAX);
+		}
+
+		if (strcmp(ast_str_buffer(*orig_rec_file), rec_file)) {
+			ast_str_set(orig_rec_file, 0, "%s", rec_file);
+			return 1;
+		}
+	}
+	return 0;
+}
+
 static void *record_thread(void *obj)
 {
 	struct conference_bridge *conference_bridge = obj;
 	struct ast_app *mixmonapp = pbx_findapp("MixMonitor");
 	struct ast_channel *chan;
 	struct ast_str *filename = ast_str_alloca(PATH_MAX);
+	struct ast_str *orig_rec_file = NULL;
 
 	ast_mutex_lock(&conference_bridge->record_lock);
 	if (!mixmonapp) {
@@ -645,7 +661,8 @@
 
 	/* XXX If we get an EXIT right here, START will essentially be a no-op */
 	while (conference_bridge->record_state != CONF_RECORD_EXIT) {
-		set_rec_filename(conference_bridge, &filename);
+		set_rec_filename(conference_bridge, &filename,
+				 is_new_rec_file(conference_bridge->b_profile.rec_file, &orig_rec_file));
 		chan = ast_channel_ref(conference_bridge->record_chan);
 		ast_answer(chan);
 		pbx_exec(chan, mixmonapp, ast_str_buffer(filename));
@@ -655,6 +672,7 @@
 		/* STOP has been called. Wait for either a START or an EXIT */
 		ast_cond_wait(&conference_bridge->record_cond, &conference_bridge->record_lock);
 	}
+	ast_free(orig_rec_file);
 	ast_mutex_unlock(&conference_bridge->record_lock);
 	ao2_ref(conference_bridge, -1);
 	return NULL;

Modified: team/file/pimp_sip_location/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_location/apps/app_meetme.c?view=diff&rev=382598&r1=382597&r2=382598
==============================================================================
--- team/file/pimp_sip_location/apps/app_meetme.c (original)
+++ team/file/pimp_sip_location/apps/app_meetme.c Thu Mar  7 10:21:40 2013
@@ -147,6 +147,14 @@
 						specify a musiconhold class to use. If one is not provided, it will use the
 						channel's currently set music class, or <literal>default</literal>.</para>
 						<argument name="class" required="true" />
+					</option>
+					<option name="n">
+						<para>Disable the denoiser. By default, if <literal>func_speex</literal> is loaded, Asterisk
+						will apply a denoiser to channels in the MeetMe conference. However, channel
+						drivers that present audio with a varying rate will experience degraded
+						performance with a denoiser attached. This parameter allows a channel joining
+						the conference to choose not to have a denoiser attached without having to
+						unload <literal>func_speex</literal>.</para>
 					</option>
 					<option name="o">
 						<para>Set talker optimization - treats talkers who aren't speaking as
@@ -657,6 +665,8 @@
 #define CONFFLAG_INTROUSER_VMREC    (1ULL << 33)
 /*! If there's only one person left in a conference when someone leaves, kill the conference */
 #define CONFFLAG_KILL_LAST_MAN_STANDING ((uint64_t)1 << 34)
+/*! If set, don't enable a denoiser for the channel */
+#define CONFFLAG_DONT_DENOISE       (1ULL << 33)
 
 enum {
 	OPT_ARG_WAITMARKED = 0,
@@ -687,6 +697,7 @@
 	AST_APP_OPTION('k', CONFFLAG_KILL_LAST_MAN_STANDING ),
 	AST_APP_OPTION_ARG('M', CONFFLAG_MOH, OPT_ARG_MOH_CLASS ),
 	AST_APP_OPTION('m', CONFFLAG_STARTMUTED ),
+	AST_APP_OPTION('n', CONFFLAG_DONT_DENOISE ),
 	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
 	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
 	AST_APP_OPTION_ARG('p', CONFFLAG_KEYEXIT, OPT_ARG_EXITKEYS ),
@@ -3218,7 +3229,8 @@
 	}
 
 	/* Reduce background noise from each participant */
-	if ((mod_speex = ast_module_helper("", "codec_speex", 0, 0, 0, 0))) {
+	if (!ast_test_flag64(confflags, CONFFLAG_DONT_DENOISE) &&
+		(mod_speex = ast_module_helper("", "func_speex", 0, 0, 0, 0))) {
 		ast_free(mod_speex);
 		ast_func_write(chan, "DENOISE(rx)", "on");
 	}

Modified: team/file/pimp_sip_location/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_location/channels/chan_iax2.c?view=diff&rev=382598&r1=382597&r2=382598
==============================================================================
--- team/file/pimp_sip_location/channels/chan_iax2.c (original)
+++ team/file/pimp_sip_location/channels/chan_iax2.c Thu Mar  7 10:21:40 2013
@@ -11573,13 +11573,15 @@
 			ast_string_field_set(iaxs[fr->callno], cid_name, connected.id.name.str);
 			iaxs[fr->callno]->calling_pres = ast_party_id_presentation(&connected.id);
 
-			if (iaxs[fr->callno]->owner) {
+			iax2_lock_owner(fr->callno);
+			if (iaxs[fr->callno] && iaxs[fr->callno]->owner) {
 				ast_set_callerid(iaxs[fr->callno]->owner,
 					S_COR(connected.id.number.valid, connected.id.number.str, ""),
 					S_COR(connected.id.name.valid, connected.id.name.str, ""),
 					NULL);
 				ast_channel_caller(iaxs[fr->callno]->owner)->id.number.presentation = connected.id.number.presentation;
 				ast_channel_caller(iaxs[fr->callno]->owner)->id.name.presentation = connected.id.name.presentation;
+				ast_channel_unlock(iaxs[fr->callno]->owner);
 			}
 		}
 		ast_party_connected_line_free(&connected);

Modified: team/file/pimp_sip_location/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_location/channels/chan_sip.c?view=diff&rev=382598&r1=382597&r2=382598
==============================================================================
--- team/file/pimp_sip_location/channels/chan_sip.c (original)
+++ team/file/pimp_sip_location/channels/chan_sip.c Thu Mar  7 10:21:40 2013
@@ -1187,6 +1187,8 @@
 static void free_old_route(struct sip_route *route);
 static void list_route(struct sip_route *route);
 static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards, int resp);
+static int build_path(struct sip_pvt *p, struct sip_peer *peer, struct sip_request *req, char *pathbuf);
+static int copy_route(struct sip_route **dst, const struct sip_route *src);
 static enum check_auth_result register_verify(struct sip_pvt *p, struct ast_sockaddr *addr,
 					      struct sip_request *req, const char *uri);
 static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *totag, const char *fromtag);
@@ -1360,7 +1362,7 @@
 static int peer_ipcmp_cb_full(void *obj, void *arg, void *data, int flags);
 
 /* Realtime device support */
-static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *username, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms);
+static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *username, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms, const char *path);
 static void update_peer(struct sip_peer *p, int expire);
 static struct ast_variable *get_insecure_variable_from_config(struct ast_config *config);
 static const char *get_name_from_variable(const struct ast_variable *var);
@@ -1399,7 +1401,7 @@
 static int get_also_info(struct sip_pvt *p, struct sip_request *oreq);
 static int parse_ok_contact(struct sip_pvt *pvt, struct sip_request *req);
 static int set_address_from_contact(struct sip_pvt *pvt);
-static void check_via(struct sip_pvt *p, struct sip_request *req);
+static void check_via(struct sip_pvt *p, const struct sip_request *req);
 static int get_rpid(struct sip_pvt *p, struct sip_request *oreq);
 static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq, char **name, char **number, int *reason, char **reason_str);
 static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id);
@@ -1442,6 +1444,7 @@
 static int add_rpid(struct sip_request *req, struct sip_pvt *p);
 static int add_vidupdate(struct sip_request *req);
 static void add_route(struct sip_request *req, struct sip_route *route);
+static void make_route_list(struct sip_route *route, char *r, int rem);
 static int copy_header(struct sip_request *req, const struct sip_request *orig, const char *field);
 static int copy_all_header(struct sip_request *req, const struct sip_request *orig, const char *field);
 static int copy_via_headers(struct sip_pvt *p, struct sip_request *req, const struct sip_request *orig, const char *field);
@@ -5112,7 +5115,7 @@
 	that name and store that in the "regserver" field in the sippeers
 	table to facilitate multi-server setups.
 */
-static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *defaultuser, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms)
+static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *defaultuser, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms, const char *path)
 {
 	char port[10];
 	char ipaddr[INET6_ADDRSTRLEN];
@@ -5135,10 +5138,11 @@
 	ast_copy_string(ipaddr, ast_sockaddr_isnull(addr) ? "" : ast_sockaddr_stringify_addr(addr), sizeof(ipaddr));
 	ast_copy_string(port, ast_sockaddr_port(addr) ? ast_sockaddr_stringify_port(addr) : "", sizeof(port));
 
-	if (ast_strlen_zero(sysname))	/* No system name, disable this */
+	if (ast_strlen_zero(sysname)) {	/* No system name, disable this */
 		sysname = NULL;
-	else if (sip_cfg.rtsave_sysname)
+	} else if (sip_cfg.rtsave_sysname) {
 		syslabel = "regserver";
+	}
 
 	/* XXX IMPORTANT: Anytime you add a new parameter to be updated, you
          *  must also add it to contrib/scripts/asterisk.ldap-schema,
@@ -5146,18 +5150,38 @@
          *  and to configs/res_ldap.conf.sample as described in
          *  bugs 15156 and 15895
          */
-	if (fc) {
-		ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
-			"port", port, "regseconds", regseconds,
-			deprecated_username ? "username" : "defaultuser", defaultuser,
-			"useragent", useragent, "lastms", str_lastms,
-			fc, fullcontact, syslabel, sysname, SENTINEL); /* note fc and syslabel _can_ be NULL */
+
+	/* This is ugly, we need something better ;-) */
+	if (sip_cfg.rtsave_path) {
+		if (fc) {
+			ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
+				"port", port, "regseconds", regseconds,
+				deprecated_username ? "username" : "defaultuser", defaultuser,
+				"useragent", useragent, "lastms", str_lastms,
+				"path", path,			/* Path data can be NULL */
+				fc, fullcontact, syslabel, sysname, SENTINEL); /* note fc and syslabel _can_ be NULL */
+		} else {
+			ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
+				"port", port, "regseconds", regseconds,
+				"useragent", useragent, "lastms", str_lastms,
+				deprecated_username ? "username" : "defaultuser", defaultuser,
+				"path", path,			/* Path data can be NULL */
+				syslabel, sysname, SENTINEL); /* note syslabel _can_ be NULL */
+		}
 	} else {
-		ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
-			"port", port, "regseconds", regseconds,
-			"useragent", useragent, "lastms", str_lastms,
-			deprecated_username ? "username" : "defaultuser", defaultuser,
-			syslabel, sysname, SENTINEL); /* note syslabel _can_ be NULL */
+		if (fc) {
+			ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
+				"port", port, "regseconds", regseconds,
+				deprecated_username ? "username" : "defaultuser", defaultuser,
+				"useragent", useragent, "lastms", str_lastms,
+				fc, fullcontact, syslabel, sysname, SENTINEL); /* note fc and syslabel _can_ be NULL */
+		} else {
+			ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
+				"port", port, "regseconds", regseconds,
+				"useragent", useragent, "lastms", str_lastms,
+				deprecated_username ? "username" : "defaultuser", defaultuser,
+				syslabel, sysname, SENTINEL); /* note syslabel _can_ be NULL */
+		}
 	}
 }
 
@@ -5251,6 +5275,10 @@
 	if (peer->chanvars) {
 		ast_variables_destroy(peer->chanvars);
 		peer->chanvars = NULL;
+	}
+	if (peer->path) {
+		free_old_route(peer->path);
+		peer->path = NULL;
 	}
 
 	register_peer_exten(peer, FALSE);
@@ -5294,7 +5322,9 @@
 	int rtcachefriends = ast_test_flag(&p->flags[1], SIP_PAGE2_RTCACHEFRIENDS);
 	if (sip_cfg.peer_rtupdate &&
 	    (p->is_realtime || rtcachefriends)) {
-		realtime_update_peer(p->name, &p->addr, p->username, p->fullcontact, p->useragent, expire, p->deprecated_username, p->lastms);
+		char path[SIPBUFSIZE * 2];
+		make_route_list(p->path, path, sizeof(path));
+		realtime_update_peer(p->name, &p->addr, p->username, p->fullcontact, p->useragent, expire, p->deprecated_username, p->lastms, path);
 	}
 }
 
@@ -5989,6 +6019,8 @@
 	return 0;
 }
 
+static int __set_address_from_contact(const char *fullcontact, struct ast_sockaddr *addr, int tcp);
+
 /*! \brief Create address structure from peer reference.
  *	This function copies data from peer to the dialog, so we don't have to look up the peer
  *	again from memory or database during the life time of the dialog.
@@ -6029,6 +6061,12 @@
 	dialog->rtptimeout = peer->rtptimeout;
 	dialog->rtpholdtimeout = peer->rtpholdtimeout;
 	dialog->rtpkeepalive = peer->rtpkeepalive;
+	copy_route(&dialog->route, peer->path);
+	if (dialog->route) {
+		/* Parse SIP URI of first route-set hop and use it as target address */
+		__set_address_from_contact(dialog->route->hop, &dialog->sa, dialog->socket.type == SIP_TRANSPORT_TLS ? 1 : 0);
+	}
+
 	if (dialog_initialize_rtp(dialog)) {
 		return -1;
 	}
@@ -6391,7 +6429,7 @@
 	ast_clear_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT_T38);
 
 	if (p->options->transfer) {
-		char buf[SIPBUFSIZE/2];
+		char buf[SIPBUFSIZE / 2];
 
 		if (referer) {
 			if (sipdebug)
@@ -8747,9 +8785,8 @@
 
 	if (useglobal_nat && addr) {
 		/* Setup NAT structure according to global settings if we have an address */
-		ast_copy_flags(&p->flags[0], &global_flags[0], SIP_NAT_FORCE_RPORT);
 		ast_sockaddr_copy(&p->recv, addr);
-
+		check_via(p, req);
 		do_setnat(p);
 	}
 
@@ -11343,12 +11380,14 @@
  *  is supported for this dialog. */
 static int add_supported(struct sip_pvt *pvt, struct sip_request *req)
 {
+	char supported_value[SIPBUFSIZE];
 	int res;
-	if (st_get_mode(pvt, 0) != SESSION_TIMER_MODE_REFUSE) {
-		res = add_header(req, "Supported", "replaces, timer");
-	} else {
-		res = add_header(req, "Supported", "replaces");
-	}
+
+	sprintf(supported_value, "replaces%s%s",
+		(st_get_mode(pvt, 0) != SESSION_TIMER_MODE_REFUSE) ? ", timer" : "",

[... 2414 lines stripped ...]



More information about the asterisk-commits mailing list