summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2013-12-13ARI: Adding a channel to a bridge while a live recording is active blocksKevin Harwell
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/ ........ Merged revisions 403749 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11res_pjsip_messaging: send message to a default outbound endpointKevin Harwell
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-11func_channel, chan_pjsip: Add CHANNEL read function support for chan_pjsipMatthew Jordan
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-10Fix correct authentication behavior for artificial endpoint.Mark Michelson
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-09Reverting regex part of -r403545 at request of file.Richard Mudgett
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-09res_sorcery_astdb.c: Fix get multiple records by regex.Richard Mudgett
* 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-09res_pjsip_nat: Add NAT module to session dialogs.Joshua Colp
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-09Switch PJSIP auth to use a vector.Mark Michelson
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-09res_fax_spandsp: Always init T.38 session to avoid crashes during state changeMatthew Jordan
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-08res_config_sqlite: Check for CDR unregistration failuresMatthew Jordan
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-05Reverting r403311. It's causing ARI tests to hang.David M. Lee
........ 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-05ari: Fix deadlock problem with functions that use autoservice.David M. Lee
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-04res_pjsip_registrar: undefined function pointer symbolKevin Harwell
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-04res_pjsip_t38: Don't pass T.38 control frames through to other hooks.Joshua Colp
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-04Initialize the hash value argument to pj_hash_get() to 0.Mark Michelson
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-03res_pjsip_session: Add support for PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE flag.Joshua Colp
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-03sorcery, bucket: Change observer remove calls to take const callbacks struct.Richard Mudgett
* 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-03Add channel locking for channel snapshot creation.Mark Michelson
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-01res_pjsip_session: Apply fromuser and fromdomain to all requests as documented.Joshua Colp
........ 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-01res_pjsip_t38: Add the framehook to the channel only on first INVITE.Joshua Colp
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-01res_pjsip_transport_websocket: Fix security events and simplify implementation.Joshua Colp
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-11-30res_ari: Add Recording events to the validator.Joshua Colp
........ 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-28res_pjsip_sdp_rtp: Don't produce an invalid media stream with no formats.Joshua Colp
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-28res_pjsip_header_funcs: Don't add headers to re-INVITEs.Joshua Colp
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-28res_stasis_playback: Add 'number', 'digits', and 'characters' URI scheme ↵Joshua Colp
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-28res_pjsip_session: Add configurable behavior for redirects.Joshua Colp
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-27res_pjsip: Fix crash when reloading certain configurations.Joshua Colp
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-27ari:Add application/json parameter supportDavid M. Lee
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-27res_pjsip: Update handling of some options to work with new option names.Joshua Colp
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-23ARI: Implement device state APIKevin Harwell
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-23res_pjsip: AMI commands and events.Kevin Harwell
Created the following AMI commands and corresponding events for res_pjsip: PJSIPShowEndpoints - Provides a listing of all pjsip endpoints and a few select attributes on each. Events: EndpointList - for each endpoint a few attributes. EndpointlistComplete - after all endpoints have been listed. PJSIPShowEndpoint - Provides a detail list of attributes for a specified endpoint. Events: EndpointDetail - attributes on an endpoint. AorDetail - raised for each AOR on an endpoint. AuthDetail - raised for each associated inbound and outbound auth TransportDetail - transport attributes. IdentifyDetail - attributes for the identify object associated with the endpoint. EndpointDetailComplete - last event raised after all detail events. PJSIPShowRegistrationsInbound - Provides a detail listing of all inbound registrations. Events: InboundRegistrationDetail - inbound registration attributes for each registration. InboundRegistrationDetailComplete - raised after all detail records have been listed. PJSIPShowRegistrationsOutbound - Provides a detail listing of all outbound registrations. Events: OutboundRegistrationDetail - outbound registration attributes for each registration. OutboundRegistrationDetailComplete - raised after all detail records have been listed. PJSIPShowSubscriptionsInbound - A detail listing of all inbound subscriptions and their attributes. Events: SubscriptionDetail - on each subscription detailed attributes SubscriptionDetailComplete - raised after all detail records have been listed. PJSIPShowSubscriptionsOutbound - A detail listing of all outboundbound subscriptions and their attributes. Events: SubscriptionDetail - on each subscription detailed attributes SubscriptionDetailComplete - raised after all detail records have been listed. (issue ASTERISK-22609) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2959/ ........ Merged revisions 403131 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23ari: Add events for playback and recording.Joshua Colp
While there were events defined for playback and recording these were not actually sent. This change implements the to_json handlers which produces them. (closes issue ASTERISK-22710) Reported by: Jonathan Rose Review: https://reviewboard.asterisk.org/r/3026/ ........ Merged revisions 403119 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23ari: Add Snoop operation for spying/whispering on channels.Joshua Colp
The Snoop operation can be invoked on a channel to spy or whisper on it. It returns a channel that any channel operations can then be invoked on (such as record to do monitoring). (closes issue ASTERISK-22780) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3003/ ........ Merged revisions 403117 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22res_pjsip: convert configuration settings names to snake case some moreKevin Harwell
Updated the alembic script for pjsip. Also, the dtls config parsing stuff was expecting strings with no underscores, so removed the underscores from the option name before passing it to the parser. ........ Merged revisions 403082 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22ARI: Don't leak implementation detailsKinsey Moore
This change prevents channels used as implementation details from leaking out to ARI. It does this by preventing creation of JSON blobs of channel snapshots created from those channels and sanitizing JSON blobs of bridge snapshots as they are created. This introduces a framework for excluding information from output targeted at Stasis applications on a consumer-by-consumer basis using channel sanitization callbacks which could be extended to bridges or endpoints if necessary. This prevents unhelpful error messages from being generated by ast_json_pack. This also corrects a bug where BridgeCreated events would not be created. (closes issue ASTERISK-22744) Review: https://reviewboard.asterisk.org/r/2987/ Reported by: David M. Lee ........ Merged revisions 403069 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22res_pjsip: convert configuration settings names to snake caseKevin Harwell
Renamed, where appropriate, the configuration options for chan/res_pjsip to use snake case (compound words separated by an underscore). For example, faxdetect will become fax_detect, recordofffeature will become record_off_feature, etc... Review: https://reviewboard.asterisk.org/r/3002/ ........ Merged revisions 403022 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21res_pjsip_session: Fix memory leak of direct media format capabilitiesMatthew Jordan
The direct media format capabilities are always allocated in ast_sip_session_alloc and were not freed in the session destructor. Whoops. (This being the third whoops caught by Scott and Nitesh's valgrind work for the Asterisk Test Suite. Nifty!) ........ Merged revisions 402968 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21res_pjsip_sdp_rtp: Fix use of uninitialized value in PJSIPMatthew Jordan
In PJMEDIA, pjmedia_sdp_rtpmap_to_attr will attempt to use the string rtpmap.param regardless of its length value. Simply setting the length to 0 does not prevent the garbage on the stack in rtpmap.param.ptr from being formatted in a sprintf call. This patch initializes the string to NULL so that at the very least, something is provided to the function that is predictable. ........ Merged revisions 402941 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21res_pjsip_mwi: Fix memory leak of MWI subscriptions containerMatthew Jordan
This patch fixes a reference counting memory leak on the ao2_container created as part of create_mwi_subscriptions. When we create the container in this routine, the intent is to hand lifetime ownership over to the global container unsolicited_mwi. When ao2_global_obj_replace_unref is called, the reference count on mwi_subscriptions (the container) will be bumped by 1; however, the function does not decrement the reference count on mwi_subscriptions when this occurs. This will prevent the container from being fully disposed of when Asterisk exits (or on any subsequent call to this operation, such as during a reload). ........ Merged revisions 402940 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21stasis: Fixed scoping problem with bridge tracking.David M. Lee
........ Merged revisions 402817 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21ari: Add silence generator controlsDavid M. Lee
This patch adds the ability to start a silence generator on a channel via ARI. This generator will play silence on the channel (avoiding audio timeouts on the peer) until it is stopped, or some other media operation is started (like playing media, starting music on hold, etc.). (closes issue ASTERISK-22514) Review: https://reviewboard.asterisk.org/r/3019/ ........ Merged revisions 402926 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-19res_pjsip_caller_id: Don't overwrite user portion of the From header when ↵Joshua Colp
fromuser is set. The fromuser option is used to explicitly set the user within the From header. The res_pjsip_caller_id module did not take this setting into account when determining if the From header could be modified or not. (closes issue ASTERISK-22866) Reported by: Anthony Messina ........ Merged revisions 402891 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-16res_pjsip: Add support for building against pjproject with SIP transaction ↵Joshua Colp
group lock support. SIP transaction group lock support has been backported into our pjproject. Since the code now internally uses a group lock the code is now changed to unlock it if present. Note that the act of finding the transaction is what actually returns it locked. For further information about group locks check out the wiki page at: http://trac.pjsip.org/repos/wiki/Group_Lock (issue ASTERISK-22818) Reported by: Matt Jordan ........ Merged revisions 402864 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-13res_ari_channels: Add the ability to stop locally generated ringing on a ↵Joshua Colp
channel. Using the 'ring' operation it is possible to start locally generated ringback if the channel is answered. This change adds the ability to stop it by using DELETE. ........ Merged revisions 402804 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404Kevin Harwell
Was returning a 404 on a valid technology with an empty list of endpoints. Now checking against the channel tech to make sure the tech itself is valid and not just an empty list of endpoints. (issue ASTERISK-22803) Reported by: David M. Lee ........ Merged revisions 402793 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404Kevin Harwell
Implementation listing endpoints by technology returned an empty array if no matching endpoints were found. Fixed so a "404 Not Found" will be returned instead. (closes issue ASTERISK-22803) Reported by: David M. Lee ........ Merged revisions 402787 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12pjsip_messaging, pjsip_header_funcs: Crashes due to NULL pointer dereferencesKevin Harwell
Both res_pjsip_messaging and res_pjsip_header_funcs were causing asterisk to crash because they were trying to dereference a NULL pointer. In the case of res_pjsip_messaging it was attempting to "print" a contact header that did not exist. In fact contact headers should not be part of a SIP MESSAGE, so the offending code was simply removed. In the case of res_pjsip_header_funcs a null private channel tech was being passed to the function and then later dereferenced. Added null checks (and error logging) to the read/write function handlers to guard against crashing. (closes issue ASTERISK-22821) Reported by: Anthony Messina ........ Merged revisions 402757 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12Fixed a typ.David M. Lee
........ Merged revisions 402738 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08res_stasis.c: Fix locking issues with the app_bridge_moh container.Richard Mudgett
* Fix unlinking from the app_bridges_moh container in remove_bridge_moh() without a lock under normal circumstances. * Made check ast_bridge_set_after_callback() return value in bridge_moh_create() to handle failure. * Fixed SCOPED_AO2LOCK() locking over too much scope in stasis_app_bridge_moh_channel() and stasis_app_bridge_moh_stop(). * Fixed unusual usage of ao2_unlink_flag() in control_unlink(). * Fixed orphaned bridge from off nominal path in stasis_app_bridge_create(). * Fixed strange construct in stasis_app_unsubscribe(). From a bad merge? * Made load_module() cleanup on failure. Review: https://reviewboard.asterisk.org/r/2962/ ........ Merged revisions 402593 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08Clarify an ambiguous error message.Mark Michelson
........ Merged revisions 402582 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402583 65c4cc65-6c06-0410-ace0-fbb531ad65f3