]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agochan_sip: Allow a sip peer to accept both AVP and AVPF calls
Kevin Harwell [Fri, 25 Oct 2013 16:05:55 +0000 (16:05 +0000)] 
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)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoLogging: Logging types ignored after specifying a verbose level
Kevin Harwell [Thu, 24 Oct 2013 20:44:09 +0000 (20:44 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401833 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoutils: Fix memory leaks and missed unregistration of CLI commands on shutdown
Jonathan Rose [Thu, 24 Oct 2013 20:33:37 +0000 (20:33 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401830 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agotest_linkedlists: Fix memory leak
Jonathan Rose [Thu, 24 Oct 2013 19:55:23 +0000 (19:55 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401791 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agojitterbuf: Fix memory leak on jitter buffer reset
Jonathan Rose [Thu, 24 Oct 2013 19:41:07 +0000 (19:41 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401787 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoastobj2: Unregister debug CLI commands at exit
Jonathan Rose [Thu, 24 Oct 2013 19:28:10 +0000 (19:28 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401783 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_voicemail: Memory Leaks against tests
Jonathan Rose [Thu, 24 Oct 2013 18:44:38 +0000 (18:44 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401744 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomemory leaks: Memory leak cleanup patch by Corey Farrell (second set)
Jonathan Rose [Thu, 24 Oct 2013 16:40:59 +0000 (16:40 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401705 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomemory leaks: Memory leak cleanup patch by Corey Farrell (first set)
Jonathan Rose [Wed, 23 Oct 2013 19:55:05 +0000 (19:55 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401661 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: Address jittery DTMF events in RTP streams
Jonathan Rose [Wed, 23 Oct 2013 17:37:15 +0000 (17:37 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401620 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agocdr_adaptive_odbc: Also apply a filter when the CDR value is empty.
Richard Mudgett [Wed, 23 Oct 2013 16:46:26 +0000 (16:46 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401579 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_mgcp: Properly handle malformed media lines
Kinsey Moore [Wed, 23 Oct 2013 15:22:54 +0000 (15:22 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401538 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Fix an issue where an incompatible audio format may be added to SDP.
Joshua Colp [Wed, 23 Oct 2013 11:11:18 +0000 (11:11 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401498 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: Fix crash when RTCP is not available during SSRC change
Matthew Jordan [Tue, 22 Oct 2013 22:42:24 +0000 (22:42 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_queue: Fix CLI "queue remove member" queue_log entry.
Richard Mudgett [Tue, 22 Oct 2013 19:02:15 +0000 (19:02 +0000)] 
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)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401433 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_dahdi: Fix unable to get index warning when transferring an analog call.
Richard Mudgett [Tue, 22 Oct 2013 00:16:24 +0000 (00:16 +0000)] 
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/11@401379 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoSegfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
Kevin Harwell [Mon, 21 Oct 2013 19:46:22 +0000 (19:46 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401326 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove Port Restriction When Checking For NAT
Michael L. Young [Fri, 18 Oct 2013 15:11:46 +0000 (15:11 +0000)] 
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/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401182 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoProperly copy/remove the device state cache flag over a masquerade.
Walter Doekes [Fri, 18 Oct 2013 14:43:26 +0000 (14:43 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401179 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix Setting A chan_sip Dialog's SIP_NAT_FORCE_RPORT Flag
Michael L. Young [Thu, 17 Oct 2013 20:32:32 +0000 (20:32 +0000)] 
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/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401167 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoReduce log level of a non-pubsub error message
Kinsey Moore [Thu, 17 Oct 2013 15:36:50 +0000 (15:36 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401120 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDon't check all realtime queues when doing "queue show some_queue".
Walter Doekes [Wed, 16 Oct 2013 11:52:24 +0000 (11:52 +0000)] 
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401076 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Fix channel left locked in off nominal code path.
Richard Mudgett [Tue, 15 Oct 2013 19:57:06 +0000 (19:57 +0000)] 
chan_iax2: Fix channel left locked in off nominal code path.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401016 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoPrevent chan_sip from sending duplicate BYEs.
Mark Michelson [Tue, 15 Oct 2013 14:58:12 +0000 (14:58 +0000)] 
Prevent chan_sip from sending duplicate BYEs.

When a 200 OK for an initial INVITE is received, we were doing
the right thing by ACKing and sending an immediate BYE. However,
we also were doing the wrong thing and queuing an answer frame,
thus causing the call to be answered. This would cause the call
to be hung up by the channel thread, thus resulting in a second
BYE being sent out.

In this fix, I also have set the hangupcause to be correct since
the initial BYE being sent by Asterisk had an unknown hangup
cause. I have changed to using "Bearer capabilty not available"
since the call was hung up due to an SDP offer/answer error.

(closes issue ASTERISK-22621)
reported by Kinsey Moore
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400971 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_dahdi: Reflect the set software gain in the CLI "dahdi show channel" output.
Richard Mudgett [Mon, 14 Oct 2013 21:44:07 +0000 (21:44 +0000)] 
chan_dahdi: Reflect the set software gain in the CLI "dahdi show channel" output.

* Remember the swgain setting from CLI "dahdi set swgain" command so the
CLI "dahdi show channel" output will reflect the current setting.

* Updated CLI "dahdi set hwgain" and "dahdi set swgain" documentation.

(issue ASTERISK-22429)
Reported by: Jaco Kroon
Patches:
      jira_asterisk_22429_v1.8_v2.patch (license #5621) patch uploaded by rmudgett
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400909 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Do not increment the SDP version between 183 and 200 responses.
Mark Michelson [Mon, 14 Oct 2013 21:42:30 +0000 (21:42 +0000)] 
chan_sip: Do not increment the SDP version between 183 and 200 responses.

Bumping the SDP version number can cause interoperability problems
since receivers of the responses will expect that a 200 SDP will
be identical to a previous 183 SDP.

(closes issue ASTERISK-21204)
reported by NITESH BANSAL

Patches:
dont-increment-session-version-in-2xx-after-183.patch uploaded by NITESH BANSAL (License #6418)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400908 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd warning when compiling with iODBC support
Kinsey Moore [Tue, 8 Oct 2013 22:27:59 +0000 (22:27 +0000)] 
Add warning when compiling with iODBC support

When running configure, libiodbc2 development headers will fulfill the
requirement for ODBC development headers, but will not function
properly. This adds a warning when libiodbc2 development headers are
detected instead of unixodbc development headers.

(closes issue ASTERISK-22459)
Reported by: Patrick Maille
Tested by: Walter Doekes
Patches:
    issueA22459_warn_when_using_iodbc.patch uploaded by Walter Doekes (License 5674)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_confbridge: Can now set the language used for announcements to the conference.
Richard Mudgett [Tue, 8 Oct 2013 20:14:14 +0000 (20:14 +0000)] 
app_confbridge: Can now set the language used for announcements to the conference.

ConfBridge now has the ability to set the language of announcements to the
conference.  The language can be set on a bridge profile in
confbridge.conf or by the dialplan function
CONFBRIDGE(bridge,language)=en.

(closes issue ASTERISK-19983)
Reported by: Jonathan White
Patches:
      M19983_rev2.diff (license #5138) patch uploaded by junky (modified)
Tested by: rmudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400741 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_confbridge: Fix duplicate default_user profile.
Richard Mudgett [Tue, 8 Oct 2013 19:08:12 +0000 (19:08 +0000)] 
app_confbridge: Fix duplicate default_user profile.

* Fixed looking in the wrong profiles container to see if the default_user
profile is already created in verify_default_profiles().  The bridge
profile container is never going to hold user profiles. :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400723 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix func_config list entry allocation
Kinsey Moore [Tue, 8 Oct 2013 18:18:21 +0000 (18:18 +0000)] 
Fix func_config list entry allocation

The AST_CONFIG dialplan function defined in func_config.c allocates its
config file list entries using ast_malloc. List entry allocations
destined for use with Asterisk's linked list API must be ast_calloc()d
or otherwise initialized so that list pointers are set to NULL. These
uses of ast_malloc have been replaced by ast_calloc to prevent
dereferencing of uninitialized pointer values when traversing the list.

(closes issue ASTERISK-22483)
Reported by: Brian Scott
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400697 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix STUN crash when using IPv6 any address
Kinsey Moore [Tue, 8 Oct 2013 15:42:44 +0000 (15:42 +0000)] 
Fix STUN crash when using IPv6 any address

Ensure that when chan_sip binds to the IPv6 any address ([::]), IPv4
candidates are also added.

(closes issue ASTERISK-21917)
Reported by: Torrey Searle
Patches:
    0023_ipv6_stun_crash.patch uploaded by Torrey Searle (License 5334)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400681 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_queue: Fix Queuelog EXITWITHKEY only logging two of four fields
Michael L. Young [Sun, 6 Oct 2013 17:09:13 +0000 (17:09 +0000)] 
app_queue: Fix Queuelog EXITWITHKEY only logging two of four fields

Commit r62462 added two extra fields for logging "the original position the
caller entered the queue at, and the amount of time the caller was waiting in
the queue."  But when r75969 was merged from 1.4 into trunk (r75977), these two
fields disappeared. Those two extra fields were not logged in 1.4 and when the
patch was merged, those fields went away.

Therefore, this is a regression and was caught by the reporter because he was
reading the awesome "Asterisk: The Definitive Guide" book.

(closes issue ASTERISK-22197)
Reported by: Dalius M.
Tested by: Dalius M.
Patches:
    asterisk-22197-q-log-exitwithkey.diff
     uploaded by Michael L. Young (license 5026)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400623 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Don't ignore expires value in contact header if it lacks semicolon
Jonathan Rose [Thu, 3 Oct 2013 22:59:04 +0000 (22:59 +0000)] 
chan_sip: Don't ignore expires value in contact header if it lacks semicolon

(closes issue ASTERISK-22574)
Reported by: Filip Jenicek
Patches:
    chan_sip_expires.patch uploaded by Filip Jenicek (license 6277)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix security events for AMI invalid password
Kinsey Moore [Thu, 3 Oct 2013 19:22:41 +0000 (19:22 +0000)] 
Fix security events for AMI invalid password

In r337595, additional security events were added for chan_sip
authentication failures. The new IEs added to the existing invalid
password event were defined as required IEs, but existing users of the
event did not set the new IEs and could not since they didn't apply to
existing uses. They are now marked as optional IEs.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400421 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_multicast: Ensure SSRC is set properly
Kinsey Moore [Thu, 3 Oct 2013 18:28:07 +0000 (18:28 +0000)] 
res_rtp_multicast: Ensure SSRC is set properly

This fixes a bug where the SSRC field on multicast RTP can be stuck at
0 which can cause problems for endpoints trying to make sense of
incoming streams.

(closes issue ASTERISK-22567)
Reported by: Simone Camporeale
Patches:
    22567_res_mulitcast_ssrc.patch uploaded by Simone Camporeale (License 6536)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400394 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCast Integer Argument To Unsigned Char
Michael L. Young [Wed, 2 Oct 2013 21:31:36 +0000 (21:31 +0000)] 
Cast Integer Argument To Unsigned Char

The member reg in the peercnt structure is an unsigned char and peercnt_modify()
is expecting an unsigned char argument which gets assigned to peercnt->reg.

This patch fixes that by casting the integer argument being passed to
peercnt_modify to unsigned char.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400315 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoman pages for astdb2bdb and astdb2sqlite3
Tzafrir Cohen [Wed, 2 Oct 2013 17:36:28 +0000 (17:36 +0000)] 
man pages for astdb2bdb and astdb2sqlite3

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400279 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Allow Asterisk to retry after 403 on register
Kinsey Moore [Mon, 30 Sep 2013 15:26:39 +0000 (15:26 +0000)] 
chan_sip: Allow Asterisk to retry after 403 on register

This adds a global option in chan_sip to allow it to continue
attempting registration if a 403 is received, clearing the cached nonce
and treating it as a non-fatal response. Normally, this would cause
registration attempts to that endpoint to stop.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874/
Reported by: Rudi
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: Correct erroneous lost packet information in RTCP reports
Matthew Jordan [Sat, 28 Sep 2013 22:21:37 +0000 (22:21 +0000)] 
res_rtp_asterisk: Correct erroneous lost packet information in RTCP reports

RTCP's calculation of the number of lost packets in an RTP stream is based on
that stream's sequence number count, the number of received packets, and how
many packets we expect to receive. When the SSRC for an RTP stream changes,
there can - and almost always will be - a large jump in the next packet's
timestamp and sequence number. If we don't reset the number of received
packets, sequence number count, and other metrics used by RTCP, the next RR/SR
report will use the previous SSRC's values to calculate the lost packet count
for the new SSRC - resulting in a very large number of lost packets.

This patch modifies res_rtp_asterisk such that, if it detects a SSRC change, it
will reset the various values used by the RTCP calculations. From the
perspective of RTCP, this appears as a new media stream - which is what it is.

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

(closes issue AST-1174)
Reported by: Thomas Arimont
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400093 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd check for openSUSE when detecting bfd library
Matthew Jordan [Sat, 28 Sep 2013 21:59:12 +0000 (21:59 +0000)] 
Add check for openSUSE when detecting bfd library

In ASTERISK-17842, some additional library checks were added to the configure
script so that the bfd library could be found on CentOS and Fedora systems.

As it turns out, openSUSE requires an additional library. This patch adds
another check to the configure script for openSUSE that will add that library.

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

(closes issue AST-1169)
Reported by: Guenther Kelleter
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400075 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Increase some scratch buffer sizes dealing with caller id.
Richard Mudgett [Fri, 27 Sep 2013 21:35:37 +0000 (21:35 +0000)] 
chan_sip: Increase some scratch buffer sizes dealing with caller id.

* Eliminated an unnecessary initialization in check_user_full().

(closes issue ASTERISK-22477)
Reported by: Michael Shepelev
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400014 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Reject calls on 200 OKs if no SDP has been received
Jonathan Rose [Fri, 27 Sep 2013 17:24:58 +0000 (17:24 +0000)] 
chan_sip: Reject calls on 200 OKs if no SDP has been received

When Asterisk receives a 200 OK in response to an invite, that peer should have
sent an SDP at some point by then. If the channel has never received an SDP,
media won't have been set and the remote address won't be known. Endpoints in
general should not be doing this. This patch makes it so that Asterisk will
simply hang up a call if it sends a 200 OK at this point. So far this odd
behavior for endpoints has only been observed in tests which involved manually
created SIP transactions in SIPp.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399962 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_dahdi: CLI "core stop gracefully" has needless delay for PRI and SS7.
Richard Mudgett [Wed, 25 Sep 2013 20:28:29 +0000 (20:28 +0000)] 
chan_dahdi: CLI "core stop gracefully" has needless delay for PRI and SS7.

The PRI and SS7 link control threads are not stopped correctly when the
chan_dahdi.so module is unloaded.  The link control threads pri_dchannel()
and ss7_linkset() are not awakened from a poll() to cancel the thread.

* Added a SIGURG signal after requesting the thread cancel to break the
link control thread poll() immediately.

For SS7 it was slightly worse, the link poll() timeout would always be
whatever was the last libss7 scheduled event time used.  If no libss7
scheduled event was pending, the thread could run more often than
necessary.

* Set nextms to 60 seconds for the ss7_linkset() poll() if there is no
other libss7 scheduled event.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399834 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Fix Realtime Peer Update Problem When Un-registering And Expires Header...
Michael L. Young [Wed, 25 Sep 2013 19:27:06 +0000 (19:27 +0000)] 
chan_sip: Fix Realtime Peer Update Problem When Un-registering And Expires Header In 200ok

1st Issue
When a realtime peer sends an un-REGISTER request, Asterisk
un-registers the peer but the database table record still has regseconds and
fullcontact for the peer.  This results in calls attempting to be routed to the
peer which is no longer registered.  The expected behavior is to get
busy/congested when attempting to call an un-registered peer through the
dialplan.

What was discovered is that we are clearing out the peer's registration in the
database in parse_register_contact() when calling expire_register() but then
upon returning from parse_register_contact(), update_peer() is run which stores
back in the database table regseconds and fullcontact.

2nd Issue
The reporter pointed out that the 200 ok being returned by Asterisk
after un-registering a peer contains a Contact header with ;expires= and the
Expires header is not set to 0.  This is actually a regression.

Tests were created for this second issue (ASTERISK-22548).  The tests have been
reviewed and a Ship It! was received on those tests.

This patch does the following:

* Do not ignore the Expires header value even when it is set to 0.  The patch
  sets the pvt->expiry earlier on in the function so that it is set properly and
  used.

* If pvt->expiry is 0, do not call update_peer since that means the peer has
  already been un-registered and there is no need to update the database record
  again since nothing has changed.

(closes issue ASTERISK-22428)
Reported by: Ben Smithurst
Tested by: Ben Smithurst, Michael L. Young
Patches:
  asterisk-22428-rt-peer-update-and-expires-header.diff
                                              by Michael L. Young (license 5026)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399795 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Prevent some needless breaking of the native IAX2 bridge.
Richard Mudgett [Tue, 24 Sep 2013 20:20:06 +0000 (20:20 +0000)] 
chan_iax2: Prevent some needless breaking of the native IAX2 bridge.

* Clean up some twisted code in the iax2_bridge() loop.

* Add AST_CONTROL_VIDUPDATE and AST_CONTROL_SRCCHANGE to a list of frames
to prevent the native bridge loop from breaking.

* Passing the AST_CONTROL_T38_PARAMETERS frame should also allow FAX over
a native IAX2 bridge.

(issue ABE-2912)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399708 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoEnsure global types in the config framework are initialized
Kinsey Moore [Fri, 20 Sep 2013 22:35:00 +0000 (22:35 +0000)] 
Ensure global types in the config framework are initialized

If a config object was allocated but one of its global objects was
never encountered, then the global object's defaults were never
applied. Ensure that global objects are initialized properly upon
allocation instead of on configuration.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399564 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix memory leak in logger.
Kevin Harwell [Fri, 20 Sep 2013 14:23:30 +0000 (14:23 +0000)] 
Fix memory leak in logger.

Fixed a memory leak discovered in the logger where a temporary string buffer
was not being freed.

(closes issue ASTERISK-22540)
Reported by: John Hardin

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399513 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Make direct media reinvites for T38 put Asterisk in the media path
Jonathan Rose [Thu, 19 Sep 2013 16:45:02 +0000 (16:45 +0000)] 
chan_sip: Make direct media reinvites for T38 put Asterisk in the media path

Prior to this patch, Asterisk would incorrectly use the previous endpoint
addresses in SDP in spite of providing its own port. T38 is never meant to
be done through directmedia and Asterisk should always be in the media path
for these streams.

(closes issue ASTERISK-17273)
Reported by: Kevin Stewart

(closes issue ASTERISK-18706)
Reported by: Jeremy Kister

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399457 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoUDPTL: Backport some fixes from v12 that should be in v11.
Richard Mudgett [Wed, 18 Sep 2013 23:36:12 +0000 (23:36 +0000)] 
UDPTL: Backport some fixes from v12 that should be in v11.

Backported the following as applied to udptl.c:
* -r398020 Fixup udpdl defaults if config file not present.
* -r398533 Fixup improper use of ao2_global_obj_replace().

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399442 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix jitter buffer log file creation
Kinsey Moore [Wed, 18 Sep 2013 19:55:46 +0000 (19:55 +0000)] 
Fix jitter buffer log file creation

This adjusts '/'-to-'#' replacement to replace all instances of '/'
instead of just the first to ensure that the jitter buffer log file
gets the correct name as per Richard Kenner's suggestion.

(closes issue ASTERISK-21036)
Reported by: Richard Kenner
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399403 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoUpdate prep_tarball with new documentation files on the Asterisk wiki
Matthew Jordan [Wed, 18 Sep 2013 17:22:48 +0000 (17:22 +0000)] 
Update prep_tarball with new documentation files on the Asterisk wiki

This will now pull both a command reference for the version being prepared,
as well as an Admin Guide that applies to all versions of Asterisk.

(issue ASTERISK-22439)
Reported by: Olle Johansson
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399373 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd a WARNING in bridge_softmix when a timing module isn't loaded
Matthew Jordan [Wed, 18 Sep 2013 17:17:13 +0000 (17:17 +0000)] 
Add a WARNING in bridge_softmix when a timing module isn't loaded

If bridge_softmix fails to be created because no timing source is present in
Asterisk, this will currently fail gracefully but with (most likely) a generic
error message by whatever module tried to create the softmix bridge. This
patch adds a more explicit warning so you can actually diagnose and fix the
problem.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399353 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid
Michael L. Young [Wed, 18 Sep 2013 01:34:09 +0000 (01:34 +0000)] 
Fix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid

When processing the lines under the [applicationmap] context in features.conf, a
segfault occurs from attempting to process a line with an invalid syntax
(basically missing most of the arguments).

Example:
[applicationmap]
automon=*6

* This patch moves the checking for empty arguments to before they are accessed.

* Also, checked the "todo" comment and removed it.  Some applications do not
  require arguments.

(closes issue ASTERISK-22416)
Reported by: CGI.NET
Tested by: CGI.NET
Patches:
    asterisk-22416-check-syntax-first_v2.diff by Michael L. Young (license 5026)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399305 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemote console: more output discrepancies
Kevin Harwell [Tue, 17 Sep 2013 18:32:57 +0000 (18:32 +0000)] 
Remote console: more output discrepancies

The remote console continued to have issues with its output.  In this case CLI
command output would either not show up (if verbose level = 0) or would contain
verbose prefixes (if verbose level > 0) once log messages were sent to the
remote console.  The fix now now adds verbose prefix data to all new lines
contained in a verbose log string.

(closes issue ASTERISK-22450)
Reported by: David Brillert
(closes issue AST-1193)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2825/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399267 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoConfbridge: empty conference not being torn down
Kevin Harwell [Tue, 17 Sep 2013 14:24:02 +0000 (14:24 +0000)] 
Confbridge: empty conference not being torn down

Confbridge would not properly tear down an empty conference bridge when all
users were kicked via end_marked=yes and at least one user was also set to
wait_marked.  This occurred because while end_marked users were being kicked
and at least one was also set to wait_marked then the leave wait_marked handler
would be called on that user, but there would be no waiting user (still
considered active).  The waiting users would decrement and now be negative.  The
conference would remain, but be put into an inactive state.  The solution was
to move from the active list to the wait list, those users with wait_marked set
right before kicking.  This allows both the active and wait users to decrement
correctly and the confbridge to tear down properly.

A crashed also occurred when trying to list the specific conference from the CLI.
This happened because the conference specified was invalid.  Since the
conference properly tears down now there is no way to reference it thus
alleviating the crash as well.

(closes issue ASTERISK-21859)
Reported by: Chris Gentle
Review: https://reviewboard.asterisk.org/r/2848/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399222 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Fix saving the wrong expiry time in astdb.
Richard Mudgett [Mon, 16 Sep 2013 16:42:35 +0000 (16:42 +0000)] 
chan_iax2: Fix saving the wrong expiry time in astdb.

When a new IAX2 client registers, the astdb database is updated with the
value of minregexpire defined in iax.conf instead of using the expiry time
that is provided by the client.  The provided expiry time of the client is
updated after inserting the astdb entry.  As a consequence, restarting or
reloading asterisk creates clients whose registration may expire before
they reregister.  The clients are therefore unavailable after minregexpire
seconds until they reregister.

* Move updating of the expiry time to before inserting into the astdb.

(closes issue ASTERISK-22504)
Reported by: Stefan Wachtler
Patches:
      chan_iax2.c.patch (license #6533) patch uploaded by Stefan Wachtler
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399159 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDon't write to /tmp/refs when REF_DEBUG is not defined.
David M. Lee [Fri, 13 Sep 2013 20:49:33 +0000 (20:49 +0000)] 
Don't write to /tmp/refs when REF_DEBUG is not defined.

If MALLOC_DEBUG is enabled, then the debug destructor for the container
is used, which would erroneously write to /tmp/refs. This patch only
uses the debug destructor if ref_debug is used.

(closes issue ASTERISK-22536)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399099 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix several crashes in MeetMeAdmin
Kinsey Moore [Fri, 13 Sep 2013 13:48:34 +0000 (13:48 +0000)] 
Fix several crashes in MeetMeAdmin

This change ensures that MeetMeAdmin commands requiring a user actually
get a user and fixes another issue where an extra dereference could
occur for a last-entered user being ejected if a user identifier was
also provided.

(closes issue ASTERISK-21907)
Reported by: Alex Epshteyn
Review: https://reviewboard.asterisk.org/r/2844/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399034 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Revert r398835 due to failing tests involving originate
Jonathan Rose [Thu, 12 Sep 2013 20:19:39 +0000 (20:19 +0000)] 
chan_sip: Revert r398835 due to failing tests involving originate

(issue ASTERISK-22424)
Reported by: Jonathan Rose
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398986 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago'queue add member' help text correction
Rusty Newton [Thu, 12 Sep 2013 00:02:37 +0000 (00:02 +0000)] 
'queue add member' help text correction

You are adding dial strings to the queue, not channels. An aribitrary string
could be used, but you are typically referencing a channel. Correcting the
command help text.

(issue ASTERISK-22263)
(closes issue ASTERISK-22263)
Reported By: Rusty Newton
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398885 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDocumentation fix - waitfordialtone is not boolean, it's time in milliseconds
Rusty Newton [Wed, 11 Sep 2013 23:50:27 +0000 (23:50 +0000)] 
Documentation fix - waitfordialtone is not boolean, it's time in milliseconds

Changing text in chan_dahdi.conf sample to be accurate.

(issue ASTERISK-22308)
(closes issue ASTERISK-22308)
Reported By: Malcolm Davenport
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398881 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Reject calls without prior SDP on 200 OK
Jonathan Rose [Wed, 11 Sep 2013 19:46:39 +0000 (19:46 +0000)] 
chan_sip: Reject calls without prior SDP on 200 OK

If we receive a 200 OK without SDP, we will now check to see if
the remote address has been established for that channel's RTP
session and if the to tag for that channel has changed from
the most recent to tag in a response less than 200.
If either a change has been made since the last to-tag was
received or the remote address is unset, then we will drop
the call.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/diff/#index_header
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398836 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix typo in confbridge.conf.sample
Russell Bryant [Wed, 11 Sep 2013 18:01:33 +0000 (18:01 +0000)] 
Fix typo in confbridge.conf.sample

The denoise filter requires func_speex, not codec_speex.  Fix this in the
description of the denoise=yes option in confbridge.conf.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398820 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix incorrect usages of ast_realloc().
Richard Mudgett [Tue, 10 Sep 2013 17:56:56 +0000 (17:56 +0000)] 
Fix incorrect usages of ast_realloc().

There are several locations in the code base where this is done:
buf = ast_realloc(buf, new_size);

This is going to leak the original buf contents if the realloc fails.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFixed utils directory breakage from r398748, this time with extra hate.
David M. Lee [Tue, 10 Sep 2013 17:48:52 +0000 (17:48 +0000)] 
Fixed utils directory breakage from r398748, this time with extra hate.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398753 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFixed utils directory breakage from r398648
David M. Lee [Tue, 10 Sep 2013 17:23:56 +0000 (17:23 +0000)] 
Fixed utils directory breakage from r398648
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398749 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMALLOC_DEBUG: Change fence magic number to be completely different from the freed...
Richard Mudgett [Mon, 9 Sep 2013 23:21:46 +0000 (23:21 +0000)] 
MALLOC_DEBUG: Change fence magic number to be completely different from the freed magic number.

Race conditions between freeing a nul terminated string and
ast_strdup()'ing it are more likely to be detected if the fence and freed
magic numbers are completely different.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix DEBUG_THREADS when lock is acquired in __constructor__
David M. Lee [Mon, 9 Sep 2013 20:02:32 +0000 (20:02 +0000)] 
Fix DEBUG_THREADS when lock is acquired in __constructor__

This patch fixes some long-standing bugs in debug threads that were
exacerbated with recent Optional API work in Asterisk 12.

With debug threads enabled, on some systems, there's a lock ordering
problem between our mutex and glibc's mutex protecting its module list
(Ubuntu Lucid, glibc 2.11.1 in this instance). In one thread, the module
list will be locked before acquiring our mutex. In another thread, our
mutex will be locked before locking the module list (which happens in
the depths of calling backtrace()).

This patch fixes this issue by moving backtrace() calls outside of
critical sections that have the mutex acquired. The bigger change was to
reentrancy tracking for ast_cond_{timed,}wait, which wrongly assumed
that waiting on the mutex was equivalent to a single unlock (it actually
suspends all recursive locks on the mutex).

(closes issue ASTERISK-22455)
Review: https://reviewboard.asterisk.org/r/2824/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398649 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoPrevent XMPP timeout on blank responses
Kinsey Moore [Sat, 7 Sep 2013 00:59:41 +0000 (00:59 +0000)] 
Prevent XMPP timeout on blank responses

Sometimes the Google Voice servers have a bad habit of sending out 1
byte replies to the xmpp resource. When a blank 1 byte reply is
received from the socket the buffer attempts to wait (endlessly) for
the rest of the reply from google which effectively blocks the socket
and google voice calls will no longer come into the server.

This patch allows the xmpp module to correctly detect empty packets and
send out ping replies to google. It also sets a socket timeout on the
default socket which prevents the xmpp socket from closing and
preventing future google voice calls from coming into the server.

Furthermore instead of sending an empty reply back to google we send a
proper xmpp ping reply back. This also adds several more
socket messages.

(closes issue ASTERISK-22347)
Reported by: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/2771
Patches:
    xmpp_fix_1.diff uploaded by Andrew Nagy (License #6524)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398618 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCommit the remainder of r398523
Kinsey Moore [Fri, 6 Sep 2013 21:00:56 +0000 (21:00 +0000)] 
Commit the remainder of r398523

This is a missing part of the commit in revision 398523 that corrects
the name of a variable.

(issue ASTERISK-22435)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398577 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix Jabber/XMPP distributed MWI
Kinsey Moore [Fri, 6 Sep 2013 19:28:16 +0000 (19:28 +0000)] 
Fix Jabber/XMPP distributed MWI

The mailbox and context are swapped on the receiving end for all users
of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
versions. This swaps those values to be correct when publishing to the
internal event system from Jabber/XMPP distributed MWI state.

(closes issue ASTERISK-22435)
Reported by: abelbeck
Tested by: Michael Keuter
Patches:
    asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
    asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398558 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix chan_h323 compilation
Kinsey Moore [Fri, 6 Sep 2013 15:58:04 +0000 (15:58 +0000)] 
Fix chan_h323 compilation

This fixes the things in chan_h323 that were missed or ignored in the
great channel opaquification and gets chan_h323 back into a compiling
state.

(closes issue ASTERISK-22365)
Reported by: Dmitry Melekhov
Patches:
    chan_h323.patch uploaded by Dmitry Melekhov

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398510 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Reduce indentation in __attempt_transmit().
Richard Mudgett [Thu, 5 Sep 2013 19:13:43 +0000 (19:13 +0000)] 
chan_iax2: Reduce indentation in __attempt_transmit().

* Reduce indentation in __attempt_transmit().

* Don't update the static last error time variable every time in
__schedule_action() and socket_read().
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398457 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Fix stray reference to worker thread idle_list.
Richard Mudgett [Thu, 5 Sep 2013 17:29:24 +0000 (17:29 +0000)] 
chan_iax2: Fix stray reference to worker thread idle_list.

* Fix stray reference to idle_list in cleanup_thread_list().  This may be
the reason for the note in iax2_process_thread() about threads not being
removed from the task lists.

* Move cleanup_thread_list(&idle_list) to after the other lists are
cleaned up.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398417 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Fix bridgecallno deadlock avoidance.
Richard Mudgett [Thu, 5 Sep 2013 17:10:28 +0000 (17:10 +0000)] 
chan_iax2: Fix bridgecallno deadlock avoidance.

* Fix bridgecallno deadlock avoidance.  When doing deadlock avoidance, you
need to retest the status of values for each loop to see if you still need
the lock for bridgecallno.

* As a safety check, after acquiring the bridgecallno lock you should
check if iaxs[bridgecallno] is NULL just like the current callno checks.

* Move setting thread->iostate to IAX_IOSTATE_IDLE to after processing any
deferred frames to ensure that the iostate is IDLE when it is placed back
into the idle list.  defer_full_frame() tries to ensure
iax2_process_thread() wakes up to process the frame.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398380 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Add missing control frame names to debug frame decode output. (Part 2)
Richard Mudgett [Wed, 4 Sep 2013 23:14:44 +0000 (23:14 +0000)] 
chan_iax2: Add missing control frame names to debug frame decode output. (Part 2)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398305 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_iax2: Add missing control frame names to debug frame decode output.
Richard Mudgett [Wed, 4 Sep 2013 22:53:58 +0000 (22:53 +0000)] 
chan_iax2: Add missing control frame names to debug frame decode output.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398302 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agounit tests: test_voicemail_api leaks stringfields from snapshots
Jonathan Rose [Wed, 4 Sep 2013 21:33:08 +0000 (21:33 +0000)] 
unit tests: test_voicemail_api leaks stringfields from snapshots

(closes issue ASTERISK-22414)
Reported by: Corey Farrell
Patches:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398285 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_voicemail: Fix leaking config objects when msg_id doesn't match
Jonathan Rose [Wed, 4 Sep 2013 21:11:48 +0000 (21:11 +0000)] 
app_voicemail: Fix leaking config objects when msg_id doesn't match

(issues ASTERISK-22414)
Reported by: Corey Farrell
Patch:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398281 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_misdn: Fix misdn debug output printed with arbitrary verbose levels.
Richard Mudgett [Wed, 4 Sep 2013 15:57:03 +0000 (15:57 +0000)] 
chan_misdn: Fix misdn debug output printed with arbitrary verbose levels.

Fix the misdn debug output to remote consoles.  chan_misdn uses
ast_console_puts() which doesn't know about verbose levels.  Better to use
ast_verbose() instead.  Without this patch the misdn debug messages are
appended to the verbose level which ever was set by the message sent to
the console before, i.e.  any undefined level.

(closes issue AST-1218)
Reported by: Guenther Kelleter
Patches:
      misdnlog.patch (license #6372) patch uploaded by Guenther Kelleter
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398236 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix remote tcs sequence handling on empty tcs received
Alexandr Anikin [Tue, 3 Sep 2013 19:45:44 +0000 (19:45 +0000)] 
Fix remote tcs sequence handling on empty tcs received

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398214 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBe a little more verbose when loading cel_custom.conf.
Walter Doekes [Mon, 2 Sep 2013 07:28:04 +0000 (07:28 +0000)] 
Be a little more verbose when loading cel_custom.conf.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398168 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix various memory leaks
Kevin Harwell [Fri, 30 Aug 2013 19:16:20 +0000 (19:16 +0000)] 
Fix various memory leaks

main/config.c - cleanup cache fie includes
res/res_security_log.c - unregister logger level
channesl/chan_sip.c - cleanup io context and notify_types
main/translator.c - cleanup at shutdown
main/named_acl.c - cleanup cli commands
main/indications.c - ast_get_indication_tone() unref default_tone_zone if used

(closes issues ASTERISK-22378)
Reported by: Corey Farrell
Patches:
     config_shutdown.patch uploaded by coreyfarrell (license 5909)
     res_security_log.patch uploaded by coreyfarrell (license 5909)
     chan_sip-11.patch uploaded by coreyfarrell (license 5909)
     indications_refleak.patch uploaded by coreyfarrell (license 5909)
     named_acl-cli_unreg-11.patch uploaded by coreyfarrell (license 5909)
     translate_shutdown.patch uploaded by coreyfarrell (license 5909)

........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398103 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMemory leak fix
Kevin Harwell [Fri, 30 Aug 2013 17:53:56 +0000 (17:53 +0000)] 
Memory leak fix

ast_xmldoc_printable returns an allocated block that must be freed by the
caller.  Fixed manager.c and res_agi.c to stop leaking these results.

(closes issue ASTERISK-22395)
Reported by: Corey Farrell
Patches:
     manager-leaks-11.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398061 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix memory leak
Kevin Harwell [Fri, 30 Aug 2013 17:00:26 +0000 (17:00 +0000)] 
Fix memory leak

Fixed a features.c test that leaked a reference to a parked call.  This caused
chancount to never reach 0, so graceful shutdown stops.  Also added an
unregister test.

(closes issue ASTERISK-22413)
Reported by: Corey Farrell
Patches:
     features-TEST_FRAMEWORK.patch uploaded by coreyfarrell (license 5909)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398022 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agotest_substituition: Fix failed test reporting to actually report failure.
Richard Mudgett [Fri, 30 Aug 2013 16:57:00 +0000 (16:57 +0000)] 
test_substituition: Fix failed test reporting to actually report failure.

You cannot put the "Testing <blah> pass/fail" on a single line before
actually performing the test.  Now any additional failure information is
logged before the test pass/fail announcement.

* Added an additional CDR(answer,u) test.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398019 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix memory leaks
Kevin Harwell [Fri, 30 Aug 2013 16:20:21 +0000 (16:20 +0000)] 
Fix memory leaks

(closes issue ASTERISK-22368)
Reported by: Corey Farrell
Patches:
     issueA22368_mixmonitor_free_filename.patch uploaded by wdoekes (license 5674)
........

Merged revisions 398004 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398011 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCheck return value on fwrite
Kevin Harwell [Fri, 30 Aug 2013 15:22:35 +0000 (15:22 +0000)] 
Check return value on fwrite

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398000 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoVerbose logging discrepancies
Kevin Harwell [Thu, 29 Aug 2013 22:16:41 +0000 (22:16 +0000)] 
Verbose logging discrepancies

Refactored cases where a combination of ast_verbose/options_verbose were
present.  Also in general tried to eliminate, in as many places as possible,
where the options_verbose global variable was being used.  Refactored the way
local and remote consoles handle verbose message logging in an attempt to
solve the various discrepancies that sometimes would show between the two.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397948 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAST-2013-005: Fix crash caused by invalid SDP
Matthew Jordan [Tue, 27 Aug 2013 18:03:08 +0000 (18:03 +0000)] 
AST-2013-005: Fix crash caused by invalid SDP

If the SIP channel driver processes an invalid SDP that defines media
descriptions before connection information, it may attempt to reference
the socket address information even though that information has not yet
been set. This will cause a crash.

This patch adds checks when handling the various media descriptions that
ensures the media descriptions are handled only if we have connection
information suitable for that media.

Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing
the solution to this problem.

(closes issue ASTERISK-22007)
Reported by: wdoekes
Tested by: wdoekes
patches:
  issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674)
........

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

Merged revisions 397757 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix uninitialized value in struct ast_control_pvt_cause_code usage.
Richard Mudgett [Tue, 27 Aug 2013 16:40:46 +0000 (16:40 +0000)] 
Fix uninitialized value in struct ast_control_pvt_cause_code usage.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397744 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAST-2013-004: Fix crash when handling ACK on dialog that has no channel
Matthew Jordan [Tue, 27 Aug 2013 15:55:16 +0000 (15:55 +0000)] 
AST-2013-004: Fix crash when handling ACK on dialog that has no channel

A remote exploitable crash vulnerability exists in the SIP channel driver if an
ACK with SDP is received after the channel has been terminated. The handling
code incorrectly assumed that the channel would always be present.

This patch adds a check such that the SDP will only be parsed and applied if
Asterisk has a channel present that is associated with the dialog.

Note that the patch being applied was modified only slightly from the patch
provided by Walter Doekes of OSSO B.V.

(closes issue ASTERISK-21064)
Reported by: Colin Cuthbertson
Tested by: wdoekes, Colin Cutherbertson
patches:
  issueA21064_fix.patch uploaded by wdoekes (License 5674)
........

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

Merged revisions 397711 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397712 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake libuuid an optional dependency for res_rtp_asterisk instead of a requirement.
Joshua Colp [Fri, 23 Aug 2013 21:57:14 +0000 (21:57 +0000)] 
Make libuuid an optional dependency for res_rtp_asterisk instead of a requirement.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397604 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix memory corruption when trying to get "core show locks".
Richard Mudgett [Fri, 23 Aug 2013 16:07:18 +0000 (16:07 +0000)] 
Fix memory corruption when trying to get "core show locks".

Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch
in memory pools but had a math error determining the buffer size and
didn't address other similar memory pool mismatches.

* Effectively reverted the previous patch to go in the same direction as
trunk for the returned memory pool of ast_bt_get_symbols().

* Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is
defined.

* Fixed some formatting in ast_bt_get_symbols().

* Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is
enabled.

* Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when
MALLOC_DEBUG is enabled.

* Moved __dump_backtrace() because of compile issues with the utils
directory.

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

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397528 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd _IO_stdin_used in version-script to fix SIGBUSes on Sparc.
Walter Doekes [Thu, 22 Aug 2013 08:22:39 +0000 (08:22 +0000)] 
Add _IO_stdin_used in version-script to fix SIGBUSes on Sparc.

The --version-script,asterisk.exports linker flag (and the module
exports) didn't provide _IO_stdin_used in the list of exported symbols.
That causes some kind of libc compatibility mode to kick in, where
stdio file structures (stdout/stderr) land somewhere else. In the
case of the Sparc, they landed on misaligned memory.

This became apparent first after r376428 (Reorder startup sequence)
when a lot of ast_log's were replaced with fprintf's. Writing to
stderr triggered a SIGBUS. (Compared to x86 and amd64 architectures,
the Sparc is very picky about memory alignment.)

(issue ASTERISK-21763)
(issue ASTERISK-21665)

Reported by: Jeremy Kister
Review: https://reviewboard.asterisk.org/r/2760/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397378 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoUDPTL: Fix a regression where UDPTL won't load default settings
Jonathan Rose [Wed, 21 Aug 2013 23:02:35 +0000 (23:02 +0000)] 
UDPTL: Fix a regression where UDPTL won't load default settings

If the file udptl.conf is unavailable at startup, UDPTL will fail to
initialize and while it makes some noise, it isn't immediately
obvious why consumers start to fail when using it. This patch makes
UDPTL load as though an empty config was provided  when udptl is
unavailable at startup.

(closes issue ASTERISK-22349)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2773/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoComplete http_shutdown.
David M. Lee [Wed, 21 Aug 2013 17:07:06 +0000 (17:07 +0000)] 
Complete http_shutdown.

This patch frees up some resources allocated in http.c.
 * tcp listeners stopped
 * tls settings freed
 * uri redirects freed
 * unregister internal http.c uri's

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

Patches:
    http.patch uploaded by Corey Farrell (license 5909)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397309 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoSet 14400 as the default max bit rate if T38MaxBitRate is not specified
Matthew Jordan [Wed, 21 Aug 2013 15:12:57 +0000 (15:12 +0000)] 
Set 14400 as the default max bit rate if T38MaxBitRate is not specified

If an endpoint fails to include the T38MaxBitRate attribute during negotiation,
Asterisk will negotiate a bit rate of 2400 instead of the ITU recommended
bit rate of 14400. This patch fixes this by making AST_T38_RATE_14400 the
'default' value of the enum by assigning it a value of 0, such that if an
endpoint fails to include the attribute, the default will be 14400.

Note that Walter Doekes included the nice comment in frame.h about why we are
purposefully assigning AST_T38_RATE_14400 a value of 0.

(closes issue ASTERISK-22275)
Reported by: Andreas Steinmetz
patches:
  fax-fix.patch uploaded by anstein (License 6523)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397257 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoPrevent a crash on outbound SIP MESSAGE requests.
Mark Michelson [Wed, 21 Aug 2013 14:36:39 +0000 (14:36 +0000)] 
Prevent a crash on outbound SIP MESSAGE requests.

If a From header on an outbound out-of-call SIP MESSAGE were
malformed, the result could crash Asterisk.

In addition, if a From header on an incoming out-of-call SIP
MESSAGE request were malformed, the message was happily accepted
rather than being rejected up front. The incoming message path
would not result in a crash, but the behavior was bad nonetheless.

(closes issue ASTERISK-22185)
reported by Zhang Lei

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397254 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix Not Storing Current Incoming Recv Address
Michael L. Young [Wed, 21 Aug 2013 02:11:26 +0000 (02:11 +0000)] 
Fix Not Storing Current Incoming Recv Address

In 1.8, r384779 introduced a regression by retrieving an old dialog and keeping
the old recv address since recv was already set.  This has caused a problem when
a proxy is involved since responses to incoming requests from the proxy server,
after an outbound call is established, are never sent to the correct recv
address.

In 11, r382322 introduced this regression.

The fix is to revert that change and always store the recv address on incoming
requests.

Thank you Walter Doekes for helping to point out this error and Mark Michelson
for your input/review of the fix.

(closes issue ASTERISK-22071)
Reported by: Alex Zarubin
Tested by: Alex Zarubin, Karsten Wemheuer
Patches:
    asterisk-22071-store-recvd-address.diff by Michael L. Young (license 5026)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397205 65c4cc65-6c06-0410-ace0-fbb531ad65f3