Commit Graph

2241 Commits

Author SHA1 Message Date
Richard Mudgett
a5f6367057 No response sent for SIP CC subscribe/resubscribe request.
Asterisk does not send a response if we try to subscribe for call
completion after we have received a 180 Ringing.  You can only subscribe
for call completion when the call has been cleared.

When we receive the 180 Ringing, for this call, its call-completion state
is 'CC_AVAILABLE'.  If we then send a subscribe message to Asterisk, it
trys to change the call-completion state to 'CC_CALLER_REQUESTED'.
Because this is an invalid state change, it just ignores the message.  The
only state Asterisk will accept our subscribe message is in the
'CC_CALLER_OFFERED' state.

Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears
the call by sending a CANCEL.

Asterisk should always send a response.  Even if its a negative one.


The fix is to allow for the CCSS core to notify a CC agent that a failure
has occurred when CC is requested.  The "ack" callback is replaced with a
"respond" callback.  The "respond" callback has a parameter indicating
either a successful response or a specific type of failure that may need
to be communicated to the requester.

(closes issue #18336)
Reported by: GeorgeKonopacki
Tested by: mmichelson, rmudgett

JIRA SWP-2633

(closes issue #18337)
Reported by: GeorgeKonopacki
Tested by: mmichelson

JIRA SWP-2634


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@307879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-15 16:13:55 +00:00
Andrew Latham
5f9a130198 Documentation Updates.
More updates to the removed doc folder and
start updates to the man page.

(issue #16505)
Reported by: tzafrir
Tested by: lathama


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@306826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-08 01:45:04 +00:00
Tilghman Lesher
1440b054eb Use the non-specific API aliases, to avoid a problem with building the utils directory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@305040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 07:51:40 +00:00
Tilghman Lesher
fd11f34692 Change mutex tracking so that it only consumes memory in the core mutex object when it's actually being used.
This reduces the overall size of a mutex which was 3016 bytes before this back
down to 216 bytes (this is on 64-bit Linux with a glibc-implemented mutex).
The exactness of the numbers here may vary slightly based upon how mutexes are
implemented on a platform, but the long and short of it is that prior to this
commit, chan_iax2 held down 98MB of memory on a 64-bit system for nothing more
than a table of 32767 locks.  After this commit, the same table occupies a mere
7MB of memory.

(closes issue #18194)
 Reported by: job
 Patches: 
       20110124__issue18194.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman
 
Review: https://reviewboard.asterisk.org/r/1066


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@304950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 06:41:36 +00:00
Matthew Nicholson
193a80b513 Reimplemented fax session reservation to reverse the ABI breakage introduced in r297486.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25 20:56:12 +00:00
Russell Bryant
cfc893a5bc Merged revisions 303548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines
  
  Merged revisions 303546 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines
    
    Fix channel redirect out of MeetMe() and other issues with channel softhangup.
    
    Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped
    working properly.  This issue includes a patch that resolves the issue by
    removing a call to ast_check_hangup() from app_meetme.c.  I left that in my
    patch, as it doesn't need to be there.  However, the rest of the patch fixes
    this problem with or without the change to app_meetme.
    
    The key difference between what happens before and after this patch is the
    effect of the END_OF_Q control frame.  After END_OF_Q is hit in ast_read(),
    ast_read() will return NULL.  With the ast_check_hangup() removed, app_meetme
    sees this which causes it to exit as intended.  Checking ast_check_hangup()
    caused app_meetme to exit earlier in the process, and the target of the
    redirect saw the condition where ast_read() returned NULL.
    
    Removing ast_check_hangup() works around the issue in app_meetme, but doesn't
    solve the issue if another application did the same thing.  There are also
    other edge cases where if an application finishes at the same time that a
    redirect happens, the target of the redirect will think that the channel hung
    up.  So, I made some changes in pbx.c to resolve it at a deeper level.  There
    are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to
    abort the hangup process.  My patch extends this to remove the END_OF_Q frame
    from the channel's read queue, making the "abort hangup" more complete.  This
    same technique was used in every place where a softhangup flag was cleared.
    
    (closes issue #18585)
    Reported by: oej
    Tested by: oej, wedhorn, russell
    
    Review: https://reviewboard.asterisk.org/r/1082/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 20:51:37 +00:00
Tilghman Lesher
44ba86f7aa Merged revisions 302675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r302675 | tilghman | 2011-01-19 15:22:45 -0600 (Wed, 19 Jan 2011) | 9 lines
  
  Merged revisions 302663 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r302663 | tilghman | 2011-01-19 15:20:28 -0600 (Wed, 19 Jan 2011) | 2 lines
    
    Add some API documentation
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 21:23:31 +00:00
Tilghman Lesher
d70a3b0856 Merged revisions 298957 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines
  
  Merged revisions 298905 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines
    
    Let Asterisk find better backtrace information with libbfd.
    
    The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search
    for better symbol information within both the Asterisk binary, as well as
    loaded modules, to assist when using inline backtraces to track down problems.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@298960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-17 23:52:04 +00:00
Tilghman Lesher
5c50b497f5 Merged revisions 298050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r298050 | tilghman | 2010-12-10 10:24:13 -0600 (Fri, 10 Dec 2010) | 11 lines
  
  Portability issue on OpenSolaris.
  
  Also detect the required structure element, because OpenSolaris defines
  SIOCGIFHWADDR, but without support for IP sockets.
  
  (closes issue #18442)
   Reported by: ranjtech
   Patches: 
         20101209__issue18442.diff.txt uploaded by tilghman (license 14)
   Tested by: ranjtech
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@298051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-10 16:26:46 +00:00
Matthew Nicholson
93454c0e30 Add support for reserving a fax session before answering the channel.
Note: this change breaks ABI compatibility.

FAX-217


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-02 21:30:47 +00:00
Tilghman Lesher
5e42199e7b Merged revisions 296991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r296991 | tilghman | 2010-12-01 11:01:00 -0600 (Wed, 01 Dec 2010) | 12 lines
  
  Merged revisions 296990 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines
    
    Clarify documentation on how we store codec preference lists.
    
    (closes issue #18397)
     Reported by: birgita
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-01 17:01:56 +00:00
Tilghman Lesher
5211e1c9d3 Merged revisions 296533 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines
  
  I love standards.  There are so many to choose from.  Except when there isn't one.
  
  Linux and *BSD disagree on the elements within the ucred structure.  Detect
  which one is in use on the system.
  
  (closes issue #18384)
   Reported by: bjm
   Patches: 
         cred-diffs uploaded by bjm (license 473)
         20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
         20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman, bjm
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 07:28:44 +00:00
Tilghman Lesher
dfbc5b89f9 Also don't build DEBUG_FD_LEAKS when STANDALONE2 is defined.
(closes issue #18385)
 Reported by: cmaj


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-27 09:58:57 +00:00
Richard Mudgett
c08103f033 Merged revisions 295843 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines
  
  Merged revisions 295790 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines
    
    The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
    
    To recreate the problem:
    1) Party A calls Party B
    2) Invoke CLI "channel redirect" command to redirect channel call leg
    associated with A.
    3) All associated channels are hung up.
    
    Note that if the CLI command were done on the channel call leg associated
    with B it works.
    
    This regression was a result of the fix for issue #16946
    (https://reviewboard.asterisk.org/r/740/).
    
    The regression affects all features that use an async goto to execute the
    dialplan because of an external event: Channel redirect, AMI redirect, SIP
    REFER, and FAX detection.
    
    The struct ast_channel._softhangup code is a mess.  The variable is used
    for several purposes that do not necessarily result in the call being hung
    up.  I have added doxygen comments to describe how the various _softhangup
    bits are used.  I have corrected all the places where the variable was
    tested in a non-bit oriented manner.
    
    The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
    hangup request so the soft hangup requests that do not normally result in
    a hangup do not hangup.
    
    JIRA SWP-2470
    JIRA SWP-2489
    
    (closes issue #18171)
    Reported by: SantaFox
    (closes issue #18185)
    Reported by: kwemheuer
    (closes issue #18211)
    Reported by: zahir_koradia
    (closes issue #18230)
    Reported by: vmarrone
    (closes issue #18299)
    Reported by: mbrevda
    (closes issue #18322)
    Reported by: nerbos
    
    Review:	https://reviewboard.asterisk.org/r/1013/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@295866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-22 19:36:10 +00:00
Russell Bryant
5153fbef97 Merged revisions 295710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r295710 | russell | 2010-11-19 18:45:51 -0600 (Fri, 19 Nov 2010) | 29 lines
  
  Fix cache of device state changes for multiple servers.
  
  This patch addresses a regression where device states across multiple servers
  were not being processing completely correctly.  The code works to determine
  the overall state by looking at the last known state of a device on each
  server.  However, there was a regression due to some invasive rewrites of how
  the cache works that led to the cache only storing the last device state change
  for a device, regardless of which server it was on.
  
  The code is set up to cache device state change events by ensuring that each
  event in the cache has a unique device name + entity ID (server ID).  The code
  that was responsible for comparing raw information elements (which EID is)
  always returned a match due to a memcmp() with a length of 0.
  
  There isn't much code to fix the actual bug.  This patch also introduces a new
  CLI command that was very useful for debugging this problem.  The command
  allows you to dump the contents of the event cache.
  
  (closes issue #18284)
  Reported by: klaus3000
  Patches:
        issue18284.rev1.txt uploaded by russell (license 2)
  Tested by: russell, klaus3000
  
  (closes issue #18280)
  Reported by: klaus3000
  
  Review: https://reviewboard.asterisk.org/r/1012/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@295711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-20 00:50:00 +00:00
Paul Belanger
f284b66dda Merged revisions 295440 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r295440 | pabelanger | 2010-11-18 12:51:34 -0500 (Thu, 18 Nov 2010) | 4 lines
  
  Fix compiler warnings when using openssl-dev 1.0.0+
  
  Review: https://reviewboard.asterisk.org/r/1016/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@295441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-18 18:02:12 +00:00
Jeff Peeler
aafc5f4e99 Merged revisions 294639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r294639 | jpeeler | 2010-11-11 13:31:00 -0600 (Thu, 11 Nov 2010) | 53 lines
  
  Merged revisions 294384 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r294384 | jpeeler | 2010-11-09 11:37:59 -0600 (Tue, 09 Nov 2010) | 47 lines
    
    Fix a deadlock in device state change processing.
    
    Copied from some notes from the original author (Russell):
    
    Deadlock scenario:
    Thread 1: device state change thread
      Holds - rdlock on contexts
      Holds - hints lock
      Waiting on channels container lock
    
    Thread 2: SIP monitor thread
      Holds the "iflock"
      Holds a sip_pvt lock
      Holds channel container lock
      Waiting for a channel lock
    
    Thread 3: A channel thread (chan_local in this case)
      Holds 2 channel locks acquired within app_dial
      Holds a 3rd channel lock it got inside of chan_local
      Holds a local_pvt lock
      Waiting on a rdlock of the contexts lock
    
    A bunch of other threads waiting on a wrlock of the contexts lock
    
    
    To address this deadlock, some locking order rules must be put in place and
    enforced. Existing relevant rules:
    
    1) channel lock before a pvt lock
    2) contexts lock before hints lock
    3) channels container before a channel
    
    What's missing is some enforcement of the order when you involve more than any
    two. To fix this problem, I put in some code that ensures that (at least in the
    code paths involved in this bug) the locks in (3) come before the locks in (2).
    To change the operation of thread 1 to comply, I converted the storage of hints
    to an astobj2 container. This allows processing of hints without holding the
    hints container lock. So, in the code path that led to thread 1's state, it no
    longer holds either the contexts or hints lock while it attempts to lock the
    channels container.
    
    (closes issue #18165)
    Reported by: antonio
    
    ABE-2583
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-11 19:42:06 +00:00
Tilghman Lesher
2d6a9d607f Merged revisions 294429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r294429 | tilghman | 2010-11-09 14:27:23 -0600 (Tue, 09 Nov 2010) | 8 lines
  
  Detect GMime properly on systems where gmime flags and libs are configured with pkg-config.
  
  (closes issue #16155)
   Reported by: jcollie
   Patches: 
         20100917__issue16155.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09 20:33:05 +00:00
Richard Mudgett
3f9644b7db Analog lines do not transfer CONNECTED LINE or execute the interception macros.
Add connected line update for sig_analog transfers and simplify the
corresponding sig_pri and chan_misdn transfer code.

Note that if you create a three-way call in sig_analog before transferring
the call, the distinction of the caller/callee interception macros make
little sense.  The interception macro writer needs to be prepared for
either caller/callee macro to be executed.  The current implementation
swaps which caller/callee interception macro is executed after a three-way
call is created.

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

JIRA ABE-2589
JIRA SWP-2372


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09 16:55:32 +00:00
Jeff Peeler
375b5b6b09 Merged revisions 294277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r294277 | jpeeler | 2010-11-08 15:58:13 -0600 (Mon, 08 Nov 2010) | 16 lines
  
  Fix playback failure when using IAX with the timerfd module.
  
  To fix this issue the alert pipe will now be used when the timerfd module is
  in use. There appeared to be a race that was not solved by adding locking in the
  timerfd module, but needed to be there anyway. The race was between the timer
  being put in non-continuous mode in ast_read on the channel thread and the IAX 
  frame scheduler queuing a frame which would enable continuous mode before the
  non-continuous mode event was read. This race for now is simply avoided.
  
  (closes issue #18110)
  Reported by: tpanton
  Tested by: tpanton
  
  I put tested by tpanton because it was tested on his hardware. Thanks for the
  remote access to debug this issue!
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@294278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-08 21:59:45 +00:00
Terry Wilson
6dfc9dddd8 Avoid valgrind warnings for ast_rtp_instance_get_xxx_address
The documentation for ast_rtp_instance_get_(local/remote)_address stated that
they returned 0 for success and -1 on failure. Instead, they returned 0 if the
address structure passed in was already equivalent to the address instance
local/remote address or 1 otherwise. 90% of the calls to these functions
completely ignored the return address and passed in an uninitialized struct,
which would make valgrind complain even though the operation was technically
safe.

This patch fixes the documentation and converts the get_xxx_address functions
to void since all they really do is copy the address and cannot fail.
Additionally two new functions
(ast_rtp_instance_get_and_cmp_(local/remote)_address) are created for the 3
times where the return value was actually checked. The
get_and_cmp_local_address function is currently unused, but exists for the sake
of symmetry.

The only functional change as a result of this change is that we will not do an
ast_sockaddr_cmp() on (mostly uninitialized) addresses before doing the
ast_sockaddr_copy() in the get_*_address functions. So, even though it is an
API change, it shouldn't have a noticeable change in behavior.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-03 18:05:14 +00:00
Richard Mudgett
d411ade931 Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
Fixes our Bamboo builds.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@293046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-26 15:53:58 +00:00
Tilghman Lesher
cdc420235e Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
Fixes our Bamboo builds.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@292906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-25 19:28:35 +00:00
Paul Belanger
a37956721c Add the ability for ast_find_ourip to return IPv4, IPv6 or both.
While testing chan_gtalk I noticed jabber was using my IPv6 address
and not IPv4. When using bindaddr=0.0.0.0 it is possible for ast_find_ourip()
to return both IPv6 and IPv4 results.  Adding a family parameter gives you
the ablility to choose.

Since jabber/gtalk/h323 do not support IPv6, we should only return IPv4 results.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@291758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-14 15:15:12 +00:00
David Vossel
f5782280d8 Gtalk enhancements and general code cleanup.
This patch includes several chan_gtalk enhancements.
Two new gtalk.conf options have been added, externip
and stunadd.  Setting externip allows us to
manually specify what the external IP address is
outside of a NAT environment.  Setting the stunaddr
option to a valid stun server allows for that external
ip to be retrieved via a STUN server automatically.  This
external IP is then advertised during call setup as
a possible candidate.

I have also attempted to clean up chan_gtalk's code
so it meets our coding guidelines. During this cleanup
I noticed several things that need to be done in the
code and made a TODO section at the top of the file.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@291192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-11 21:38:39 +00:00
Jason Parker
c437bca01b Merged revisions 290751 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r290751 | qwell | 2010-10-07 15:57:14 -0500 (Thu, 07 Oct 2010) | 16 lines
  
  Merged revisions 290750 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r290750 | qwell | 2010-10-07 15:56:04 -0500 (Thu, 07 Oct 2010) | 9 lines
    
    Allow PRI to build properly when using --with-pri.
    
    Use the directories found for the parent when using lib dependencies.
    
    (closes issue #17314)
    Reported by: tzafrir
    Patches: 
          17314-withdeps.diff uploaded by qwell (license 4)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@290752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-07 20:58:47 +00:00
David Vossel
f87133b078 Fixes chan_gtalk to work with gmail client
This patch was written by Philippe Sultan (phsultan). Thanks
for keeping this up to date!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@290479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-05 22:00:43 +00:00
Jeff Peeler
ddebf12b88 Merged revisions 289798 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r289798 | jpeeler | 2010-10-01 18:01:31 -0500 (Fri, 01 Oct 2010) | 22 lines
  
  Merged revisions 289797 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r289797 | jpeeler | 2010-10-01 17:58:38 -0500 (Fri, 01 Oct 2010) | 15 lines
    
    Change RFC2833 DTMF event duration on end to report actual elapsed time.
    
    The scenario here is with a non P2P early media session. The reported time
    length of DTMF presses are coming up short when sending to the remote side.
    Currently the event duration is a running total that is incremented when sending
    continuation packets. These continuation packets are only triggered upon
    incoming media from the remote side, which means that the running total probably
    is not going to end up matching the actual length of time Asterisk received
    DTMF. This patch changes the end event duration to be lengthened if it is
    detected that the end event is going to come up short.
    
    Review: https://reviewboard.asterisk.org/r/957/
    
    ABE-2476
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@289840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-02 02:43:45 +00:00
Tilghman Lesher
f48a6f6cfe More Solaris compatibility fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@289543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-30 17:50:52 +00:00
Tilghman Lesher
e00c4dcc6d Solaris compatibility fixes
Review: https://reviewboard.asterisk.org/r/942/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@289104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-28 18:18:43 +00:00
Tilghman Lesher
2eb6c7395d Merged revisions 288637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines
  
  Merged revisions 288636 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines
    
    Solaris compatibility fixes
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@288638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-24 03:39:29 +00:00
David Vossel
ecabd15422 Addition of the FrameHook API (AKA AwesomeHooks)
So far all our tools for viewing and manipulating media streams
within Asterisk have been entirely focused on audio.  That made
sense then, but is not scalable now.  The FrameHook API lets us
tap into and manipulate _ANY_ type of media or signaling passed
on a channel present today or in the future.  This tool is a step
in the direction of expanding Asterisk's boundaries and will help
generate some rather interesting applications in the future.

In addition to the FrameHook API, a simple dialplan function
exercising the api has been included as well.  This function
is called FRAME_TRACE().  FRAME_TRACE() allows for the internal
ast_frames read and written to a channel to be output.  Filters
can be placed on this function to debug only certain types of frames.
This function could be thought of as an internal way of doing
ast_frame packet captures.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@287647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-20 22:09:16 +00:00
Jeff Peeler
c9bfde6afd 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/branches/1.8@286931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 19:22:15 +00:00
Terry Wilson
e72b55f3cf Merged revisions 286115 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines
  
  Merged revisions 286059 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
    
    Inherit CHANNEL() writes to both sides of a Local channel
    
    Having Local (/n) channels as queue members and setting the language in the
    extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
    channel. Hold time report playbacks happen on the Local/...,1 channel and
    therefor do not play in the specified language.
    
    This patch modifies func_channel_write to call the setoption callback and pass
    the CHANNEL() write info to the callback. chan_local uses this information to
    look up the other side of the channel and apply the same changes to it.
    
    (closes issue #17673)
    Reported by: Guggemand
    
    Review: https://reviewboard.asterisk.org/r/903/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@286189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 22:04:53 +00:00
Tilghman Lesher
6b87845350 Merged revisions 285961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r285961 | tilghman | 2010-09-10 00:31:31 -0500 (Fri, 10 Sep 2010) | 6 lines
  
  Another fix for Mac OS X.
  
  While trying to fix this the "right" way, I wandered into dependency hell.  Two
  hours later, I backed out, and just removed the offending code.  ast_inline_api
  only goes one level deep and then it breaks.  Ouch.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 05:32:18 +00:00
Tilghman Lesher
f7c710feed Merged revisions 285930 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r285930 | tilghman | 2010-09-09 20:16:32 -0500 (Thu, 09 Sep 2010) | 14 lines
  
  Merged revisions 285889 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r285889 | tilghman | 2010-09-09 19:13:45 -0500 (Thu, 09 Sep 2010) | 7 lines
    
    Fix Mac OS X build.
    
    This also fixes a rather grievous calculation error for the offset of
    ast_fdset, which was masked on Linux and FreeBSD, because these platforms
    check the first 256 FDs regardless of the bitmask setting (due to backwards
    compatibility).
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 01:25:50 +00:00
Jason Parker
a766133be6 Merged revisions 285529 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r285529 | qwell | 2010-09-08 15:42:44 -0500 (Wed, 08 Sep 2010) | 1 line
  
  Follow coding guidelines in moh rescan fix.  Also fix the documentation that got me in trouble.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-08 20:43:10 +00:00
Tilghman Lesher
f7f7eaa3a0 Fix build on FreeBSD 8.0, take 2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07 19:38:12 +00:00
Russell Bryant
2fc3cf65af Fix libsrtp -fPIC check for when non-standard prefix is used.
Thanks to loompek in #asterisk for reporting the issue and testing this patch.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-06 20:10:03 +00:00
Russell Bryant
222d4676d1 Add a C++ compatible version of AST_CLI_DEFINE().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-04 18:08:19 +00:00
Jan Kalab
e7603921cf Support for calendar events priorities and categories
Review 880


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@284849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03 11:27:04 +00:00
Tilghman Lesher
7e3f95e00a 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/branches/1.8@284610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:20:59 +00:00
Tilghman Lesher
6c61e312c6 Merged revisions 284593,284595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines
  
  Merged revisions 284478 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines
    
    Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows.
    
    This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing
    a potential crash bug in all supported releases.
    
    (closes issue #17678)
     Reported by: russell
    Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select 
    
    Review: https://reviewboard.asterisk.org/r/824/
  ........
................
  r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines
  
  Failed to rerun bootstrap.sh after last commit
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@284597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:00:34 +00:00
Terry Wilson
8a112de270 Fix SRTP for changing SSRC and multiple a=crypto SDP lines
Adding code to Asterisk that changed the SSRC during bridges and masquerades
broke SRTP functionality. Also broken was handling the situation where an
incoming INVITE had more than one crypto offer. This patch caches the SRTP
policies the we use so that we can change the ssrc and inform libsrtp of the
new streams. It also uses the first acceptable a=crypto line from the incoming
INVITE.

(closes issue #17563)
Reported by: Alexcr
Patches: 
      srtp.diff uploaded by twilson (license 396)
Tested by: twilson

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@284477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-01 18:44:36 +00:00
Russell Bryant
b246f8691e Make the AST_CEL_AMA enum match up with the AST_CDR_ ama flag values.
Really, having 2 enums for this is silly and error prone, demonstrated by
the crash that I hit because there was an assumption in the code that the
values in each matched up.  However, this is a quick fix to get them to
match up so it will work.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@283230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-23 13:23:12 +00:00
David Vossel
9fe871150e fixes truncated uint64_t value in put_unaligned_uint64_t() function
(issue #17804)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@282543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-17 19:34:06 +00:00
Tilghman Lesher
3c0616589e 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/branches/1.8@282366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-14 04:53:58 +00:00
David Vossel
48fb2c3276 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/branches/1.8@282269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-13 20:03:56 +00:00
Richard Mudgett
89872aac58 Separate call completion config parameter allocation and default initialization.
If you ever have a need to reset the call completion config parameters
to defaults, now you can.

And no Virginia, C++ idioms do not always work in C.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@282098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 22:06:06 +00:00
David Vossel
44bc8cd334 improved translation paths for wideband codecs
The problem I'm addressing is that Asterisk's current
method of building the least cost translation paths
between codecs does not take into account sample rate.
For instance, it was possible for siren14 (a 32khz codec),
to contain the a translation path to siren7 (a 16khz
audio codec) that goes through slin at 8khz.  In this
case Asterisk takes a 32khz codec, down samples it to
8khz and then up samples it to 16khz which is terrible
regardless if it is computationally less expensive.  This
patch now builds translation paths that give priority to
maintaining the best possible sample rate before taking
into consideration computational cost.  This patch also
adds cli commands to expose what translation paths are
actually being used.

Changes:
1. Translation paths will never contain a step that changes
the sample rate unless absolutely necessary.
2. When choosing the best codec to make two channels compatible.
Shared codecs with the highest sample rate are given priority.
3. A new cli command to show all translation paths available
for a specific codec 'core show translation paths [codec name]'
has been added.
4. 'core show translation' which displays the translation
matrix now includes the new higher bit audio codecs in the table.
5. 'core show channel [channel name]'  now displays the
translation paths if translation is used.

(closes issue #16841)
Reported by: dvossel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@282047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 20:15:41 +00:00