summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2014-01-16PJSIP: Fix outbound OPTIONS supportKinsey Moore
When path support was added and contacts were made available during request creation and transmission, the code path used by outbound qualify support was not modified correctly and was causing request creation to fail. This ensures that outbound request creation with only a contact and no dialog, endpoint, or uri can succeed which restores qualify support. Reported by: gtjoseph Reported by: kharwell ........ Merged revisions 405743 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16res_fax: check_modem_rate() returned incorrect rate for V.27Kevin Harwell
According to the new standard for V.27 and V.32 they are able to transmit at a bit rate of 4,800 or 9,600. The check_mode_rate function needed to be updated to reflect this. Also, because of this change the default 'minrate' value was updated to be 4800. (closes issue ASTERISK-22790) Reported by: Paolo Compagnini Patches: res_fax.txt uploaded by looserouting (license 6548) ........ Merged revisions 405656 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 405693 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405694 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15PJSIP: Add Path header supportKinsey Moore
This adds Path support to chan_pjsip in res_pjsip_path.c with minimal additions in res_pjsip_registrar.c to store the path and additions in res_pjsip_outbound_registration.c to enable advertisement of path support to registrars and intervening proxies. Path information is stored on contacts and is enabled via Address of Record (AoRs) and Registration configuration sections. While adding path support, it became necessary to be able to add SIP supplements that handled messages outside of sessions, so a framework for handling these types of hooks was added in parallel to the already-existing session supplements and several senders of out-of-dialog requests were refactored as a result. (closes issue ASTERISK-21084) Review: https://reviewboard.asterisk.org/r/3050/ ........ Merged revisions 405565 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14ARI: Add mailboxes resource for controlling and polling external MWIJonathan Rose
Adds the following AMI commands: PUT mailboxes/mailboxName modifies mailbox state and implicitly creates new mailboxes GET mailboxes/mailboxName retrieves a JSON representation of a single mailbox if it exists GET mailboxes retrieves a JSON array of all mailboxes DELETE mailbox/mailboxName deletes a mailbox Note that res_mwi_external must be loaded for these functions to actually do anything. Review: https://reviewboard.asterisk.org/r/3117/ ........ Merged revisions 405553 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14Fix erroneous behavior when sending auth rejection to artificial endpoint.Mark Michelson
We were not including an authentication challenge when sending a 401 response to unmatched endpoints. This was due to the conversion to use a vector for authentication section names on an endpoint. The vector for artificial endpoints was empty, resulting in the challenge being sent back containing no challenges. This is worked around by placing a bogus value in the artificial endpoint's auth vector. This value is never looked up by anything, since they instead will directly call ast_sip_get_artificial_auth(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13res_pjsip: Fix CLI tab completion issuesKinsey Moore
This fixes several issues with the new res_pjsip CLI tab completion such as output of headers during tab completion and being able to tab-complete more items than the code actually handled (further items would simply be ignored). (closes issue ASTERISK-23081) Review: https://reviewboard.asterisk.org/r/3115/ Reported by: xrobau ........ Merged revisions 405338 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12res_ari: Fix various memory leaks.Joshua Colp
This change fixes a few memory leaks that were found based on a mailing list post. 1. Some JSON response messages were never freed. This was caused by the documentation stating that message references were stolen when in reality they were not. The code now follows the documentation and usage has been updated. 2. HTTP response headers were never freed. 3. The variable list for wildcards paths was never freed. (closes issue ASTERISK-23128) Reported by: Kenneth Watson (on list) Review: https://reviewboard.asterisk.org/r/3119/ ........ Merged revisions 405325 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-10Print "<unknown>" for artificial endpoint in PJSIP security events.Mark Michelson
Previously, this printed a UUID, which was not very clear when dealing with an artificial endpoint. Review: https://reviewboard.asterisk.org/r/3113 ........ Merged revisions 405298 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09PJSIP: Add unhold on reinvite without SDP behaviorJonathan Rose
Review: https://reviewboard.asterisk.org/r/3106/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09res_pjsip_messaging: potential for field values in from/to headers to be missingKevin Harwell
Added in ability to specify display name format ("name" <sip:name@ipaddr:port>) for a given URI and made sure it was fully propagated to the outgoing message. Also made it so outoing messages in res_pjsip always send as "sip:". (closes issue ASTERISK-22924) Reported by: Anthony Messina Review: https://reviewboard.asterisk.org/r/3094/ ........ Merged revisions 405266 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09astobj2: Correct ao2_iterator opacity violationsKinsey Moore
This corrects the ao2_iterator opacity violations in res_pjsip_session.c by adding a global function to get the number of elements inside the container hidden behind the iterator. (closes issue ASTERISK-23053) Review: https://reviewboard.asterisk.org/r/3111/ Reported by: Richard Mudgett ........ Merged revisions 405253 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09res_rtp_asterisk: Fails to resume WebRTC call from holdKevin Harwell
In ast_rtp_ice_start if the ice session create check list failed, start check was never initiated and ice_started was never set to true. Upon re-entering the function (for instance, [un]hold) it would try to create the check list again with duplicate remote candidates. Fixed so that if the create check list fails the necessary data structures are properly re-initialized for any subsequent retries. Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a check list failure because it possible things might still work. However, a debug message was added to help with any future troubleshooting. (closes issue ASTERISK-22911) Reported by: Vytis Valentinavičius Patches: works_on_my_machine.patch uploaded by xytis (license 6558) ........ Merged revisions 405234 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405235 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08Use proper case for checking if digest authentication is used.Mark Michelson
........ Merged revisions 405131 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07res_pjsip_acl: Fix another case of assuming a contact will always contain a URI.Joshua Colp
........ Merged revisions 405034 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07res_pjsip_nat: Don't assume a Contact header will always contain a URI.Joshua Colp
If the 'rewrite_contact' option was enabled and a Contact header was received which contained a '*' a crash would occur. This change makes the res_pjsip_nat module ignore the Contact header if it contains only a '*'. (closes issue ASTERISK-23101) Reported by: Matt Jordan ........ Merged revisions 405019 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06External MWI AMI support.Richard Mudgett
The external MWI AMI interface provides a thin wrapper around the core external MWI resource. The resource adds the following AMI actions: MWIGet, MWIDelete, and MWIUpdate. (closes issue AFS-46) Review: https://reviewboard.asterisk.org/r/3061/ ........ Merged revisions 404954 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06External MWI core support.Richard Mudgett
* The core external MWI resource provides for MWI message counts persistence using sorcery. With sorcery, the user is able to configure which sorcery wizzard backend to use if the default astdb is not desired. * The core external MWI resoruce provides some debugging CLI commands enabled by defining MWI_DEBUG_CLI. The debugging CLI commands are: "mwi delete all", "mwi delete like <regex>", "mwi delete mailbox <mailbox>", "mwi list all", "mwi list like <regex>", "mwi show mailbox <mailbox>", and "mwi update mailbox <mailbox> [<new> [<old>]]". (closes issue AFS-43) Review: https://reviewboard.asterisk.org/r/3061/ ........ Merged revisions 404952 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-05res_pjsip_outbound_registration: Don't assume that a registration client ↵Joshua Colp
will always exist. ........ Merged revisions 404935 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-05res_pjsip_outbound_registration: Create registration client in pj thread.Joshua Colp
Depending on which threading was loading the outbound registration it was possible for the registration client to be allocated outside of a pj thread. This change moves the creation inside the synchronous task where it is guaranteed it will occur in a pj thread. Reported by: Rob Thomas ........ Merged revisions 404923 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03res_pjsip_logger: Add the ASTERISK_FILE_VERSION macroMatthew Jordan
Registering yourself with the Asterisk core is the nice thing to do, even when you're a logging module. ........ Merged revisions 404855 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03res_pjsip_authenticator_digest: Fix md5 hash bufferMatthew Jordan
An md5 hash is 32 bytes long. The char buffer must be at least 33 bytes to avoid clobbering of the stack. This patch also fixes a potential clobbering in test_utils.c. Thanks to Andrew Nagy for reporting and testing this out in #asterisk-dev Reported by: Andrew Nagy Tested by: Andrew Nagy ........ Merged revisions 404843 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03res_pjsip: Ensure more URI validation happens in pj threads.Joshua Colp
........ Merged revisions 404737 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03res_pjsip_outbound_registration: Ensure URI validation happens in a pjlib ↵Joshua Colp
thread. This change moves outbound registration URI validation into the task executed within a pjlib thread. Reported by: Andrew Nagy ........ Merged revisions 404725 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-02res_pjsip: add 'set_var' support on endpointsKevin Harwell
Added a new 'set_var' option for ast_sip_endpoint(s). For each variable specified that variable gets set upon creation of a pjsip channel involving the endpoint. (closes issue ASTERISK-22868) Reported by: Joshua Colp Review: https://reviewboard.asterisk.org/r/3095/ ........ Merged revisions 404663 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31chan_pjsip: Handle hanging up before calling.Joshua Colp
Channel creation in Asterisk is broken up into two steps: requesting and calling. In some cases a channel may be requested but never called. This happens in the ChanIsAvail dialplan application for determining if something is reachable or not. The PJSIP channel driver did not take this situation into account and attempted to end a session that was never called out on. The code now checks the session state to determine if the session has been called out on and if not terminates it instead of ending it. (closes issue ASTERISK-23074) Reported by: Kilburn ........ Merged revisions 404652 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31res_pjsip_endpoint_identifier_ip: Accept hostnames in the 'match' field.Joshua Colp
Hostnames specified in the 'match' field will be resolved and all addresses returned. Each address will be added to the endpoint identifier for the matching process. Reported by: Rob Thomas ........ Merged revisions 404613 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31res_pjsip_outbound_registration: Add validation for 'server_uri' and ↵Joshua Colp
'client_uri'. When applying configuration for outbound registrations the 'server_uri' and 'client_uri' fields were not validated. The code will now confirm that they exist and that they contain parseable SIP URIs. Reported by: Andrew Nagy ........ Merged revisions 404592 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-24res_pjsip_pubsub: Ensure dialog manipulation happens on proper thread.Joshua Colp
When destroying a subscription we remove the serializer from its dialog and decrease its reference count. Depending on which thread dropped the subscription reference count to 0 it was possible for this to occur in a thread where it is not possible. (closes issue ASTERISK-22952) Reported by: Matt Jordan ........ Merged revisions 404553 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-21res_pjsip/pjsip_cli: fix compilation error caused by passing ast_freeMatthew Jordan
When wanting to pass *free as a function pointer, ast_free_ptr has to be used instead of ast_free. This allows it to be compiled with MALLOC_DEBUG enabled. ........ Merged revisions 404531 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20ari: Remove support for specifying channel vars during origination.David M. Lee
When we added support for specifying channel variables for an origination, we didn't consider how that would interact with another feature, namely specifying request parameters in a JSON request body. The method of specifying channel variables (as a flat JSON object passed in the JSON body) interferes with parsing parameters out of the request body. Unfortunately, fixing this would be a backward incompatible change. In the interest of keeping the API sane and keeping our release schedule, we're dropping the feature for specifying channel variables in the origination request. We will bring the feature back soon, as a backward compatible addition to the API. (closes issue ASTERISK-23051) Review: https://reviewboard.asterisk.org/r/3088 ........ Merged revisions 404509 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20res_pjsip: Add PJSIP CLI commandsMatthew Jordan
Implements the following cli commands: pjsip list aors pjsip list auths pjsip list channels pjsip list contacts pjsip list endpoints pjsip show aor(s) pjsip show auth(s) pjsip show channels pjsip show endpoint(s) Also... Minor modifications made to the AMI command implementations to facilitate reuse. New function ast_variable_list_sort added to config.c and config.h to implement variable list sorting. (issue ASTERISK-22610) patches: pjsip_cli_v2.patch uploaded by george.joseph (License 6322) ........ Merged revisions 404480 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20Fix issue where PJSIP blind transferer dialog may not complete as planned.Mark Michelson
When transferring to a dialplan extension that will not place any outbound calls, the only control frames that the PJSIP REFER framehook will receive are inconsequential (such as unhold or srcchange). As such, we shouldn't allow for the reception of those types of frames prevent us from signaling to the transferring party that the transfer has completed successfully once voice frames are read. Thanks to Jonathan Rose for pointing this out. ........ Merged revisions 404439 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20res_stasis_device_state: Set resource type for subscriptions to deviceStateMatthew Jordan
The documentation for ARI already specifies that the device state resource when used for subscribing for events is "deviceState", not "device_state". The code, however, used "device_state"; although this was inconsistent as well in doxygen comments in resource_applications. Because the actual resource being subscribed to is /deviceStates/{device}/, it makes sense for the resource type specifier to be deviceState. Note that the key value in the events is still "device_state". ........ Merged revisions 404437 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20ao2_iterator: Mini-audit of the ao2_iterator loops in the new code files.Richard Mudgett
* Fixed several places where ao2_iterator_destroy() was not called. * Fixed several iterator loop object variable reference problems. * Fixed res_parking AMI actions returning non-zero. Only the AMI logoff action can return non-zero. Review: https://reviewboard.asterisk.org/r/3087/ ........ Merged revisions 404434 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19res_pjsip: Ignore 401/407 responses for transactions and dialogs we don't ↵Joshua Colp
know about. Under normal conditions it is unlikely we will ever receive a response for a transaction or dialog we don't know about but if any are received ignore them. ........ Merged revisions 404371 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19res_pjsip_session: Fix SDP negotiation when resending an INVITE with ↵Joshua Colp
authentication. The process for resending an INVITE with authentication involves restarting the UAC session. We were incorrectly passing in that a new offer is being sent, causing the SDP negotiation to get into a (technically speaking) funky state. ........ Merged revisions 404369 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19Fix a deadlock that occurred due to a conflict of masquerades.Mark Michelson
For the explanation, here is a copy-paste of the review board explanation: Initially, it was discovered that performing an attended transfer of a multiparty bridge with a PJSIP channel would cause a deadlock. A PBX thread started a masquerade and reached the point where it was calling the fixup() callback on the "original" channel. For chan_pjsip, this involves pushing a synchronous task to the session's serializer. The problem was that a task ahead of the fixup task was also attempting to perform a channel masquerade. However, since masquerades are designed in a way to only allow for one to occur at a time, the task ahead of the fixup could not continue until the masquerade already in progress had completed. And of course, the masquerade in progress could not complete until the task ahead of the fixup task had completed. Deadlock. The initial fix was to change the fixup task to be asynchronous. While this prevented the deadlock from occurring, it had the frightful side effect of potentially allowing for tasks in the session's serializer to operate on a zombie channel. Taking a step back from this particular deadlock, it became clear that the problem was not really this one particular issue but that masquerades themselves needed to be addressed. A PJSIP attended transfer operation calls ast_channel_move(), which attempts to both set up and execute a masquerade. The problem was that after it had set up the masquerade, the PBX thread had swooped in and tried to actually perform the masquerade. Looking at changes that had been made to Asterisk 12, it became clear that there never is any time now that anyone ever wants to set up a masquerade and allow for the channel thread to actually perform the masquerade. Everyone always is calling ast_channel_move(), performs the masquerade itself before returning. In this patch, I have removed all blocks of code from channel.c that will attempt to perform a masquerade if ast_channel_masq() returns true. Now, there is no distinction between setting up a masquerade and performing the masquerade. It is one operation. The only remaining checks for ast_channel_masq() and ast_channel_masqr() are in ast_hangup() since we do not want to interrupt a masquerade by hanging up the channel. Instead, now ast_hangup() will wait for a masquerade to complete before moving forward with its operation. The ast_channel_move() function has been modified to basically in-line the logic that used to be in ast_channel_masquerade(). ast_channel_masquerade() has been killed off for real. ast_channel_move() now has a lock associated with it that is used to prevent any simultaneous moves from occurring at once. This means there is no need to make sure that ast_channel_masq() or ast_channel_masqr() are already set on a channel when ast_channel_move() is called. It also means the channel container lock is not pulling double duty by both keeping the container locked and preventing multiple masquerades from occurring simultaneously. The ast_do_masquerade() function has been renamed to do_channel_masquerade() and is now internal to channel.c. The function now takes explicit arguments of which channels are involved in the masquerade instead of a single channel. While it probably is possible to do some further refactoring of this method, I feel that I would be treading dangerously. Instead, all I did was change some comments that no longer are true after this changeset. The other more minor change introduced in this patch is to res_pjsip.c to make ast_sip_push_task_synchronous() run the task in-place if we are already a SIP servant thread. This is related to this patch because even when we isolate the channel masquerade to only running in the SIP servant thread, we would still deadlock when the fixup() callback is reached since we would essentially be waiting forever for ourselves to finish before actually running the fixup. This makes it so the fixup is run without having to push a task into a serializer at all. (closes issue ASTERISK-22936) Reported by Jonathan Rose Review: https://reviewboard.asterisk.org/r/3069 ........ Merged revisions 404356 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19res_fax.c: crash on framehook with no dsp in fax detectScott Griepentrog
In fax_detect_framehook() a null pointer reference can occur where a voice frame is processed but no dsp is attached to the fax detection structure. The code block that rejects frames that detection cannot be processed on is checking for dsp but falls through when it should instead return, as this change implements. (closes issue ASTERISK-22942) Reported by: adomjan Review: https://reviewboard.asterisk.org/r/3076/ ........ Merged revisions 404351 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 404352 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19Voicemail: Remove mailbox identifier format (box@context) assumptions in the ↵Richard Mudgett
system. This change is in preparation for external MWI support. Removed code from the system for normal mailbox handling that appends @default to the mailbox identifier if it does not have a context. The only exception is the legacy hasvoicemail users.conf option. The legacy option will only work for app_voicemail mailboxes. The system cannot make any assumptions about the format of the mailbox identifer used by app_voicemail. chan_sip and chan_dahdi/sig_pri had the most changes because they both tried to interpret the mailbox identifier. chan_sip just stored and compared the two components. chan_dahdi actually used the box information. The ISDN MWI support configuration options had to be reworked because chan_dahdi was parsing the box@context format to get the box number. As a result the mwi_vm_boxes chan_dahdi.conf option was added and is documented in the chan_dahdi.conf.sample file. Review: https://reviewboard.asterisk.org/r/3072/ ........ Merged revisions 404348 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18channel locking: Add locking for channel snapshot creationKevin Harwell
Original commit message by mmichelson (asterisk 12 r403311): "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." The above was initially committed and then reverted at r403398. The problem was found to be in core_local.c in the publish_local_bridge_message function. The ast_unreal_lock_all function locks and adds a reference to the returned channels and while they were being unlocked they were not being unreffed when no longer needed. Fixed by unreffing the channels. Also in bridge.c a lock was obtained on "other->chan", but then an attempt was made to unlock "other" and not the previously locked channel. Fixed by unlocking "other->chan" (closes issue ASTERISK-22709) Reported by: John Bigelow ........ Merged revisions 404237 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18channels: Return allocated channels locked.Joshua Colp
This change makes ast_channel_alloc return allocated channels locked. By doing so no other thread can acquire, lock, and manipulate the channel before it is completely set up. (closes issue AST-1256) Review: https://reviewboard.asterisk.org/r/3067/ ........ Merged revisions 404204 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18res_calendar: Protect channel when adding datastore.Joshua Colp
This change adds a missing channel lock when adding a datastore to a channel. ........ Merged revisions 404135 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 404136 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 404137 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17bridging: Give bridges a name and a known creatorJonathan Rose
Bridges have two new optional properties, a creator and a name. Certain consumers of bridges will automatically provide bridges that they create with these properties. Examples include app_bridgewait, res_parking, app_confbridge, and app_agent_pool. In addition, a name may now be provided as an argument to the POST function for creating new bridges via ARI. (closes issue AFS-47) Review: https://reviewboard.asterisk.org/r/3070/ ........ Merged revisions 404042 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17res_sorcery_config: Output an error message when an object can't be created.Joshua Colp
If object creation fails an error message will now be output with the id, type, and configuration file. ........ Merged revisions 404029 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17ari/resource_channels: When creating a channel, specify a default format (SLIN)Matthew Jordan
When creating channels via ARI, the current code fails to provide any default format capabilities. For non-virtual channels this isn't really a problem - the channels typically receive their capabilities as a result of the underlying channel driver configuration. For virtual channels (such as Local channels), the lack of any format capabilities causes the Asterisk core to make some 'odd' choices with respect to the translation paths. The issue reporter had some paths that had 3 hops on each channel leg, causing multiple transcodings and some really crappy audio/performance. By specifying a baseline of SLIN, we prevent that from occurring. Note that this is what AMI does when it performs an Originate, as does res_clioriginate. Review: https://reviewboard.asterisk.org/r/3068/ (issue ASTERISK-22962) Reported by: Matt DiMeo ........ Merged revisions 403993 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-14res_pjsip: Apply outbound proxy to all SIP requests.Joshua Colp
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/ ........ Merged revisions 403811 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-14res_stasis: Expose event for call forwarding and follow forwarded channel.Joshua Colp
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/ ........ Merged revisions 403808 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13documentation: Add PJSIP technology to messaging documentationJonathan Rose
........ Merged revisions 403796 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13Transfers: Make Asterisk set ATTENDEDTRANSFER/BLINDTRANSFER more reliablyJonathan Rose
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/ ........ Merged revisions 403781 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-13ARI: Allow specifying channel variables during a POST /channelsKevin Harwell
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/ ........ Merged revisions 403752 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403757 65c4cc65-6c06-0410-ace0-fbb531ad65f3