Commit Graph

24770 Commits

Author SHA1 Message Date
Scott Griepentrog
1de75f4fae pbx.c: fix confused match caller id that deleted exten still in hash
This fixes a bug where a zero length callerid match adjacent to a no
match callerid extension entry would be deleted together, which then
resulted in hashtable references to free'd memory.  A third state of
the matchcid value has been added to indicate match to any extension
which allows enforcing comparison of matchcid on/off without errors.

(closes issue AST-1235)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2930/
........

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

Merged revisions 401960 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 20:47:55 +00:00
Jonathan Rose
155ba34659 PJSIP: Add log messages when requests are received for non-existent endpoints
(closes issue ASTERISK-22552)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2934/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 17:34:30 +00:00
Jonathan Rose
a5ca8e9347 Put clicompat-r2.patch back in
We've figured out how to resolve the problems this was causing in 12/trunk,
so this can go back in now.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401935 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 17:31:38 +00:00
Jonathan Rose
b5cb5a0aa4 revert clicompat-r2.patch from r401704
Patch caused the following build errors against testsuite
https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD4-244

(issue ASTERISK-22467)
Reported by: Corey Farrell
........

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

Merged revisions 401896 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 16:57:58 +00:00
Kevin Harwell
9afa2ff076 chan_sip: Allow a sip peer to accept both AVP and AVPF calls
Adapts the behaviour of avpf to only impact the format of outgoing calls. For
inbound calls, both AVP and AVPF calls will be accepted regardless of the value
of avpf in the configuration.

(closes issue ASTERISK-22005)
Reported by: Torrey Searle
Patches:
     optional_avpf_trunk.patch uploaded by tsearle (license 5334)
........

Merged revisions 401884 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 16:07:38 +00:00
David M. Lee
e8b74d4d57 test_json: Fix deprecation warnings
After a series of upgrades over recent weeks, I've discovered that
test_json.c won't compile in dev mode any more for me.

One of gcc-4.8.2, OS X Mavericks or Xcode 5 has decided to deprecate
tempnam. Which, in general, is a good thing. But for test code that just
needs a temporary file, it's just annoying.

This patch replaces usage of tempname with mkstemp, avoiding the
deprecation warning. It also removes the temporary files when the test
is complete, which apparently we weren't doing before (oops).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 13:48:40 +00:00
Kevin Harwell
27334b9093 Logging: Logging types ignored after specifying a verbose level
If one specified a verbose level within a logging facility in
logger.conf then any component after it was ignored.  Fixed so
all values are correctly read.

(closes issue ASTERISK-22456)
Reported by: Kevin Harwell
........

Merged revisions 401833 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 20:56:50 +00:00
Jonathan Rose
2e3908a554 utils: Fix memory leaks and missed unregistration of CLI commands on shutdown
Final set of patches in a series of memory leak/cleanup patches by Corey Farrell

(closes issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    main-utils-1.8.patch uploaded by coreyfarrell (license 5909)
    main-utils-11.patch uploaded by coreyfarrell (license 5909)
    main-utils-12up.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401830 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 20:34:23 +00:00
Jonathan Rose
23a4856d63 test_linkedlists: Fix memory leak
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    test_linkedlists-1.8.patch uploaded by coreyfarrell (license 5909)
    test_linkedlists-11up.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401791 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:56:06 +00:00
Jonathan Rose
09bea85f3d jitterbuf: Fix memory leak on jitter buffer reset
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    jitterbuf-jb_reset-leak-1.8.patch
    jitterbuf-jb_reset-leak-11up.patch
........

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

Merged revisions 401787 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:41:49 +00:00
Jonathan Rose
8f5bad357b astobj2: Unregister debug CLI commands at exit
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    astobj2-clean-debug-cli-1.8-11.patch uploaded by coreyfarrell (license 5909)
    astobj2-clean-debug-cli-12up.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401783 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:30:50 +00:00
Jonathan Rose
b2ea7c51ed app_voicemail: Memory Leaks against tests
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    app_voicemail-1.8.patch uploaded by coreyfarrell (license 5909)
    app_voicemail-11up.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401744 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 18:45:52 +00:00
Jonathan Rose
b5cc4ae955 memory leaks: Memory leak cleanup patch by Corey Farrell (second set)
Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was
replaced with one of my own.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909)
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
    codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909)
    data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909)
    main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401705 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 16:58:30 +00:00
David M. Lee
5f31d0b182 The Swagger 1.2 specification for type extension ended up being
slightly different than my proposal. Instead of putting an 'extends'
field on the subtype, the base type has a 'subTypes' field, which is a
list of the subTypes. Given that its a messaging model and not an
object model, kinda makes sense.

This patch changes the events.json api-doc, and the python translators
to take the new format into account.

Other changes that are in Swagger 1.2 were not adopted, since the spec
is still in flux, and could change before it's finalized.

A summary of changes to the Swagger-1.2 spec can be found at
https://github.com/wordnik/swagger-core/wiki/1.2-transition.

(closes issue ASTERISK-22440)
Review: https://reviewboard.asterisk.org/r/2909/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 03:12:06 +00:00
Jonathan Rose
77136643d4 memory leaks: Memory leak cleanup patch by Corey Farrell (first set)
(issue ASTERSIK-22467)
Reported by: Corey Farrell
Patches:
    chan_sip-parse_contact_header_test-free-contacts.patch uploaded by coreyfarrell (license 5909)
    cli-filename-completion-leak.patch uploaded by coreyfarrell (license 5909)
    func_math.patch uploaded by corefarrell (license 5909)
    main-test-cleanup.patch uploaded by coreyfarrell (license 5909)
    test_dlinklists.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401661 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 20:02:21 +00:00
Jonathan Rose
ac7cd94477 res_rtp_asterisk: Address jittery DTMF events in RTP streams
(closes issue ASTERISK-21170)
Reported by: NITESH BANSAL
Patches:
    dtmf-timestamp.patch uploaded by NITESH BANSAL (license 6418)
Review: https://reviewboard.asterisk.org/r/2938/
........

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

Merged revisions 401620 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 17:45:36 +00:00
Richard Mudgett
f855ba2a76 cdr_adaptive_odbc: Also apply a filter when the CDR value is empty.
Extra CDR records are written if a filtered CDR value is empty because the
filter is not checked.

(closes issue ASTERISK-22272)
Reported by: Jordi Llull Chavarria
........

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

Merged revisions 401579 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 16:49:51 +00:00
John Bigelow
6c89018948 Add a test suite event to indicate when the atxfer 3-way feature is detected
This adds a test suite event that indicates to tests when the attended transfer
three-way call feature is detected.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 16:37:34 +00:00
Kinsey Moore
b0b7db475c chan_mgcp: Properly handle malformed media lines
This corrects a situation in which a media line was not parsed properly
and resulted in a crash.

(closes issue ASTERISK-21190)
Reported by: adomjan
Patches:
    chan_mgcp.c-sscnaf_fix uploaded by adomjan (License 5448)
........

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

Merged revisions 401538 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 15:23:30 +00:00
Joshua Colp
de0ec33701 chan_sip: Fix an issue where an incompatible audio format may be added to SDP.
If preferred codecs included any non-audio format the code would
mistakenly add the audio format, even if it was not a joint capability
with the remote side.

(closes issue ASTERISK-21131)
Reported by: nbougues
Patches:
	patch_unsupported_codec_1.8.patch uploaded by nbougues (license 6470)
........

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

Merged revisions 401498 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 11:14:49 +00:00
Michael L. Young
ecb2759060 chan_iax2: Fix Binding To Multiple Addresses Again
When reworking chan_iax2 for IPv6, the ability to bind to multiple addresses
was removed by mistake.  This patch restores this functionality and adds notes
about IPv6 addresses in the sample config.

(closes issue ASTERISK-22741)
Reported by: Joshua Colp
Tested by: Michael L. Young
Patches:
    asterisk-22741-fix-binding-multiple-addr.diff
                                     uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 02:31:48 +00:00
Matthew Jordan
d8bda6cf59 res_rtp_asterisk: Fix crash when RTCP is not available during SSRC change
In r400089, a patch was put in to correct erroneous RTCP statistic resets.
Unfortunately, ast_rtp_read can be called on an RTP instance that does not
have RTCP information. This patch prevents that crash by only resetting
the statistics if we do actually have an RTCP instance.

(issue AST-1174)

(closes issue ASTERISK-22667)
Reported by: John Bigelow
........

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

Merged revisions 401446 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 22:50:23 +00:00
Richard Mudgett
5d783eff54 app_queue: Fix CLI "queue remove member" queue_log entry.
The queue_log entry resulting from CLI "queue remove member" when
log_membername_as_agent is enabled is wrong.  It always uses the interface
name instead of the member name in the queue_log entry.

* Get the queue member before removing it from the queue so the member
name is available for the queue_log entry.

(closes issue ASTERISK-21826)
Reported by: Oscar Esteve
Patches:
      fix_membername.diff (license #6505) patch uploaded by Oscar Esteve
         (modified to fix potential ref leak)
........

Merged revisions 401433 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 19:03:02 +00:00
Richard Mudgett
aa94b9c148 Bridging: Fix orphaned bridge if neither of the joining channels can join.
The original issue noted that the bridge is orphaned when res_parking.so
is not loaded and a call uses the dial kK flags.

A similar issue happens when only one of the park flags is used.  In this
case you have the bridge with one or the other channel left in it.  The
channel and bridge will stay around until the channel hangs up.

* Fixed the initial bridge channel push failure to act as if the channel
were kicked out of the bridge.  The bridge then decides if it needs to be
dissolved.

(closes issue ASTERISK-22629)
Reported by: Kevin Harwell

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 17:05:14 +00:00
Richard Mudgett
420b5e27db res_parking: Give parking timeout comebacktoorigin channel DTMF features.
Parking timeouts did not set any DTMF features for the channel calling the
parker back.

* Added code to set the parkedcalltransfers, parkedcallreparking,
parkedcallhangup, and parkedcallrecording options appropriately for the
channels when a parking timeout occurs.  The recall channel DTMF options
are set using the BRIDGE_FEATURES channel variable to allow the other
timeout options to have the DTMF features available.

(closes issue ASTERISK-22630)
Reported by: Kevin Harwell

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 16:32:23 +00:00
Richard Mudgett
51adbac546 res_parking: Update XML documention for DTMF features after parking timeout.
* Updated the XML documentation to indicate that the parkedcalltransfers,
parkedcallreparking, parkedcallhangup, and parkedcallrecording
configuration options also apply to parking timeouts.

(issue ASTERISK-22630)
Reported by: Kevin Harwell

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 16:26:20 +00:00
Richard Mudgett
a3a6f6bc38 Blocked revisions 401379
........
chan_dahdi: Fix unable to get index warning when transferring an analog call.

Transferring an analog call using flashhooks generated an unable to get
index WARNING message when the transfer is completed.

* Removed unnecessary analog subchannel shell games when transferring a
call using flashhooks.

Thanks to Tzafrir Cohen for mentioning this in a comment on issue
ASTERISK-22720.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 00:20:14 +00:00
Mark Michelson
61a061aa3c Remove a noisy debug message from bridging code.
This particular debug message, during a stress test, was logged so
often that it appeared that there may be a memory leak in the logger
code. In actuality, there was no memory leak, but the logger thread
was having a hard time keeping up with the demands of the rest of the
system.

Since this debug message has no value at all, the best way to fix the
problem was to just remove the message.

(closes issue AST-1225)
reported by John Bigelow

Patches:
	spammy_log.diff uploaded by Mark Michelson (License #5049)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 21:05:37 +00:00
Kevin Harwell
2a16b55404 Segfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
isn't installed

Include the appropriate declarations when not using termcap, but term+curses
and [n]curses do not exist.

(closes issue ASTERISK-22351)
Reported by: A. Iglesias
Patches:
    issueA22351_libedit_internal_without_ncurses_dev.patch uploaded by wdoekes (license 5674)
........

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

Merged revisions 401326 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 19:48:28 +00:00
David M. Lee
222e34644f Fixing r401281; the model name is Channel, with a capital C
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 18:58:37 +00:00
Kinsey Moore
36f77eabf1 Fix IAX2 incoming call address lookups
This fixes address lookup for incoming calls without a peer definition.
The address family was unset instead of being set to AST_AF_UNSPEC
which was causing lookup failures on "127.0.0.1". This is one of the
causes of the current failure of the app_page integration test.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-19 21:53:08 +00:00
Joshua Colp
abcc1c0c15 Return a channel snapshot when originating using ARI, and subscribe the Stasis application to it.
This change allows a user of ARI to know what channel it has originated and also follow any
progress. If a Stasis application is provided it will be automatically subscribed to the
originated channel immediately.

(closes issue ASTERISK-22485)
Reported by: David Lee

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-19 14:43:41 +00:00
Richard Mudgett
0b00869558 res_parking: Remove setting useless flag.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 22:51:26 +00:00
David M. Lee
fab60975fa This is just a quick script for dumping swagger-ui into static-http,
so that it can be served by the Asterisk web server.

I had to change the Makefile in order to recursively install content
from the static-http directory, hence the code review instead of just
putting it in.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 21:49:48 +00:00
Mark Michelson
82904b87f3 Resolve some memory leaks due to incorrect for loop / ao2 ref usage.
A common idiom in Asterisk is to due something like:

for (ao2_obj = list_beginning; ao2_obj = next_item; ao2_ref(ao2_obj, -1)) {
    ...do stuff...
}

This is nice because it automatically takes care of the object references
for you. However, there is a pitfall here. If a break statement is in the
for loop, then the current reference is not cleaned up. In some cases, this
is on purpose, but in others there is a leak. This commit fixes the leak
cases.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 18:33:35 +00:00
Richard Mudgett
aa4e8c4ab3 Add channel lock protection around translation path setup.
Most callers of ast_channel_make_compatible() happen before the channels
enter a two party bridge.  With the new bridging framework, two party
bridging technologies may also call ast_channel_make_compatible() when
there is more than one thread involved with the two channels.

* Added channel lock protection in set_format() and
ast_channel_make_compatible_helper() when dealing with the channel's
native formats while setting up a translation path.

* Fixed best_src_fmt and best_dst_fmt usage consistency in
ast_channel_make_compatible_helper().  The call to
ast_translator_best_choice() got them backwards.

* Updated some callers of ast_channel_make_compatible() and the function
documentation.  There is actually a difference between the two channels
passed in.

* Fixed the deadlock potential in res_fax.c dealing with
ast_channel_make_compatible().  The deadlock potential was already there
anyway because res_fax called ast_channel_make_compatible() with chan
locked.

(closes issue ASTERISK-22542)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 16:52:32 +00:00
Richard Mudgett
0b625fcc69 Tweak ast_bridge_depart() doxygen.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 16:20:25 +00:00
Mark Michelson
61a66eb214 Remove the bit about requiring ast_bridge_depart() to be called before ast_bridge_destroy().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 16:05:56 +00:00
Mark Michelson
edc734c694 Clarify in ast_bridge_destroy() about how departable channels must be handled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 15:28:16 +00:00
Michael L. Young
28ef29ce1d Remove Port Restriction When Checking For NAT
When trying to determine if a peer is behind NAT, we should not be using the
ports when comparing addresses.

This patch removes the port from being checked and just useds the addresses
now.

(closes issue ASTERISK-22729)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
    asterisk-remove-using-port-for-nat-check.diff
                                     uploaded by Michael L. Young (license 5026)

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

Merged revisions 401182 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 15:13:02 +00:00
Walter Doekes
bd300a0d78 Properly copy/remove the device state cache flag over a masquerade.
In r378303 the AST_FLAG_DISABLE_DEVSTATE_CACHE flag was added that tells
the devstate system to not cache states for non-real devices. However,
when optimizing away channels (ast_do_masquerade), that flag wasn't
copied.

In my case, using Local devices as queue members created a situation
where the endpoint was considered in use, but the state change of the
device being available again was ignored (not cached). The endpoint
channel was optimized into the (previously) Local channel, but kept
the do-not-cache flag. The end result being that the queue member
apparently stayed in use forever.

(closes issue ASTERISK-22718)
Reported by: Walter Doekes

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

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

Merged revisions 401179 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 14:47:12 +00:00
Michael L. Young
7cfd8775bb Fix Setting A chan_sip Dialog's SIP_NAT_FORCE_RPORT Flag
A condition was added in a commit to fix ASTERISK-21374, that, if the
SIP_PAGE3_NAT_AUTO_RPORT flag was set, to then copy a peer's SIP_NAT_FORCE_RPORT
flag to the dialog.  This condition should not have been there since it assumed
that if Asterisk is in an environment where NAT is involved, that the auto_* nat
settings or force_rport setting would be on in the global settings.  If the nat
setting in the global setting is set to 'nat=no' and then turned on for peers
(which is not quite the recommended way, although it is allowed) this flag is
never copied to the dialog resulting in problems like, REGISTER replies going
to the wrong port.

This patch removes this conditional check and will now always use the peer's
flag which by this point in the code the checks on whether the peer is behind
NAT or not (if using auto_force_rport) have already been run.

(closes issue ASTERISK-22236)
Reported by: Filip Frank
Tested by: Michael L. Young
Patches:
    asterisk-2236-always-set-rport.diff uploaded
                                              by Michael L. Young (license 5026)

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

Merged revisions 401167 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-17 20:37:10 +00:00
Jonathan Rose
990e413335 res_parking: Fix bug where reloading immediately wipes new parkpos extensions
(closes issue ASTERISK-22631)
Reported by: Kevin Harwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-17 18:16:33 +00:00
Kinsey Moore
766dc7c765 Reduce log level of a non-pubsub error message
Drop an error log message to debug level 1 since distributed device
state functions correctly when receiving this message and it spams the
logs.

(closes issue ASTERISK-22410)
Reported by: abelbeck
Patches:
    asterisk-1.8-res_jabber-log-nonpubsub-error-to-debug.patch uploaded by abelbeck (License 5903)
    asterisk-11-res_xmpp-log-nonpubsub-error-to-debug.patch uploaded by abelbeck (License 5903)
........

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

Merged revisions 401120 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-17 15:40:20 +00:00
Richard Mudgett
ec516d1896 ARI: Fix crash when POST /playback/{id}/control does not have an operation parameter.
(closes issue ASTERISK-22680)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 21:20:21 +00:00
David M. Lee
0fc343958a Fixed malformed Access-Control-Allow-Methods header. Was causing Safari to barf on POST and DELETE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 21:17:24 +00:00
David M. Lee
2484b94d1c Oops. Leftover /stasis reference
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 17:00:50 +00:00
Kinsey Moore
24fe1d52fb Clarify documentation for channel and bridge list
This makes it clear that the ARI API calls for listing channels and
bridges will list all channels or bridges in the system and not just
those that are in or are controlled by a Stasis application.

(closes issue ASTERISK-22635)
Reported by: Kevin Harwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 14:01:04 +00:00
Walter Doekes
ec1c707121 Don't check all realtime queues when doing "queue show some_queue".
When using realtime queues, queues have to be fetched from the database
every now and then to see if any info has been changed or to see if the
queue has been removed. When fetching info for an individual queue, the
pruning of other queues is unnecessarily costly.

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

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

Merged revisions 401076 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 12:12:42 +00:00
Paul Belanger
c76d5392f5 Use POST / DELETE to toggle ARI bridge moh
Review: https://reviewboard.asterisk.org/r/2911/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 00:02:45 +00:00