Commit Graph

24909 Commits

Author SHA1 Message Date
Matthew Jordan fc8c0ef28f channels/Makefile: clean pjsip directory
........

Merged revisions 403736 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 05:00:53 +00:00
Richard Mudgett 3a5e4317f5 test_voicemail_api: Add check for a registered voicemail provider before tests.
It is much nicer diagnosing a test failure if app_voicemail is actually
loaded.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 00:40:49 +00:00
Scott Griepentrog d2eb007bf0 realtime: Create extensions in alembic ast-db-manage contribution
When the alembic scripts were written for creating Asterisk
realtime databases the extensions table for dialplan wasn't
included.  This update creates the extensions table.

(closes issue ASTERISK-22815)
Reported by: Zone Conkle
Review: https://reviewboard.asterisk.org/r/3064/
........

Merged revisions 403713 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-12 19:46:54 +00:00
Jonathan Rose 5583d2c629 chan_pjsip: Revert r403587
This patch was intended to eliminate a deadlock that occurs when
masquerades occur in pjsip channels, but has some potential side
effects. Mark Michelson is currently working on addressing this
problem from another angle.

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

Merged revisions 403705 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-12 19:18:06 +00:00
Kevin Harwell c602b086ed res_pjsip_messaging: send message to a default outbound endpoint
In some cases messages need to be sent to a direct URI (sip:<ip address>). This
patch adds in that support by using a default outbound endpoint.  When sending
messages, if no endpoint can be found then the default one is used.

To facilitate this a new default_outbound_endpoint option was added to the
globals section for pjsip.conf.

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

Merged revisions 403680 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 20:24:50 +00:00
Russell Bryant 90108b15a0 Reset peer outboundproxy on sip.conf reload
If you set a peer's outboundproxy and then removed it from the config,
this would not get picked up in a config reload.  This patch fixes that
by resetting it in set_peer_defaults().

Closes ASTERISK-19454
Review: https://reviewboard.asterisk.org/r/3065/
........

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

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

Merged revisions 403639 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 19:22:05 +00:00
Richard Mudgett 8183bba99a app_voicemail: Voicemail callback registration/unregistration function improvements.
* The voicemail registration/unregistration functions now take a struct of
callbacks instead of a lengthy parameter list of callbacks.

* The voicemail registration/unregistration functions now prevent a
competing module from interfering with an already registered callback
supplying module.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 19:19:24 +00:00
Matthew Jordan ce423d2ea4 func_channel, chan_pjsip: Add CHANNEL read function support for chan_pjsip
This patch adds CHANNEL read support for chan_pjsip. This allows the dialplan
to use the CHANNEL function on a chan_pjsip channel to obtain run-time
information about the channel from the PJSIP channel driver and the PJSIP
stack. This includes:
 * RTP information, including source/destination media addresses, whether or
   not the media is secure, held, and other properties.
 * RTCP information. This includes sets of parseable information, as well as
   individual statistic attriutes.
 * PJSIP information. This includes URIs, local/remote signalling addresses,
   whether or not the signalling is secure, and other properties.
 * The endpoint name. This can be used in conjunction with the PJSIP_ENDPOINT
   function to obtain more detailed endpoint information.

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

Merged revisions 403618 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 13:06:30 +00:00
Matthew Jordan f46b30bd36 func_pjsip_endpoint: Add PJSIP_ENDPOINT function for querying endpoint details
This patch adds a new function, PJSIP_ENDPOINT, which lets the dialplan query,
for any endpoint, any property configured on an endpoint. This function is a
companion to the CHANNEL function, which can be used to extract the endpoint
name for a channel.

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

Merged revisions 403616 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 12:31:57 +00:00
Mark Michelson 5b4aab75ef Fix correct authentication behavior for artificial endpoint.
When switching to using a vector for authentication, I initialized
the vector for the artificial endpoint to be of size 1. However, this
does not result in AST_VECTOR_SIZE() returning 1 since there isn't
actually anything in the vector.

Rather than trifle with the vector by putting unnecessary elements in,
I simply changed the callback in res_pjsip_authenticator_digest.c to
explicitly report that the artificial endpoint requires authentication.

Thanks to Joshua Colp for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-10 15:15:13 +00:00
Jonathan Rose 905a7de52b chan_pjsip: Fix a sticking channel lock caused by channel masquerades
(closes issue ASTERISK-22936)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/3042/
........

Merged revisions 403587 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 22:59:14 +00:00
Jonathan Rose f6e92c35df app_page: Add predial handlers for app_page.
(closes issue AFS-14)
Review: https://reviewboard.asterisk.org/r/3045/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 22:17:14 +00:00
Richard Mudgett c91d4d12de Reverting regex part of -r403545 at request of file.
res_sorcery_astdb.c: Fix get multiple records by regex.

* Fix sorcery_astdb_retrieve_regex() pattern matching.  Let the regexec()
function match the stored key values instead of having astdb prefilter
them.  Previoiusly you could only use a simple regex pattern when the
pattern began with '^'.
........

Merged revisions 403559 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 19:24:58 +00:00
Richard Mudgett 31d51d373b res_sorcery_astdb.c: Fix get multiple records by regex.
* Fix sorcery_astdb_retrieve_regex() pattern matching.  Let the regexec()
function match the stored key values instead of having astdb prefilter
them.  Previoiusly you could only use a simple regex pattern when the
pattern began with '^'.

* Fix off nominal memory leak in sorcery_astdb_retrieve_regex().
........

Merged revisions 403545 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:50:20 +00:00
Richard Mudgett 0a02932ddf sorcery: Eliminate shadowing a varaible that caused confusion.
* Eliminated shadowing of the __ast_sorcery_apply_config() name parameter
causing confusion.

* Fix potential crash from sorcery.conf user input in
__ast_sorcery_apply_config() if the user supplied a malformed config line
that is missing the sorcery object type name.

* Remove redundant test in __ast_sorcery_apply_config().  !config and
config == CONFIGS_STATUS_FILEMISSING are identical.
........

Merged revisions 403541 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:32:57 +00:00
Joshua Colp dcb642e2da endpoints: Keep a reference to channel ids when creating snapshot.
The snapshot process for endpoints uses the channel ids present
on the endpoint itself. Without keeping a reference it was possible
for the strings to be freed underneath any consumer of an endpoint
snapshot.

A reference is now held by the snapshot to the channel ids and
released when the snapshot is destroyed.

(issue ASTERISK-22801)
Reported by: Matt Jordan
........

Merged revisions 403542 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:32:02 +00:00
Richard Mudgett cf5e00138d sorcery: Whitespace
You would think that a new file would start off without any whitespace
oddities.
........

Merged revisions 403527 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:14:41 +00:00
Mark Michelson d421818c3d Add a CONFBRIDGE_RESULT channel variable to discern why a channel left a ConfBridge.
Review: https://reviewboard.asterisk.org/r/3009



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 17:29:48 +00:00
Mark Michelson 5730410861 Create function for retrieving Mixmonitor instance data.
For the time, this is only useful for retrieving the filename.

The purpose of this function is to better facilitate multiple
mixmonitors per channel. Setting a MIXMONITOR_FILENAME channel
variable is not conducive to such behavior, so allowing finer
grained access to individual mixmonitor properties improves
the situation. The MIXMONITOR_FILENAME channel variable is still
set, though, so there is no worry about backwards compatibility.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 16:42:59 +00:00
Joshua Colp 4d760694b2 res_pjsip_nat: Add NAT module to session dialogs.
Due to the way pjproject internally works it was possible for the
NAT module to not be invoked on messages with-in a session dialog.
This means that the various parts of the message would not get rewritten
with the source IP address and port.

This change uses a session supplement to add the NAT module
to the dialog on the first incoming or outgoing INVITE.

(closes issue ASTERISK-22941)
Reported by: Leif Madsen
........

Merged revisions 403510 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 16:41:43 +00:00
Mark Michelson b18ed67d16 Switch PJSIP auth to use a vector.
Since Asterisk has a vector API now, places where arrays are manually
resized don't really make sense any more. Since the auth work in PJSIP
was freshly-written, it was easy to reform it to use a vector.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 16:10:05 +00:00
Matthew Jordan 8042f4cdd2 res_fax_spandsp: Always init T.38 session to avoid crashes during state change
Prior to this patch, res_fax_spandsp was conservative with how it initialized
the spandsp T.38 context. It would only initialize it if the driver thought
the current state was a T.38 fax. While this works fine in nominal situations,
in certain off nominal situations, res_fax_spandsp can believe that a T.38
fax will not occur when in fact one has started. In particular, this was
discovered when res_fax would fall back to audio after timing out on a T.38
upgrade. The SIP channel driver would continue to retry the re-INVITE and -
if the remote end responded after res_fax timed out with a 200 OK - a T.38
frame would be delivered to the res_fax stack when it no longer expected it.

As it turns out, there does not appear to be any downside to always
initializing the T.38 context, other than the actual memory allocation.
Since that avoids this off nominal situation (and others which are equally
likely hard to predict), this is the safest way to avoid this problem.

Much thanks to Torrey as well for providing a scenario that reproduces this
issue.

(closes issue ASTERISK-21242)
Reported by: Ashley Winters
Tested by: Torrey Searle
patches:
  always-init-t38.patch uploaded by awinters (License 6477)
  A_PARTY.xml uploaded by tsearle (License 5334)
........

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

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

Merged revisions 403458 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 03:21:56 +00:00
Matthew Jordan eb4aa1f0a8 res_config_sqlite: Check for CDR unregistration failures
If the CDR unregistration fails due to an inflight CDR, the
res_config_sqlite module needs to bail on unloading itself. Otherwise,
the config could be unloaded (including the CDR table name) while the
CDR engine posts a CDR to the still registered backend, resulting in
a crash.
........

Merged revisions 403435 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-08 05:59:46 +00:00
Jonathan Rose ae92549c93 app_record: Add an option that allows DTMF '0' to act as an additional terminator
Using this terminator when active results in ${RECORD_STATUS} being set to
'OPERATOR' instead of 'DTMF'

(closes issue AFS-7)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 23:40:38 +00:00
David M. Lee 1212906351 Reverting r403311. It's causing ARI tests to hang.
........

Merged revisions 403398 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 22:10:20 +00:00
David M. Lee fc70db3a81 ari: Fix deadlock problem with functions that use autoservice.
The code for getting channel variables from ARI assumed that you needed
to lock the channel in order to properly execute functions and read
channel variables. Apparently, this is not the case, since any dialplan
function that puts the channel into autoservice deadlocks when
attempting to remove the channel from autoservice.
........

Merged revisions 403342 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 22:09:20 +00:00
David M. Lee 8c3b944764 Multiple revisions 403304,403310
........
  r403304 | dlee | 2013-12-02 12:34:50 -0600 (Mon, 02 Dec 2013) | 1 line
  
  Fixed the filename for the ari.conf docs
........
  r403310 | file | 2013-12-03 10:32:12 -0600 (Tue, 03 Dec 2013) | 5 lines
  
  Revert revision 403304: Fixed the filename for the ari.conf docs
  
  The changed value refers to the name of the module. The name of the
  configuration file is specified in the configFile section.
........

Merged revisions 403304,403310 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 22:08:30 +00:00
David M. Lee b8ddf63871 Blocked revisions 403291
........
remove unwanted property svn:mergeinfo


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 22:07:46 +00:00
Kevin Harwell e8208e8899 res_pjsip_registrar: undefined function pointer symbol
Used a static wrapper around the offending function to alleviate the issue.

Reported by: rmudgett
........

Merged revisions 403377 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-04 21:42:39 +00:00
Joshua Colp 2364626811 res_pjsip_t38: Don't pass T.38 control frames through to other hooks.
This crept up during gateway testing where the gateway would receive
the request to negotiate and assume it came from the remote side, causing
the gateway state machine to go a little, to a use a technical term,
"wonky".
........

Merged revisions 403364 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-04 20:54:52 +00:00
Mark Michelson d61f258384 Initialize the hash value argument to pj_hash_get() to 0.
Passing a non-zero value causes PJLIB to use the given input as the
hash value. Passing zero causes the parameter to become an output parameter
that receives the hash value that was computed based on the given key.

This change essentially makes ast_sip_dict_get() properly retrieve the
desired value.
........

Merged revisions 403349 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-04 18:41:01 +00:00
Joshua Colp b8025e789d res_pjsip_session: Add support for PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE flag.
Newer versions of PJSIP have changed to using a flag for the
PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE instead of a define. This adds a
configure check to detect the presence of the flag and use it if found.
........

Merged revisions 403329 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 18:01:36 +00:00
Richard Mudgett 3357c494cb sorcery, bucket: Change observer remove calls to take const callbacks struct.
* Make ast_sorcery_observer_remove() accept a const callbacks struct.

* Make ast_sorcery_observer_remove() tolerant of the sorcery parameter
being NULL.  Now it can be called within a module unload routine if the
sorcery initialization fails.

* Fix ast_sorcery_observer_add() to fail if the container link fails.
........

Merged revisions 403324 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 17:35:54 +00:00
Mark Michelson 8e8b329e14 Add channel locking for channel snapshot creation.
This adds channel locks around calls to create channel snapshots as well
as other functions which operate on a channel and then end up
creating a channel snapshot. Functions that expect the channel to be
locked prior to being called have had their documentation updated to
indicate such.
........

Merged revisions 403311 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 17:07:29 +00:00
Joshua Colp 8b24b0d206 media_index: Make media indexing tolerable of bad symlinks.
Media indexing will now skip over files and directories that stat
will not return information about. This can occur under normal
conditions when a symbolic link points to a location that no longer
exists.
........

Merged revisions 403312 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 16:39:13 +00:00
Alexandr Anikin 879bd7aad9 Check and reject non-digits e164 values on peers and general sections in ooh323.conf
Regenerate e164 endpoint list on reload ooh323
(issue ASTERISK-22901)
Reported by: Cyril CONSTANTIN
Patches:
	ASTERISK-22901.patch
........

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

Merged revisions 403290 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 18:12:57 +00:00
Joshua Colp 177e7861a2 res_pjsip_session: Apply fromuser and fromdomain to all requests as documented.
........

Merged revisions 403271 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 21:13:20 +00:00
Joshua Colp 88c840db50 res_pjsip_t38: Add the framehook to the channel only on first INVITE.
The check for determining whether the T.38 framehook should be added to
the channel or not has now been changed to guarantee adding only occurs
on the first incoming or outgoing INVITE.
........

Merged revisions 403258 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 20:04:55 +00:00
Joshua Colp 0620cc0c00 res_pjsip_transport_websocket: Fix security events and simplify implementation.
Transport type determination for security events has been simplified to use
the type present on the message itself instead of searching through configured
transports to find the transport used.

The actual WebSocket transport has also been simplified. It now leverages the
existing PJSIP transport manager for finding the active WebSocket transport
for outgoing messages. This removes the need for res_pjsip_transport_websocket
to store a mapping itself.

(closes issue ASTERISK-22897)
Reported by: Max E. Reyes Vera J.

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

Merged revisions 403256 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 19:58:08 +00:00
Joshua Colp e93fbf41e6 res_ari: Add Recording events to the validator.
........

Merged revisions 403240 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-30 14:12:50 +00:00
Joshua Colp 56290895aa res_pjsip_sdp_rtp: Don't produce an invalid media stream with no formats.
Depending on configuration it was possible for a media stream to be
created without any media formats. The produced SDP would fail internal
validation and cause a crash.

The code will now no longer add media streams with no formats to the SDP,
allowing it to pass validation and work.

(closes issue ASTERISK-22858)
Reported by: Anthony Messina
........

Merged revisions 403223 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 02:12:45 +00:00
Joshua Colp b315b16c90 res_pjsip_header_funcs: Don't add headers to re-INVITEs.
When sending a re-INVITE to an endpoint it was possible for received
headers to be added as well (since they are stored for retrieval using
the PJSIP_HEADER dialplan function). This caused a broken (and
potentially large) SIP INVITE to be produced and sent.

This changes the module so it will no longer add headers to
re-INVITEs.

(closes issue ASTERISK-22882)
Reported by: David M. Lee
........

Merged revisions 403221 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 01:56:52 +00:00
Joshua Colp 6019353ad6 res_stasis_playback: Add 'number', 'digits', and 'characters' URI scheme implementations.
This change adds new URI scheme implementations for playing numbers, digits,
and characters. This is done as part of the normal playback mechanism and can
be used with queueing to create a combined sentence.

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

Merged revisions 403209 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 00:54:37 +00:00
Joshua Colp a64cd7c6bb res_pjsip_session: Add configurable behavior for redirects.
The action taken when a redirect occurs is now configurable on a
per-endpoint basis. The redirect can either be treated as a redirect
to a local extension, to a URI that is dialed through the Asterisk
core, or to a URI that is dialed within PJSIP itself.

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

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

Merged revisions 403207 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 00:38:36 +00:00
Richard Mudgett 48c2b40ff3 astdb: Tweak some doxygen comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 17:32:29 +00:00
Joshua Colp 9d3b590ad8 res_pjsip: Fix crash when reloading certain configurations.
Certain options available that specify a SIP URI perform validation
on the provided URI using the PJSIP URI parser. This operation
requires that the thread executing it be registered with the PJLIB
library. During reloads this was done on a thread which was NOT
registered with it.

This fixes the problem by creating a task which reloads the
configuration on a PJSIP thread.

(closes issue ASTERISK-22923)
Reported by: Anthony Messina
........

Merged revisions 403179 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 16:12:56 +00:00
David M. Lee fccb427c88 ari:Add application/json parameter support
The patch allows ARI to parse request parameters from an incoming JSON
request body, instead of requiring the request to come in as query
parameters (which is just weird for POST and DELETE) or form
parameters (which is okay, but a bit asymmetric given that all of our
responses are JSON).

For any operation that does _not_ have a parameter defined of type
body (i.e. "paramType": "body" in the API declaration), if a request
provides a request body with a Content type of "application/json", the
provided JSON document is parsed and searched for parameters.

The expected fields in the provided JSON document should match the
query parameters defined for the operation. If the parameter has
'allowMultiple' set, then the field in the JSON document may
optionally be an array of values.

(closes issue ASTERISK-22685)
Review: https://reviewboard.asterisk.org/r/2994/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 15:48:39 +00:00
Joshua Colp fd33969240 res_pjsip: Update handling of some options to work with new option names.
Some options (such as call_group and pickup_group) share the same configuration
handler and decide what logic to use based on the name of the option. These
handlers were not updated to check for the new option names and were treating
the options as invalid.

This change simply updates the handlers with the proper names of the options.

(closes issue ASTERISK-22922)
Reported by: Anthony Messina
........

Merged revisions 403173 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 15:31:43 +00:00
Joshua Colp c321b1f454 Fix a configure issue with PJSIP transaction group lock detection.
The configure check did not use the provided paths for pjproject
if provided when looking for transaction group lock support.
........

Merged revisions 403160 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-26 22:34:08 +00:00
Kevin Harwell ed48377994 ARI: Implement device state API
Created a data model and implemented functionality for an ARI device state
resource.  The following operations have been added that allow a user to
manipulate an ARI controlled device:

Create/Change the state of an ARI controlled device
PUT    /deviceStates/{deviceName}&{deviceState}

Retrieve all ARI controlled devices
GET    /deviceStates

Retrieve the current state of a device
GET    /deviceStates/{deviceName}

Destroy a device-state controlled by ARI
DELETE /deviceStates/{deviceName}

The ARI controlled device must begin with 'Stasis:'.  An example controlled
device name would be Stasis:Example.  A 'DeviceStateChanged' event has also
been added so that an application can subscribe and receive device change
events.  Any device state, ARI controlled or not, can be subscribed to.

While adding the event, the underlying subscription control mechanism was
refactored so that all current and future resource subscriptions would be
the same.  Each event resource must now register itself in order to be able
to properly handle [un]subscribes.

(issue ASTERISK-22838)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3025/
........

Merged revisions 403134 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 17:48:28 +00:00