]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
10 years agoStasis_channels: Resolve unfinished Dials when doing masquerades
Jonathan Rose [Fri, 19 Sep 2014 15:10:50 +0000 (15:10 +0000)] 
Stasis_channels: Resolve unfinished Dials when doing masquerades

Masquerades into channels that are in the dialing state don't end their dial
and this goes against the model for things like CDRs and generating Dial end
manager actions and such.

ASTERISK-24237 #close
Reported by: Richard Mudgett
Review: https://reviewboard.asterisk.org/r/3990/

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

10 years agoPJSIP: Prevent T38 framehook being put on wrong channel
Kinsey Moore [Fri, 19 Sep 2014 12:30:39 +0000 (12:30 +0000)] 
PJSIP: Prevent T38 framehook being put on wrong channel

This change gives framehooks a reverse-direction masquerade callback in
addition to chan_fixup_cb similar to the callback added to datastores
to handle the same situation. The new callback provides the same
parameters as the fixup callback, but is called on the new channel's
framehooks before moving framehooks from the old channel to the new
channel. This gives the framehooks an oppurtunity to decide whether
they should remain on the new channel or be removed.

This new callback is used to prevent the PJSIP T.38 framehook from
remaining on a masqueraded channel if the new channel is not also a
PJSIP channel. This was causing a crash when a local channel was
masqueraded into a PJSIP channel and the framehook was executed on the
local channel since the channel's tech private data was not structured
as expected.

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

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

10 years agores_pjsip: Don't require a password when doing userpass authentication.
Sean Bright [Thu, 18 Sep 2014 19:29:30 +0000 (19:29 +0000)] 
res_pjsip: Don't require a password when doing userpass authentication.

An empty password is valid for username/password authentication so we should
allow password to be empty/not supplied.

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

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

10 years agoutils: Create ast_strsep function that ignores separators inside quotes
George Joseph [Thu, 18 Sep 2014 19:21:56 +0000 (19:21 +0000)] 
utils: Create ast_strsep function that ignores separators inside quotes

This function acts like strsep with three exceptions...
* The separator is a single character instead of a string.
* Separators inside quotes are treated literally instead of like separators.
* You can elect to have leading and trailing whitespace and quotes
stripped from the result and have '\' sequences unescaped.

Like strsep, ast_strsep maintains no internal state and you can call it
recursively using different separators on the same storage.

Also like strsep, for consistent results, consecutive separators are not
collapsed so you may get an empty string as a valid result.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3989/

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

10 years agores_pjsip_endpoint_identifier_ip: Fix parsing of match value with CIDR
Jonathan Rose [Thu, 18 Sep 2014 16:44:26 +0000 (16:44 +0000)] 
res_pjsip_endpoint_identifier_ip: Fix parsing of match value with CIDR

Also fixes comma separates match lists

ASTERISK-24290 #close
Reported by: Ray Crumrine
Review: https://reviewboard.asterisk.org/r/3995/

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

10 years agoastobj2.c/refcounter.py: Fix to deal with invalid object refs.
Richard Mudgett [Thu, 18 Sep 2014 16:39:06 +0000 (16:39 +0000)] 
astobj2.c/refcounter.py: Fix to deal with invalid object refs.

* Make astob2 REF_DEBUG output an invalid object line when an invalid ao2
object ref/unref is attempted.  This is similar to the
constructor/destructor lines.

* Fixed refcounter.py to handle skewed objects that have
constructor/destructor states.

* Made refcounter.py highlight the invalid ao2 object refs by putting them
in their own section of the processed output file.

* Made refcounter.py highlight unreffing an object by more than one that
results in a negative ref count and the object being destroyed.  The
abnormally destroyed object is reported in the invalid and finalized
object sections of the output.

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

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

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

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

10 years agores_fax_spandsp: Properly handle cleanup before starting FAXes.
Mark Michelson [Thu, 18 Sep 2014 16:20:51 +0000 (16:20 +0000)] 
res_fax_spandsp: Properly handle cleanup before starting FAXes.

If faxing fails at a very early stage, then it is possible for
us to pass a NULL t30 state pointer to spandsp, which spandsp
is none too pleased with.

This patch ensures that we pass the correct pointer to spandsp
in the situation where we have not yet set our local t30 state
pointer.

ASTERISK-24301 #close
Reported by Matt Jordan
Patches:
ASTERISK-24301-fax.diff Uploaded by Mark Michelson (License #5049)
........

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

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

10 years agores_pjsip_pubsub: Add some type safety when generating NOTIFY bodies.
Mark Michelson [Thu, 18 Sep 2014 15:40:47 +0000 (15:40 +0000)] 
res_pjsip_pubsub: Add some type safety when generating NOTIFY bodies.

res_pjsip_pubsub has two separate checks that it makes when a SUBSCRIBE
arrives.
* It checks that there is a subscription handler for the Event
* It checks that there are body generators for the types in the Accept header

The problem is, there's nothing that ensures that these two things will
actually mesh with each other. For instance, Asterisk will accept a subscription
to MWI that accepts pidf+xml bodies. That doesn't make sense.

With this commit, we add some type information to the mix. Subscription
handlers state they generate data of type X, and body generators state
that they consume data of type X. This way, Asterisk doesn't end up in
some hilariously mismatched situation like the one in the previous paragraph.

ASTERISK-24136 #close
Reported by Mark Michelson

Review: https://reviewboard.asterisk.org/r/3877
Review: https://reviewboard.asterisk.org/r/3878

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

10 years agores_pjsip: ami: Fix error in AMI output when an endpoint has no transport
George Joseph [Thu, 18 Sep 2014 15:01:11 +0000 (15:01 +0000)] 
res_pjsip: ami: Fix error in AMI output when an endpoint has no transport

When no transport is associated to an endpoint, the AMI output for
PJSIPShowEndpoint indicates an error instead of silently ignoring the
missing transport.

This patch causes the error to appear only if a transport was specified
on the endpoint and the transport doesn't exist.  It also fixes an issue
with counting the objects that were actually found.

ASTERISK-24161 #close
ASTERISK-24331 #close
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3998/

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

10 years agoconfig: bug: Fix SEGV in ast_category_insert when matching category isn't found
George Joseph [Thu, 18 Sep 2014 14:43:41 +0000 (14:43 +0000)] 
config: bug: Fix SEGV in ast_category_insert when matching category isn't found

If you call ast_category_insert with a match category that doesn't exist, the
list traverse runs out of 'next' categories and you get a SEGV.  This patch
adds check for the end-of-list condition and changes the signature to return
an int for success/failure indication instead of a void.

The only consumer of this function is manager and it was also changed to use
the return value.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3993/
........

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

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

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

10 years agores_rtp_asterisk: Ensure that the thread terminating pj stuff is registered.
Joshua Colp [Wed, 17 Sep 2014 18:04:25 +0000 (18:04 +0000)] 
res_rtp_asterisk: Ensure that the thread terminating pj stuff is registered.
........

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

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

10 years agores_rtp_asterisk: Fix 100% CPU usage due to timer heap thread spinning.
Joshua Colp [Tue, 16 Sep 2014 21:02:53 +0000 (21:02 +0000)] 
res_rtp_asterisk: Fix 100% CPU usage due to timer heap thread spinning.

Side note: I need a vacation.
........

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

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

10 years agores_rtp_asterisk: Fix building when pjproject is not used.
Joshua Colp [Tue, 16 Sep 2014 20:31:31 +0000 (20:31 +0000)] 
res_rtp_asterisk: Fix building when pjproject is not used.
........

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

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

10 years agores_pjsip_session: Fix usage of wrong memory pool when creating local SDP.
Joshua Colp [Tue, 16 Sep 2014 12:11:09 +0000 (12:11 +0000)] 
res_pjsip_session: Fix usage of wrong memory pool when creating local SDP.

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

10 years agores_rtp_asterisk: Fix a myriad of TURN client issues.
Joshua Colp [Tue, 16 Sep 2014 11:09:25 +0000 (11:09 +0000)] 
res_rtp_asterisk: Fix a myriad of TURN client issues.

1. The number of file descriptors an ioqueue instance can handle is fixed, so we
now spawn the required number to handle the load.
2. Our transport identifiers were exceeding the range supported by pjnath.
3. The TURN client did not set up client binding causing needless bandwidth usage.
4. The code no longer updates address information on each packet.
5. STUN traffic was getting looped back to Asterisk instead of going through the
TURN server.
6. Synchronization now ensures things are completely setup or destroyed.
7. Logging now reflects the target the TURN server is sending to/receiving from
on our behalf.

ASTERISK-23577 #close
Reported by: Jay Jideliov

ASTERISK-23634 #close
Reported by: Roman Skvirsky

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

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

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

10 years agocontrib: Fix verifyi typo in alembic DB script ps_transport table.
Walter Doekes [Mon, 15 Sep 2014 10:45:23 +0000 (10:45 +0000)] 
contrib: Fix verifyi typo in alembic DB script ps_transport table.

Reported by: Zogot (on IRC)
Patches:
  tmp.diff uploaded by Zogot, cleaned up by me.

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

10 years agochan_sip: Clarify that sipdebug=yes cannot be undone by the CLI.
Walter Doekes [Sun, 14 Sep 2014 15:51:28 +0000 (15:51 +0000)] 
chan_sip: Clarify that sipdebug=yes cannot be undone by the CLI.

Document it in sip.conf.

ASTERISK-24249 #close
Reported by: Avinash Mohod

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

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

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

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

10 years agoBlocked revisions 423010
Kinsey Moore [Fri, 12 Sep 2014 18:19:48 +0000 (18:19 +0000)] 
Blocked revisions 423010

........
Bridging: Fix bouncing native bridge

This fixes a situation in Asterisk 1.8 and 11 where ast_channel_bridge
could cause a bouncing native bridge. In the case of the
dial_LS_options test, this was a remote RTP bridge which caused the
audio path to continually cycle between Asterisk and the remote
endpoints generating a large number of SIP messages and delaying the
test long enough to cause it to fail (checking timing was part of the
test). The root cause was that the code to decide whether to use native
bridging was expecting a time-remaining value of 0 to be the default
instead of the actual default value of -1. A value of 0 or negative
numbers could also be generated by preceding code in some
circumstances. Both issues are addressed in this patch.

ASTERISK-24211 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3987/
........

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

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

10 years agoRealtime: Fix a bug that caused realtime destroy command to crash
Jonathan Rose [Fri, 12 Sep 2014 16:01:36 +0000 (16:01 +0000)] 
Realtime: Fix a bug that caused realtime destroy command to crash

Also has could affect with anything that goes through ast_destroy_realtime.
If a CLI user used the command 'realtime destroy <family>' with only a single
column/value pair, Asterisk would crash when trying to create a variable list
from a NULL value.

ASTERISK-24231 #close
Reported by: Niklas Larsson
Review: https://reviewboard.asterisk.org/r/3985/

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

10 years agoRemove undocumented default behavior of ast_play_and_record_full acceptdtmf.
Mark Michelson [Thu, 11 Sep 2014 22:16:03 +0000 (22:16 +0000)] 
Remove undocumented default behavior of ast_play_and_record_full acceptdtmf.

ast_play_and_record_full() has a parameter called "acceptdtmf" that is a
string of acceptable DTMF digits that may be pressed by a caller to end
and accept the recording.

ARI uses this function in order to perform recording, and it provides
options for what is passed as acceptdtmf to ast_play_and_record_full().
By default, ARI passes an empty string, with the intention that no DTMF
can be used to end the recording.

The problem is that ast_play_and_record_full() attempts to be "helpful"
by setting "#" as the acceptdtmf if an empty string or NULL pointer
has been passed in. With ARI, this results in unexpected behavior
occurring if you have attempted to intercept "#" yourself in order
to perform some other manipulation of the live recording.

This change removes the "helpful" behavior by no longer accepting
"#" as a default acceptdtmf if none is specified by the caller of
ast_play_and_record_full(). This makes the ARI scenario work as
expected.

The other callers of ast_play_and_record_full() are app_voicemail
and app_minivm, and in both cases, they pass an explicit "#" to
ast_play_and_record_full() as acceptdtmf, so they are unaffected
by this change.

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

10 years agoconfig: bug: fix truncation of included config files on permissions error
George Joseph [Wed, 10 Sep 2014 16:02:54 +0000 (16:02 +0000)] 
config: bug: fix truncation of included config files on permissions error

ast_config_text_file_save() currently truncates include files as they
are processed.  If a subsequent include file or the main config file has
a permissions error that prevents writing, earlier include files are left
truncated resulting in a frantic search for backups.

This patch causes ast_config_text_file_save to check for write access
on all files before it truncates any of them.

Will be applied 1.8 > trunk.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3986/
........

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

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

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

10 years agopjsip/config_auth.c: Add missing whitespace to log messages.
Sean Bright [Wed, 10 Sep 2014 15:58:45 +0000 (15:58 +0000)] 
pjsip/config_auth.c: Add missing whitespace to log messages.

The errors generated when validating 'auth' settings are missing a space which
makes the messages a little confusing.

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

10 years agoSounds/BuildSystem: Modifications to include new releases and Japanese language.
Rusty Newton [Sun, 7 Sep 2014 00:09:54 +0000 (00:09 +0000)] 
Sounds/BuildSystem: Modifications to include new releases and Japanese language.

Modifying Makefile and sounds.xml to include new core 1.4.26 and extra 1.4.15
sound prompt releases, plus the new Japanese core sound prompts contributed
by QLOOG.

ASTERISK-23324
Reported by: Kevin McCoy
Tested by: Rusty Newton
........

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

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

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

10 years agomain/cdr: Copy over location information during a fork
Matthew Jordan [Sat, 6 Sep 2014 22:48:24 +0000 (22:48 +0000)] 
main/cdr: Copy over location information during a fork

When a CDR is forked, a new CDR is created and appended to the CDR chain for
the Party A. The forked CDR starts life off as a clone of the last
non-finalized for the particular Party A. In the past, merely copying over
the snapshots for Party A/Party B would be sufficient. However, as the CDRs
now contain cached information from Party A - specifically application/data,
context, and extension - we need to copy that over during a fork as well.

Huzzah for unit tests catching this when the context/extension were derived
from a cached value on the CDR instead of on Party A.

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

10 years agomain/rtp_engine: Format NTP timestamps as unsigned ints
Matthew Jordan [Sat, 6 Sep 2014 22:20:27 +0000 (22:20 +0000)] 
main/rtp_engine: Format NTP timestamps as unsigned ints

On some systems, a timeval's tv_sec/tv_usec will be unsigned lont ints, as
opposed to long ints. When the RTP engine formats these as strings, it was
previously formatting them as signed integers, which can result in some
odd negative timestamp values (particularly on 32-bit systems). This patch
formats the values as unsigned long integers.

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

10 years agores_pjsip_sdp_rtp: Fix retrieval of "ice-pwd" attribute if in session and not media...
Joshua Colp [Sat, 6 Sep 2014 19:11:25 +0000 (19:11 +0000)] 
res_pjsip_sdp_rtp: Fix retrieval of "ice-pwd" attribute if in session and not media stream.

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

10 years agomain/cdrs: Preserve context/extension when executing a Macro or GoSub
Matthew Jordan [Fri, 5 Sep 2014 22:02:23 +0000 (22:02 +0000)] 
main/cdrs: Preserve context/extension when executing a Macro or GoSub

The context/extension in a CDR is generally considered the destination of a
call. When looking at a 2-party call CDR, users will typically be presented
with the following:

context    exten      channel     dest_channel app  data
default    1000       SIP/8675309 SIP/1000     Dial SIP/1000,,20

However, if the Dial actually takes place in a Macro, the current behaviour
in 12 will result in the following CDR:

context    exten      channel     dest_channel app  data
macro-dial s          SIP/8675309 SIP/1000     Dial SIP/1000,,20

The same is true of a GoSub:

context    exten      channel     dest_channel app  data
subs       dial_stuff SIP/8675309 SIP/1000     Dial SIP/1000,,20

This generally makes the context/exten fields less than useful.

It isn't hard to preserve these values in the CDR state machine; however, we
need to have something that informs us when a channel is executing a
subroutine. Prior to this patch, there isn't anything that does this.

This patch solves this problem by adding a new channel flag,
AST_FLAG_SUBROUTINE_EXEC. This flag is set on a channel when it executes a
Macro or a GoSub. The CDR engine looks for this value when updating a Party A
snapshot; if the flag is present, we don't override the context/exten on the
main CDR object. In a funny quirk, executing a hangup handler must *not* abide
by this logic, as the endbeforehexten logic assumes that the user wants to see
data that occurs in hangup logic, which includes those subroutines. Since
those execute outside of a typical Dial operation (and will typically have
their own dedicated CDR anyway), this is unlikely to cause any heartburn.

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

ASTERISK-24254 #close
Reported by: tm1000, Tony Lewis
Tested by: Tony Lewis

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

10 years agomain/cdr: Fix crash/memory consumption in CDRs in multi-party bridge scenarios
Matthew Jordan [Fri, 5 Sep 2014 21:53:35 +0000 (21:53 +0000)] 
main/cdr: Fix crash/memory consumption in CDRs in multi-party bridge scenarios

This patch fixes an issue where CDRs would get stuck generating an infinite
number of CDRs, eventually crashing Asterisk (and consuming a lot of memory
along the way).

When a channel enters into a multi-party bridge, the CDR engine creates
mappings of each participant to each other participant, picking the 'A' party
as it goes. So, if we have four channels in a multi-party bridge (Alice, Bob,
Charlie, Denise), we would have something like:

Alice => Bob
Alice => Charlie
Alice => Denise
Bob => Charlie
Bob => Denise
Charlie => Denise

This works fine when participants enter the bridge a single time.

When a participant leaves a bridge, the CDRs for that channel are transitioned
to a finalized state.

The bug occurs if Bob rejoins. When the CDR engine creates mappings between the
channels, it walks through all the participants currently in the bridge, and
realizes that no one in the bridge can create a CDR with the channel (Bob).
As such it creates a new CDR for the candidate and appends it to that
candidate's chain. Unfortunately, on this particular code path, it doesn't
stop traversing the candidate's chain. Since we just added ourselves to the
chain, this causes the loop to keep going, constantly adding new CDRs.

This patch makes it so the engine bails when it creates a CDR match in this
case.

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

ASTERISK-24241 #close
Reported by: Deepak Singh Rawat
Tested by: Deepak Singh Rawat

ASTERISK-24208
Reported by: Frankie Chin

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

10 years agoCall IDs: Fix appearance of call ID in core show channels when NULL
Jonathan Rose [Fri, 5 Sep 2014 17:46:14 +0000 (17:46 +0000)] 
Call IDs: Fix appearance of call ID in core show channels when NULL

NULL call IDs were meant to appear as '(none)' but instead were showing
the contents of an uninitialized character buffer.

ASTERISK-24223
Review: https://reviewboard.asterisk.org/r/3979/

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

10 years agoManager: Require read permission for SYSTEM in order to send FullyBooted
Jonathan Rose [Thu, 4 Sep 2014 20:46:46 +0000 (20:46 +0000)] 
Manager: Require read permission for SYSTEM in order to send FullyBooted

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

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

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

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

10 years agores_pjsip_transport_websocket: Fix crash when the Contact header is not a URI.
Joshua Colp [Wed, 3 Sep 2014 14:03:27 +0000 (14:03 +0000)] 
res_pjsip_transport_websocket: Fix crash when the Contact header is not a URI.

The code for changing the Contact header wrongly assumed that the Contact
would always contain a URI. This is incorrect.

ASTERISK-24271
Reported by: Dafi Ni

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

10 years agoResolve race condition where channels enter dialplan application before media has...
Mark Michelson [Tue, 2 Sep 2014 18:16:55 +0000 (18:16 +0000)] 
Resolve race condition where channels enter dialplan application before media has been negotiated.

Testsuite tests will occasionally fail because on reception of a 200 OK SIP response,
an AST_CONTROL_ANSWER frame is queued prior to when media has finished being
negotiated. This is because session supplements are called into before PJSIP's
inv_session code has told us that media has been updated. Sometimes the queued answer
frame is handled by the PBX thread before the ensuing media negotiations occur, causing
a test failure.

As it turns out, there is another place that session supplements could be called into, which is
after media has finished getting negotiated. What this commit introduces is a means for session
supplements to indicate when they wish to be called into when handling an incoming SIP response.
By default, all session supplements will be run at the same point that they were prior to this
commit. However, session supplements may indicate that they wish to be handled earlier than
normal on redirects, or they may indicate they wish to be handled after media has been negotiated.

In this changeset, two session supplements have been updated to indicate a preference for when
they should be run: res_pjsip_diversion executes before handling redirection in order to get
information from the Diversion header, and chan_pjsip now handles responses to INVITEs after
media negotiation to fix the race condition mentioned previously.

ASTERISK-24212 #close
Reported by Matt Jordan

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

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

10 years agomain/cli: Do not attempt to show CDR data for internal channels
Matthew Jordan [Mon, 1 Sep 2014 14:16:12 +0000 (14:16 +0000)] 
main/cli: Do not attempt to show CDR data for internal channels

Internal channels don't have CDRs. Querying the CDR engine for their variables
will make it cranky.

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

10 years agores_stasis: Don't play MoH to channels by default when added to holding bridges
Matthew Jordan [Mon, 1 Sep 2014 14:07:04 +0000 (14:07 +0000)] 
res_stasis: Don't play MoH to channels by default when added to holding bridges

When ARI manipulates a bridge, it generally doesn't care what the mixing
technology is. Operations on a bridge initiated through ARI should perform
their action in generally the same way, regardless of the bridge's mixing
technology. While the mixing technology may determine how media flows to
channels, the actual operations on a bridge themselves should be the same.

Currently, this isn't the case with holding bridges. When a channel joins
without a role, MoH is started on that channel automatically. Subsequent bridge
operations that would stop MoH would fail (as there is no Announcer channel
playing MoH to the bridge). Starting MoH on the bridge will also create two
MoH streams: one from the MoH being played on the participant channel, and one
from the announcer channel. From the perspective of ARI users, this is
counter-intuitive - I would not expect MoH to be started for me. The mixing
technology determines how media is shared between participants, not the
application experience.

This patch does the following:
 * The Stasis bridge class now inspects channels as they are going into a
   bridge. If the bridge has a holding capability, and the channel has no
   roles, we give it a participant role and mark the default behaviour to have
   no entertainment. This allows addChannel operations to continue to set a
   participant role with an entertainment option if it felt like it (or could
   do it).
 * The music on hold channel is now Stasis approved (tm)

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

ASTERISK-24264 #close
Reported by: Samuel Galarneau
Tested by: Samuel Galarneau

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

10 years agoconfbridge: Add Duration to ConfbridgeList event
George Joseph [Sat, 30 Aug 2014 17:28:04 +0000 (17:28 +0000)] 
confbridge: Add Duration to ConfbridgeList event

The ConfbridgeList event doesn't include how long the user has been a
member of the conference.  This patch adds Duration (seconds) which
is based on user->chan->answertime.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3955/

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

10 years agomanager: Make WaitEvent action respect eventfilters
George Joseph [Sat, 30 Aug 2014 17:22:55 +0000 (17:22 +0000)] 
manager: Make WaitEvent action respect eventfilters

A WaitEvent issued via an http session isn't respecting eventfilters defined
for the user. I just added a match_filter to the predicate that controls
astman_append.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3958/
........

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

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

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

10 years agodoc: Add a manpage for the smsq utility
Matthew Jordan [Fri, 29 Aug 2014 19:39:42 +0000 (19:39 +0000)] 
doc: Add a manpage for the smsq utility

This patch adds a manpage for the smsq utility. Note that this is one of
the patches the Debian distro applies for the Asterisk project, as per
ASTERISK-24191.

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

ASTERISK-24171 #close
Reported by: Jeremy Laine
patches:
  smsq.8 uploaded by Jeremy Laine (License 6561)
........

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

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

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

10 years agodoc: Add a manpage for the aelparse utility
Matthew Jordan [Fri, 29 Aug 2014 19:32:49 +0000 (19:32 +0000)] 
doc: Add a manpage for the aelparse utility

This patch adds a manpage for the aelparse utility. Note that this is one of
the patches the Debian distro applies for the Asterisk project, as per
ASTERISK-24191.

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

ASTERISK-24171 #close
Reported by: Jeremy Laine
patches:
  aelparse.8 uploaded by Jeremy Laine (License 6561)
........

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

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

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

10 years agoLICENSE: Clarify language in Asterisk's LICENSE to allow for linking to UniMRCP
Matthew Jordan [Thu, 28 Aug 2014 21:53:51 +0000 (21:53 +0000)] 
LICENSE: Clarify language in Asterisk's LICENSE to allow for linking to UniMRCP

The UniMRCP project distributes Asterisk modules that integrate Asterisk with
UniMRCP, and other Asterisk users use the UniMRCP library as well.
Unfortunately, the UniMRCP license is Apache 2.0, which per the Free Software
Foundation, is not a compatible license with the GPLv2.

"Please note that this license is not compatible with GPL version 2, because it
has some requirements that are not in that GPL version. These include certain
patent termination and indemnification provisions. The patent termination
provision is a good thing, which is why we recommend the Apache 2.0 license for
substantial programs over other lax permissive licenses."

On the other hand, UniMRCP is a great project and we'd like to let people use
it with Asterisk.

This patch updates the LICENSE text to allow users to link Asterisk with
UniMRCP and distribute the resulting binaries.
........

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

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

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

10 years agochan_iax2: Fix Dynamic IAX2 Registrations After Temporary DNS Failure
Michael L. Young [Thu, 28 Aug 2014 20:29:45 +0000 (20:29 +0000)] 
chan_iax2: Fix Dynamic IAX2 Registrations After Temporary DNS Failure

The reporter on the issue found some issues when upgrading from version 10 to 11
on 55 hosts.

Two situations that can occur with dynamic registrations.

1.  With dnsmgr disabled, if the host is not resolvable we are not trying to
    resolve the host again when it is time to attempt to register again.  This
    results in never registering to the host.
2.  With dnsmgr enabled, when the host is temporarily not resolvable the
    address is set to 0.0.0.0:0 and then when the host is resolvable the port
    is not being restored and stays set to 0.

This patch resolves these two issues by:

* Storing the hostname so that it can be used for resolving with DNS.
* Resolve the hostname on the next scheduled attempt to register.
* Storing the port used to reach the host so that when the hostname is
  resolvable again, we can set the port again if the port is still unset after
  looking up the host.

ASTERISK-23767 #close
Reported by: David Herselman
Tested by: David Herselman, Michael L. Young
Patches:
    asterisk-23767-dns_reg_retry_and_set_port_11_v3.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

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

10 years agoAdded ConfBridge AMI event note to UPGRADE.txt.
Richard Mudgett [Thu, 28 Aug 2014 17:19:35 +0000 (17:19 +0000)] 
Added ConfBridge AMI event note to UPGRADE.txt.

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

10 years agores/res_pjsip/pjsip_options.c: Eliminate excessive RAII_VAR usage.
Richard Mudgett [Thu, 28 Aug 2014 00:30:14 +0000 (00:30 +0000)] 
res/res_pjsip/pjsip_options.c: Eliminate excessive RAII_VAR usage.

* Fix off nominal ref leak in find_or_create_contact_status().

* Add missing NULL check of status in update_contact_status() and
init_start_time().

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

10 years agoconfbridge: Add 'Admin' param to join, leave, mute, unmute and talking events
George Joseph [Wed, 27 Aug 2014 17:21:57 +0000 (17:21 +0000)] 
confbridge: Add 'Admin' param to join, leave, mute, unmute and talking events

Currently there's no way to tell if a user is an admin or not when receiving
the join, leave, mute, unmute and talking events.  This patch adds that
capability.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3950/

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

10 years agoCallerID: Fix parsing of malformed callerid
Kinsey Moore [Wed, 27 Aug 2014 15:14:39 +0000 (15:14 +0000)] 
CallerID: Fix parsing of malformed callerid

This allows the callerid parsing function to handle malformed input
strings and strings containing escaped and unescaped double quotes.
This also adds a unittest to cover many of the cases where the parsing
algorithm previously failed.

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

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

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

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

10 years agoconfbridge: Make kick, mute and unmute handle channel targets consistently.
George Joseph [Tue, 26 Aug 2014 23:18:32 +0000 (23:18 +0000)] 
confbridge: Make kick, mute and unmute handle channel targets consistently.

Kick, mute and unmute were a little inconsistent in their handling of channel
targets.  This patch cleans that up by insuring they all handle the 'all'
target consistently and adds the 'participants' target which acts on
non-admins.  Documentation for kick was also cleaned up as it never
supported partial channel names.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3944/

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

10 years agoFix race condition in the scheduler when deleting a running entry.
Mark Michelson [Tue, 26 Aug 2014 22:08:39 +0000 (22:08 +0000)] 
Fix race condition in the scheduler when deleting a running entry.

When scheduled tasks run, they are removed from the heap (or hashtab).
When a scheduled task is deleted, if the task can't be found in the
heap (or hashtab), an assertion is triggered. If DO_CRASH is enabled,
this assertion causes a crash.

The problem is, sometimes it just so happens that someone attempts
to delete a scheduled task at the time that it is running, leading
to a crash. This change corrects the issue by tracking which task
is currently running. If that task is attempted to be deleted,
then we mark the task, and then wait for the task to complete.
This way, we can be sure to coordinate task deletion and memory
freeing.

ASTERISK-24212
Reported by Matt Jordan

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

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

10 years agores_musiconhold: Fix MOH restarting where it left off from the last hold.
Richard Mudgett [Mon, 25 Aug 2014 16:11:19 +0000 (16:11 +0000)] 
res_musiconhold: Fix MOH restarting where it left off from the last hold.

Restore code removed by https://reviewboard.asterisk.org/r/3536/ that
introduced a regression that prevents MOH from restarting were it left off
the last time.

ASTERISK-24019 #close
Reported by: Jason Richards
Patches:
      jira_asterisk_24019_v1.8.patch (license #5621) patch uploaded by rmudgett

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

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

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

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

10 years agores_pjsip_transport_websocket: Attach the Websocket module on outgoing INVITEs.
Joshua Colp [Sun, 24 Aug 2014 19:34:50 +0000 (19:34 +0000)] 
res_pjsip_transport_websocket: Attach the Websocket module on outgoing INVITEs.

In order to alter the Contact header on in-dialog requests and responses the
Websocket module must be attached on outgoing INVITEs. The Contact header is
modified so that the PJSIP transport layer can find and use the existing
Websocket connection based on the source IP address, port, and transport.

ASTERISK-24143 #close
Reported by: Aleksei Kulakov

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

10 years agores_pjsip_transport_websocket: Fix a progressive memory growth.
Joshua Colp [Sun, 24 Aug 2014 19:18:51 +0000 (19:18 +0000)] 
res_pjsip_transport_websocket: Fix a progressive memory growth.

The packet structure used to receive messages was using the transport
pool. This meant that for each parsing the pool would grow accordingly.
Since memory can not be reclaimed without resetting it this would
cause the memory pool to grow and grow.

This change uses a specific memory pool for the packet structure and
resets it to a fresh state after the message has been received and
handled.

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

10 years agores_pjsip_transport_websocket: Ensure secure Websocket clients can be called.
Joshua Colp [Sun, 24 Aug 2014 18:52:09 +0000 (18:52 +0000)] 
res_pjsip_transport_websocket: Ensure secure Websocket clients can be called.

This change enforces the transport in the Contact header for Websocket clients.
Previously a client may provide a transport of 'ws' when it is actually using
a transport of 'wss'. This would cause outgoing calls to fail as the existing
connection could not be found.

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

10 years agochan_sip: Use the server reflexive ICE candidate RTCP port as provided.
Joshua Colp [Sun, 24 Aug 2014 17:20:29 +0000 (17:20 +0000)] 
chan_sip: Use the server reflexive ICE candidate RTCP port as provided.

This code originally worked around an issue within res_rtp_asterisk itself.
The wrong socket was being used for the STUN check for RTCP, causing the
port to be the same as RTP. This was subsequently fixed and the RTCP port
provided for the ICE candidate is correct and does not need to be incremented.

ASTERISK-23997 #close
Reported by: Badalian Vyacheslav
Patches:
 plus1.diff submitted by Badalian Vyacheslav (license 5249)
........

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

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

10 years agoARI: Fix a crash caused by hanging during playback to a channel in a bridge
Jonathan Rose [Fri, 22 Aug 2014 16:27:42 +0000 (16:27 +0000)] 
ARI: Fix a crash caused by hanging during playback to a channel in a bridge

ASTERISK-24147 #close
Reported by: Edvin Vidmar
Review: https://reviewboard.asterisk.org/r/3908/

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

10 years agomain/message: Add a new-line to a DEBUG message
Matthew Jordan [Fri, 22 Aug 2014 13:50:23 +0000 (13:50 +0000)] 
main/message: Add a new-line to a DEBUG message

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

10 years agores_musiconhold.c: Remove obsolete REF_DEBUG code.
Richard Mudgett [Thu, 21 Aug 2014 22:05:18 +0000 (22:05 +0000)] 
res_musiconhold.c: Remove obsolete REF_DEBUG code.

Remove unneeded code that writes to the wrong file location in an obsolete
format.
........

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

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

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

10 years agoSwitch from hostname to an IP address in the SDP origin line.
Mark Michelson [Thu, 21 Aug 2014 21:42:08 +0000 (21:42 +0000)] 
Switch from hostname to an IP address in the SDP origin line.

Using the hostname in the SDP origin line may not satisfy the requirement
of RFC 4566 that we use a FQDN or IP address. This change has us use the
same information from the SDP connection line if possible. If not possible,
we'll use the configured media address. And if that's not possible, we use
the result of a PJLIB call to get the IP address of ourself.

ASTERISK-23994 #close
Reported by Private Name

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

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

10 years agoEnsure after-bridge behavior is correct when moving from Stasis to a non-Stasis bridge.
Mark Michelson [Thu, 21 Aug 2014 21:35:21 +0000 (21:35 +0000)] 
Ensure after-bridge behavior is correct when moving from Stasis to a non-Stasis bridge.

Because of the departable state of channels that enter Stasis bridges, Stasis has to
take responsibility for directing the channel to its intended after-bridge destination
if the channel moves from a Stasis bridge to a non-Stasis bridge. This change ensures
that when such a move occurs, when the channel leaves the bridging system, any after
bridge gotos are honored.

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

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

10 years agoLet's try checking the name and number, instead of the name twice.
Mark Michelson [Thu, 21 Aug 2014 21:27:19 +0000 (21:27 +0000)] 
Let's try checking the name and number, instead of the name twice.

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

10 years agores_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set
Jonathan Rose [Thu, 21 Aug 2014 21:15:40 +0000 (21:15 +0000)] 
res_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set

Due to a faulty function for debugging reference decrementing, it was possible
to reduce the refcount on the wrong object if two moh classes of the same name
were in the moh class container.

(closes issue ASTERISK-22252)
Reported by: Walter Doekes
Patches:
    18_moh_debug_ref_patch.diff Uploaded by Jonathan Rose (license 6182)
........

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

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

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

10 years agoImprove consistency of party ID privacy usage.
Mark Michelson [Thu, 21 Aug 2014 21:14:20 +0000 (21:14 +0000)] 
Improve consistency of party ID privacy usage.

Prior to this change, the Remote-Party-ID header took the position of
"If caller name and number are not explicitly allowed, then they are private"
and P-Asserted-Identity took the position of
"Caller name and number are only private if marked explicitly so"

Now both mechanisms of conveying party identification use the former approach.

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

10 years agochan_sip: Don't use port derived from fromdomain if it isn't set
Matthew Jordan [Thu, 21 Aug 2014 17:33:56 +0000 (17:33 +0000)] 
chan_sip: Don't use port derived from fromdomain if it isn't set

If a user does not provide a port in the fromdomain setting, chan_sip will set
the fromdomainport to STANDARD_SIP_PORT (5060). The fromdomainport value will
then get used unilaterally in certain places. This causes issues with TLS,
where the default port is expected to be 5061.

This patch modifies chan_sip such that fromdomainport is only used if it is
not the standard SIP port; otherwise, the port from the SIP pvt's recorded
self IP address is used.

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

ASTERISK-24178 #close
Reported by: Elazar Broad
patches:
  fromdomainport_fix.diff uploaded by Elazar Broad (License 5835)
........

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

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

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

10 years agoARI: Fix implicit answer when playback is initiated on unanswered channel
Matthew Jordan [Thu, 21 Aug 2014 15:22:53 +0000 (15:22 +0000)] 
ARI: Fix implicit answer when playback is initiated on unanswered channel

When issuing a POST /channels/{channel_id}/play on a channel that is not
yet answered, ARI is supposed to:
* Queue up an AST_CONTROL_PROGRESS on the channel
* Start up the playback of the media

Instead, we sneak an answer on the channel right before starting playing media.

This is due to ARI's usage of control_streamfile. This function implicitly
answers the channel (and doesn't give ARI the option to stop it). The answering
of the channel here is probably unnecessary:
* app_voicemail, by far the biggest consumer of this function, always answers
  the channels anyway
* control stream file (in res_agi) and ControlPlayback probably shouldn't be
  implicitly answering the channel. Answering should not be tied directly to
  playing back media.

As it turns out, the answering of the channel here is pretty old:
356042    twilson       if (ast_channel_state(chan) != AST_STATE_UP) {
  3087      anthm               res = ast_answer(chan);
180259   tilghman       }

(As in, ancient?)

Note that others ran into this problem and commented about it on various
mailing lists.

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

ASTERISK-24229 #close
Reported by: Matt Jordan

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

10 years agoClean up files that do not end with newlines
Matthew Jordan [Thu, 21 Aug 2014 14:51:27 +0000 (14:51 +0000)] 
Clean up files that do not end with newlines

Trivial patch to add new lines to several files missing them. This fixes
warnings when compiling with gcc 4.1.2 on CentOS 5.

ASTERISK-24245 #close
Reported by: Shaun Ruffell
patches:
  0002-Trivial-addition-of-newlines-at-end-of-three-files.patch uploaded by Shaun Ruffell (License 5417)

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

10 years agocli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.
Richard Mudgett [Wed, 20 Aug 2014 22:19:41 +0000 (22:19 +0000)] 
cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.

filename_completion_function() returns memory that was not allocated by
the MALLOC_DEBUG allocation tracker so the memory must be freed by
ast_std_free().
........

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

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

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

10 years agoMove evaluation of set_var options in pjsip to the end of channel initialization.
Mark Michelson [Wed, 20 Aug 2014 20:02:56 +0000 (20:02 +0000)] 
Move evaluation of set_var options in pjsip to the end of channel initialization.

This allows for set_var to override certain defaults such as caller ID and codec
values. This also fixes a test suite regression. The "set_var" test suite test attempted
to use set_var to override caller ID, but a recent change caused that to no longer work.

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

10 years agoStasis: Add information to blind transfer event
Kinsey Moore [Wed, 20 Aug 2014 12:56:58 +0000 (12:56 +0000)] 
Stasis: Add information to blind transfer event

When a blind transfer occurs that is forced to create a local channel
pair to satisfy the transfer request, information about the local
channel pair is not published. This adds a field to describe that
channel to the blind transfer message struct so that this information
is conveyed properly to consumers of the blind transfer message.

This also fixes a bug in which Stasis() was unable to properly identify
the channel that was replacing an existing Stasis-controlled channel
due to a blind transfer.

Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3921/

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

10 years agoAlter documentation for callerid_privacy to use correct values.
Mark Michelson [Tue, 19 Aug 2014 20:27:47 +0000 (20:27 +0000)] 
Alter documentation for callerid_privacy to use correct values.

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

10 years agoFix compilation error on certain versions of GCC.
Mark Michelson [Tue, 19 Aug 2014 19:54:09 +0000 (19:54 +0000)] 
Fix compilation error on certain versions of GCC.

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

10 years agoAMI Docs: Fix Status channel parameter optionality
Kinsey Moore [Tue, 19 Aug 2014 19:41:53 +0000 (19:41 +0000)] 
AMI Docs: Fix Status channel parameter optionality
........

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

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

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

10 years agoARI: Fix a bug where /channels/{channelID}/continue doesn't execute PBX
Jonathan Rose [Tue, 19 Aug 2014 16:20:59 +0000 (16:20 +0000)] 
ARI: Fix a bug where /channels/{channelID}/continue doesn't execute PBX

If /channels/{channelID}/continue is called on a channel that was originated
without a PBX (such as the ARI command POST channel with a stasis application
argument), the channel will not start dialplan execution. This patch will now
run the PBX out of the stasis execution if the channel doesn't currently have
an active PBX upon continuing.

ASTERISK-24043 #close
Reported by: Krandon Bruse
Review: https://reviewboard.asterisk.org/r/3917/
Patches:
    stasis-continue.diff submitted by Krandon Bruse (license 6631)

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

10 years agochan_pjsip: Fix attended transfer connected line name update.
Richard Mudgett [Tue, 19 Aug 2014 16:06:58 +0000 (16:06 +0000)] 
chan_pjsip: Fix attended transfer connected line name update.

A calls B
B answers
B SIP attended transfers to C
C answers, B and C can see each other's connected line information
B completes the transfer
A has number but no name connected line information about C
  while C has the full information about A

I examined the incoming and outgoing party id information handling of
chan_pjsip and found several issues:

* Fixed ast_sip_session_create_outgoing() not setting up the configured
endpoint id as the new channel's caller id.  This is why party A got
default connected line information.

* Made update_initial_connected_line() use the channel's CALLERID(id)
information.  The core, app_dial, or predial routine may have filled in or
changed the endpoint caller id information.

* Fixed chan_pjsip_new() not setting the full party id information
available on the caller id and ANI party id.  This includes the configured
callerid_tag string and other party id fields.

* Fixed accessing channel party id information without the channel lock
held.

* Fixed using the effective connected line id without doing a deep copy
outside of holding the channel lock.  Shallow copy string pointers can
become stale if the channel lock is not held.

* Made queue_connected_line_update() also update the channel's
CALLERID(id) information.  Moving the channel to another bridge would need
the information there for the new bridge peer.

* Fixed off nominal memory leak in update_incoming_connected_line().

* Added pjsip.conf callerid_tag string to party id information from
enabled trust_inbound endpoint in caller_id_incoming_request().

AFS-98 #close
Reported by: Mark Michelson

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

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

10 years agofunc_config: Change 'Not Found' message from ERROR to DEBUG
George Joseph [Mon, 18 Aug 2014 20:17:09 +0000 (20:17 +0000)] 
func_config: Change 'Not Found' message from ERROR to DEBUG

When you call the CONFIG dialplan function with the name of a variable that
doesn't exist in the target context you get an ERROR.  This does nothing but
clutter up the logs with messages that may be perfectly acceptable.  Just
because a variable wasn't in the context doesn't mean it's an error.  Maybei
t's optional or just needs to be defaulted or ignored.

This patch changes the log level from ERROR to DEBUG.  If a dialplan developer
wants to debug their dialplan they still canby setting the console debug level
as needed.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3919/
........

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

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

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

10 years agoapps/app_meetme: Fix crash when publishing MeetMe messages with no channel
Matthew Jordan [Sun, 17 Aug 2014 23:28:27 +0000 (23:28 +0000)] 
apps/app_meetme: Fix crash when publishing MeetMe messages with no channel

The same function, meetme_stasis_generate_msg, handles creating and publishing
Stasis message both when there are channels in the MeetMe conference and when
there are no channels in the conference. When the performance improvement was
made to use cached snapshots, this created a situation where Asterisk would
crash: obtaining a cached snapshot is not NULL tolerant.

This patch restores the previous implementation, which used a NULL safe set
of routines to produce a blob containing the channel snapshot (if available)
and information about the MeetMe conference.

ASTERISK-24234 #close
Reported by: Shaun Ruffell
Tested by: Shaun Ruffell

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

10 years agoapps/app_dial: Fix Dial 'z' option
Matthew Jordan [Sun, 17 Aug 2014 23:08:57 +0000 (23:08 +0000)] 
apps/app_dial: Fix Dial 'z' option

The 'z' option is supposed to disable the dial timeout in the case of a call
forward. Unfortunately, the wrong timeout timer was passed to the do_forward
function, resulting in the option not working.

ASTERISK-24225 #close
Reported by: dimitripietro
Tested by: dimitripietro
patches:
  jira_asterisk_24225_v1.8.patch uploaded by rmudgett (License 5621)
  jira_asterisk_24225_v11.patch uploaded by rmudgett (License 5621)
........

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

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

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

10 years agoconfigure: Undefine FORTIFY_SOURCE prior to defining it for patched gcc
Matthew Jordan [Sun, 17 Aug 2014 22:33:21 +0000 (22:33 +0000)] 
configure: Undefine FORTIFY_SOURCE prior to defining it for patched gcc

Some distributions of Linux patch gcc to define FORTIFY_SOURCE when gcc is
executed with optimization. This "help" unfortunately results in re-definition
warnings when FORTIFY_SOURCE is later defined in Asterisk's build system. This
patch undefines FORTIFY_SOURCE prior to defining it to prevent this warning.

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

ASTERISK-24032 #close
Reported by: Kilburn
Tested by: Kilburn, wdoekes
patches:
  1.8.diff uploaded by cloos (License 5956)
  10.diff uploaded by cloos (License 5956)
  11.diff uploaded by cloos (License 5956)
  12.diff uploaded by cloos (License 5956)
  13.diff uploaded by cloos (License 5956)
........

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

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

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

10 years agoBridging: Fix a behavioral change when checking if a channel is leaving a bridge
Jonathan Rose [Fri, 15 Aug 2014 16:56:33 +0000 (16:56 +0000)] 
Bridging: Fix a behavioral change when checking if a channel is leaving a bridge

r420934 introduced some failures in the test suite.  Upon investigating, it was
discovered that differences in the way we were evaluating whether a channel was in
the process of leaving a bridge were causing some reinvites not to occur (mostly
reinvites back to Asterisk when ending a call). This patch fixes that behavioral
change.

ASTERISK-24027 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3910/

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

10 years agoapp_voicemail/app: Remove test events that were duplicated by r421059
Matthew Jordan [Fri, 15 Aug 2014 15:41:35 +0000 (15:41 +0000)] 
app_voicemail/app: Remove test events that were duplicated by r421059

Moving the test event raised when a file is played back (which occurred in
r421059) broke the ever loving snot out of the voicemail tests. This caused
duplicate test events to get raised, as app_voicemail and main/app were raising
events prior to call ast_streamfile. The voicemail tests did not enjoy getting
multiple events.

Since raising the playback event in ast_streamfile is far more useful to the
vast majority of tests, this patch keeps the call there and simply removes the
extraneous calls that duplicated the event.
........

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

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

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

10 years agores/res_hep_rtcp: Remove dependency on PJSIP
Matthew Jordan [Thu, 14 Aug 2014 21:15:44 +0000 (21:15 +0000)] 
res/res_hep_rtcp: Remove dependency on PJSIP

The res_hep_rtcp module was incorrectly including <pjsip.h>. This didn't need
to be included, as the module does not using PJPROJECT any fashion.
Unfortunately, because res_hep_rtcp did not include pjsip in its MODULEINFO as
a dependency, this also meant that res_hep_rtcp will fail to compile on a
system without PJPROJECT.

This patch removes the include.

Thanks to Damien Wedhorn for pointing this out in #asterisk-dev.

ASTERISK-24236 #close
Reported by: Damien Wedhorn, Matt Jordan
Tested by: Damien Wedhorn

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

10 years agomain/file: Move test event to emit PLAYBACK event more consistently
Matthew Jordan [Thu, 14 Aug 2014 20:57:48 +0000 (20:57 +0000)] 
main/file: Move test event to emit PLAYBACK event more consistently

This is being done in advance of the test for ASTERISK-23953
........

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

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

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

10 years agocel: Make sure channels in extra fields include their unique IDs as well
Matthew Jordan [Thu, 14 Aug 2014 19:09:32 +0000 (19:09 +0000)] 
cel: Make sure channels in extra fields include their unique IDs as well

CEL typically tracks a lot of information using the unique ID of the channel.
This is typically needed due to tying events together using the linked ID of
the various channels involved in a "call", which is derived from the channel ID
of the oldest channel involved in a bridge (or in the case of a Dial, the
parent channel).

Previously, we had updated the extra fields to include the involved channel
names, but forgot to put in the unique ID. This patch corrects that error.

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

10 years agoARI: Originate to app local channel subscription code optimization.
Richard Mudgett [Thu, 14 Aug 2014 16:30:21 +0000 (16:30 +0000)] 
ARI: Originate to app local channel subscription code optimization.

Reduce the scope of local_peer and only get it if the ARI originate is
subscribing to the channels.

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

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

10 years agores_pjsip_send_to_voicemail.c: Fix svn file properties.
Richard Mudgett [Wed, 13 Aug 2014 17:03:41 +0000 (17:03 +0000)] 
res_pjsip_send_to_voicemail.c: Fix svn file properties.

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

10 years agoPJSIP: Prevent crash no-URI contacts
Kinsey Moore [Wed, 13 Aug 2014 16:47:10 +0000 (16:47 +0000)] 
PJSIP: Prevent crash no-URI contacts

This prevents a crash from occurring when a contact with no URI is used
for the creation of an outbound out-of-dialog request with no
associated endpoint.

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

10 years agoBridges: Fix feature interruption/unintended kick caused by external actions
Jonathan Rose [Wed, 13 Aug 2014 15:21:07 +0000 (15:21 +0000)] 
Bridges: Fix feature interruption/unintended kick caused by external actions

If a manager or CLI user attached a mixmonitor to a call running a dynamic
bridge feature while in a bridge, the feature would be interrupted and the
channel would be forcibly kicked out of the bridge (usually ending the call
during a simple 1 to 1 call). This would also occur during any similar action
that could set the unbridge soft hangup flag, so the fix for this was to
remove unbridge from the soft hangup flags and make it a separate thing all
together.

ASTERISK-24027 #close
Reported by: mjordan
Review: https://reviewboard.asterisk.org/r/3900/

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

10 years agologger: Don't store verbose-magic in the log files.
Walter Doekes [Wed, 13 Aug 2014 07:50:34 +0000 (07:50 +0000)] 
logger: Don't store verbose-magic in the log files.

In r399267, the verbose2magic stuff was edited. This time it results
in magic characters in the log files for multiline messages.

In trunk (and 13) this was fixed by the "stripping" of those
characters from multiline messages (in r414798).

This is a backport of that fix to 11. That fix is altered to actually
strip the characters and not replace them with blanks.

Review: https://reviewboard.asterisk.org/r/3901/
Review: https://reviewboard.asterisk.org/r/3902/
........

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

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

10 years agores/stasis/command.c: Fix recent commit using spaces instead of tabs.
Richard Mudgett [Mon, 11 Aug 2014 20:42:44 +0000 (20:42 +0000)] 
res/stasis/command.c: Fix recent commit using spaces instead of tabs.

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

10 years agoAMI/ARI: Update version to 2.5.0/1.5.0 respectively
Matthew Jordan [Mon, 11 Aug 2014 18:48:18 +0000 (18:48 +0000)] 
AMI/ARI: Update version to 2.5.0/1.5.0 respectively

This is to support the backwards compatible changes made in the next version
of Asterisk.

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

10 years agoStasis: Use the correct return value
Kinsey Moore [Mon, 11 Aug 2014 18:45:11 +0000 (18:45 +0000)] 
Stasis: Use the correct return value

Return the correct value instead of always returning 0 when setting
internal status on unreal channels.

Reported by: Richard Mudgett

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

10 years agoStasis: Allow internal channels directly into bridges
Kinsey Moore [Mon, 11 Aug 2014 18:35:27 +0000 (18:35 +0000)] 
Stasis: Allow internal channels directly into bridges

The patch to catch channels being shoehorned into Stasis() via external
mechanisms also happens to catch Announcer and Recorder channels
because they aren't known to be stasis-controlled channels in the usual
sense. This marks those channels as Stasis()-internal channels and
allows them directly into bridges.

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

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

10 years agogeneral: Fix memory Corruption in __ast_string_field_ptr_build_va.
Walter Doekes [Mon, 11 Aug 2014 10:37:41 +0000 (10:37 +0000)] 
general: Fix memory Corruption in __ast_string_field_ptr_build_va.

If the space left in a stringfield is between 0 and
(alignof(ast_string_field_allocation)-1) adding new data would cause
memory corruption, because we would assume enough space (unsigned
underrun).

Thanks Arnd Schmitter for reporting and finding out the cause!

ASTERISK-23508 #close
Reported by: Arnd Schmitter
Tested by: Arnd Schmitter, JoshE

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

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

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

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

10 years agotcptls: Avoid compiler warning on non-dev-mode.
Walter Doekes [Mon, 11 Aug 2014 09:53:29 +0000 (09:53 +0000)] 
tcptls: Avoid compiler warning on non-dev-mode.
........

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

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

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

10 years agomain/message: remove debug message
Matthew Jordan [Fri, 8 Aug 2014 12:31:25 +0000 (12:31 +0000)] 
main/message: remove debug message

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

11 years agoCEL: Update unit tests for additional information
Kinsey Moore [Fri, 8 Aug 2014 02:51:15 +0000 (02:51 +0000)] 
CEL: Update unit tests for additional information

This updates the CEL unit tests for the new information contained in
the attended transfer CEL extra field.

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

11 years agochan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.
Richard Mudgett [Thu, 7 Aug 2014 21:48:58 +0000 (21:48 +0000)] 
chan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.

Replace sip_tls_read() and sip_tcp_read() with a single function and
resolve the poll/wait issue with large SDP payloads.

ASTERISK-18345 #close
Reported by: Stephane Chazelas
Patches:
      tcptls_pollv4.diff (license #5835) patch uploaded by Elazar Broad

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

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

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

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

11 years agoStasis: Correct blind transfer message generation
Kinsey Moore [Thu, 7 Aug 2014 21:16:11 +0000 (21:16 +0000)] 
Stasis: Correct blind transfer message generation

This fixes the json object creation format string and key name for the
BridgeBlindTransfer Stasis event allowing it to be published properly.

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

11 years agoStasis: Ensure transfer messages follow validation rules
Kinsey Moore [Thu, 7 Aug 2014 20:23:30 +0000 (20:23 +0000)] 
Stasis: Ensure transfer messages follow validation rules

This makes Stasis() event generation for transfer messages follow
validation rules. Currently, ast_json_null() is being used in place of
omitting a key entirely which falls afoul of these validation rules.

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

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

11 years agoEnsure bridges exist when trying to determine bridged parties when publishing transfe...
Mark Michelson [Thu, 7 Aug 2014 19:43:59 +0000 (19:43 +0000)] 
Ensure bridges exist when trying to determine bridged parties when publishing transfer information.

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

11 years agoRevert previous patch since it had some unreviewed content in it.
Mark Michelson [Thu, 7 Aug 2014 19:42:43 +0000 (19:42 +0000)] 
Revert previous patch since it had some unreviewed content in it.

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

11 years agoEnsure bridges actually exist when trying to determine the bridged peer.
Mark Michelson [Thu, 7 Aug 2014 19:37:00 +0000 (19:37 +0000)] 
Ensure bridges actually exist when trying to determine the bridged peer.

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

11 years agoStasis: Convey transfer information to applications
Kinsey Moore [Thu, 7 Aug 2014 15:19:53 +0000 (15:19 +0000)] 
Stasis: Convey transfer information to applications

This fixes a class of issues where Stasis applications were not made
aware that their channels were being manipulated or replaced by
external entitiessuch as transfers, AMI commands, or dialplan
applications such as Bridge(). Inconsistent information such as
StasisEnd events with unknown channels as a result of masquerades has
also been corrected. To accomplish these fixes, several new fields
were added to blind and attended transfer messages as well as
StasisStart and BridgeAttendedTransfer Stasis events.

ASTERISK-23941 #close
Review: https://reviewboard.asterisk.org/r/3865/
Review: https://reviewboard.asterisk.org/r/3857/
Review: https://reviewboard.asterisk.org/r/3852/
Review: https://reviewboard.asterisk.org/r/3816/
Review: https://reviewboard.asterisk.org/r/3731/
Review: https://reviewboard.asterisk.org/r/3729/
Review: https://reviewboard.asterisk.org/r/3728/

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

11 years agoChange comment.
Richard Mudgett [Wed, 6 Aug 2014 21:47:30 +0000 (21:47 +0000)] 
Change comment.

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