Commit Graph

1145 Commits

Author SHA1 Message Date
Richard Mudgett b99b1116be Merged revisions 331265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331265 | rmudgett | 2011-08-09 18:12:49 -0500 (Tue, 09 Aug 2011) | 22 lines
  
  Merged revisions 331248 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331248 | rmudgett | 2011-08-09 17:12:59 -0500 (Tue, 09 Aug 2011) | 15 lines
    
    Misc minor items found in code.
    
    * Add some reentrancy protection in pbx.c when creating the contexts_table
    hash table.
    
    * Fix inverted test in chan_sip.c conditional code.
    
    * Fix uninitialized variable and use of the wrong variable in chan_iax2.c.
    
    * Fix test of return value in app_parkandannounce.c.  Explicitly testing
    for -1 is bad if the function does not actually return that value when it
    fails.
    
    * Fixup some comments and add some curly braces in features.c.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-09 23:17:13 +00:00
David Vossel e128ee2567 Merged revisions 330586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330586 | dvossel | 2011-08-02 11:17:59 -0500 (Tue, 02 Aug 2011) | 15 lines
  
  Merged revisions 330581 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330581 | dvossel | 2011-08-02 11:15:08 -0500 (Tue, 02 Aug 2011) | 8 lines
    
    Fixes crash in chan_iax2.
    
    Fixes crash in chan_iax2 resulting from an edge case in the
    way control frames are queued during calltoken negotiation is complete.
    
    (closes issue ASTERISK-17610)
    Reported by: mgrobecker
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-02 16:19:32 +00:00
Russell Bryant 6a15e95a32 astobj2: Avoid using temporary objects + ao2_find() with OBJ_POINTER.
There is a fairly common pattern making its way through the code base where we
put a temporary object on the stack so we can call ao2_find() with OBJ_POINTER.
The purpose is so that it can be passed into the object hash function.
However, this really seems like a hack and potentially error prone.  This patch
is a first stab at approach to avoid having to do that.

It adds a new flag, OBJ_KEY, which can be used instead of OBJ_POINTER in these
situations.  Then, the hash function can know whether it was given an object or
some custom data to hash.

The patch also changes some uses of ao2_find() for iax2_user and iax2_peer
objects to reflect how OBJ_KEY would be used.

So long, and thanks for all the fish.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29 19:34:36 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Tilghman Lesher 7d179abfd4 Merged revisions 326411 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r326411 | tilghman | 2011-07-05 17:08:29 -0500 (Tue, 05 Jul 2011) | 14 lines
  
  Add the attribute "type" to each "<use>" for menuselect.
  
  This matters only when autoconf fails to detect that weak linking is supported.
  External optional dependencies will become optional in both cases, as they are
  removed at compile time when not detected.  However, runtime-optional modules
  are made mandatory when weak linking is not found.  This change affects only
  the external optional dependencies; previously, they were incorrectly required
  when weak linking support was not detected.
  
  Patches:
  	20110702__issue18062__asterisk_trunk.diff.txt by tilghman (License #5003)
  
  Tested by: iasgoscouk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 22:11:40 +00:00
David Vossel d5ea9e5ae2 Merged revisions 324652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r324652 | dvossel | 2011-06-23 13:23:21 -0500 (Thu, 23 Jun 2011) | 20 lines
  
  Merged revisions 324634 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
    
    Merged revisions 324627 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
      
      Addresses AST-2011-010, remote crash in IAX2 driver
      
      Thanks to twilson for identifying the issue and providing the patches.
      
      AST-2011-010
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23 18:26:09 +00:00
Richard Mudgett 397c379a7d Merged revisions 321812-321813 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321812 | rmudgett | 2011-06-03 14:55:21 -0500 (Fri, 03 Jun 2011) | 1 line
  
  Correct IAX2 and SIP event subscription description string.
........
  r321813 | rmudgett | 2011-06-03 14:56:09 -0500 (Fri, 03 Jun 2011) | 1 line
  
  Constify subscription description parameter string.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 19:57:03 +00:00
Russell Bryant 0ccfc8609a Merged revisions 318436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318436 | russell | 2011-05-10 10:13:16 -0500 (Tue, 10 May 2011) | 2 lines
  
  chan_iax2: change LOG_NOTICE to LOG_DEBUG in iax2_read().
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-10 15:16:34 +00:00
Russell Bryant 3736b02d97 Merged revisions 318055 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318055 | russell | 2011-05-07 18:24:18 -0500 (Sat, 07 May 2011) | 7 lines
  
  chan_iax2: Don't overwrite port found with an SRV lookup.
  
  (closes issue #17291)
  Reported by: jcovert
  Patches:
        chan_iax2.c.1.8.3-srvlookup-corrected.patch uploaded by jcovert (license 551)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-07 23:26:05 +00:00
Russell Bryant f0f5e237bf Merged revisions 317474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317474 | russell | 2011-05-05 17:36:33 -0500 (Thu, 05 May 2011) | 2 lines
  
  Fix more "set but unused" warnings.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:44:52 +00:00
Leif Madsen b8b1d085db Add 'description' field for CLI and Manager output
(closes issue #19076)
Reported by: lmadsen
Patches: 
      __20110408-channel-description.txt uploaded by lmadsen (license 10)
Tested by: lmadsen

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13 15:49:33 +00:00
David Vossel d760e81f37 Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
   using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
   and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
   for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
   updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.

-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22 23:04:49 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Jason Parker 76cfbf7817 Merged revisions 305692 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r305692 | qwell | 2011-02-01 16:48:16 -0600 (Tue, 01 Feb 2011) | 7 lines
  
  Reverse sense of an error test when reading from astdb.
  
  (closes issue #18545)
  Reported by: jcovert
  Patches: 
        chan_iax2.c.patch uploaded by jcovert (license 551)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-01 22:48:55 +00:00
Leif Madsen 783ea39ba1 Merged revisions 300521 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r300521 | lmadsen | 2011-01-04 15:53:27 -0600 (Tue, 04 Jan 2011) | 17 lines
  
  Merged revisions 300520 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r300520 | lmadsen | 2011-01-04 15:52:41 -0600 (Tue, 04 Jan 2011) | 9 lines
    
    Fix backwards and broken XML documentation.
    
    (closes issue #18547)
    Reported by: jcovert
    Patches: 
          xmldoc.c.patch uploaded by jcovert (license 551)
          chan_iax2.c.doc.patch uploaded by jcovert (license 551)
          chan_sip.c.patch uploaded by jcovert (license 551)
          chan_agent.c.patch uploaded by jcovert (license 551)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-04 21:54:20 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
Tilghman Lesher 597e913cd2 Merged revisions 296951 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296951 | tilghman | 2010-11-30 19:46:32 -0600 (Tue, 30 Nov 2010) | 9 lines
  
  Merged revisions 296950 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r296950 | tilghman | 2010-11-30 19:38:19 -0600 (Tue, 30 Nov 2010) | 2 lines
    
    Missed initializations caused startup errors on Mac OS X (and possibly others, too).
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-01 02:02:04 +00:00
Paul Belanger bd6f29dcb9 Merged revisions 296673 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296673 | pabelanger | 2010-11-29 18:05:45 -0500 (Mon, 29 Nov 2010) | 19 lines
  
  Merged revisions 296671 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r296671 | pabelanger | 2010-11-29 17:54:14 -0500 (Mon, 29 Nov 2010) | 12 lines
    
    Merged revisions 296670 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r296670 | pabelanger | 2010-11-29 17:49:39 -0500 (Mon, 29 Nov 2010) | 5 lines
      
      Make sure nothing else is needed before destroying the scheduler.
      
      (closes issue #18398)
      Reported by: pabelanger
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 23:07:06 +00:00
Paul Belanger 53149a69df Merged revisions 293496 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r293496 | pabelanger | 2010-11-01 12:09:05 -0400 (Mon, 01 Nov 2010) | 13 lines
  
  Use ast_sockaddr_from_sin function not memcpy
  
  This resolves some IAX2 registration issue report on the 
  asterisk-users mailing list. 
  
  (closes issue #18202)
  Reported by: pabelanger
  Patches: 
        update_registry.patch.v2 uploaded by pabelanger (license 224)
  Tested by: pabelanger, Nic Colledge (mailing list)
  
  Review: https://reviewboard.asterisk.org/r/993
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-01 16:11:50 +00:00
David Vossel ae6e8ecfd2 Merged revisions 290506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r290506 | dvossel | 2010-10-05 17:23:00 -0500 (Tue, 05 Oct 2010) | 2 lines
  
  Fixes uninitialized memory problem in 'iax2 set debug peer' option.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-05 22:23:52 +00:00
David Vossel a8e290cd15 Merged revisions 290378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r290378 | dvossel | 2010-10-05 15:09:06 -0500 (Tue, 05 Oct 2010) | 11 lines
  
  Resolves dnsmgr memory corruption in chan_iax2.
  
  (closes issue #17902)
  Reported by: afried
  Patches:
        issue_17902.rev1.txt uploaded by russell (license 2)
  Tested by: afried, russell, dvossel
  
  Review: https://reviewboard.asterisk.org/r/965/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-05 20:10:05 +00:00
Richard Mudgett c5f5c24103 Merged revisions 288194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288194 | rmudgett | 2010-09-21 19:06:21 -0500 (Tue, 21 Sep 2010) | 40 lines
  
  Merged revisions 288193 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r288193 | rmudgett | 2010-09-21 19:03:37 -0500 (Tue, 21 Sep 2010) | 33 lines
    
    Merged revisions 288192 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r288192 | rmudgett | 2010-09-21 18:55:58 -0500 (Tue, 21 Sep 2010) | 26 lines
      
      In chan_iax2.c:schedule_delivery() calls ast_bridged_channel() on an unlocked channel.
      
      Near the beginning of schedule_delivery(), ast_bridged_channel() is called
      on iaxs[fr->callno]->owner.  However, the channel is not locked, which can
      result in ast_bridged_channel() crashing should owner->tech change to a
      technology that doesn't implement bridged_channel.
      
      I also fixed the other calls to ast_bridged_channel() in chan_iax2.c since
      the owner lock was not held there either.
      
      Converted the existing channel deadlock avoidance to use
      iax2_lock_owner().  Using the new function simplified some awkward code.
      
      In the process of fixing the locking on ast_bridged_channel(), I also
      found a memory leak in socket_process() for v1.6.2 and v1.8.  The local
      struct variable ies.vars is not freed on early/abnormal function exits.
      
      (closes issue #17919)
      Reported by: rain
      Patches:
            issue17919_v1.4.patch uploaded by rmudgett (license 664)
            issue17919_w_leak_v1.6.2.patch uploaded by rmudgett (license 664)
            issue17919_w_leak_v1.8.patch uploaded by rmudgett (license 664)
      
      Review: https://reviewboard.asterisk.org/r/926/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-22 00:08:49 +00:00
Paul Belanger b287e93101 Merged revisions 288157 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288157 | pabelanger | 2010-09-21 18:26:15 -0400 (Tue, 21 Sep 2010) | 15 lines
  
  Merged revisions 288147 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r288147 | pabelanger | 2010-09-21 18:22:43 -0400 (Tue, 21 Sep 2010) | 9 lines
    
    Setup timer before set_config().
    
    (closes issue #18019)
    Reported by: Netview
    Patches: 
          issue_0018019.patch uploaded by pabelanger (license 224)
    Tested by: Netview
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-21 22:28:21 +00:00
Jeff Peeler 41b95ee887 Merged revisions 286931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r286931 | jpeeler | 2010-09-15 14:22:15 -0500 (Wed, 15 Sep 2010) | 16 lines
  
  Add parking extension for non-default parking lots.
  
  This is a new feature that allows for parking to custom parking lots to be
  accessed directly, rather than with channel variables or by changing the
  default parking lot. The extension is set with the parkext option just as the
  default parking lot is done. Also, the manager action has been updated to
  optionally allow a specified parking lot.
  
  (closes issue #14882)
  Reported by: vmikhnevych
  Patches: 
        patch_14882.txt uploaded by mnick (license 874)
        modified by me
  
  Review: https://reviewboard.asterisk.org/r/884/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 19:23:56 +00:00
Paul Belanger b51f922a34 Merged revisions 286120 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r286120 | pabelanger | 2010-09-10 17:11:08 -0400 (Fri, 10 Sep 2010) | 18 lines
  
  Merged revisions 286117 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r286117 | pabelanger | 2010-09-10 16:55:06 -0400 (Fri, 10 Sep 2010) | 11 lines
    
    Merged revisions 286114 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r286114 | pabelanger | 2010-09-10 16:35:08 -0400 (Fri, 10 Sep 2010) | 4 lines
      
      Load iax.conf before registering any functions/applications/actions.
      
      Review: https://reviewboard.asterisk.org/r/914/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 21:13:02 +00:00
Brett Bryant 5e97e23de0 Merged revisions 284967 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r284967 | bbryant | 2010-09-03 14:19:53 -0400 (Fri, 03 Sep 2010) | 15 lines
  
  Merged revisions 284958 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r284958 | bbryant | 2010-09-03 14:15:49 -0400 (Fri, 03 Sep 2010) | 8 lines
    
    This is a patch provided for issue #17935 to add the ActionID to the IAXregistry AMI response.
    
    (closes issue #17935)
    Reported by: alexkuklin
    Patches: 
          iaxshowreg uploaded by alexkuklin (license 1115)
    Tested by: alexkuklin
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03 18:21:47 +00:00
Tilghman Lesher 8190e96fad Merged revisions 284610 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r284610 | tilghman | 2010-09-02 00:20:59 -0500 (Thu, 02 Sep 2010) | 10 lines
  
  When optional_api is non-optional, force dependent modules to be loaded.
  
  (closes issue #17707)
   Reported by: ira
   Patches: 
         20100819__issue17707__asterisk1.8.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
   
  Review: https://reviewboard.asterisk.org/r/876/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:27:53 +00:00
David Vossel 06c6b2c7eb Merged revisions 282545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282545 | dvossel | 2010-08-17 15:08:56 -0500 (Tue, 17 Aug 2010) | 6 lines
  
  ACCEPT message should respond with the new FORMAT2 ie
  
  (closes issue #17804)
  Reported by: tpanton
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-17 20:09:30 +00:00
Tilghman Lesher 557ad25f07 Merged revisions 282366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282366 | tilghman | 2010-08-13 23:53:58 -0500 (Fri, 13 Aug 2010) | 4 lines
  
  Fix our FRACKing issue with chan_iax2 a different way.
  
  Review: https://reviewboard.asterisk.org/r/861/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-14 04:58:34 +00:00
David Vossel 0f8eaa6299 Merged revisions 282269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282269 | dvossel | 2010-08-13 15:03:56 -0500 (Fri, 13 Aug 2010) | 4 lines
  
  res_stun_monitor for monitoring network changes behind a NAT device
  
  Review: https://reviewboard.asterisk.org/r/854
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-13 20:05:44 +00:00
Paul Belanger 0443248aa7 PeerStatus now includes Address and Port
(closes issue #17730)
Reported by: jkroon
Patches:
      iax2-peerstate-address.patch uploaded by jkroon (license 714)
Tested by: lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@280555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-29 21:06:13 +00:00
Terry Wilson d6e1c724e5 Remove built-in AES code and use optional_api instead
Review: https://reviewboard.asterisk.org/r/793/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 19:11:32 +00:00
Tilghman Lesher a8c843199c Change order so that it more closely matches the related SIP command.
(closes issue #17648)
 Reported by: GMLudo

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 06:45:06 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Mark Michelson 6fa79e8f77 Make ACLs IPv6-capable.
ACLs can now be configured to match IPv6 networks. This is only
relevant for ACLs in chan_sip for now since other channel drivers
do not support IPv6 addressing. However, once those channel drivers
are outfitted to support IPv6 addressing, the ACLs will already be
ready for IPv6 support.

https://reviewboard.asterisk.org/r/791



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 14:17:16 +00:00
Richard Mudgett cf7bbcc4c6 Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.

This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 16:58:03 +00:00
Richard Mudgett ec37ffbdaf ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
Tilghman Lesher 2fdf43f9fc Get more information about the Bamboo test failures
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 20:01:01 +00:00
Tilghman Lesher d6011adab4 Weird, no output and Bamboo still fails...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 18:55:02 +00:00
Tilghman Lesher 384681e182 Add some diagnostic feedback to our data tests
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 18:21:39 +00:00
Tilghman Lesher da8450323f Kill some startup warnings and errors and make some messages more helpful in tracking down the source.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 17:00:22 +00:00
Mark Michelson cd4ebd336f Add IPv6 to Asterisk.
This adds a generic API for accommodating IPv6 and IPv4 addresses
within Asterisk. While many files have been updated to make use of the
API, chan_sip and the RTP code are the files which actually support
IPv6 addresses at the time of this commit. The way has been paved for
easier upgrading for other files in the near future, though.

Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne
for their hard work on this.

(closes issue #17565)
Reported by: russell
Patches: 
      asteriskv6-test-report.pdf uploaded by russell (license 2)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08 22:08:07 +00:00
Eliel C. Sardanons a1b89a6a50 Implement AstData API data providers as part of the GSOC 2010 project,
midterm evaluation.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08 14:48:42 +00:00
Tzafrir Cohen c613897d1c Fix various typos reported by Lintian
(Also fix the typos in the comments)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-02 15:57:02 +00:00
Russell Bryant 450f4ff2ee Resolve some errors produced during module unload of chan_iax2.
The external test suite stops Asterisk using the "core stop gracefully" command.
The logs from the tests show that there are a number of problems with Asterisk
trying to cleanly shut down.  This patch addresses the following type of error
that comes from chan_iax2:

[Jun 22 16:58:11] ERROR[29884]: lock.c:129 __ast_pthread_mutex_destroy:
                chan_iax2.c line 11371 (iax2_process_thread_cleanup):
                Error destroying mutex &thread->lock: Device or resource busy

For an example in the context of a build, see:

http://bamboo.asterisk.org/browse/AST-TRUNK-739/log

The primary purpose of this patch is to change the thread pool shutdown
procedure to be more explicit to ensure that the thread exits from a point
where it is not holding a lock.  While testing that, I encountered various
crashes due to the order of operations in unload_module() being problematic.
I reordered some things there, as well.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-23 23:09:28 +00:00
David Vossel fcb055fb4e addition of G.719 pass-through support
(closes issue #16293)
Reported by: malcolmd
Patches:
      g719.passthrough.patch.7 uploaded by malcolmd (license 924)
      format_g719.c uploaded by malcolmd (license 924)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 19:03:24 +00:00
David Vossel 1da8159aa6 Merged revisions 270866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r270866 | dvossel | 2010-06-16 12:35:29 -0500 (Wed, 16 Jun 2010) | 22 lines
  
  fixes chan_iax2 race condition
  
  There is code in chan_iax2.c that attempts to guarantee that only a single
  active thread will handle a call number at a time.  This code works once
  the thread is added to an active_list of threads, but we are not currently
  guaranteed that a newly activated thread will enter the active_list immediately
  because it is left up to the thread to add itself after frames have been
  queued to it.  This means that if two frames come in for the same call number
  at the same time, it is possible for them to grab two separate threads because
  the first thread did not add itself to the active_list fast enough.  This
  causes some pretty complex problems.
  
  This patch resolves this race condition by immediately adding an activated
  thread to the active_list within the network thread and only depending on
  the thread to remove itself once it is done processing the frames queued to
  it.  By doing this we are guaranteed that if another frame for the same call
  number comes in at the same time, that this thread will immediately be found
  in the active_list of threads.
  
  Review: https://reviewboard.asterisk.org/r/720/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 17:36:51 +00:00
Terry Wilson 857814f435 Add SRTP support for Asterisk
After 5 years in mantis and over a year on reviewboard, SRTP support is finally
being comitted. This includes generic CHANNEL dialplan functions that work for
getting the status of whether a call has secure media or signaling as defined
by the underlying channel technology and for setting whether or not a new
channel being bridged to a calling channel should have secure signaling or
media. See doc/tex/secure-calls.tex for examples.

Original patch by mikma, updated for trunk and revised by me.

(closes issue #5413)
Reported by: mikma
Tested by: twilson, notthematrix, hemanshurpatel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 05:29:08 +00:00
Tilghman Lesher 7d18dd5394 Finally track down and eliminate the "FRACK! warnings from chan_iax2".
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-06 00:37:30 +00:00
David Vossel cddc244c97 fix iax_frame double free
Very unfortunate things happen if we add an iax_frame
to the frame queue and let go of the lock before scheduling
the frame's transmit... There is a race condition that
exists where the frame can be removed from the frame_queue
and freed before the transmit is scheduled if we do not
hold on to that lock.  This results in a freed frame
being scheduled for transmit later.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-14 18:53:55 +00:00
Leif Madsen bb2fa21ac1 IAXpeers output now matches SIPpeers format for manager (AMI).
(closes issue #17100)
Reported by: secesh
Tested by: pabelanger

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-21 19:02:45 +00:00
Richard Mudgett a5a0a5f867 Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.
SWP-1229
ABE-2161

* Ensure chan_local.c:local_call() will not leak cid.cid_dnid when
copying.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-03 02:12:33 +00:00
David Vossel 3d4de4a277 Merged revisions 250394 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r250394 | dvossel | 2010-03-03 12:02:27 -0600 (Wed, 03 Mar 2010) | 16 lines
  
  fixes problem with duplicate TXREQ packets
  
  When Asterisk receives an IAX2 TXREQ packet, try_transfer()
  will call store_by_transfercallno() to link the chan_iax2_pvt
  struct into iax_transfercallno_pvts. If a duplicate TXREQ
  packet is received for the same call, the pvt struct will be
  linked into iax_transfercallno_pvts multiple times.  This patch
  fixes this.  Thanks rain for debugging this and providing a patch!
  
  (closes issue #16904)
  Reported by: rain
  Patches:
        iax2-double-txreq-fix.diff uploaded by rain (license 327)
  Tested by: rain, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03 18:03:19 +00:00
Kevin P. Fleming 7e2145b9ac Merged revisions 249234 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r249234 | kpfleming | 2010-02-27 09:07:59 -0500 (Sat, 27 Feb 2010) | 1 line
  
  add a reference to the now-published IAX2 RFC
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-27 14:08:35 +00:00
David Vossel dd48c7eb40 fixes a merging error for the iaxs and iaxsl off by one fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09 23:18:58 +00:00
David Vossel 5be3d14c11 Merged revisions 245792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r245792 | dvossel | 2010-02-09 16:55:38 -0600 (Tue, 09 Feb 2010) | 12 lines
  
  Fixes iaxs and iaxsl size off by one issue.
  
  2^15 = 32768 which is the maximum allowed iax2 callnumber.
  Creating the iaxs and iaxsl array of size 32768 means the maximum
  callnumber is actually out of bounds.  This causes a nasty crash.
  
  (closes issue #15997)
  Reported by: exarv
  Patches:
        iax_fix.diff uploaded by dvossel (license 671)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09 23:07:17 +00:00
David Vossel a97e8f3908 adds total call numbers available to 'iax2 show callnumber usage' cli output
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-05 18:12:41 +00:00
Russell Bryant 34317fb0d3 Fix the ability to specify an OSP token for an outbound IAX2 call.
When this patch was originally submitted, the code allowed for the token to be
set via a channel variable.  I decided that a cleaner approach would be to
integrate it into the CHANNEL() function.  Unfortunately, that is not a suitable
approach.  It's not possible to get the value set on the channel soon enough
using that method.  So, go back to the simple channel variable method.

(closes issue #16711)
Reported by: homesick
Patches:
      iax-svn.diff uploaded by homesick (license 91)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-27 17:32:07 +00:00
Tilghman Lesher 9c1b53cab4 According to POSIX, the capital L modifier applies only to floating point types.
Fixes a crash on Solaris.
(closes issue #16572)
 Reported by: crjw
 Patches: 
       frame_changes.patch uploaded by crjw (license 963)
       Plus several others found and fixed by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@239074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-10 19:37:30 +00:00
David Vossel c8bb5daf1e Merged revisions 238411 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r238411 | dvossel | 2010-01-07 14:14:25 -0600 (Thu, 07 Jan 2010) | 10 lines
  
  fixes crash in "scheduled_destroy" in chan_iax
  
  A signed short was used to represent a callnumber.  This is makes
  it possible to attempt to access the iaxs array with a negative
  index.
  
  (closes issue #16565)
  Reported by: jensvb
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-07 20:15:27 +00:00
David Vossel 6ecaa764d3 fixes iax "can't compress subclass 4294967295" error
(closes issue #16456)
Reported by: dvossel
Tested by: dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-22 21:53:46 +00:00
David Vossel 417657f4ed fixes iax2 show cache locking error, thanks alecdavis!
(closes issue #16094)
Reported by: alecdavis
Patches:
      bug16094.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis, dvossel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-20 22:35:54 +00:00
Kevin P. Fleming 209e1cf195 Merged revisions 230246 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r230246 | kpfleming | 2009-11-15 11:19:06 -0600 (Sun, 15 Nov 2009) | 6 lines
  
  Correct mistaken option name in error message.
  
  The configuration option for allowing hosts to make non-token-based calls
  is 'calltokenoptional', not 'calltokenignore'. (reported on asterisk-users)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-15 17:23:02 +00:00
Tilghman Lesher 5e2aa190fe Display a list of channel variables in each channel-oriented event.
(Closes AST-33)
Reviewboard:	https://reviewboard.asterisk.org/r/368/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13 20:42:03 +00:00
David Vossel 60f80e5360 Merged revisions 229167 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r229167 | dvossel | 2009-11-10 11:15:57 -0600 (Tue, 10 Nov 2009) | 9 lines
  
  don't crash on log message in solaris
  
  AST-2009-006
  
  (closes issue #16206)
  Reported by: bklang
  Tested by: bklang
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-10 17:16:49 +00:00
Tilghman Lesher 2bbda7a7c8 Two other trunk build fixes (reported by seanbright on #asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 16:17:18 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
David Vossel 3acfd4933c Merged revisions 225243 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r225243 | dvossel | 2009-10-21 15:58:08 -0500 (Wed, 21 Oct 2009) | 13 lines
  
  IAX2: VNAK loop caused by signaling frames with no destination call number
  
  It is possible for the PBX thread to queue up signaling frames before
  a destination call number is received.  This can result in signaling
  frames being sent out with no destination call number. Since recent
  versions of Asterisk require accurate destination callnumbers for all
  Full Frames, this can cause a VNAK loop to occur.  To resolve this
  no signaling frames are sent until a destination callnumber is received,
  and destination call numbers are now only required for iax_pvt matching
  when the frame is an ACK.
  
  Review: https://reviewboard.asterisk.org/r/413/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 21:58:46 +00:00
David Vossel 984d6500ce Merged revisions 225032 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r225032 | dvossel | 2009-10-21 09:37:04 -0500 (Wed, 21 Oct 2009) | 20 lines
  
  IAX/SIP shrinkcallerid option
  
  The shrinking of caller id removes '(', ' ', ')', non-trailing '.',
  and '-' from the string.  This means values such as 555.5555 and
  test-test result in 555555 and testtest.  There are instances,
  such as Skype integration, where a specific value is passed via
  caller id that must be preserved unmodified.  This patch makes
  the shrinking of caller id optional in chan_sip and chan_iax in
  order to support such cases.  By default this option is on to
  preserve previous expected behavior.
  
  (closes issue #15940)
  Reported by: dimas
  Patches:
        v2-15940.patch uploaded by dimas (license 88)
        15940_shrinkcallerid_trunk.c uploaded by dvossel (license 671)
  Tested by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/408/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 14:39:10 +00:00
Kevin P. Fleming 1c9fe00920 Recorded merge of revisions 222152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines
  
  Fix ao2_iterator API to hold references to containers being iterated.
  
  See Mantis issue for details of what prompted this change.
  
  Additional notes:
  
  This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK
  has become an enum instead of a macro, with a name that fits our
  naming policy; also, it is now necessary to call
  ao2_iterator_destroy() on any iterator that has been
  created. Currently this only releases the reference to the container
  being iterated, but in the future this could also release other
  resources used by the iterator, if the iterator implementation changes
  to use additional resources.
  
  (closes issue #15987)
  Reported by: kpfleming
  
  Review: https://reviewboard.asterisk.org/r/383/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 01:24:24 +00:00
David Vossel 3cce68d329 Merged revisions 222026 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222026 | dvossel | 2009-10-02 12:32:13 -0500 (Fri, 02 Oct 2009) | 3 lines
  
  Removes unnecessary unlock, clarifies a memcpy.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02 17:34:07 +00:00
David Vossel 9329079bb4 Merged revisions 219720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219720 | dvossel | 2009-09-21 11:55:53 -0500 (Mon, 21 Sep 2009) | 3 lines
  
  Reverting merge 219520. This change was not necessary.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-21 16:59:05 +00:00
Russell Bryant 5996ab0ee2 Merged revisions 219586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219586 | russell | 2009-09-18 21:51:13 -0500 (Fri, 18 Sep 2009) | 6 lines
  
  Make sure the iax_pvt exists before dereferencing it.
  
  This fixes the latest crash posted on issue 15609.
  
  (issue #15609)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-19 02:59:52 +00:00
David Vossel 95be40493a Merged revisions 219519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219519 | dvossel | 2009-09-18 18:19:50 -0500 (Fri, 18 Sep 2009) | 9 lines
  
  iax2 frame double free
  
  The iax frame's retrans sched id was written over right
  before iax2_frame_free was called.  In iax2_frame_free that
  retrans id is used to delete the sched item.  By writing over
  the retrans field before the sched item could be deleted, it was
  possible for a retransmit to occur on a freed frame.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-18 23:20:58 +00:00
Tilghman Lesher 1b147b0094 Make calltoken support work with realtime users and peers.
In the course of this, I also found that the results of ast_gethostbyname
were being used incorrectly in both chan_iax2 and chan_sip, so both have
been fixed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 23:12:16 +00:00
David Vossel e716801ab2 Merged revisions 217806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r217806 | dvossel | 2009-09-10 16:06:07 -0500 (Thu, 10 Sep 2009) | 22 lines
  
  IAX2 encryption regression
  
  The IAX2 Call Token security patch inadvertently broke the use of
  encryption due to the reorganization of code in the socket_process()
  function.  When encryption is used, an incoming full frame must first
  be decrypted before the information elements can be parsed.  The
  security release mistakenly moved IE parsing before decryption in
  order to process the new Call Token IE.  To resolve this, decryption
  of full frames is once again done before looking into the frame.  This
  involves searching for an existing callno, checking the pvt to see if
  encryption is turned on, and decrypting the packet before the internal
  fields of the full frame are accessed.
  
  (closes issue #15834)
  Reported by: karesmakro
  Patches:
        iax2_encryption_fix_1.4.diff uploaded by dvossel (license 671)
  Tested by: dvossel, karesmakro
  
  Review: https://reviewboard.asterisk.org/r/355/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 21:07:47 +00:00
David Vossel d09f9fd00a Merge code associated with AST-2009-006
(closes issue #12912)
Reported by: rathaus
Tested by: tilghman, russell, dvossel, dbrooks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 16:31:54 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Jeff Peeler 0f31e6c26c Merged revisions 208923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r208923 | jpeeler | 2009-07-26 20:18:31 -0500 (Sun, 26 Jul 2009) | 2 lines
  
  Fix logic errors from 208746
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 01:20:37 +00:00
Jeff Peeler b7cfe90404 Merged revisions 208746 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r208746 | jpeeler | 2009-07-25 01:19:50 -0500 (Sat, 25 Jul 2009) | 7 lines
  
  Fix compiling under dev-mode with gcc 4.4.0.
  
  Mostly trivial changes, but I did not know of any other way to fix the
  "dereferencing type-punned pointer will break strict-aliasing rules" error
  without creating a tmp variable in chan_skinny.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-25 06:23:18 +00:00
David Vossel 090066be3b fixes an error in r203638 CEL commit
(closes issue #15525)
Reported by: elguero
Patches:
      iax2-double-unlock.patch uploaded by elguero (license 37)
      15525.diff uploaded by dvossel (license 671)
Tested by: dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-17 22:07:36 +00:00
Russell Bryant e55d1b11b9 Merged revisions 206385 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
  r206385 | russell | 2009-07-14 09:48:00 -0500 (Tue, 14 Jul 2009) | 13 lines
  
  Merged revisions 206384 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.2
  
  ........
    r206384 | russell | 2009-07-14 09:45:47 -0500 (Tue, 14 Jul 2009) | 6 lines
    
    Ensure apathetic replies are sent out on the proper socket.
    
    chan_iax2 supports multiple address bindings.  The send_apathetic_reply()
    function did not attempt to send its response on the same socket that the
    incoming message came in on.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14 14:51:44 +00:00
David Vossel ba2a8457b8 Merged revisions 205471 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r205471 | dvossel | 2009-07-08 18:15:54 -0500 (Wed, 08 Jul 2009) | 10 lines
  
  Fixes 8khz assumptions
  
  Many calculations assume 8khz is the codec rate. This
  is not always the case.  This patch only addresses chan_iax.c
  and res_rtp_asterisk.c, but I am sure there are other areas
  that make this assumption as well.
  
  Review: https://reviewboard.asterisk.org/r/306/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 23:19:09 +00:00
David Vossel 519f1dd7d6 moving debug message from level 0 to 1.
(closes issue #15404)
Reported by: leobrown
Patches:
      iax_codec_debug.patch uploaded by leobrown (license 541)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 19:47:11 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
David Vossel 05da5f14d9 Merged revisions 201993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines
  
  timestamp was being converted to host order as a short rather than a long
  
  (closes issue #15361)
  Reported by: ffloimair
  Patches:
        ts_issue.diff uploaded by dvossel (license 671)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-19 20:24:37 +00:00
David Vossel 68ba81dfe6 Add rtsavesysname to chan_iax
chan_sip has an option to save the sysname on rtupdate.  This patch copies that same logic to chan_iax.

(closes issue #14837)
Reported by: barthpbx
Patches:
      iax2-rtsavesysname.patch uploaded by barthpbx (license 744)
      rt_iax.diff uploaded by dvossel (license 671)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-17 21:56:42 +00:00
David Vossel 940accbd99 update chan_iax to use 64bit feature flags.
(closes issue #15335)
Reported by: lmadsen

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-17 14:42:06 +00:00
Kevin P. Fleming 4379249674 Convert a number of global module variables to 'static'.
These modules all contained variables that are module-global but not system-global,
but were not marked 'static'.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:06:34 +00:00
David Vossel e018606c7e Merged revisions 199138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r199138 | dvossel | 2009-06-04 14:00:15 -0500 (Thu, 04 Jun 2009) | 3 lines
  
  Additional updates to AST-2009-001
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-04 19:10:16 +00:00
David Vossel 61bc1854d5 fixes issue with channels not going down after transfer
Iax2 currently does not support native bridging if the timeoutms value is set.  We check for that in iax2_bridge, but then set timeoutms to 0 by default.  If the timeoutms is not provided it is set to -1. By setting timeoutms to 0 it is processed causing a bridging retry loop.

(closes issue #15216)
Reported by: oxymoron
Tested by: dvossel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-02 17:55:35 +00:00
Joshua Colp e9e4efdcb6 Fix a bug where the trunkmtu setting was not set to the default value of 1240 on load but was on reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 18:45:11 +00:00
Eliel C. Sardanons 2c882626a0 Implement a new element in AstXML for AMI actions documentation.
A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

Example manager xml documentation:
<manager name="ami action name" language="en_US">
    <synopsis>
        AMI action synopsis.
    </synopsis>
    <syntax>
        <xi:include xpointer="xpointer(...)" /> <-- for ActionID
        <parameter name="header1" required="true">
	    <para>Description</para>
	</parameter>
	...
    </syntax>
    <description>
        <para>AMI action description</para>
    </description>
    <see-also>
    	...
    </see-also>
</manager>



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 17:52:35 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
David Vossel 88bda581ec Merged revisions 195991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195991 | dvossel | 2009-05-21 14:04:56 -0500 (Thu, 21 May 2009) | 14 lines
  
  Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer.
  
  There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset.  This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number.  This patch checks for this negative case and sets the ms to zero.  A similar check is already done right below this one in the 'else' statement.
  
  (closes issue #15032)
  Reported by: guillecabeza
  Patches:
        chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380)
  Tested by: guillecabeza
  
  (closes issue #14216)
  Reported by: Andrey Sofronov
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 19:11:49 +00:00
David Vossel 2595c54876 Merged revisions 194873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194873 | dvossel | 2009-05-15 17:43:13 -0500 (Fri, 15 May 2009) | 17 lines
  
  IAX2 REGAUTH loop
  
  IAX was not sending REGREJ to terminate invalid registrations.  Instead it sent another REGAUTH if the authentication challenge failed.  This caused a loop of REGREQ and REGAUTH frames.
  
  (Related to Security fix AST-2009-001)
  
  (closes issue #14867)
  Reported by: aragon
  Tested by: dvossel
  
  (closes issue #14717)
  Reported by: mobeck
  Patches:
        regauth_loop_update_patch.diff uploaded by dvossel (license 671)
  Tested by: dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 22:44:44 +00:00
David Vossel d9ac4bfc6f Merged revisions 194557,194685 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194557 | dvossel | 2009-05-14 17:59:43 -0500 (Thu, 14 May 2009) | 10 lines
  
  IAX2 "Ghost" Channels
  
  There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.
  
  (closes issue #14207)
  Reported by: clive18
  
  Review: https://reviewboard.asterisk.org/r/246/
........
  r194685 | dvossel | 2009-05-15 10:40:37 -0500 (Fri, 15 May 2009) | 6 lines
  
  Update to previous IAX2 "Ghost" Channels patch.
  
  Fixed some comments made on reviewboard for the previous patch.
  
  (issue #14207)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 20:52:12 +00:00
Joshua Colp 9936f0ca14 Fix a bug where a timer would be created but not acknowledged.
This scenario crept up if chan_iax2 was loaded with no configuration file present.
It would create a timer and tell it to go at an interval but the thread that normally
acknowledges it would not be created because no configuration file was present. The timer
will now be closed if no configuration file is present.

(closes issue #15014)
Reported by: madkins


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-06 17:38:51 +00:00
David Vossel 0d44a84870 Merged revisions 192213 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192213 | dvossel | 2009-05-04 17:37:31 -0500 (Mon, 04 May 2009) | 11 lines
  
  global mohinterpret setting is ignored
  
  mohinterpret and mohsuggest global variables were not copied over during build_users and build_peers.
  
  (closes issue #14728)
  Reported by: dimas
  Patches:
        v1-14728.patch uploaded by dimas (license 88)
  Tested by: dimas, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 22:44:51 +00:00
Tilghman Lesher 451c59aa18 Set debug message back to DEBUG level.
(closes issue #15007)
 Reported by: hulber


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-01 18:18:00 +00:00
Russell Bryant cba19c8a67 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

Review: http://reviewboard.digium.com/r/203/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 14:04:26 +00:00
Doug Bailey 9c2ff7bb1e Merged revisions 189391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189391 | dbailey | 2009-04-20 14:10:56 -0500 (Mon, 20 Apr 2009) | 4 lines
  
  Clean up problem with manager implementation of mmap where it was not testing against MAP_FAILED response.
  Got rid of shadowed variable used in processign the mmap results. 
  Change test of mmap results to compare against MAP_FAILED
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 19:28:16 +00:00
Joshua Colp e2a336124f Do not try to send the format read/format write/make compatible options over IAX2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 16:27:53 +00:00
Mark Michelson 6f53ed4c67 This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are
chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be
introduced in a later commit. chan_skinny has code added to it here, but according
to user pj, the support on chan_skinny is not working as of now. This will be fixed in
a later commit.

A special thanks goes out to bugtracker user gareth for getting the ball rolling and
providing the initial support for this work. Without his initial work on this, this would
not have been nearly as painless as it was.

This functionality has been tested by Digium's product quality department, as well as a
customer site running thousands of calls every day. In addition, many many many many bugtracker
users have tested this, too.

(closes issue #8824)
Reported by: gareth

Review: http://reviewboard.digium.com/r/201



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 22:41:46 +00:00
Joshua Colp 2d9c6ef3d5 Add better support for relaying success or failure of the ast_transfer() API call.
This API call now waits for a special frame from the underlying channel driver to
indicate success or failure. This allows the return value to truly convey whether
the transfer worked or not. In the case of the Transfer() dialplan application this
means the value of the TRANSFERSTATUS dialplan variable is actually true.

(closes issue #12713)
Reported by: davidw
Tested by: file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 16:47:27 +00:00
Russell Bryant 8dfcd7e418 Improve performance of the code handling the frame queue in chan_iax2.
In my tests that exercised full frame handling in chan_iax2, the version with
these changes took 30% to 40% of the CPU time compared to the same test of
Asterisk trunk before these modifications.

While doing some profiling for <http://reviewboard.digium.com/r/205/>,
one function that caught my eye was network_thread() in chan_iax2.c.
After the things that I was working on there, it was the next target
for analysis and optimization.  I used oprofile's source annotation
functionality and found that the loop traversing the frame queue in
network_thread() was to blame for the excessive CPU cycle consumption.

The frame_queue in chan_iax2 previously held all frames that either were
pending transmission or had been transmitted and are still pending
acknowledgment.

In network_thread(), the previous code would go back through the main
for loop after reading a single incoming frame or after being signaled
because a frame had been queued up for initial transmission.  In each
iteration of the loop, it traverses the entire frame queue looking for
frames that need to be transmitted.  On a busy server, this could easily
be quite a few entries.

This patch is actually quite simple.  The frame_queue has become only a list
of frames pending acknowledgment.  Frames that need to be transmitted are
queued up to a dedicated transmit thread via the taskprocessor API.

As a result, the code in network_thread() becomes much simpler, as its only
job is to read incoming frames.

In addition to the previously described changes, this patch includes some
additional changes to the frame_queue.  Instead of one big frame_queue, now
there is a list per call number to further reduce wasted list traversals.
The biggest impact of this change is in socket_process().

For additional details on testing and test results, see the review request.

Review: http://reviewboard.digium.com/r/212/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 19:07:58 +00:00
Kevin P. Fleming 9381bff79d Improve timing interface to remember which provider provided a timer
The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error.

This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider.

(closes issue #14697)
Reported by: moy

Review: http://reviewboard.digium.com/r/211/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 19:10:32 +00:00
Russell Bryant ee77b475f2 Improve performance of the ast_event cache functionality.
This code comes from svn/asterisk/team/russell/event_performance/.

Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.

1) Asterisk 1.6.1 introduces some additional logic to be able to handle
   distributed device state.  This functionality comes at a cost.
   One relatively minor change in this patch is that the extra processing
   required for distributed device state is now completely bypassed if
   it's not needed.

2) One of the things that I noticed when profiling this code was that a
   _lot_ of time was spent doing string comparisons.  I changed the way
   strings are represented in an event to include a hash value at the front.
   So, before doing a string comparison, we do an integer comparison on the
   hash.

3) Finally, the code that handles the event cache has been re-written.
   I tried to do this in a such a way that it had minimal impact on the API.
   I did have to change one API call, though - ast_event_queue_and_cache().
   However, the way it works now is nicer, IMO.  Each type of event that
   can be cached (MWI, device state) has its own hash table and rules for
   hashing and comparing objects.  This by far made the biggest impact on
   performance.

For additional details regarding this code and how it was tested, please see the
review request.

(closes issue #14738)
Reported by: russell

Review: http://reviewboard.digium.com/r/205/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 21:57:19 +00:00
Russell Bryant 7460afdd46 Exclude slin16, siren7, and siren14 from bandwidth=low and =medium
The default codec configuration for chan_iax2 is bandwidth=low.  I noticed
slin16 being negotiated as the codec in some test calls, but that no longer
happens after this change.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-24 21:40:44 +00:00
Russell Bryant f4d0347d02 Merged revisions 183559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183559 | russell | 2009-03-20 11:53:25 -0500 (Fri, 20 Mar 2009) | 2 lines

Fix a crash in IAX2 registration handling found during load testing with dvossel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20 17:00:58 +00:00
David Vossel 18ac659dc6 Merged revisions 182281 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182281 | dvossel | 2009-03-16 12:47:42 -0500 (Mon, 16 Mar 2009) | 7 lines
  
  Randomize IAX2 encryption padding
  
  The 16-32 byte random padding at the beginning of an encrypted IAX2 frame turns out to not be all that random at all.  This patch calls ast_random to fill the padding buffer with random data.  The padding is randomized at the beginning of every encrypted call and for every encrypted retransmit frame.
  
  Review: http://reviewboard.digium.com/r/193/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16 17:49:58 +00:00
David Vossel 5f476b6085 Merged revisions 181340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r181340 | dvossel | 2009-03-11 12:25:31 -0500 (Wed, 11 Mar 2009) | 11 lines
  
  encrypted IAX2 during packet loss causes decryption to fail on retransmitted frames
  
  If an iax channel is encrypted, and a retransmit frame is sent, that packet's iseqno is updated while it is encrypted.  This causes the entire frame to be corrupted.  When the corrupted frame is sent, the other side decrypts it and sends a VNAK back because the decrypted frame doesn't make any sense.  When we get the VNAK, we look through the sent queue and send the same corrupted frame causing a loop.  To fix this, encrypted frames requiring retransmission are decrypted, updated, then re-encrypted.  Since key-rotation may change the key held by the pvt struct, the keys used for encryption/decryption are held within the iax_frame to guarantee they remain correct.
  
  (closes issue #14607)
  Reported by: stevenla
  Tested by: dvossel
  
  Review: http://reviewboard.digium.com/r/192/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 17:34:57 +00:00
Joshua Colp 775b30307f Do not try to remove a registration scheduled item if the scheduler context has already been destroyed.
(closes issue #14580)
Reported by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02 14:28:09 +00:00
David Vossel 3d0aac6cd8 IAX2 prune realtime, minor tweak to last fix
A return statement was missing which caused unexpected cli output.

issue #14479


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-26 17:46:12 +00:00
David Vossel a0ef434095 IAX2 prune realtime fix
Iax2 prune realtime had issues.  If "iax2 prune realtime all" was called, it would appear like the command was successful, but in reality nothing happened.  This is because the reload that was supposed to take place checks the config files, sees no changes, and does nothing.  If there had been a change in the the config file, the realtime users would have been marked for deletion and everything would have been fine.  Now prune_users() and prune_peers() are called instead of reload_config() to prune all users/peers that are realtime.  These functions remove all users/peers with the rtfriend and delme flags set. iax2_prune_realtime() also lacked the code to properly delete a single friend.  For example. if iax2 prune realtime <friend> was called, only the peer instance would be removed. The user would still remain.  

(closes issue #14479)
Reported by: mousepad99
Review: http://reviewboard.digium.com/r/176/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-26 15:50:22 +00:00
David Vossel 641dd68c4d Allows manager command to see if IAX link is trunked and encrypted. Displays what kind of encryption is enabled as well.
Manager command "iaxpeers" now shows if a link is trunked and encrypted.  Instead of encryption saying simply "yes" or "no", it now displays what type of encryption is enabled and if keyrotation is on or not.  

(closes issue #14427)
Reported by: snuffy
Patches:
	iax_show_trunks.diff uploaded by snuffy (license 35)
	2009022200_iax2_show_trunkencryption.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak, dvossel, snuffy
Review: http://reviewboard.digium.com/r/173/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 17:42:37 +00:00
David Vossel 7d1ac32af1 Changes the way keyrotation is enabled by default
Key rotation was enabled by default by setting the global encryption method to IAX_ENCRYPT_KEYROTATE.  the problem with this is that if encryption is not enabled, and the encryption method is set to anything except 0, the peer appears to have encryption enabled when issuing a "iax2 show peers".  Rather than have the key rotation bit always set by default, it is now only set when an encryption method is enabled. 

(closes issue #14523)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-23 17:59:55 +00:00
David Vossel 00b5dcfca4 Merged revisions 176354 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r176354 | dvossel | 2009-02-16 17:30:52 -0600 (Mon, 16 Feb 2009) | 8 lines
  
  Fixes issue with AST_CONTROL_SRCUPDATE not being relayed correctly during bridging
  
  This should have been committed with rev176247, but I missed it.  srcupdate frames no longer break out of the native bridge, but are not being sent to the other call leg either.  This fixs that.
  
  issue #13749
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 23:33:55 +00:00
David Vossel 0a792331bf Merged revisions 175597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r175597 | dvossel | 2009-02-13 14:11:55 -0600 (Fri, 13 Feb 2009) | 4 lines
  
  Fixed iax2 key rotation backwards compatibility
  
  Turns key rotation back on by default.  Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility.  This eliminates the need for the keyrotate option in iax.conf, so it has been removed.  
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 21:30:17 +00:00
David Vossel 35ac1d7e1c Fixed iax2 key rotation backwards compatibility
Turns key rotation back on by default.  Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility.  This eliminates the need for the keyrotate option in iax.conf, so it has been removed. 

Review: http://reviewboard.digium.com/r/159/ 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 20:11:55 +00:00
David Vossel 178e6f06df Adds force encryption option to iax.conf
This patch adds forceencryption=yes as an iax.conf option.  When force encryption is enabled, no unencrypted connections are allowed.  This insures all connections are encrypted.  This is a new feature, so CHANGES and iax.conf.sample are updated as well.   

(closes issue #13285)
Reported by: sgofferj
Tested by: russell
Review: http://reviewboard.digium.com/r/150/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12 21:27:11 +00:00
Kevin P. Fleming 1448b5db6a correct warning message to not refer specifically to DAHDI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12 18:48:52 +00:00
David Vossel 53f3ab973e Setting key rotation to be off by default
Key rotation breaks compatibility between (trunk/1.6.1) and (1.2/1.4/1.6.0).  As a follow up to this, I am investigating possible ways to allow key rotation to be on by default and not affect the other branches, but for now it must be turned off. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12 17:07:17 +00:00
David Vossel c15b83e7e5 Adds immediate yes/no option to iax.conf
This is very similar to the DAHDI immediate=yes option.  When the phone is picked up, instead of giving a dialtone it connects directly to the "s" extension.  Changes where implemented in chan_iax2.c to directly connect to the "s" extension in the appropriate context when this option is enabled.  Examples explaining its use are added to iax2.conf.sample.  CHANGES has been updated as well. 

(closes issue #14266)
Reported by: jcovert
Patches:
      chan_iax2.c.patch-trunk uploaded by jcovert (license 551)
      iax.conf.sample.patch uploaded by jcovert (license 551)
Tested by: jcovert, dvossel
Review: http://reviewboard.digium.com/r/143/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-06 20:12:33 +00:00
Russell Bryant 0cbada4f96 Add a common implementation of a scheduler context with a dedicated thread.
This commit expands the Asterisk scheduler API to include a common implementation
of a scheduler context being processed by a dedicated thread.  chan_iax2 has been
updated to use this new code.  Also, as a result, this resolves some race
conditions related to the previous chan_iax2 scheduler handling.

Related to rev 171452 which resolved the same issues in 1.4.

Code from team/russell/sched_thread2

Review: http://reviewboard.digium.com/r/129/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-06 10:55:35 +00:00
David Vossel b605bdff0c Fixes issue with IAX2 transfer not handing off calls. Reverts changes in 116884
Fixes issue with IAX2 transfers not taking place. As it was, a call that was being transfered would never be handed off correctly to the call ends because of how call numbers were stored in a hash table. The hash table, "iax_peercallno_pvt", storing all the current call numbers did not take into account the complications associated with transferring a call, so a separate hash table was required. This second hash table "iax_transfercallno_pvt" handles calls being transfered, once the call transfer is complete the call is removed from the transfer hash table and added to the peer hash table resuming normal operations. Addition functions were created to handle storing, removing, and comparing items in the iax_transfercallno_pvt table. The changes reverted in 116884 caused backwards compatibility issues involving iax2 transfer with 1.6.0, 1.4, and 1.2. 
  
(closes issue #13468)
Reported by: nicox
Tested by: dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 21:25:14 +00:00
Tilghman Lesher 0308c5b943 Merged revisions 170588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170588 | tilghman | 2009-01-23 13:20:44 -0600 (Fri, 23 Jan 2009) | 2 lines
  
  Additions to AST-2009-001
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-23 19:25:10 +00:00
Tilghman Lesher 9c8776f5fd Merged revisions 167260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
  r167260 | tilghman | 2009-01-06 14:48:05 -0600 (Tue, 06 Jan 2009) | 9 lines
  
  Merged revisions 167259 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.2
  
  ........
    r167259 | tilghman | 2009-01-06 14:44:03 -0600 (Tue, 06 Jan 2009) | 2 lines
    
    Security fix AST-2009-001.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 21:02:33 +00:00
Russell Bryant 9e65283794 Open a timer before loading configuration so that the trunking configuration option
will take effect.

(closes issue #14082)
Reported by: seandarcy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 22:25:46 +00:00
Russell Bryant 3ef07d4fd4 Fix log message to refer to the generic timing interface, not DAHDI specifically
(inspired by issue #14082)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 22:22:43 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Russell Bryant 15431e2948 Merged revisions 160003 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r160003 | russell | 2008-12-01 11:27:30 -0600 (Mon, 01 Dec 2008) | 6 lines

Apply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
both have the potential to send control frames in the middle of call setup.  We
have to wait until we have received a message back from the remote end before
we try to send any more frames.  Otherwise, the remote end will consider it
invalid, and we'll get stuck in an INVAL/VNAK storm.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 17:34:31 +00:00
Kevin P. Fleming 887e28d7aa incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines

update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way


------------------------------------------------------------------------

in addition:

move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29 17:57:39 +00:00
Steve Murphy c5e64b2ac4 Merged revisions 159316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r159316 | murf | 2008-11-25 15:41:10 -0700 (Tue, 25 Nov 2008) | 15 lines

(closes issue #12694)
Reported by: yraber
Patches:
      12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav

Thanks to file (Joshua Colp) for his IAX fix.

the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 23:03:01 +00:00
Tilghman Lesher fe2c495db6 Merged revisions 159269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r159269 | tilghman | 2008-11-25 15:56:48 -0600 (Tue, 25 Nov 2008) | 7 lines
  
  Don't try to send a response on a NULL pvt.
  (closes issue #13919)
   Reported by: barthpbx
   Patches: 
         chan_iax2.c.patch uploaded by eliel (license 64)
   Tested by: barthpbx
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 21:57:59 +00:00
Tilghman Lesher f41f8858cd Merged revisions 159246 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
  r159246 | tilghman | 2008-11-25 15:40:28 -0600 (Tue, 25 Nov 2008) | 14 lines
  
  Merged revisions 159245 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.2
  
  ........
    r159245 | tilghman | 2008-11-25 15:37:06 -0600 (Tue, 25 Nov 2008) | 7 lines
    
    Regression fix for last security fix.  Set the iseqno correctly.
    (closes issue #13918)
     Reported by: ffloimair
     Patches: 
           20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
     Tested by: ffloimair
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 21:42:42 +00:00
Sean Bright fd8caa1778 This is basically a complete rollback of r155401, as it was determined that
it would be best to maintain API compatibility.  Instead, this commit introduces
ao2_callback_data() which is functionally identical to ao2_callback() except
that it allows you to pass arbitrary data to the callback.

Reviewed by Mark Michelson via ReviewBoard:
	http://reviewboard.digium.com/r/64


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 01:01:49 +00:00
Tilghman Lesher 654a8c1b4b Merged revisions 156229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r156229 | tilghman | 2008-11-12 12:39:21 -0600 (Wed, 12 Nov 2008) | 11 lines
  
  Revert revision 132506, since it occasionally caused IAX2 HANGUP packets not
  to be sent, and instead, schedule a task to destroy the iax2 pvt structure
  10 seconds later.  This allows the IAX2 HANGUP packet to be queued,
  transmitted, and ACKed before the pvt is destroyed.
  (closes issue #13645)
   Reported by: dzajro
   Patches: 
         20081111__bug13645__3.diff.txt uploaded by Corydon76 (license 14)
   Tested by: vazir
   Reviewed: http://reviewboard.digium.com/r/51/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 18:55:18 +00:00
Sean Bright 30d1744ffc Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find).  Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.

Reviewed by Russell and Mark M. via ReviewBoard:
    http://reviewboard.digium.com/r/36/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 22:39:30 +00:00
Tilghman Lesher bdb21bef93 Switch to using a thread condition to signal that a child thread is ready for
work, rather than a busy wait.
(closes issue #13011)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_find_idle.patch uploaded by jpgrayson (license 492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 23:03:00 +00:00
Tilghman Lesher 0488e8c94e Merged revisions 154365 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r154365 | tilghman | 2008-11-04 14:49:33 -0600 (Tue, 04 Nov 2008) | 9 lines
  
  On busy systems, it's possible for the values checked within a single line
  of code to change, unless the structure is locked to ensure a consistent
  state.
  (closes issue #13717)
   Reported by: kowalma
   Patches: 
         20081102__bug13717.diff.txt uploaded by Corydon76 (license 14)
   Tested by: kowalma
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 20:51:18 +00:00
Eliel C. Sardanons 4c3ce9b8a1 Add XML documentation for:
Functions
        - IAXPEER()
        - IAXVAR()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 13:33:58 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Eliel C. Sardanons 1e6864dd9d Add IAX2Provision() application XML documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 06:24:53 +00:00
Tilghman Lesher 6450b7c4da Make helper call a little safer (suggested by Russell on IRC)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 17:09:03 +00:00
Tilghman Lesher b3bb9564d3 Fix the FRACK! warnings in chan_iax2 when POKE/LAGRQ packets are not answered.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 16:34:29 +00:00
Mark Michelson 32ef7bedd3 Add an IAXregistry manager command. See doc/manager_1_1.txt
for more details of this command.

(closes issue #13326)
Reported by: ib2
Patches:
      bug13326_trunk_20080822.diff uploaded by snuffy (license 35)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 00:18:01 +00:00
Mark Michelson d8d6d5e35b Remove an odd redundant comparison
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 22:30:23 +00:00
Steve Murphy e235a07376 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 14:17:33 +00:00
Sean Bright d1f257ba53 Move the DAHDI-to-DAHDI operator mode check from app_dial into chan_dahdi
so we don't have to hardcode anything.

(closes issue #13636)
Reported by: seanbright
Patches:
      13636.diff uploaded by seanbright (license 71)
Reviewed by: russellb, putnopvut


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 21:34:44 +00:00
Tilghman Lesher 63b165dbb9 Merged revisions 146799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines
  
  Dialplan functions should not actually return 0, unless they have modified the
  workspace.  To signal an error (and no change to the workspace), -1 should be
  returned instead.
  (closes issue #13340)
   Reported by: kryptolus
   Patches: 
         20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 21:09:05 +00:00
Tilghman Lesher 9b214d2135 Merged revisions 143140 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r143140 | tilghman | 2008-09-15 16:29:32 -0500 (Mon, 15 Sep 2008) | 6 lines
  
  Set the raw formats at the same time as the other formats.
  (closes issue #13240)
   Reported by: jvandal
   Patches: 
         20080813__bug13240.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-15 21:31:36 +00:00
Tilghman Lesher 8fbee1307c Repair IAXVAR implementation so that it works again (regression?)
(closes issue #13354)
 Reported by: adomjan
 Patches: 
       20080828__bug13354.diff.txt uploaded by Corydon76 (license 14)
       20080829__bug13354__1.6.0.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, adomjan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-13 13:54:15 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Michiel van Baak 28764dd1f6 Some fixes to autocompletion in some commands.
Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto completed. Now we complete this command with:
  'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...
- Pass ast_cli_args->argv and ast_cli_args->argc while running autocompletion on CLI commands (CLI_GENERATE).
  With this we avoid comparisons on ast_cli_args->line like this:
  strcasestr(a->line, " description")
  strcasestr(a->line, "descriptions ")
  strcasestr(a->line, "realtime peer"), and so on..

  Making the code more confusing (check the spaces in description!).
  The only thing we must be sure is to first check a->pos or a->argc.
														      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this command with 'all' & 'iax2 peers', check a look that iax2 peers where all the peers, now only the ones in the cache..

(closes issue #13133)
Reported by: eliel
Patches:
      clichanges.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06 12:03:11 +00:00
Sean Bright f3111835bb Merged revisions 140605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140605 | seanbright | 2008-09-02 14:14:57 -0400 (Tue, 02 Sep 2008) | 8 lines

Make sure to use the correct length of the mohinterpret and mohsuggest
buffers when copying configuration values.

(closes issue #13336)
Reported by: decryptus_proformatique
Patches:
      chan_iax2_mohinterpret_mohsuggest_general_settings.patch uploaded by decryptus (license 555)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 18:15:54 +00:00
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines

After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the 
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 17:47:17 +00:00
Russell Bryant b296adfe8e Merged revisions 140051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140051 | russell | 2008-08-26 10:27:23 -0500 (Tue, 26 Aug 2008) | 15 lines

Fix a race condition with the IAX scheduler thread.  A lock and condition are
used here to allow newly scheduled tasks to wake up the scheduler just in case
the new task needs to run sooner than the current wakeup time when the thread
is sleeping.  However, there was a race condition such that a newly scheduled
task would not properly wake up the scheduler or affect the wake up period.
The order of execution would have been:

  1) Scheduler thread determines wake up time of N ms.
  2) Another thread schedules a task and signals the condition, with an
     execution time of < N ms.
  3) Scheduler thread locks and goes to sleep for N ms.

By moving the sleep time determination to inside the critical section, this
possibility is avoided.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 15:29:25 +00:00
Mark Michelson e13a77e628 Merged revisions 139466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139466 | mmichelson | 2008-08-22 12:24:47 -0500 (Fri, 22 Aug 2008) | 3 lines

Fix the build. Thanks, mvanbaak!


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 17:25:12 +00:00
Mark Michelson 8b5c762f83 Merged revisions 139456 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139456 | mmichelson | 2008-08-22 11:57:38 -0500 (Fri, 22 Aug 2008) | 7 lines

Prevent a deadlock in chan_iax2 resulting from
incorrect locking order between iax2_pvt and
ast_channel structures.

AST-13


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 16:58:21 +00:00
Sean Bright 69c6dcba67 Fix the output of the JitterBufStats manager event.
(closes issue #13324)
Reported by: srt
Patches:
      13324_missing_nl_in_jitterbufstats_event_2.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-17 13:31:54 +00:00
Sean Bright db1ed285c4 More RSW merges. This should do it for the channels/ dir.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09 14:12:34 +00:00
Tilghman Lesher de582e1eb2 Merged revisions 135747 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135747 | tilghman | 2008-08-05 16:34:46 -0500 (Tue, 05 Aug 2008) | 9 lines

In a conversion to use ast_strlen_zero, the meaning of the flag IAX_HASCALLERID
was perverted.  This change reverts IAX2 to the original meaning, which was,
that the callerid set on the client should be overridden on the server, even if
that means the resulting callerid is blank.  In other words, if you set
"callerid=" in the IAX config, then the callerid should be overridden to blank,
even if set on the client.  Note that there's a distinction, even on realtime,
between the field not existing (NULL in databases) and the field existing, but
set to blank (override callerid to blank).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05 21:37:35 +00:00
Kevin P. Fleming 7df8b8b848 make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05 16:56:11 +00:00
Russell Bryant 58291bcec9 Merge changes from team/bbryant/keyrotation
This set of changes enhances IAX2 encryption support by adding key rotation
to provide enhanced security.  The key used for encryption is rotated right 
after the call gets set up, and then again every few minutes.  This was
discussed at the last AstriDevCon.  For interoperability with older versions
of Asterisk, there is an option that disables key rotation.

(closes issue #13018)
Reported by: bbryant
Patches:
      07072008__iax2_key_rotation.diff uploaded by bbryant (license 36)
Tested by: russell, bbryant


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-01 18:16:24 +00:00
Tilghman Lesher 0c23159464 Deprecate *_device_state_* APIs in favor of *_devstate_* APIs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@133860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-25 21:20:03 +00:00
Tilghman Lesher 3fe5a70e07 Yet another conversion of '|' to ','
(closes issue #13137)
 Reported by: eliel
 Patches: 
       chan_iax2trunk-IAXPEER.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 17:20:43 +00:00
Tilghman Lesher ca62442094 Merged revisions 132713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r132713 | tilghman | 2008-07-22 16:19:39 -0500 (Tue, 22 Jul 2008) | 10 lines

Merged revisions 132711 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r132711 | tilghman | 2008-07-22 16:14:10 -0500 (Tue, 22 Jul 2008) | 2 lines

Fixes for AST-2008-010 and AST-2008-011

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 21:53:40 +00:00
Brett Bryant 9fceb1b8ee Add autocompletion to "iax2 set debug peer".
(closes issue #13129)
Reported by: eliel
Patches:
      chan_iax2.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 22:49:08 +00:00
Brett Bryant 1f74485078 Add "iax2 set debug peer" command and remove deprecated iax2 debug
commands that conflicted with adding new features to the newer debug 
commaands.

(closes issue #13103)
Reported by: mvanbaak
Patches:
      2008071901__issue13103_iax2_set_debug_peer.diff uploaded by 
mvanbaak (license 7)
Tested by: bbryant, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 17:55:04 +00:00
Brett Bryant 4fc282ef63 Fix an issue in iax2 where a call that's been rejected still kept an open channel on the side that attempted to make the call (not the side of the
call that rejected the call). Changes were load tested and also approved by Russell.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 17:22:02 +00:00
Tilghman Lesher 3fa9ad3d13 Merged revisions 131970 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131970 | tilghman | 2008-07-18 11:30:31 -0500 (Fri, 18 Jul 2008) | 2 lines

Make the ast_assert call within ast_sched_del report something useful.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:33:56 +00:00
Brett Bryant 28fa79c23c Merged revisions 131491 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131491 | bbryant | 2008-07-16 17:17:07 -0500 (Wed, 16 Jul 2008) | 6 lines

Fix a bug in iax2 registration that allowed peers to register with 
case-insensitive names (user_cmp_cb and peer_cmp_cb are now both 
case-sensitive).

(closes issue #13091)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 22:17:36 +00:00
Russell Bryant 2842b71a32 Merged revisions 131421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131421 | russell | 2008-07-16 15:47:53 -0500 (Wed, 16 Jul 2008) | 7 lines

Always ensure that the channel's tech_pvt reference is NULL after calling the
destroy callback.
(closes issue #13060)
Reported by: jpgrayson
Patches:
      chan_iax2_tech_pvt_crash.patch uploaded by jpgrayson (license 492)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 20:48:27 +00:00
Tilghman Lesher e921e6f0de Merged revisions 130889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130889 | tilghman | 2008-07-14 18:59:13 -0500 (Mon, 14 Jul 2008) | 8 lines

Override the callerid in all cases when the callerid is set in the user, not
just when a remote callerid is set.  Also, if not set in the user, allow the
remote CallerID to pass through.
(closes issue #12875)
 Reported by: dimas
 Patches: 
       20080714__bug12875.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 23:59:54 +00:00
Tilghman Lesher fe67adf6bc Merged revisions 130514 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130514 | tilghman | 2008-07-13 12:56:10 -0500 (Sun, 13 Jul 2008) | 4 lines

Reverting 2 changesets, as it breaks incoming IAX2 calls
(Related to issue #12963)
Reported by: mvanbaak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-13 17:58:47 +00:00
Tilghman Lesher b66aa676fa Merged revisions 130169 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130169 | tilghman | 2008-07-11 13:51:56 -0500 (Fri, 11 Jul 2008) | 7 lines

Ensure that a destination callno of 0 will not match for frames that do not
start a dialog (new, lagrq, and ping).
(closes issue #12963)
 Reported by: russellb
 Patches: 
       chan_iax2_dup_new_fix4.patch uploaded by jpgrayson (license 492)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:52:42 +00:00
Tilghman Lesher 7e3be6c12f Merged revisions 129803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129803 | tilghman | 2008-07-10 16:57:05 -0500 (Thu, 10 Jul 2008) | 8 lines

Correctly deal with duplicate NEW frames (due to retransmission).  Also, fixup
the destination call number matching to be more strict and reliable.
(closes issue #12963)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_dup_new_fix3.patch uploaded by jpgrayson (license 492)
 Tested by: jpgrayson, Corydon76

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-10 22:06:07 +00:00
Tilghman Lesher aa81a86265 Merged revisions 129047 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129047 | tilghman | 2008-07-08 11:45:23 -0500 (Tue, 08 Jul 2008) | 7 lines

Timestamp decoding for video mini-frames is bogus, because the timestamp only
includes 15 bits, unlike voice frames, which contain a 16-bit timestamp.
(closes issue #13013)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_unwrap_ts.patch uploaded by jpgrayson (license 492)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:49:01 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +00:00
Russell Bryant 10cc442eb7 Merged revisions 128795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128795 | russell | 2008-07-07 17:41:48 -0500 (Mon, 07 Jul 2008) | 8 lines

Fix handling of when a pvt disappears.  Properly return the pvt locked
and don't hold the pvt lock while destroying the ast_channel.

(closes issue #13014)
Reported by: jpgrayson
Patches:
      chan_iax2_ast_iax2_new2.patch uploaded by jpgrayson (license 492)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 22:42:30 +00:00
Sean Bright 880a02f283 Merged revisions 128737 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128737 | seanbright | 2008-07-07 16:47:56 -0400 (Mon, 07 Jul 2008) | 9 lines

Remove spurious trailing whitespace from log messages and fix a spelling error
in a log message.

(closes issue #13017)
Reported by: jpgrayson
Patches:
      chan_iax2_space_after_newline.patch uploaded by jpgrayson (license 492)
      chan_iax2_spelling.patch uploaded by jpgrayson (license 492)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 20:50:29 +00:00
Mark Michelson 834b8e8a71 Merged revisions 128639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128639 | mmichelson | 2008-07-07 12:02:28 -0500 (Mon, 07 Jul 2008) | 10 lines

By using the iaxdynamicthreadcount to identify a thread, it was possible
for thread identifiers to be duplicated. By using a globally-unique monotonically-
increasing integer, this is now avoided.

(closes issue #13009)
Reported by: jpgrayson
Patches:
      chan_iax2_dyn_threadnum.patch uploaded by jpgrayson (license 492)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 17:09:11 +00:00
Brett Bryant 022a157bd8 Remove commit that somehow got mergeed into trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 22:44:39 +00:00
Brett Bryant 10fdf344ed Update these files with transfer code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 22:36:02 +00:00
Tilghman Lesher 885d17506b Keep ast_app_inboxcount API compatible with 1.6.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 21:27:53 +00:00
Tilghman Lesher e347f8bc70 Merged revisions 127133 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127133 | tilghman | 2008-07-01 15:25:37 -0500 (Tue, 01 Jul 2008) | 2 lines

Disable the old, slow search for matching callno in chan_iax2 (but allow it to be reenabled for debugging)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 20:28:54 +00:00
Tilghman Lesher 3217aed39c Merged revisions 127068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127068 | tilghman | 2008-07-01 13:52:53 -0500 (Tue, 01 Jul 2008) | 8 lines

Change around how we schedule pings and lagrqs, and fix a reason why the
jobs were not getting properly cancelled.
(closes issue #12903)
 Reported by: stevedavies
 Patches: 
       20080620__bug12903__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: stevedavies

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 19:20:25 +00:00
Tilghman Lesher 6fa1dab33d Merged revisions 126999 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r126999 | tilghman | 2008-07-01 11:50:46 -0500 (Tue, 01 Jul 2008) | 2 lines

Suppress annoying warning by finding the remaining cases where the callno is not in the hash.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 16:52:29 +00:00
Tilghman Lesher 94c4089f4e More expansion of the deadlock avoidance macro, including a macro to do locking
of the channel lock


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 02:34:11 +00:00
Michiel van Baak 8e8359465b Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:48:33 +00:00
Tilghman Lesher bb0dbfa520 Merged revisions 123391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123391 | tilghman | 2008-06-17 13:56:53 -0500 (Tue, 17 Jun 2008) | 3 lines

Fix 3 more places where failure to lock the structure could cause the wrong lock to be
unlocked.  (Closes issue #12795)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 18:57:45 +00:00
Tilghman Lesher 596f8b5186 Merged revisions 123113 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123113 | tilghman | 2008-06-16 14:50:12 -0500 (Mon, 16 Jun 2008) | 2 lines

Port "hasvoicemail" change from SIP to other channel drivers

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 19:57:05 +00:00
Tilghman Lesher b2ef18dab4 Add some more IAX2-specific information about the channel to the CHANNEL()
function and begin the transition from SIPCHANINFO() to just using CHANNEL().
(closes issue #12856)
 Reported by: mostyn
 Patches: 
       iax_and_sip_channel_info.patch uploaded by mostyn (license 398)
       (with some additional cleanup by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-15 15:21:16 +00:00
Russell Bryant b6457ecf4c Merge changes from timing branch
- Convert chan_iax2 to use the timing API
 - Convert usage of timing in the core to use the timing API instead of
   using DAHDI directly
 - Make a change to the timing API to add the set_rate() function
 - change the timing core to use a rwlock
 - merge a timing implementation, res_timing_dahdi

Basic testing was successful using res_timing_dahdi


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 12:45:50 +00:00
Russell Bryant 968cf2b578 Merged revisions 122259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122259 | russell | 2008-06-12 13:22:44 -0500 (Thu, 12 Jun 2008) | 3 lines

Fix some race conditions that cause ast_assert() to report that chan_iax2 tried
to remove an entry that wasn't in the scheduler

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 18:23:54 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Russell Bryant 74932445b7 Bump up the debug level of a couple of messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 00:52:46 +00:00
Tilghman Lesher 53459f86b2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:51:59 +00:00