Commit Graph

25328 Commits

Author SHA1 Message Date
Richard Mudgett
5ce91ec687 app_confbridge: Fix ref leak in CLI "confbridge kick" command.
Fixed ref leak in the CLI "confbridge kick" command when the channel to be
kicked was not in the conference.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 20:34:58 +00:00
Mark Michelson
9ca83558ef Fix encoding of custom prepare extra data.
Patches:
	res_config_odbc-take2.patch by John Hardin (License #6512)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 17:50:52 +00:00
Mark Michelson
5bb7b34385 Improve XML sanitization in NOTIFYs, especially for presence subtypes and messages.
Embedded carriage return line feed combinations may appear in presence subtypes
and messages since they may be derived from user input in an instant messenger
client. As such, they need to be properly escaped so that XML parsers do not
vomit when the messages are received.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 22:00:31 +00:00
Mark Michelson
168d9ccc04 Check for an act on failures to update contacts during registration.
There was an underlying issue in a realtime backend where database updates
would fail. Since we were not checking for failure, we would end up in a
strange state where the old database entry was still present but Asterisk
thought that it had been updated. Now when an entry fails to update, we
print a warning and delete the old contact from sorcery so there is no
mismatch between foreground and backend state.

Patches:
	res_pjsip_registrar.patch by John Hardin (License #6512)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 17:46:44 +00:00
Mark Michelson
9534a884c5 Ensure that all parts of SQL UPDATEs and DELETEs are encoded.
Patches:
	res_config_odbc.patch by John Hardin (License #6512)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 17:05:19 +00:00
Mark Michelson
75515f9474 Correct variable traversal logic in res_config_odbc's update_odbc function.
Closes issue ASTERISK-23675
Reported by Leando Dardini
Patches:
	asterisk-23675-odbc-linkedlist-traversal_12.diff uploaded by Michael L. Young (license #5026)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:35:16 +00:00
Mark Michelson
92a0e5b593 Prevent crashes in res_config_odbc due to uninitialized string fields.
Patches:
    odbc-crash.patch by John Hardin (License #6512)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:27:05 +00:00
Mark Michelson
85f4843bb0 Return the number of rows affected by a SQL insert, rather than an object ID.
The realtime API specifies that the store callback is supposed to return the number
of rows affected. res_config_pgsql was instead returning an Oid cast as an int, which
during any nominal execution would be cast to 0. Returning 0 when more than 0 rows were
inserted causes problems to the function's callers.

To give an idea of how strange code can be, this is the necessary code change to fix
a device state issue reported against chan_pjsip in Asterisk 12+. The issue was that
the registrar would attempt to insert contacts into the database. Because of the 0
return from res_config_pgsql, the registrar would think that the contact was not successfully
inserted, even though it actually was. As such, even though the contact was query-able
and it was possible to call the endpoint, Asterisk would "think" the endpoint was unregistered,
meaning it would report the device state as UNAVAILABLE instead of NOT_INUSE.

The necessary fix applies to all versions of Asterisk, so even though the bug reported
only applies to Asterisk 12+, the code correction is being inserted into 1.8+.

Closes issue ASTERISK-23707
Reported by Mark Michelson
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:02:53 +00:00
Richard Mudgett
44d19433d9 res_pjsip_refer: Add Referred-By header on INVITE for blind transfers.
Per rfc3892, the Referred-By header in a REFER must be copied into the
referenced request (IE.  The outgoing INVITE to the transfer target).

* Automatically put the Referred-By header in the outgoing INVITE message
if the SIPREFERREDBYHDR channel variable is defined with a value.

* Made chan_sip.c:get_refer_info() set SIPREFERREDBYHDR for inheritance so
chan_pjsip has a better chance to interoperate.

* Fixed refer_blind_callback() and refer_incoming_refer_request() to not
modify the data in the pointer returned by pjsip_msg_find_hdr_by_name().
It seems wrong to modify that data since the calling routine doesn't own
the buffer.

ASTERISK-23501 #close
Reported by: John Bigelow

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 16:33:59 +00:00
Jonathan Rose
0531dd81d4 Parking: Add 'AnnounceChannel' argument to manager action 'Park'
(closes ASTERISK-23397)
Reported by: Denis
Review: https://reviewboard.asterisk.org/r/3446/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 15:58:27 +00:00
Mark Michelson
44b5ac115f Remove unnecessary repetition checks from res_pjsip_exten_state
The PBX core already takes care of ensuring that repeated state changes
are not communicated to exten state consumers. Because the check in res_pjsip_exten_state
was incomplete, it was causing valid presence state changes not to be sent out. For instance,
if the presence state did not change but the message or subtype did, then no presence-related
NOTIFY request would be sent out.

closes issue ASTERISK-23672
Reported by Mark Michelson



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-01 15:41:43 +00:00
Joshua Colp
37dc0e9623 res_pjsip: Add the ability to configure ciphers based on name.
Previously this code would only accept the OpenSSL identifier instead
of the documented name.

ASTERISK-23498 #close
ASTERISK-23498 #comment Reported by: Anthony Messina

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-01 12:30:43 +00:00
Richard Mudgett
a136fc1cae chan_sip.c: Fixed off-nominal message iterator ref count and alloc fail issues.
* Fixed early exit in sip_msg_send() not destroying the message iterator.

* Made ast_msg_var_iterator_next() and ast_msg_var_iterator_destroy()
tolerant of a NULL iter parameter in case ast_msg_var_iterator_init()
fails.

* Made ast_msg_var_iterator_destroy() clean up any current message data
ref.

* Made struct ast_msg_var_iterator, ast_msg_var_iterator_init(),
ast_msg_var_iterator_next(), ast_msg_var_unref_current(), and
ast_msg_var_iterator_destroy() use iter instead of i.

* Eliminated RAII_VAR usage in res_pjsip_messaging.c:vars_to_headers().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 20:47:24 +00:00
Joshua Colp
d7956cdb83 chan_pjsip: Fix deadlock when retrieving call-id of channel.
If a task was in-flight which required the channel or bridge lock
it was possible for the synchronous task retrieving the call-id
to deadlock as it holds those locks.

After discussing with Mark Michelson the synchronous task was
removed and the call-id accessed directly. This should be safe as
each object involved is guaranteed to exist and the call-id will
never change.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 20:38:35 +00:00
Kinsey Moore
064601a7ed Websocket: Add session locking and delay close
This resolves a race condition where data could be written to a NULL
FILE pointer causing a crash as a websocket connection was in the
process of shutting down by adding locking to websocket session writes
and by deferring session teardown until session destruction.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 13:06:47 +00:00
Joshua Colp
2fa93ecfdc res_stasis: Add progress indications to operations which perform media.
This change fixes operations which did not account for the fact that they may
be executed on channels which have not been answered. These operations will
now indicate progress when invoked.

ASTERISK-23560 #close
ASTERISk-23560 #comment Reported by: Jan Svoboda

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 12:41:55 +00:00
Joshua Colp
17b171965f res_pjsip_sdp_rtp: Fix issue where sending a hold SDP twice could cause an unhold.
This change fixes a bug where if an SDP with media address and sendonly was
received twice the underlying call would go off hold, instead of remaining on hold.
This occured because the code did not properly take into account that the SDP
may contain both a valid media address and the sendonly attribute.

The code now examines the sendonly attribute and media address first, so if the
SDP is received again no change will occur.

ASTERISK-23558 #comment Reported by: John Bigelow

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 12:38:07 +00:00
Joshua Colp
15579da128 chan_pjsip: Add support for picking up calls in the configured pickup group.
AST-1363

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 12:31:07 +00:00
George Joseph
492c828a54 Add "destroy" implementation for spinlock.
The original commit for spinlock was missing "destroy" implementations.
Most of them are no-ops but phtread_spin and pthread_mutex do need their
locks destroyed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-29 15:09:11 +00:00
Joshua Colp
8727cb1435 chan_pjsip: Implement core ability to get Call-ID of a channel.
This changes implement the "get_pvt_uniqueid" which is used to return the
technology specific unique identifier. In the case of SIP this is the Call-ID
of the dialog.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-29 11:19:05 +00:00
Kinsey Moore
99261bc371 Bridging: Don't lock NULL bridges
When bridge locking was added for bridge snapshot creation, some
locations where bridge locking was added were not guaranteed to
actually have a bridge and locking NULL AO2 objects tends to cause
segfaults. This ensures that NULL bridges aren't locked.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-28 20:01:02 +00:00
Matthew Jordan
ccba84047e res_rtp_asterisk: Add support for DTLS handshake retransmissions
On congested networks, it is possible for the DTLS handshake messages to get
lost. This patch adds a timer to res_rtp_asterisk that will periodically
check to see if the handshake has succeeded. If not, it will retransmit the
DTLS handshake.

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

ASTERISK-23649 #close
Reported by: Nitesh Bansal
patches:
  dtls_retransmission.patch uploaded by Nitesh Bansal (License 6418)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-25 17:48:19 +00:00
Kevin Harwell
8ad8ffeb81 pjsip realtime: increase the size of some columns
The string lengths on certain columns created through alembic for PJSIP were
too short. For instance, columns containing URIs are currently set to 40
characters, but this can be too small and result in truncated values.  Added
an alembic migration script that increases the size of these columns and a
few others to 255.

ASTERISK-23639 #close
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/3475/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-24 14:37:11 +00:00
George Joseph
9400ad29ee This patch adds support for spinlocks in Asterisk.
There are cases in Asterisk where it might be desirable to lock
a short critical code section but not incur the context switch
and yield penalty of a mutex or rwlock.  The primary spinlock
implementations execute exclusively in userspace and therefore
don't incur those penalties.  Spinlocks are NOT meant to be a
general replacement for mutexes.  They should be used only for
protecting short blocks of critical code such as simple compares
and assignments.  Operations that may block, hold a lock, or
cause the thread to give up it's timeslice should NEVER be
attempted in a spinlock.

The first use case for spinlocks is in astobj2 - internal_ao2_ref.
Currently the manipulation of the reference counter is done with
an ast_atomic_fetchadd_int which works fine.  When weak reference
containers are introduced however, there's an additional comparison
and assignment that'll need to be done while the lock is held.
A mutex would be way too expensive here, hence the spinlock.
Given that lock contention in this situation would be infrequent,
the overhead of the spinlock is only a few more machine instructions
than the current ast_atomic_fetchadd_int call.

ASTERISK-23553 #close
Review: https://reviewboard.asterisk.org/r/3405/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-23 20:06:03 +00:00
Richard Mudgett
7ac2e15e77 http: Fix spurious ERROR message in responses with no content.
Backport -r411687 and fix the fix because content_length is the length of
out plus the length of the file controlled by fd.

When a response has an out content length of 0, fwrite would be called to
write a buffer with no data in it.  This resulted in the following classic
error message:

  [Apr  3 11:49:17] ERROR[26421] http.c: fwrite() failed: Success

This patch makes it so that we only attempt to write the content of out if
the out string is non-zero.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-23 18:00:40 +00:00
Joshua Colp
11858be68c res_stasis: Fix crash when handling a failed blind transfer message.
This changes fixes a crash that occurs when stasis determines if it
should send a message out to an application or not. The code
incorrectly assumed that a bridge snapshot would always be present
when in reality for failure cases it may not be.

ASTERISK-23573 #close


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-22 10:09:03 +00:00
Jonathan Rose
19a64d582f chan_sip: trust_id_outbound CHANGES message improvement
(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 17:54:57 +00:00
Jonathan Rose
7f940e3a7d Blocked revisions 412767
........
Typo in CHANGES
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 16:23:27 +00:00
Kinsey Moore
5b5323ad13 HTTP: Add TCP_NODELAY to accepted connections
This adds the TCP_NODELAY option to accepted connections on the HTTP
server built into Asterisk. This option disables the Nagle algorithm
which controls queueing of outbound data and in some cases can cause
delays on receipt of response by the client due to how the Nagle
algorithm interacts with TCP delayed ACK. This option is already set on
all non-HTTP AMI connections and this change would cover standard HTTP
requests, manager HTTP connections, and ARI HTTP requests and
websockets in Asterisk 12+ along with any future use of the HTTP
server.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 16:15:34 +00:00
Jonathan Rose
ea0325599a chan_sip: Add sendrpid trust options
In r411189, some behavior was changed which made sendrpid behavior
act in a more trusting manner by sending full user data for peers
set with private caller presence in P-Asserted-Identity headers.
Since this changed long time expected behaviors, we decided to pull
that patch when that was pointed out by the community. Instead, this
patch provides a trust_id_outbound setting which will expose the data
per RFC-3325 if set to 'yes' and simply not send the PAI/RPID headers
at all if set to 'no'. By default trust_id_outbound will be set to
'legacy' which will preserve the behavior prior to these patches.
Extra special thanks to Walter Doekes for providing advice and
feedback.

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 16:05:11 +00:00
Kinsey Moore
587c8c507d Confbridge: Fix ConfbridgeKick AMI documentation
This adds documentation for the "all" channel option for the
ConfbridgeKick AMI action and adjusts AMI responses accordingly.

(issue ASTERISK-23282)
Reported by: Dorian Logan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 14:57:25 +00:00
Kinsey Moore
a542eb4c60 Confbridge: Add references for kick all option
After the ability to kick all attendees from a conference was added, a
rework removed the comment about that feature from the CLI
documentation. This adds that documentation and adds "all" to the
participant tab completion list for the confbridge kick command.

(closes issue ASTERISK-23282)
Reported by: Dorian Logan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 14:46:06 +00:00
Igor Goncharovskiy
bf53aadd44 Fix wrong dialtone. The "modulation" should not be referenced for tone+tone as it refers to the on-off characteristic - this often resulted in a single tone rather than the multitone as in the UK.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 08:31:30 +00:00
Matthew Jordan
ad1d62c3e8 main/asterisk: Fix startup sequence for realtime features
When ASTERISK-23265/ASTERISK-23320 was fixed, it inadvertently led to realtime
features breaking. This was due to features loading prior to realtime. This
patch fixes this by loading features after loading dynamic modules.

ASTERISK-23487 #close
Reported by: Denis
Tested by: Denis


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-19 02:13:15 +00:00
Matthew Jordan
003fa0d955 app_sms: Fix uninitialized values; hangup channel when REL is sent successfully
This patch fixes two issues in app_sms:
(1) Firstly, the 'flags' field on the stack in sms_exec() is uninitialised,
    causing it to use the wrong protocol in some cases. This patch correctly
    initializes the flags fields.

(2) Secondly, when disconnect supervision is not working or
    inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
    terminate the call after it sent the REL(ease) message and the peer stopped
    talking to it. This patch fixes the code to handle the 'bad stop bit'
    message more gracefully in that case, and hang up the call.

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

ASTERISK-18331 #close
Reported by: David Woodhouse
patches:
  asterisk-fix-sms.patch uploaded by David Woodhouse (License 5754)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-19 01:09:04 +00:00
Jonathan Rose
020738ca6d ARI: Remove unnecessary \briefs from automatically generated documentation
Review: https://reviewboard.asterisk.org/r/3440/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 20:26:01 +00:00
Jonathan Rose
032b1a3276 ARI: Make bridges/{bridgeID}/play queue sound files
Previously multiple play actions against a bridge at one time would cause
the sounds to play simultaneously on the bridge. Now if a sound is already
playing, the play action will queue playback to occur after the completion
of other sounds currently on the queue.

(closes issue ASTERISK-22677)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/3379/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 18:54:53 +00:00
Rusty Newton
3856b3142d sounds: Fix Sounds Makefile and XML that didn't support new sound prompt sets
In sounds/Makefile

 1 Adds and moves some lines necessary for the en_GB core set. I'm just following how the other sets are defined here.
 2 removes the ES extra sounds related lines as we don't have ES extra sound sets. 

In sounds/sounds.xml

 3 Adds member definitons for EN_AU, EN_GB, IT for core sound sets, and EN_GB in extra sound sets

ASTERISK-23550 #close
Review: https://reviewboard.asterisk.org/r/3464/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 17:16:14 +00:00
Mark Michelson
98893f97ea Allow for multiple contacts to be configured in a single contact= line.
This is useful for configuring multiple permanent contacts for an AOR when using
realtime AORs.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:39:52 +00:00
Richard Mudgett
a44f43d452 Originated calls: Fix several originate call problems.
* Restore the reason value set by pbx_outgoing_attempt() to use
AST_CONTROL_xxx values as all the consumers were expecting rather than
cause codes.

* Fixed the dial routines to set cause codes for more than just
ast_request() so pbx_outgoing_attempt() reason codes will function.

* Fix inconsistent locked_channel return status in pbx_outgoing_attempt().
The chanel may not have been locked or the channel may have been a stale
pointer.

* Fixed the OutgoingSpoolFailed channel to run dialplan whenever the
dialing fails for an originate exten and 1 < synchronous.

* Fix incorrect ast_cond_wait() usage in pbx_outgoing_attempt().
Indroduced by issue ASTERISK-22212 patch.

* Made struct pbx_outgoing use the ao2 lock instead of its own lock for
the cond wait mutex.  No sense in having two locks associated with the
same struct when only one is needed.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:38:20 +00:00
Richard Mudgett
341db59212 app_dial and app_queue: Make lock the forwarding channel while taking the channel snapshot.
* Fixed ast_channel_publish_dial_forward() not locking the forwarded
channel when taking the channel snapshot.

* Fixed app_dial.c:do_forward() using the wrong channel to get the
original call forwarding string.

* Removed unnecessary locking when calling ast_channel_publish_dial() and
ast_channel_publish_dial_forward() in app_dial and app_queue.  Holding
channel locks when calling ast_channel_publish_dial_forward() with a
forwarded channel could result in pausing the system while the stasis bus
completes processsing a forwarded channel subscription.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:19:17 +00:00
Kinsey Moore
6b9f6459da ARI: Add debug logging for events and responses
This adds DEBUG level logging for ARI websocket events and HTTP
responses similar to what is available for AMI. Logging for ARI HTTP
requests is already adequate for debugging purposes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 14:21:34 +00:00
Joshua Colp
3a0d0b7522 res_pjsip: Handle reloading when permanent contacts exist and qualify is configured.
This change fixes a problem where permanent contacts being qualified were not
being updated. This was caused by the permanent contacts getting a uuid and not a
known identifier, causing an inability to look them up when updating in the
qualify code. A bug also existed where the new configuration may not be available
immediately when updating qualifies.

(closes issue ASTERISK-23514)
Reported by: Richard Mudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 22:49:32 +00:00
Jonathan Rose
8baf0ae036 Fix a silly shadowed variable mistake that was missed from play tones patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 22:42:16 +00:00
Jonathan Rose
a365f9100f ARI: Add tones playback resource
Adds a tones URI type to the playback resource. The tone can be specified by
name (from indications.conf) or by a tone pattern. In addition, tonezone can
be specified in the URI (by appending ;tonezone=<zone>). Tones must be
stopped manually in order for a stasis control to move on from playback of
the tone. Tones may be paused, resumed, restarted, and stopped. They may
not be rewound or fast forwarded (tones can't be controlled in a way that
lets you skip around from note to note and pausing and resuming will also
restart the tone from the beginning). Tests are currently in development
for this feature (https://reviewboard.asterisk.org/r/3428/).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 21:47:10 +00:00
Matthew Jordan
703220e8a9 main/Makefile: Fix build failure on SmartOS/Illumos/SunOS
This patch fixes two issues when building on SmartOS:

- channels/chan_oss.c: it makes sure soundcard.h is found
- main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun
  Linker doesn't support that. Similar checks are already used elswhere in the
  Makefile

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

ASTERISK-23576 #close
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 20:24:41 +00:00
Kevin Harwell
4ca3de4f63 res_pjsip_refer: Channel variable SIPREFERTOHDR not being set during blind transfer
The SIPREFERTOHDR channel variable is not being set on any channel when
performing a blind transfer using PJSIP. The 'refer->refer_to' was not
being set during a blind transfer.  Updated so the 'refer_to' is set to
the target uri on a blind transfer.

(closes issue ASTERISK-23502)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/3445/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 15:16:42 +00:00
Kinsey Moore
91e7c75848 Stasis: Add a usage note on stasis_app_get_bridge
This function returns an ast_bridge without a refcount bump and the
caller must increment the count if it intends to hold the pointer.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-16 19:13:51 +00:00
Richard Mudgett
32cd970a21 Eliminate some more unnecessary RAII_VAR() uses.
RAII_VAR() is not a hammer appropriate to pound all nails.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 18:27:23 +00:00
Richard Mudgett
51554c2927 Remove unused RAII_VAR() declarations.
* Remove unused RAII_VAR() declarations.  The compiler cannot catch these
because the cleanup function "references" the unused variable.  Some
actually allocated and released resources that were never used.

* Fixed some whitespace issues in stasis_bridges.c.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 17:56:53 +00:00