summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2014-02-17Store SIP User-Agent information in contacts.Mark Michelson
When an endpoint sends a REGISTER request to Asterisk, we now will associate the User-Agent header with all contacts that were bound in that REGISTER request. ........ Merged revisions 408270 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-13Remove all PJSIP MWI-specific use from our MWI code.Mark Michelson
PJSIP has built-in MWI code that could be useful to some degree, but our utilization of the API actually made our code a bit more cluttered since we had to have special cases peppered throughout. With this change, we move to using the pjsip_evsub API instead, which streamlines the code by removing special cases. Review: https://reviewboard.asterisk.org/r/3205 ........ Merged revisions 408005 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-13Fix crash in AMI PJSIPShowEndpoint action.Mark Michelson
If an AOR has no permanent contacts, then the permanent_contacts container is never allocated. This makes the code safe in the face of NULLs. I also changed the variable that counts contacts from "num" to "total_contacts" since there are now two variables that are indicate numbers of things. ........ Merged revisions 407988 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-11ari/resource_channels: Add channel variables earlier in the creation processMatthew Jordan
This patch tweaks the behaviour of POST /channels with channel variables such that the variables are passed into the pbx.c routines that perform the origination. This allows the variables to be assigned to the newly created channels immediately upon their construction, as opposed to be assigned after the originate has completed. The upshot of this is that the variables are available on the channels if they execute in the dialplan, as opposed to only being available once the channels are answered. Review: https://reviewboard.asterisk.org/r/3183/ ........ Merged revisions 407937 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10res_config_pgsql: Fix ast_update2_realtime calls.Walter Doekes
Fix so multiple updates from a single call works (add missing ','). Remove bogus ast_free's that weren't supposed to be there. Moved a few spaces for readability. Review: https://reviewboard.asterisk.org/r/3194/ ........ Merged revisions 407873 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 407874 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 407875 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07timing: Improve performance for most timing implementations.Joshua Colp
This change allows timing implementation data to be stored directly on the timer itself thus removing the requirement for many implementations to do a container lookup for the same information. This means that API calls into timing implementations can directly access the information they need instead of having to find it. Review: https://reviewboard.asterisk.org/r/3175/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06res_pjsip: Updates and adds more PJSIP CLI commands.Richard Mudgett
* Adds identify, transport, and registration support to the PJSIP CLI. * Creates three additional callbacks, one for an iterator, one for a comparator, and one for a container. This eliminates the link dependency from higher level modules to lower level ones. * Eliminates duplicate sorting in PJSIP CLI commands. * Cleans up PJSIP CLI output formatting. * Pushes CLI command registration down to the implementing source file. * Adds several ast_sip_destroy_sorcery functions to complement existing ast_sip_sorcery_initialize functions. The destroy functions unregister PJSIP CLI commands and PJSIP CLI formatters. Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3104/ ........ Merged revisions 407568 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05res_pjsip: When no global type the debug option defaults to "yes"Kevin Harwell
If the global section was not specified in pjsip.conf then the configuration object does not exist in sorcery so when retrieving "debug" option it would return NULL. Then the NULL result was passed to ast_false utils function which would return false because it wasn't set to some representation of false, thus enabling sip debug logging. Made it so if the global config object does not exist then it will return a default of "no" for sip debugging. (issue ASTERISK-23038) Reported by: Rusty Newton ........ Merged revisions 407442 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04res_pjsip: Fix assertion for pjsip.conf authorization list options.Richard Mudgett
(closes issue ASTERISK-23168) Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3143/ ........ Merged revisions 407324 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04res_clialiases: Fix crash when reloading and re-aliasing an alias that is in ↵Joshua Colp
use. The code assumed that unregistering the alias would always succeed while in practice this is not actually true. A common case is the "reload" command itself. If the cli_aliases.conf configuration file was changed and reload executed the command would fail to unregister and ultimately point to freed memory. The reload process now checks whether unregistering succeeded or not and if not the old CLI alias is retained. (closes issue ASTERISK-19773) Reported by: Joel Vandal (closes issue ASTERISK-22757) Reported by: Gareth Blades ........ Merged revisions 407205 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 407210 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 407213 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-01res_stasis: Enable transfers and provide events when they occur.Joshua Colp
This change enables transfers within ARI created bridges and adds events for when they occur. Unlike other events these will be received if *any* subscribed object is involved in the transfer. (closes issue ASTERISK-22984) Reported by: David M. Lee Review: https://reviewboard.asterisk.org/r/3120/ ........ Merged revisions 407153 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31res_pjsip: Config option to enable PJSIP logger at load time.Kevin Harwell
Added a "debug" configuration option for res_pjsip that when set to "yes" enables SIP messages to be logged. It is specified under the "system" type. Also added an alembic script to add the option to realtime. (closes issue ASTERISK-23038) Reported by: Rusty Newton Review: https://reviewboard.asterisk.org/r/3148/ ........ Merged revisions 407036 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31res_pjsip_exten_state: Exporting global symbols caused load order issuesKevin Harwell
Removed the exportation of global symbols from the module as it is no longer needed and it could potentially cause load problems as on some systems it would try to load before res_pjsip_pubsub ........ Merged revisions 407034 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31Decouple subscription handling from NOTIFY/PUBLISH body generation.Mark Michelson
When the PJSIP pubsub framework was created, subscription handlers were required to state what event they handled along with what body types they knew how to generate. While this serves well when implementing a base RFC, it has problems when trying to extend the body to support non-standard or proprietary body elements. The code also was NOTIFY-specific, meaning that when the time comes that we start writing code to send out PUBLISH requests with MWI or presence bodies, we would likely find ourselves duplicating code that had previously been written. This changeset introduces the concept of body generators and body supplements. A body generator is responsible for allocating a native structure for a given body type, providing the primary body content, converting the native structure to a string, and deallocating resources. A body supplement takes the primary body content (the native structure, not a string) generated by the body generator and adds nonstandard elements to the body. With these elements living in their own module, it becomes easy to extend our support for body types and to re-use resources when sending a PUBLISH request. Body generators and body supplements register themselves with the pubsub core, similar to how subscription and publish handlers had done. Now, subscription handlers do not need to know what type of body content they generate, but they still need to inform the pubsub core about what the default body type for a given event package is. The pubsub core keeps track of what body generators and body supplements have been registered. When a SUBSCRIBE arrives, the pubsub core will check that there is a subscription handler for the event in the SUBSCRIBE, then it will check that there is a body generator that can provide the content specified in the Accept header(s). Because of the nature of body generators and supplements, it means res_pjsip_exten_state and res_pjsip_mwi have been completely gutted. They no longer worry about body types, instead calling ast_sip_pubsub_generate_body_content() when they need to generate a NOTIFY body. Review: https://reviewboard.asterisk.org/r/3150 ........ Merged revisions 407016 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31res_pjsip_mwi: Subscribe fails when missing aor nameKevin Harwell
When subscribing to MWI (res_pjsip_mwi) and the sip uri did not contain a name (ex: sip:<ip address>) then the subscription would fail since it would be unable to locate an associated aor. This patch makes it so that when a subscribe comes with no aor name then it will subscribe to all aors on the located endpoint. (closes issue ASTERISK-23072) Reported by: Bob M Review: https://reviewboard.asterisk.org/r/3164/ ........ Merged revisions 407014 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31PJSIP: Fix address for ACK in NAT situationsKinsey Moore
In NAT scenarios where a call is placed to a Grandstream phone, res_pjsip will sometimes send the ACK to a 200 OK to the private address of the device behind the NAT instead of the address of the NAT device. This corrects that behavior by rewriting the address in the Contact header in the incoming 200 OK and the dialog's target address if necessary (since it has already been rewritten to the incorrect private address). (closes issue ASTERISK-23106) Review: https://reviewboard.asterisk.org/r/3168/ Reported by: Matt Jordan ........ Merged revisions 407000 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictionsCorey Farrell
ast_bind to a port reserved for another program by SELinux causes errno == EACCES. This caused random failures when binding rtp or udptl sockets. Treat EACCES as a non-fatal error, try next port. (closes issue ASTERISK-23134) Reported by: Corey Farrell ........ Merged revisions 406933 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 406934 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 406935 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28res_pjsip_pubsub: potential crash on timeoutKevin Harwell
What seems to be happening is if a subscription has been terminated and the subscription timeout/expires is less than the time it takes for all pending transactions (currently on the subscription) to end then the subscription timer will not have been canceled yet and sub will be null. Since the subscription has already been canceled nothing needs to be done so a null check in the asterisk code is sufficient in working around this problem. (closes issue ASTERISK-23129) Reported by: Dan Jenkins ........ Merged revisions 406847 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28res_pjsip,compat: INFINITY and NAN undefinedKevin Harwell
On some systems the values for INFINITY and NAN are not defined thus causing a build error on those systems. Added definitions for those if they had not previously been defined. (closes issue ASTERISK-23056) Reported by: capouch Patches: inf-nan-patch.txt uploaded by capouch (license 6564) ........ Merged revisions 406788 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28ARI: Make double subscribe respond with successKinsey Moore
Currently, attempting to subscribe an application to a device state that it has already subscribed to will generate a 500 error response. This will now be treated as a subscription refresh even though ARI subscriptions don't currently support lifetimes and will respond with the normal response for a successful subscription (200 OK). (closes issue ASTERISK-23143) Reported by: Matt Jordan ........ Merged revisions 406775 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-26res_pjsip_session: Be less strict with core requested outgoing capabilities.Joshua Colp
The core may (depending on circumstances) request a single codec on outgoing calls. Many channel drivers ignore or treat this as a suggestion while still including configured codecs. The res_pjsip_session logic treated this as an explicit request, leaving out other configured codecs. This change makes res_pjsip_session behave like other channel driver and simply adds the requested codec to the list. (closes issue ASTERISK-23082) Reported by: xrobau Review: https://reviewboard.asterisk.org/r/3140/ ........ Merged revisions 406489 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practicalJonathan Rose
Review: https://reviewboard.asterisk.org/r/3141/ ........ Merged revisions 406360 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 406361 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 406389 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-23Multiple revisions 406294-406295Mark Michelson
........ r406294 | mmichelson | 2014-01-23 15:00:24 -0600 (Thu, 23 Jan 2014) | 11 lines Fix presence body errors found during testing: * PIDF bodies were reporting an "open" state in many cases where it should have been reporting "closed" * XPIDF bodies had XML nodes placed incorrectly within the hierarchy. * SIP URIs in XPIDF bodies did not go through XML sanitization * XML sanitization had some errors: * Right angle bracket was being replaced with "&rt;" instead of "&gt;" * Double quote, apostrophe, and ampersand were not being escaped. ........ r406295 | mmichelson | 2014-01-23 15:09:35 -0600 (Thu, 23 Jan 2014) | 11 lines Fix presence body errors found during testing: * PIDF bodies were reporting an "open" state in many cases where it should have been reporting "closed" * XPIDF bodies had XML nodes placed incorrectly within the hierarchy. * SIP URIs in XPIDF bodies did not go through XML sanitization * XML sanitization had some errors: * Right angle bracket was being replaced with "&rt;" instead of "&gt;" * Double quote, apostrophe, and ampersand were not being escaped. ........ Merged revisions 406294-406295 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22res_stasis_playback: Correct error argument orderKinsey Moore
Several of the playback error messages for invalid media input in res_stasis_playback.c had the media name and channel name reversed. They now correctly identify the channel name and media name. Reported by: skrusty ........ Merged revisions 406152 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21res_pjsip: Documentation improvement for Endpoint and AOR mailbox options.Rusty Newton
Making the help text for both more explicit regarding the format of mailbox identifiers. i.e. clarifying the format for app_voicemail mailboxes vs mailboxes from external MWI sources through modules such as res_external_mwi. ........ Merged revisions 406133 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21PJSIP: Handle headers in a list appropriatelyKinsey Moore
The PJSIP header parsing function (pjsip_parse_hdr) can generate more than one header instance from a single header field. These header instances exist as a list attached to the returned header and must be handled appropriately when they are added to a message or else only the first header instance will be used. This changes the linked list functions used in outbound proxy code to merge the lists properly. ........ Merged revisions 406020 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21ARI: Support channel variables in originateKinsey Moore
This adds back in support for specifying channel variables during an originate without compromising the ability to specify query parameters in the JSON body. This was accomplished by generating the body-parsing code in a separate function instead of being integrated with the URI query parameter parsing code such that it could be called by paths with body parameters. This is transparent to the user of the API and prevents manual duplication of code or data structures. (closes issue ASTERISK-23051) Review: https://reviewboard.asterisk.org/r/3122/ Reported by: Matt Jordan ........ Merged revisions 406003 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17pjsip: fix support for allow=allScott Griepentrog
This change adds improvements to support for allow=all in pjsip.conf so that it functions as intended. Previously, the allow/disallow socery configuration would set & clear codecs from the media.codecs and media.prefs list, but if all was specified the prefs list was not updated. Then a call would fail when create_outgoing_sdp_stream() created an SDP with no audio codecs. A new function ast_codec_pref_append_all() is provided to add all codecs to the prefs list - only those not already on the list. This enables the configuration to specify a codec preference, but still add all codecs, and even then remove some codecs, as shown in this example: allow = ulaw, alaw, all, !g729, !g723 Also, the display order of allow in cli output is updated to match the configuration by using prefs instead of caps when generating a human readable string. Finally, a change to create_outgoing_sdp_stream() skips a codec when it does not have a payload code instead of the call failing. (closes issue ASTERISK-23018) Reported by: xrobau Review: https://reviewboard.asterisk.org/r/3131/ ........ Merged revisions 405875 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17Fixing some XML syntax issues with my previous commit at r405777 for ↵Rusty Newton
ASTERISK-23071 ........ Merged revisions 405843 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17res_pjsip: enhance documentation for mailboxes options, for both endpoints ↵Rusty Newton
and aors Made documentation more explicit as to the use of the both options. (issue ASTERISK-23071) (closes issue ASTERISK-23071) Reported by: Matt Jordan ........ Merged revisions 405777 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17Enable wide band audio in musiconhold streams.Walter Doekes
Review: https://reviewboard.asterisk.org/r/3112/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16res_pjsip: AOR option qualify_frequency not respected on startupKevin Harwell
If an endpoint had previously dynamically registered a contact and the contact information was successfully stored in astdb then upon restart the qualify notifications would not be sent out if the qualify_frequency was set. This was due to the fact that only permanent contacts were being checked and scheduled for qualifies on startup. Modified the code to check and schedule all registered contacts at startup. (closes issue ASTERISK-23062) Reported by: Rusty Newton Review: https://reviewboard.asterisk.org/r/3124/ ........ Merged revisions 405748 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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