Commit Graph

24955 Commits

Author SHA1 Message Date
Scott Griepentrog
dc188ae39d app_sms: BufferOverflow when receiving odd length 16 bit message
This patch prevents an infinite loop overwriting memory when
a message is received into the unpacksms16() function, where
the length of the message is an odd number of bytes.

(closes issue ASTERISK-22590)
Reported by: Jan Juergens
Tested by: Jan Juergens


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16 15:29:30 +00:00
Matthew Jordan
2ebb01a3e6 pjsip/dialplan_functions: Use the right buffer length when printing URIs
While entertaining, sizeof(buflen) is not the same as buflen. Doh.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-15 01:38:16 +00:00
Joshua Colp
db930057fd res_pjsip: Apply outbound proxy to all SIP requests.
Objects which are involved in SIP request creation and sending
now allow an outbound proxy to be specified. For cases where
an endpoint is used the outbound proxy specified there will
be applied.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-14 17:25:51 +00:00
Joshua Colp
6e7d64c79d res_stasis: Expose event for call forwarding and follow forwarded channel.
This change adds an event for when an originated call is redirected to
another target. This event contains the original channel and the newly
created channel. If a stasis subscription exists on the original originated
channel for a stasis application then a new subscription will also be
created on the stasis application to the redirected channel. This allows
the application to follow the call path completely.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-14 17:15:54 +00:00
Jonathan Rose
b602348140 documentation: Add PJSIP technology to messaging documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 21:24:31 +00:00
Richard Mudgett
6ee1da4b52 test.c: Fix too sticky unit test failed status.
Rerunning a failed unit test after loading any required modules should
allow the test to report a pass status if it now passes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 20:06:53 +00:00
Jonathan Rose
95795aa36b Transfers: Make Asterisk set ATTENDEDTRANSFER/BLINDTRANSFER more reliably
There were still a few cases in which ATTENDEDTRANSFER and BLINDTRANSFER
wouldn't be set on channels involved with blind and attended transfers.
This would happen with features that were initialized by channel driver
specific mechanisms in multiparty calls. This patch resolves those cases
while attempted to keep the behavior for setting those variables as
consistent as possible.

(closes issue AFS-24)
Review: https://reviewboard.asterisk.org/r/3040/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 20:04:41 +00:00
Richard Mudgett
f22ac347fc 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.
........

Merged revisions 403726 from http://svn.asterisk.org/svn/asterisk/trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 19:55:31 +00:00
Richard Mudgett
5f0d590b2e 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.
........

Merged revisions 403643 from http://svn.asterisk.org/svn/asterisk/trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 19:48:05 +00:00
Kevin Harwell
9aea346918 bridge_native_rtp: Deadlock during 4-way conference creation
The change contains a slightly adjusted patch that was on the issue
(submitted by kmoore).  A fix was made by adding in a bridge lock
while calling bridge_start/stop from the framehook callback.  Since
the framehook callback is not called from the bridging core the bridge
is not locked, but needs to be before calling bridge_start.

(closes issue ASTERISK-22749)
Reported by: Kinsey Moore
Review: https://reviewboard.asterisk.org/r/3066/
Patches:
     lock_inversion.diff uploaded by kmoore (license 6273)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 18:24:47 +00:00
Kevin Harwell
0948170edb ARI: Allow specifying channel variables during a POST /channels
Added the ability to specify channel variables when creating/originating a
channel in ARI.  The variables are sent in the body of the request and should
be formatted as a single level JSON object.  No nested objects allowed.
For example: {"variable1": "foo", "variable2": "bar"}.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 17:17:48 +00:00
Kevin Harwell
010983be91 ARI: Adding a channel to a bridge while a live recording is active blocks
Added the ability to have rules that are checked when adding and/or removing
channels to/from a bridge.  In this case, if a channel is currently recording
and someone attempts to add it to a bridge an "is recording" rule is checked,
fails, and a 409 conflict is returned.

Also command functions now return an integer value that can be descriptive of
what kind of problems, if any, occurred before or during execution.

(closes issue ASTERISK-22624)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/2947/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 16:32:53 +00:00
David M. Lee
6fc1e9b81e Setting svn:ignore
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 16:27:30 +00:00
Matthew Jordan
d5820a01e6 channels/Makefile: clean pjsip directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13 05:00:05 +00:00
Scott Griepentrog
3cd07b4989 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/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-12 19:44:23 +00:00
Jonathan Rose
74d1e87fb4 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-12 19:12:00 +00:00
Kevin Harwell
5cfa71a6b4 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 20:11:50 +00:00
Russell Bryant
8d3fe9c3da 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 19:18:31 +00:00
Matthew Jordan
c125499963 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 13:05:12 +00:00
Matthew Jordan
9ca456742b 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 12:29:49 +00:00
Jonathan Rose
4986ebcbb8 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 22:47:06 +00:00
Richard Mudgett
e08b39cf3a 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 '^'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 19:23:49 +00:00
Richard Mudgett
3a6aa0867c 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().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:49:28 +00:00
Joshua Colp
67ea0c2078 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:31:13 +00:00
Richard Mudgett
117286dd87 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:31:07 +00:00
Richard Mudgett
56b4c16073 sorcery: Whitespace
You would think that a new file would start off without any whitespace
oddities.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:01:25 +00:00
Joshua Colp
1167576cc8 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 16:40:59 +00:00
Matthew Jordan
c3ba9d186c 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 03:19:39 +00:00
Matthew Jordan
1d2de2fdb8 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-08 05:54:53 +00:00
David M. Lee
c0b4e18900 Reverting r403311. It's causing ARI tests to hang.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 20:49:52 +00:00
Kevin Harwell
c8a92c8125 res_pjsip_registrar: undefined function pointer symbol
Used a static wrapper around the offending function to alleviate the issue.

Reported by: rmudgett



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-04 21:41:24 +00:00
Joshua Colp
3a33afa7cd 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".


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-04 20:53:32 +00:00
Mark Michelson
a36332e42f 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.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-04 18:40:23 +00:00
David M. Lee
55798c532a 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 20:17:48 +00:00
Joshua Colp
3dfd810c6c 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 17:59:41 +00:00
Richard Mudgett
1123e09e2f 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 17:23:50 +00:00
Joshua Colp
cb6204eb0a 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 16:37:26 +00:00
Mark Michelson
4b7ba33125 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.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 16:33:49 +00:00
Joshua Colp
d904906a1a 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 16:32:12 +00:00
David M. Lee
1a940480b5 Fixed the filename for the ari.conf docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 18:34:50 +00:00
Alexandr Anikin
d80611a52e remove unwanted property svn:mergeinfo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 18:03:15 +00:00
Alexandr Anikin
c90c183e92 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 17:58:33 +00:00
Joshua Colp
7026284b5a res_pjsip_session: Apply fromuser and fromdomain to all requests as documented.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 21:12:37 +00:00
Joshua Colp
fb7c0d5ecc 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 20:04:02 +00:00
Joshua Colp
e0cfdf5655 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/ 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 19:56:38 +00:00
Joshua Colp
021f49bad7 res_ari: Add Recording events to the validator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-30 14:11:55 +00:00
Joshua Colp
e9a5c707d6 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 02:12:04 +00:00
Joshua Colp
457ddd6cc1 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 01:56:02 +00:00
Joshua Colp
54523ed21e 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 00:53:43 +00:00
Joshua Colp
4a9e6d06a7 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 00:36:53 +00:00