Commit Graph

22737 Commits

Author SHA1 Message Date
Jonathan Rose
445b1ced10 Reverting r411189 so that it can be put up for public review
---
  r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines

  chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

  Prior to this patch, the P-Asserted-Identity header would include anonymous
  caller id information which seems to go against the point of the
  P-Asserted-Identity header. Now the real caller ID information will be
  included in this header. Also, no privacy header would be included.
  This patch adds 'Privacy: id' to outgoing SIP messages that include the
  P-Asserted-Identity header.

  (closes issue AST-1301)
---



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@412328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 15:21:27 +00:00
Richard Mudgett
ee72a7a7d1 app_stack: Add missing unlock in off-nominal path of STACK_PEEK function.
ASTERISK-23620 #close
Reported by: Bradley Watkins
Patches:
      ASTERISK-23620_unlock_oldlist.patch (license #5021) patch uploaded by Bradley Watkins


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@412225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 21:37:42 +00:00
Matthew Jordan
751dc2b7da main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output
This patch does the following:
(1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables
    REF_DEBUG globally throughout Asterisk.
(2) The ref debug log file is now created in the AST_LOG_DIR directory.
    Every run will now blow away the previous run (as large ref files
    sometimes caused issues). We now also no longer open/close the file
    on each write, instead relying on fflush to make sure data gets written
    to the file (in case the ao2 call being performed is about to cause a
    crash)
(3) It goes with a comma delineated format for the ref debug file. This
    makes parsing much easier. This also now includes the thread ID of the
    thread that caused ref change.
(4) A new python script instead for refcounting has been added in the
    contrib/scripts folder.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@412114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 01:33:03 +00:00
Richard Mudgett
85a69184c7 Internal timing: Add notice that the -I and internal_timing option are no longer needed.
Add notice messages during execution that the -I command line option and
the astersik.conf internal_timing option are no longer needed.  The
internal timing functionality is now always enabled if there is a timing
module loaded.

NOTE: Since the command line options and the asterisk.conf config file are
processed before the logging system is initialized, the messages are
output to stderr.

Change requested as a result of asterisk-dev list comments about the
commit for ASTERISK-22846 that removed the -I and internal_timing options.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 21:15:39 +00:00
Richard Mudgett
70cdee628c config: Fix CB_ADD_LEN() to work as originally intended.
Fix a long standing bug in CB_ADD_LEN() behaving like CB_ADD().

ASTERISK-23546 #close
Reported by: Walter Doekes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 20:49:11 +00:00
Walter Doekes
7dc87fa2b9 configs: Clean up long line and typo in res_odbc.conf.sample.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 14:45:10 +00:00
Richard Mudgett
a997ddc829 internal_timing: Remove the option and always make it enabled if a timing module is loaded.
The masquerade supertest frequently fails because either the local channel
chain doesn't completely optimize out or the DTMF handshake doesn't
completely get accross.  Local channel optimization requires frames
flowing to trigger when optimization can happen.  When optimization
happens the media frame that triggered the optimization is dropped.
Sending DTMF requires frames to flow in the other direction for timing
purposes while sending nothing.  If internal timing is not enabled when
MOH is playing, Asterisk switches to received timing when an audio frame
is received.  With optimization dropping media frames and MOH not sending
frames unless it receives frames, occasionaly there are no more frames
being passed and the test fails.

* The asterisk command line -I option and the asterisk.conf
internal_timing option are removed.  Asterisk now always uses internal
timing when needed if any timing module is loaded.  The issue
ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken
if other internal timing modules besides DAHDI are used.  The
ast_read_generator_actions() now only does received timing if it has no
choice for frame generators like MOH, silence, and playback streaming.

* Cleaned up some code dealing with frame generators in
ast_deactivate_generator(), generator_write_format_change(),
ast_activate_generator(), and ast_channel_stop_silence_generator().

ASTERISK-22846 #close
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 18:32:46 +00:00
Joshua Colp
6f85424652 app_queue: Fix a bug where realtime members would be deleted during reload causing waiting callers to get ejected.
This patch causes realtime queue members to remain in queues during the reload process. Previously these
members would be removed causing any waiting callers to be ejected from the queue with a reason of "EXITEMPTY".

ASTERISK-23547 #close
ASTERISK-23547 #comment Patch app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo Rossi (license 6409)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 16:48:55 +00:00
Scott Griepentrog
dd5c0ffd4d http: response body often missing after specific request
This patch works around a problem with the HTTP body
being dropped from the response to a specific client
and under specific circumstances:

a) Client request comes from node.js user agent
   "Shred" via use of swagger-client library.

b) Asterisk and Client are *not* on the same
   host or TCP/IP stack

In testing this problem, it has been determined that
the write of the HTTP body is lost, even if the data
is written using low level write function.  The only
solution found is to instruct the TCP stack with the
shutdown function to flush the last write and finish
the transmission.  See review for more details.


ASTERISK-23548 #close
(closes issue ASTERISK-23548)
Reported by: Sam Galarneau
Review: https://reviewboard.asterisk.org/r/3402/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 16:16:02 +00:00
Matthew Jordan
9e5d570c46 UPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 15:42:36 +00:00
Matthew Jordan
f222e30437 res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

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

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 04:24:07 +00:00
Matthew Jordan
588550c950 chan_sip: Add MESSAGE request to allowed methods
The allowed methods advertised by chan_sip did not previously note the MESSAGE
request. Even in Asterisk 1.8, we do accept in-dialog MESSAGE requests; we
should advertise that we support MESSAGE requests.

ASTERISK-23504 #close
ASTERISK-23504 #comment Reported by: Martin Kontsek
ASTERISK-23504 #comment Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 03:49:33 +00:00
Corey Farrell
824c8d4b6b Fix dialplan function NULL channel safety issues
(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 19:06:13 +00:00
Joshua Colp
e86e40892c say: Fix a bug where SayNumber in Polish tries to play incorrect sound.
This change fixes a bug where calling SayNumber with a number divisible by
100 using the Polish language would cause the code to attempt to play a
sound file with an empty name.

(closes issue ASTERISK-23509)
Reported by: zvision

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 22:43:25 +00:00
Jonathan Rose
e2708b03b6 chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.

(closes issue AST-1301)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 15:50:48 +00:00
Kinsey Moore
7ae2541b15 chan_sip: Fix incorrect use of timers
If update_provisional_keepalive() is called while
send_provisional_keepalive_full() is waiting on the PVT lock, then
pvt->provisional_keepalive_sched_id will be changed to a new sched_id
value by update_provisional_keepalive(), but that new sched_id then may
be overwritten with -1 by send_provisional_keepalive_full(), killing
the pvt's reference to a schedule and "leaking" the reference.

(closes issue ASTERISK-22079)
Review: https://reviewboard.asterisk.org/r/3368/
Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
Patches:
    provisional_keepalive_fix.diff uploaded by Steve Davies (license 5012)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 15:50:39 +00:00
Joshua Colp
9c7ed786e5 chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
(closes issue ASTERISK-20841)
Reported by: Kelly Goedert


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-24 21:36:27 +00:00
Russ Meyerriecks
e62a5f78e9 !fixup: callerid: Logic error in checksum processing
Fixes syntax error in previous commit :-(


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 21:54:18 +00:00
Russ Meyerriecks
2478dc0606 callerid: Logic error in checksum processing
Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.

This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.  

Review: https://reviewboard.asterisk.org/r/3356/
(closes issue ASTERISK-23488)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 21:14:21 +00:00
Richard Mudgett
1d8a661b30 AST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.

Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.

(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 17:00:32 +00:00
Kinsey Moore
b0df15e1bf AST-2014-002: chan_sip: Exit early on bad session timers request
This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.

(closes issue ASTERISK-23373)
Reported by: Corey Farrell
Patches:
     chan_sip-earlier-st-1.8.patch uploaded by Corey Farrell (license 5909)
     chan_sip-earlier-st-11.patch uploaded by Corey Farrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 13:15:18 +00:00
Corey Farrell
dbfbcbb1c7 chan_sip: Fix deadlock of monlock between unload_module and do_monitor
Release monlock before calling pthread_join.  This ensures do_monitor
cannot freeze by locking monlock during module unload.

(closes issue ASTERISK-21406)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3284/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:50:40 +00:00
Matthew Jordan
78089aa1cf chan_sip: Allow static realtime members to be qualified during module load.
When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.

This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.

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

(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
  realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 04:35:43 +00:00
Russell Bryant
ad637d43d5 moh: fix a refcount error with realtime MOH
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@410043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:01:26 +00:00
Kinsey Moore
992b0aa702 config: Fix inverted test
The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 20:31:09 +00:00
David M. Lee
a15bacd163 Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:50:48 +00:00
Sean Bright
9808696b8a Fix references to 'keys' CLI commands in astgenkey
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 12:04:05 +00:00
Igor Goncharovskiy
28b726e79b Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 05:10:50 +00:00
Michael L. Young
0e3e1b678c func_audiohookinheritance: Check If A Channel Was Specified
This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 19:32:21 +00:00
Kinsey Moore
f75aeea441 AO2: Add an assert for bad objects
This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 16:50:24 +00:00
Kinsey Moore
133a042f25 rtp_engine: Clean up after a failed remote bridge
Upon failure of an INVITE transaction meant to initiate a remote native
bridge, rtp_engine.c would not clean up non-reference-counted bridge
instance pointers leaving a dangling pointer which was being used to
perform a local native bridge after the other channel had hung up. This
lead to dereferencing into freed memory and plenty of AO2 errors. This
change allows the remote native bridge loop to clean up properly when
the bridge fails.

(closes issue ASTERISK-23310)
Reported by: Jeremy Laine


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 15:31:05 +00:00
Sean Bright
2942d6fdac Minor whitespace change to 'sip show peers' output.
(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 14:50:55 +00:00
Walter Doekes
c6f7a6652a buildsystem: Unbreak 'make -qp' on 1.8.
r408083 caused trouble with make -qp. Backport r408193 to 1.8 as well.

(closes issue ASTERISK-23382)
Reported by: Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 13:39:13 +00:00
Matthew Jordan
b42ab7fe81 doxygen: Tweak the link back to ye olde Digium website
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 02:06:24 +00:00
Tzafrir Cohen
25d1057845 Makefile: replace -O6 with -O3
-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the 
default optimization flag to be -O3, like gcc actually considered it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-02 10:58:13 +00:00
Richard Mudgett
5e47d100d1 chan_sip: Add precautionary p->owner checks.
* Add precautionary p->owner checks in sip_hangup(), get_refer_info(),
get_also_info(), and interpret_t38_parameters().

* Simplify some tangled logic in get_refer_info(), get_also_info(), and
add_rpid().

* Removed some dead code in handle_request_invite().

(closes issue ASTERISK-23323)
Reported by: Walter Doekes
Patches:
      issueA23323-more_p_owner_checks-1.8.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-11.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-12.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-trunk.patch (license #5674) uploaded by wdoekes (modified)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:00:43 +00:00
Richard Mudgett
5f27cde1ea chan_sip: Fix crash in ast_channel_hangupcause_set().
* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 17:57:45 +00:00
David M. Lee
b695da6510 Fix memory stomping bug in astman.
This memset complained in dev mod on my Ubuntu box. The memset is both
unnecessary and dangerous. At this point, m hasn't been initialized
yet, so the memset will write off to whatever address happens to be
on the stack at the time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:23:11 +00:00
Corey Farrell
a6a92ffe3d res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 15:59:15 +00:00
Matthew Jordan
bb9dfa1962 rtp_engine: fix crash during remote native bridging when calling get_codecs
When two RTP channels are in a remote bridge, the remote bridging loop in
rtp_engine will periodically check to see if the two channels can still be
bridged. One of the many things it checks is whether or not the codecs have
changed on the channel. If the codec has changed, it will break out of the
loop to re-determine which type of bridge is appropriate.

In order to perform this check, the ast_rtp_glue virtual table's get_codec
callback is called for each channel. The callback implementations assume
that the channel tech private is valid when called; as such, there has
always been some code in place to check whether or not the channel pvt is
NULL before calling. However, this check is insufficient.

The channels are unlocked during the remote bridging loop. It is possible
for a channel to get masqueraded between the check for the pvt being NULL and
the actual call to get_codec. When this occurs, the callback is called with a
ZOMBIE channel, which now has a NULL pvt. Crash.

While this has always been possible in Asterisk 1.8, it is much more likely to
occur in Asterisk 11 and later versions due to the timing changes that occur
when getting the codec from a channel. Note that this is much more likely to be
reproduced on slow, boggy hardware running Asterisk 11 - but fairly rarely
otherwise.

Also Note: This crash was also caught by the various SIP blind transfer tests,
in addition to the bug report Alec filed.

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

(closes issue ASTERISK-21737)
Reported by: Alec Davis
Tested by: Alec Davis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 12:39:34 +00:00
Rusty Newton
d72f70e9a5 configs/voicemail.conf.sample - Make mailcmd sample text more explicit
Made the wording a bit more explicit. Didn't really change the meaning.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:41:50 +00:00
Corey Farrell
b78f5a2d30 Remove extra defines of AST_PBX_MAX_STACK.
* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h.
* Fix incorrect function parameters in utils/extconf.c.

(closes issue ASTERISK-23141)
Reported by: Maxim
Review: https://reviewboard.asterisk.org/r/3241/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 02:26:36 +00:00
Kevin Harwell
c8e50614fb app_forkcdr: ForkCDR v option does not keep CDR variables for subsequent records
When the 'v' option is specified to ForkCDR application, AST_CDR_FLAG_KEEP_VARS
flag is set only for the first CDR in the chain. So ForkCDR works fine with this
option only once. After the second and further calls to ForkCDR, CDR variables
get cleared on all CDRs besides the first one and moved to the newly forked CDR.
It always sets the KEEP_VARS flag on the first CDR in the chain, instead of the
most recent CDR which is used as a base to fork a new CDR.

This patch sets KEEP_VARS flag on the most recent CDR on the stack (the CDR used
for forking).

(closes issue ASTERISK-23260)
Reported by: zvision
Patches:
     app_forkcdr.diff uploaded by zvision (license 5755)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 20:18:45 +00:00
Kevin Harwell
d2e5c5f922 rtp_engine: Output mixup in ${CHANNEL(rtpqos,audio,all)}
Fixed the output of CHANNEL(rtpqos,audio,all) to use txjitter instead
of rxjitter.

(closes issue ASTERISK-23261)
Reported by: rsw686
Patches:
     rtpqos.patch uploaded by rsw686 (license 5887)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:56:56 +00:00
Kevin Harwell
2197b1d114 channel.c: MOH is not working for transferee after attended transfer
Updated the code to check to see if MOH is playing on the transferor and if
so then start it on the channel that replaces it during a masquerade.

Example scenario of the problem:
Alice calls Bob and then Bob begins the attended transfer process into a queue.
Upon going on hold Alice hears music and so does Bob once he is in the queue.
Bob then transfers Alice into the queue and then music for Alice stops even
though she should be hearing it since has now replaced Bob in the queue.

The problem that was occurring is that once the channel was masqueraded the app
(queues, confbridge, etc...) had no way of knowing that the channel had just
been swapped out thus it did not start music for the present channel.

Credit to Olle Johansson for pointing me in the right direction on this issue.

(closes issue ASTERISK-19499)
Reported by: Timo Teräs
Review: https://reviewboard.asterisk.org/r/3226/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:24:27 +00:00
Alexandr Anikin
44af8d9f46 Fix type of roundTripDelay variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 10:35:36 +00:00
Michael L. Young
2b4a90343a app_chanspy: Documentation Update To Clarify "x" Option
When using the "x" option (specify a DTMF digit to exit the application), it is
not obvious in the documentation that this only works when spying on a channel.
If a channel being used to spy on other channels is waiting to connect to a
channel or is no longer attached to a channel, the DTMF is ignored.

As noted on the issue tracker, since there are workarounds available and this is
a rarely used option we are opting for a documentation change here.

(closes issue ASTERISK-22661)
Reported by: Chris Hillman
Patches:
    asterisk-22661-doc-clarify-chan_spy.diff
                                     uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 00:46:35 +00:00
Rusty Newton
8c1e17b171 apps/app_queue - Fix incorrect Macro parameter documentation
Macro is executed on the called channel, not the calling channel.

(closes issue ASTERISK-23069)
Reported By: Bryan Anderson


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 02:39:48 +00:00
Richard Mudgett
ba39ba7635 config: Add file size and nanosecond resolution fields to the cached modified config file information.
Repeatedly modifying config files and reloading too fast sometimes fails
to reload the configuration because the cached modification timestamp has
one second resolution.

* Added file size and nanosecond resolution fields to the cached config
file modification timestamp information.  Now if the file size changes or
the file system supports nanosecond resolution the modified file has a
better chance of being detected for reload.

* Added a missing unlock in an off-nominal code path.

(closes issue AST-1303)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 19:01:05 +00:00
Alexandr Anikin
8c234f205d process receiveAndTransmit user input remote caps instead of receive only
send receiveAndTransmit user input our caps instead of receive only



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@408328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 11:30:25 +00:00