]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agoBlocked revisions 401379
Richard Mudgett [Tue, 22 Oct 2013 00:20:14 +0000 (00:20 +0000)] 
Blocked revisions 401379

........
chan_dahdi: Fix unable to get index warning when transferring an analog call.

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

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

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

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

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

11 years agoRemove a noisy debug message from bridging code.
Mark Michelson [Mon, 21 Oct 2013 21:05:37 +0000 (21:05 +0000)] 
Remove a noisy debug message from bridging code.

This particular debug message, during a stress test, was logged so
often that it appeared that there may be a memory leak in the logger
code. In actuality, there was no memory leak, but the logger thread
was having a hard time keeping up with the demands of the rest of the
system.

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

(closes issue AST-1225)
reported by John Bigelow

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

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

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

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

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

11 years agoFixing r401281; the model name is Channel, with a capital C
David M. Lee [Mon, 21 Oct 2013 18:58:37 +0000 (18:58 +0000)] 
Fixing r401281; the model name is Channel, with a capital C

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

11 years agoFix IAX2 incoming call address lookups
Kinsey Moore [Sat, 19 Oct 2013 21:53:08 +0000 (21:53 +0000)] 
Fix IAX2 incoming call address lookups

This fixes address lookup for incoming calls without a peer definition.
The address family was unset instead of being set to AST_AF_UNSPEC
which was causing lookup failures on "127.0.0.1". This is one of the
causes of the current failure of the app_page integration test.

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

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

11 years agoReturn a channel snapshot when originating using ARI, and subscribe the Stasis applic...
Joshua Colp [Sat, 19 Oct 2013 14:43:41 +0000 (14:43 +0000)] 
Return a channel snapshot when originating using ARI, and subscribe the Stasis application to it.

This change allows a user of ARI to know what channel it has originated and also follow any
progress. If a Stasis application is provided it will be automatically subscribed to the
originated channel immediately.

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

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

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

11 years agores_parking: Remove setting useless flag.
Richard Mudgett [Fri, 18 Oct 2013 22:51:26 +0000 (22:51 +0000)] 
res_parking: Remove setting useless flag.

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

11 years agoThis is just a quick script for dumping swagger-ui into static-http,
David M. Lee [Fri, 18 Oct 2013 21:49:48 +0000 (21:49 +0000)] 
This is just a quick script for dumping swagger-ui into static-http,
so that it can be served by the Asterisk web server.

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

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

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

11 years agoResolve some memory leaks due to incorrect for loop / ao2 ref usage.
Mark Michelson [Fri, 18 Oct 2013 18:33:35 +0000 (18:33 +0000)] 
Resolve some memory leaks due to incorrect for loop / ao2 ref usage.

A common idiom in Asterisk is to due something like:

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

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

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

11 years agoAdd channel lock protection around translation path setup.
Richard Mudgett [Fri, 18 Oct 2013 16:52:32 +0000 (16:52 +0000)] 
Add channel lock protection around translation path setup.

Most callers of ast_channel_make_compatible() happen before the channels
enter a two party bridge.  With the new bridging framework, two party
bridging technologies may also call ast_channel_make_compatible() when
there is more than one thread involved with the two channels.

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

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

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

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

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

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

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

11 years agoTweak ast_bridge_depart() doxygen.
Richard Mudgett [Fri, 18 Oct 2013 16:20:25 +0000 (16:20 +0000)] 
Tweak ast_bridge_depart() doxygen.

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

11 years agoRemove the bit about requiring ast_bridge_depart() to be called before ast_bridge_des...
Mark Michelson [Fri, 18 Oct 2013 16:05:56 +0000 (16:05 +0000)] 
Remove the bit about requiring ast_bridge_depart() to be called before ast_bridge_destroy().

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

11 years agoClarify in ast_bridge_destroy() about how departable channels must be handled.
Mark Michelson [Fri, 18 Oct 2013 15:28:16 +0000 (15:28 +0000)] 
Clarify in ast_bridge_destroy() about how departable channels must be handled.

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

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

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

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

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

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

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

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

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

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

11 years agores_parking: Fix bug where reloading immediately wipes new parkpos extensions
Jonathan Rose [Thu, 17 Oct 2013 18:16:33 +0000 (18:16 +0000)] 
res_parking: Fix bug where reloading immediately wipes new parkpos extensions

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

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

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

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

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

11 years agoARI: Fix crash when POST /playback/{id}/control does not have an operation parameter.
Richard Mudgett [Wed, 16 Oct 2013 21:20:21 +0000 (21:20 +0000)] 
ARI: Fix crash when POST /playback/{id}/control does not have an operation parameter.

(closes issue ASTERISK-22680)
Reported by: John Bigelow

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

11 years agoFixed malformed Access-Control-Allow-Methods header. Was causing Safari to barf on...
David M. Lee [Wed, 16 Oct 2013 21:17:24 +0000 (21:17 +0000)] 
Fixed malformed Access-Control-Allow-Methods header. Was causing Safari to barf on POST and DELETE.

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

11 years agoOops. Leftover /stasis reference
David M. Lee [Wed, 16 Oct 2013 17:00:50 +0000 (17:00 +0000)] 
Oops. Leftover /stasis reference

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

11 years agoClarify documentation for channel and bridge list
Kinsey Moore [Wed, 16 Oct 2013 14:01:04 +0000 (14:01 +0000)] 
Clarify documentation for channel and bridge list

This makes it clear that the ARI API calls for listing channels and
bridges will list all channels or bridges in the system and not just
those that are in or are controlled by a Stasis application.

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

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

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

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

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

11 years agoUse POST / DELETE to toggle ARI bridge moh
Paul Belanger [Wed, 16 Oct 2013 00:02:45 +0000 (00:02 +0000)] 
Use POST / DELETE to toggle ARI bridge moh

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

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

11 years agobridge_native_dahdi: Return channel join failure if could not make the channels compa...
Richard Mudgett [Tue, 15 Oct 2013 20:25:37 +0000 (20:25 +0000)] 
bridge_native_dahdi: Return channel join failure if could not make the channels compatible.

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

11 years agoEnsure bridge record error responses validate
Kinsey Moore [Tue, 15 Oct 2013 20:02:08 +0000 (20:02 +0000)] 
Ensure bridge record error responses validate

This adds the list of expected errors to the /bridges/{bridgeId}/record
ARI documentation so that outbound 4xx errors validate properly.
Previously, this would result in a response validation failure.

(closes issue ASTERISK-22627)
Reported by: Joshua Colp

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

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

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

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

11 years agoUse POST / DELETE to toggle hold / moh for ARI channels
Paul Belanger [Tue, 15 Oct 2013 15:26:17 +0000 (15:26 +0000)] 
Use POST / DELETE to toggle hold / moh for ARI channels

This change updates how we handle toggle events, rather then create two
different function names, we'll just use POST / DELETE from HTTP to handle it.

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

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

11 years agoPrevent chan_sip from sending duplicate BYEs.
Mark Michelson [Tue, 15 Oct 2013 15:21:56 +0000 (15:21 +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
........

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

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

11 years agoMy doc correction in r400842 had a silly bug.
David M. Lee [Tue, 15 Oct 2013 13:43:05 +0000 (13:43 +0000)] 
My doc correction in r400842 had a silly bug.

Because I added a wiki_description to models and not their properties, the
rendered wiki page had the model description instead of the property
descriptions, which looks very silly indeed.

(closes issue ASTERISK-22705)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400958 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:55:07 +0000 (21:55 +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
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400911 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:52:24 +0000 (21:52 +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
........

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

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

11 years agopjsip outbound registration: Log message says received a 408 when we didn't
Kevin Harwell [Mon, 14 Oct 2013 15:52:28 +0000 (15:52 +0000)] 
pjsip outbound registration: Log message says received a 408 when we didn't

If the server didn't exist that we are trying to register to the log message
would say that a 408 was received from that server when in reality one wasn't.
Added log messages stating no response was received if the response does not
exist.

(closes issue ASTERISK-22554)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2893/

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

11 years agoRemove duplicate module info block
Matthew Jordan [Mon, 14 Oct 2013 14:57:40 +0000 (14:57 +0000)] 
Remove duplicate module info block

The module info block was repeated twice. Once is sufficient.

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

11 years agoFix a race condition in res_pjsip_session with rapidly terminating the session.
Joshua Colp [Sun, 13 Oct 2013 15:41:37 +0000 (15:41 +0000)] 
Fix a race condition in res_pjsip_session with rapidly terminating the session.

The INVITE session state callback wrongly assumes that a session will always exist, but
when rapidly terminating the session this assumption goes out the window. As all handler
code for the INVITE session state callback requires the session it will now just exit
immediately if no session exists.

(closes issue ASTERISK-22668)
Reported by: John Bigelow

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

11 years agoFix realm comparison for outbound auth
Kinsey Moore [Sat, 12 Oct 2013 16:49:00 +0000 (16:49 +0000)] 
Fix realm comparison for outbound auth

When generating the list of authentication credentials to pass to
PJSIP, Asterisk was using the raw pointer of a pj_str_t which is not
always NULL-terminated. This sometimes resulted in incorrect text for
the realm and a failure to match the realm for authentication purposes
which was causing the outbound nominal auth pjsip basic call test to
bounce. This now uses the pj_str_t that contains the realm instead of
generating a new one. Thanks to John Bigelow for helping to narrow this
down.

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

11 years agochannel.h: whitespace changes.
Richard Mudgett [Fri, 11 Oct 2013 16:53:14 +0000 (16:53 +0000)] 
channel.h: whitespace changes.

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

11 years agoSoftmix: Fix crash when switching from softmix to another bridge technology.
Richard Mudgett [Fri, 11 Oct 2013 16:25:05 +0000 (16:25 +0000)] 
Softmix: Fix crash when switching from softmix to another bridge technology.

The crash is caused by a race condition when switching between native RTP
and softmix bridging technologies.  In this situation, the bridging
technology is switched from native RTP to softmix, and then back to native
RTP fast enough that the softmix private data gets destroyed before the
softmix mixing thread gets started.

Thanks to Kinsey Moore for the crash analysis.

* Fix race condition when starting the softmix mixing thread and switching
to another bridge technology.

(closes issue ASTERISK-22678)
Reported by: John Bigelow
Patches:
      jira_asterisk_22678_v12.patch (license #5621) patch uploaded by rmudgett
Tested by: John Bigelow

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

11 years agoFix a stupid copy/paste error in ARI docs.
David M. Lee [Fri, 11 Oct 2013 16:18:46 +0000 (16:18 +0000)] 
Fix a stupid copy/paste error in ARI docs.

Patches:
    ari-doc-patch.txt uploaded by jbigelow (license 5091)

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

11 years agoUpdated /play resource docs. The playback of http: resources isn't implemented.....
David M. Lee [Thu, 10 Oct 2013 19:26:19 +0000 (19:26 +0000)] 
Updated /play resource docs. The playback of http: resources isn't implemented... yet

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

11 years agoCorrect some ARI wiki rendering errors
David M. Lee [Thu, 10 Oct 2013 19:23:24 +0000 (19:23 +0000)] 
Correct some ARI wiki rendering errors

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

11 years agoPerform validation of permanent contacts on AORs in res_pjsip.
Joshua Colp [Thu, 10 Oct 2013 18:21:07 +0000 (18:21 +0000)] 
Perform validation of permanent contacts on AORs in res_pjsip.

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

11 years agoFix an assertion in res_pjsip when specifying an invalid outbound proxy.
Joshua Colp [Thu, 10 Oct 2013 12:25:44 +0000 (12:25 +0000)] 
Fix an assertion in res_pjsip when specifying an invalid outbound proxy.

This change fixes two issues when setting an outbound proxy:

1. The outbound proxy URI was not parsed and validated during configuration.
2. If an outgoing dialog was created and the outbound proxy could not be set an assertion would
occur because the usage count on the dialog was not decremented.

The documentation has also been updated to specify that a full URI must be specified for
the outbound proxy.

(closes issue ASTERISK-22672)
Reported by: Antti Yrjola

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

11 years agoUse 'z' as the format specifier for size_t
Matthew Jordan [Wed, 9 Oct 2013 11:00:47 +0000 (11:00 +0000)] 
Use 'z' as the format specifier for size_t

Using 'lu' will produce a compiler warning for some versions of gcc and on some
architectures. 'z' should be portable as a format specifier for size_t.

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

11 years agoAdd PJSIP_HEADER function for manipulation of SIP headers in the PJSIP stack
Matthew Jordan [Tue, 8 Oct 2013 22:58:04 +0000 (22:58 +0000)] 
Add PJSIP_HEADER function for manipulation of SIP headers in the PJSIP stack

This patch adds support to the PJSIP stack in Asterisk for SIP header
manipulation. Note that this is analagous to SIPAddHeader/SIPRemoveHeader.

For PJSIP_HEADER, an incoming supplemental session callback is registered that
takes the pjsip_hdrs from the incoming session and stores them in a linked
list in the session datastore.  Calls to PJSIP_HEADER traverse over the list
and return the nth matching header where 'n' is the 'number' argument to the
function.

When adding a header, the first call creates a datastore and linked list and
adds the datastore to the session.  The header is then created as a pjsip_hdr
and added to the list.  An outgoing supplemental session callback then
traverses the list and adds the headers to the outgoing pjsip_msg.

When removing a header, the list created with PJSIP_HEADER(add,...) is
traversed and all matching entries are removed.

(closes issue ASTERISK-22498)
Reported by: George Joseph
patch:
  res_pjsip_header_funcs_v1.patch uploaded by george.joseph (License 6322)

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

11 years agoAdd warning when compiling with iODBC support
Kinsey Moore [Tue, 8 Oct 2013 22:30:37 +0000 (22:30 +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
........

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

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

11 years agoapp_agent_pool: Fix AMI/CLI AgentLogoff soft preventing agents from logging back in.
Richard Mudgett [Tue, 8 Oct 2013 21:19:17 +0000 (21:19 +0000)] 
app_agent_pool: Fix AMI/CLI AgentLogoff soft preventing agents from logging back in.

* Clear the deferred_logoff flag when an agent logs in.

(closes issue ASTERISK-22669)
Reported by: John Bigelow

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

11 years agoSwitch from using pjsip_strerror to pj_strerror.
Mark Michelson [Tue, 8 Oct 2013 20:51:21 +0000 (20:51 +0000)] 
Switch from using pjsip_strerror to pj_strerror.

pjsip_strerror is only aware of PJSIP-specific error
codes. pj_strerror() is aware of all PJProject error
codes and OS-specific error codes.

This specifically fixes an oft-seen error in transport
configuration code where EADDRINUSE would result in
"Unknown PJSIP error 120098" instead of a useful
message.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400749 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:16:55 +0000 (20:16 +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
........

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

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

11 years agoapp_confbridge: Fix duplicate default_user profile.
Richard Mudgett [Tue, 8 Oct 2013 19:12:03 +0000 (19:12 +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. :)
........

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

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

11 years agoFix func_config list entry allocation
Kinsey Moore [Tue, 8 Oct 2013 18:19:23 +0000 (18:19 +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
........

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

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

11 years agoFix STUN crash when using IPv6 any address
Kinsey Moore [Tue, 8 Oct 2013 15:44:04 +0000 (15:44 +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)
........

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

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

11 years agoPush CLI qualify into the threadpool.
Mark Michelson [Tue, 8 Oct 2013 15:36:08 +0000 (15:36 +0000)] 
Push CLI qualify into the threadpool.

If you run Asterisk in the background and then connect to
it through a separate console, the thread that runs CLI commands
is not registered with PJLIB. Thus PJLIB does not like it when
you attempt to send OPTIONS requests from that thread. So now
we push the task into the threadpool, which we know to be registered
with PJLIB.

Thanks to Antti Yrjola for reporting this.

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

11 years agoMake app_queue and res_agi independent of AMI being enabled.
Richard Mudgett [Tue, 8 Oct 2013 15:11:04 +0000 (15:11 +0000)] 
Make app_queue and res_agi independent of AMI being enabled.

The https://reviewboard.asterisk.org/r/2888/ review changes manager to not
subscribe to stasis when it is disabled for performance reasons.  When
manager is disabled app_queue and res_agi decline to load and fail to
clean up what they have already allocated.

* Made app_queue and res_agi clean up allocated resources when they
decline to load.

* Made app_queue and res_agi use their own subscriptions to the stasis
topics instead of borrowing manager's message router structure
inappropriately.

(closes issue ASTERISK-22604)
Reported by: rmudgett

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

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

11 years agoMiscellaneous stand alone comment cleanups.
Richard Mudgett [Mon, 7 Oct 2013 15:37:16 +0000 (15:37 +0000)] 
Miscellaneous stand alone comment cleanups.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400661 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:11:24 +0000 (17:11 +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
........

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

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

11 years agochan_iax2: Fix compile error.
Richard Mudgett [Sat, 5 Oct 2013 00:41:32 +0000 (00:41 +0000)] 
chan_iax2: Fix compile error.

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

11 years agoAdd IPv6 Support To chan_iax2
Michael L. Young [Fri, 4 Oct 2013 21:40:33 +0000 (21:40 +0000)] 
Add IPv6 Support To chan_iax2

This patch adds IPv6 support to chan_iax2.  Yay!

(closes issue ASTERISK-22025)
Patches:
  iax2-ipv6-v5-reviewboard.diff by Michael L. Young (license 5026)

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

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

11 years agoAdded missing file from r400522
David M. Lee [Fri, 4 Oct 2013 19:31:35 +0000 (19:31 +0000)] 
Added missing file from r400522

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

11 years agochan_pjsip: Make logger togglable without loading/unloading
Jonathan Rose [Fri, 4 Oct 2013 18:42:06 +0000 (18:42 +0000)] 
chan_pjsip: Make logger togglable without loading/unloading

This patch makes the res_pjsip_logger do a few things... First, it
will be built and installed by default now, so end users won't need
to enable it in menuselect. Second, while it is loaded, it no longer
will immediately issue log messages. Upon loading, it is in the
disabled state and must be turned on with the new CLI command. The
CLI command 'pjsip set logger <on/off/host> has been added and can be
used to do the following:
pjsip set logger on:
    Enables logger for all PJSIP traffic
pjsip set logger off:
    Disables logger for all PJSIP traffic
pjsip set logger host <host>:
    Enables logger for the specific host

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

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

11 years agochan_pjsip: Add alembic scripts for generating db tables for PJSIP
Jonathan Rose [Fri, 4 Oct 2013 17:10:27 +0000 (17:10 +0000)] 
chan_pjsip: Add alembic scripts for generating db tables for PJSIP

Also updates sample configurations for sorcery and extconfig to
demonstrate how to use databases created by that alembic script.

(closes issue ASTERISK-22133)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2892/

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

11 years agoARI: Add subscription support
Matthew Jordan [Fri, 4 Oct 2013 15:54:57 +0000 (15:54 +0000)] 
ARI: Add subscription support

This patch adds an /applications API to ARI, allowing explicit management of
Stasis applications.

 * GET /applications - list current applications
 * GET /applications/{applicationName} - get details of a specific application
 * POST /applications/{applicationName}/subscription - explicitly subscribe to
   a channel, bridge or endpoint
 * DELETE /applications/{applicationName}/subscription - explicitly unsubscribe
   from a channel, bridge or endpoint

Subscriptions work by a reference counting mechanism: if you subscript to an
event source X number of times, you must unsubscribe X number of times to stop
receiveing events for that event source.

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

(issue ASTERISK-22451)
Reported by: Matt Jordan

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

11 years agoEnclose the To URI and update its user portion if a request user has been specified.
Joshua Colp [Fri, 4 Oct 2013 15:48:34 +0000 (15:48 +0000)] 
Enclose the To URI and update its user portion if a request user has been specified.

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

11 years agoReplace the connection address at the SDP level if altering the SDP with the external...
Joshua Colp [Fri, 4 Oct 2013 14:54:32 +0000 (14:54 +0000)] 
Replace the connection address at the SDP level if altering the SDP with the external media address.

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

11 years agoCorrected response class for stopPlayback
David M. Lee [Fri, 4 Oct 2013 04:54:51 +0000 (04:54 +0000)] 
Corrected response class for stopPlayback

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400508 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 23:11:24 +0000 (23:11 +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
........

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

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

11 years agoRemove publication of a channel snapshot when the technology is set
Matthew Jordan [Thu, 3 Oct 2013 21:40:20 +0000 (21:40 +0000)] 
Remove publication of a channel snapshot when the technology is set

This patch removes said publication for a few reasons:
(1) It is unnecessary. Association of the channel technology with a specific
channel is an implementation detail that should be assumed to "just happen",
and consumers of Stasis don't need to be informed about it.
(2) Publication of said message can now cause crashes, as the actual creation
of a channel in normal locations now stages its messages. As a result, things
that create dummy channels (such as the SIP RTP QOS unit test) and associate
them with a channel technology were now crashing, as the channel itself was
not known by Stasis.

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

11 years agoWhen serializing CDR variables (like for "core show channels") don't output an error...
Joshua Colp [Thu, 3 Oct 2013 19:31:43 +0000 (19:31 +0000)] 
When serializing CDR variables (like for "core show channels") don't output an error if CDRs aren't enabled.

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

11 years agoFix security events for AMI invalid password
Kinsey Moore [Thu, 3 Oct 2013 19:29:49 +0000 (19:29 +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
........

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

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

11 years agoFix assumption in bridge_native_rtp.c regarding number of participants in a bridge.
Mark Michelson [Thu, 3 Oct 2013 19:11:22 +0000 (19:11 +0000)] 
Fix assumption in bridge_native_rtp.c regarding number of participants in a bridge.

When a party leaves a bridge, there may be more participants in the bridge than expected.
As such, it is important not to make assumptions regarding the list of channels in a
bridge.

This change makes it so that when a party leaves a native RTP bridge, we unbridge it and
the party it was bridged with. Previously, the first and last channels in the list were
unbridged since it was assumed that these were the two channels that had been bridged. As
previously stated, a new party had been inserted into the bridge, so this logic did not
work properly.

(closes issue ASTERISK-22615)
reported by Matt Jordan

(closes issue ASTERISK-22532)
reported by Matt Jordan

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

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

11 years agoFix a crash caused by muting and unmuting a channel in ARI without specifying a direc...
Joshua Colp [Thu, 3 Oct 2013 19:05:36 +0000 (19:05 +0000)] 
Fix a crash caused by muting and unmuting a channel in ARI without specifying a direction.

(closes issue ASTERISK-22637)
Reported by: Scott Griepentrog

Patch by Matt Jordan, whose office I have taken over in the name of Canada.

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

11 years agocel: Some whitespace cleanups
Richard Mudgett [Thu, 3 Oct 2013 18:44:10 +0000 (18:44 +0000)] 
cel: Some whitespace cleanups

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

11 years agores_rtp_multicast: Ensure SSRC is set properly
Kinsey Moore [Thu, 3 Oct 2013 18:28:57 +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
........

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

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

11 years agoDetect and use xsltCleanupGlobals when available
Kinsey Moore [Thu, 3 Oct 2013 17:57:49 +0000 (17:57 +0000)] 
Detect and use xsltCleanupGlobals when available

This introduces usage of an additional libxslt cleanup function,
xsltCleanupGlobals, when the configure script detects that it is
available. Early versions of the library did not include this function.

(closes issue ASTERISK-22570)
Reported by: Corey Farrell
Patches:
    xsltCleanupGlobals.patch uploaded by Corey Farrell (License 5909)

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

11 years agoUpdate Alembic database scripts for external scripting and PostgreSQL, Oracle
Matthew Jordan [Thu, 3 Oct 2013 17:55:50 +0000 (17:55 +0000)] 
Update Alembic database scripts for external scripting and PostgreSQL, Oracle

This patch does the following:
1) The env scripts have been updated to be tolerant of a NULL configuration
   file. This occurs when configuration is provided by an external script,
   such that the actual config.ini file is not used.
2) Enum types have all been given names. This is needed for PostgreSQL script
   generation.
3) The identifier meetme_confno_starttime_endtime is greater than 30
   characters, and hence invalid for Oracle databases. This has been truncated
   down to meetme_confno_start_end.

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

11 years agochan_vpb: Make compile again.
Richard Mudgett [Thu, 3 Oct 2013 16:22:45 +0000 (16:22 +0000)] 
chan_vpb: Make compile again.

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

11 years agoGet rid of uses of stasis_topic_wait()
Mark Michelson [Thu, 3 Oct 2013 14:56:30 +0000 (14:56 +0000)] 
Get rid of uses of stasis_topic_wait()

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

11 years agoFix crashes in res_pjsip_sdp_rtp and res_pjsip_t38 when a stream is rejected and...
Joshua Colp [Thu, 3 Oct 2013 14:51:41 +0000 (14:51 +0000)] 
Fix crashes in res_pjsip_sdp_rtp and res_pjsip_t38 when a stream is rejected and external_media_address is set.

The callback function for changing the media address in streams wrongly assumes that a connection line
will always be present. This is false as no line is present if a stream has been rejected.

(closes issue ASTERISK-22645)
Reported by: Rusty Newton

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

11 years agoCache string values of formats on ast_format_cap() to save processing.
Mark Michelson [Wed, 2 Oct 2013 22:34:05 +0000 (22:34 +0000)] 
Cache string values of formats on ast_format_cap() to save processing.

Channel snapshots have string representations of the channel's native formats.
Prior to this change, the format strings were re-created on ever channel snapshot
creation. Since channel native formats rarely change, this was very wasteful.
Now, string representations of formats may optionally be stored on the ast_format_cap
for cases where string representations may be requested frequently. When formats
are altered, the string cache is marked as invalid. When strings are requested, the
cache validity is checked. If the cache is valid, then the cached strings are copied.
If the cache is invalid, then the string cache is rebuilt and copied, and the cache
is marked as being valid again.

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

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

11 years agoRemove svn:mergeinfo property.
Mark Michelson [Wed, 2 Oct 2013 22:10:54 +0000 (22:10 +0000)] 
Remove svn:mergeinfo property.

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

11 years agoRemove unnecessary waits from stasis.
Mark Michelson [Wed, 2 Oct 2013 22:08:49 +0000 (22:08 +0000)] 
Remove unnecessary waits from stasis.

Since caches are updated on publisher threads, there is no need
to wait for the cache updates to occur after a stasis message
is published.

In the case of chan_pjsip device state changes, this set of
changes caused an improvement to performance.

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

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

11 years agoCast Integer Argument To Unsigned Char
Michael L. Young [Wed, 2 Oct 2013 21:32:53 +0000 (21:32 +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
........

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

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

11 years agoOnly create Stasis subscriptions when enabled
Matthew Jordan [Wed, 2 Oct 2013 21:25:50 +0000 (21:25 +0000)] 
Only create Stasis subscriptions when enabled

Subscribing to Stasis isn't free.

As such, this patch makes AMI, CDR, and CEL - the "big 3" - only subscribe
when enabled. Toggling their availability via a .conf file will
unsubscribe/subscribe as appropriate.

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

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

11 years agoOriginate: Make setting caller id on outgoing call use either name or number.
Richard Mudgett [Wed, 2 Oct 2013 20:30:07 +0000 (20:30 +0000)] 
Originate: Make setting caller id on outgoing call use either name or number.

Previous code was requiring both name and number to be available.

Also restored a comment block on why caller id is also set on an outgoing
call leg in addition to connected line from earlier versions of Asterisk.

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

11 years agoCorrect allowable values for ARI general information filter
Kinsey Moore [Wed, 2 Oct 2013 19:19:25 +0000 (19:19 +0000)] 
Correct allowable values for ARI general information filter

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

11 years agoFix the CDR CLI command 'cdr show active {channel}'
Matthew Jordan [Wed, 2 Oct 2013 18:57:15 +0000 (18:57 +0000)] 
Fix the CDR CLI command 'cdr show active {channel}'

When the switch from channel names to channel unique IDs happened, the poor
CLI command got left in the dust. This fixes the command so that users can
once again see how Asterisk is messing up your billing information.

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

11 years agoFix a crash in res_pjsip_t38 caused by the wrong assumption that a session will alway...
Joshua Colp [Wed, 2 Oct 2013 18:42:41 +0000 (18:42 +0000)] 
Fix a crash in res_pjsip_t38 caused by the wrong assumption that a session will always have a channel.

When starting up or shutting down this assumption is false.

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

11 years agoman pages for astdb2bdb and astdb2sqlite3
Tzafrir Cohen [Wed, 2 Oct 2013 18:25:16 +0000 (18:25 +0000)] 
man pages for astdb2bdb and astdb2sqlite3

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

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

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

11 years agoMALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.
Richard Mudgett [Wed, 2 Oct 2013 17:11:42 +0000 (17:11 +0000)] 
MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.

* There were several places in ARI where an external library was mallocing
memory that must always be released with free().  When MALLOC_DEBUG is
enabled, free() is redirected to the MALLOC_DEBUG version.  Since the
external library call still uses the normal malloc(), MALLOC_DEBUG
complains that the freed memory block is not registered and will not free
it.  These cases must use ast_std_free().

* Changed calls to asprintf() and vasprintf() to the equivalent
ast_asprintf() and ast_vasprintf() versions respectively.

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

11 years agosig_ss7: Fix compiler warnings.
Richard Mudgett [Wed, 2 Oct 2013 17:05:13 +0000 (17:05 +0000)] 
sig_ss7: Fix compiler warnings.

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

11 years agoReduce channel snapshot creation and publishing by up to 50%.
Joshua Colp [Wed, 2 Oct 2013 16:20:25 +0000 (16:20 +0000)] 
Reduce channel snapshot creation and publishing by up to 50%.

This change introduces the ability to stage channel snapshot
creation and publishing by suppressing the implicit creation
and publishing that some functions have. Once all operations
are executed the staging is marked as done and a single snapshot
is created and published.

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

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

11 years agoFix a random one way audio issue in PJSIP.
Joshua Colp [Wed, 2 Oct 2013 15:31:31 +0000 (15:31 +0000)] 
Fix a random one way audio issue in PJSIP.

Due to the asynchronous design of the PJMEDIA SDP negotiator it was possible for
the SDP to be negotiated *after* a channel was created and after it was being wait
on by an application. It is only after negotiation occurs that the file descriptors
for RTP are placed on the channel. Since the channel was already being waited on
these file descriptors were not monitored, causing incoming media to never be read.

This change wakes up any application waiting on the channel so that added file
descriptors end up being monitored.

(closes issue AST-1227)
Reported by: John Bigelow

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

11 years agoAllow specifying a channel to dial an extension and context in an ARI dial operation.
Joshua Colp [Wed, 2 Oct 2013 15:22:54 +0000 (15:22 +0000)] 
Allow specifying a channel to dial an extension and context in an ARI dial operation.

(issue ASTERISK-22625)
Reported by: Scott Griepentrog

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

11 years agoRetrieve and store the hostname only once so multiple threads do not potentially...
Joshua Colp [Wed, 2 Oct 2013 14:13:08 +0000 (14:13 +0000)] 
Retrieve and store the hostname only once so multiple threads do not potentially initialize it at the same time.

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

11 years agochan_dahdi: Fix analog parking using flash-hook.
Richard Mudgett [Tue, 1 Oct 2013 21:17:56 +0000 (21:17 +0000)] 
chan_dahdi: Fix analog parking using flash-hook.

Transferring an analog call using a flash-hook to parking would fail to
park the call and result in an invalid ao2 object unref.

* Park the correct bridged channel.

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

11 years agoFeatures: Rearm the parking config options have moved warning for each reload.
Richard Mudgett [Tue, 1 Oct 2013 16:34:51 +0000 (16:34 +0000)] 
Features: Rearm the parking config options have moved warning for each reload.

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

11 years agoFilter out internal channels for bridge leave messages and parked call messages
Matthew Jordan [Tue, 1 Oct 2013 15:48:42 +0000 (15:48 +0000)] 
Filter out internal channels for bridge leave messages and parked call messages

Granted, if you manage to park a Conference announcer channel, something has
gone horrifically wrong.

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

11 years agoconfiguration samples: Pull all parking related stuff out of features.conf
Jonathan Rose [Mon, 30 Sep 2013 21:31:54 +0000 (21:31 +0000)] 
configuration samples: Pull all parking related stuff out of features.conf

This patch also adds documentation for parking from features.conf to
res_parking.conf

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

11 years agoParse arguments passed to the CDR_PROP function correctly
Matthew Jordan [Mon, 30 Sep 2013 19:57:36 +0000 (19:57 +0000)] 
Parse arguments passed to the CDR_PROP function correctly

I can only blame this on a bad merge, because this in no way worked properly
the way it was written. Mea culpa. The function should now parse its arguments
correctly and function properly. (Note that the API used by the CDR_PROP
function has working unit tests... this was merely bad coding of the actual
registered function)

(closes issue ASTERISK-22613)
Reported by: Private Name

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

11 years agoRemove spurious event raised when CDRs are reloaded
Matthew Jordan [Mon, 30 Sep 2013 19:44:54 +0000 (19:44 +0000)] 
Remove spurious event raised when CDRs are reloaded

The Reload event is now raised by the module loading core. As such, the Reload
event in the CDR engine was a duplicate and not needed.

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