summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2014-03-21res_pjsip_registrar.c: Miscellaneous cleanup in rx_task().Richard Mudgett
* Fix variable shadowing of 'updated' by renaming it to 'contact_update'. * Checked 'contact_update' for ast_sorcery_copy() failure. * Removed silly use of RAII_VAR() for 'contact_update'. ........ Merged revisions 410995 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21Make the AEL load process less chatty.Sean Bright
Switched a bunch of LOG_NOTICEs to ast_debug. This time without breaking the build. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21Revert r410981. aelparse blew up.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21Make the AEL load process less chatty.Sean Bright
Switched a bunch of LOG_NOTICEs to ast_debug. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20assigned-uniqueids: Miscellaneous cleanup and fixes.Richard Mudgett
* Fix memory leak in ast_unreal_new_channels(). Made it generate the ;2 uniqueid on a stack variable instead of mallocing it. * Made send error response to ARI and AMI requests instead of just logging excessive uniqueid length and allowing truncation. action_originate() and ari_channels_handle_originate_with_id(). * Fixed minor truncating uniqueid hole when generating the ;2 uniqueid string length. Created public and internal lengths of uniqueid. The internal length can handle a max public uniqueid plus an appended ;2. * free() and ast_free() are NULL tolerant so they don't need a NULL test before calling. * Made use better struct initialization format instead of the position dependent initialization format. Also anything not explicitly initialized in the struct is initialized to zero by the compiler. * Made ast_channel_internal_set_fake_ids() use the safer ast_copy_string() instead of strncpy(). Review: https://reviewboard.asterisk.org/r/3371/ ........ Merged revisions 410949 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19PJSIP: Allow for identify sections to be specified in sorcery.conf.Mark Michelson
"identify" is a special type of configuration object in PJSIP because unlike the other objects, it is not provided by the base res_pjsip module. Instead, it is provided by the res_pjsip_endpoint_identifier_ip module. If using the default sorcery wizard (config,criteria=type=identify) then things work because the module that applies the default wizard is the correct module. However, if attempting to use sorcery.conf to apply an alternate wizard, it was not possible. If you attempted to specify the identify object type in the res_pjsip section, then the object could not be registered since the object was undocumented for the res_pjsip module. There was no alternate configuration section defined for it, so you were out of luck if you wanted to override the default wizard. With this change, the identify section will properly have a sorcery.conf-based wizard applied when the identify definition is within the res_pjsip_endpoint_identifier_ip section. ........ Merged revisions 410933 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19res_stasis: Fix a bug where the default bridge type was not set.Joshua Colp
........ Merged revisions 410918 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19res_stasis: Extend bridge type to be a comma separated list of bridge ↵Joshua Colp
attributes. This change turns the bridge type field into a comma separated list of attributes. These attributes include: mixing, holding, dtmf_events, and proxy_media. By setting the various attributes a user can control the type of bridge created with the behavior they need for their application. (closes issue ASTERISK-23437) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3359/ ........ Merged revisions 410904 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19res_ari: Fix documentation schema errorMatthew Jordan
........ Merged revisions 410890 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18res_ari: Add notes about Asterisk HTTP server to the "enabled" config option ↵Rusty Newton
for the res_ari general section Added note and see-also reminding user to enable the HTTP server. (closes issue ASTERISK-22499) Reported by: Rusty Newton ........ Merged revisions 410876 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18res_pjsip: Fix memory leak of nameservers in off-nominal resolver creation ↵Joshua Colp
failure. Thanks Walter Doekes! ........ Merged revisions 410844 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18res_fax_spandsp: Use g711_free() when available.Sean Bright
Per Johann Steinwendtner on the asterisk-dev mailing list: http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a noop. I opted not to remove the call to g711_release() since it is harmless and to call g711_free() if we have a sufficiently recent version of spandsp. (issue ASTERISK-20149) Reported by: Alexandr Gordeev ........ Merged revisions 410829 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 410830 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17res_pjsip: Enable PJSIP DNS client support.Joshua Colp
This change enables DNS client support within PJSIP. System nameservers are automatically discovered using res_init or res_ninit. If this fails then PJSIP will resort to using gethostbyname for resolution. By enabling this support we gain SRV support, failover, and weight support. (closes issue ASTERISK-23435) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3343/ ........ Merged revisions 410795 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17res_pjsip_multihomed: Make address replacement less aggressive.Joshua Colp
This change makes the res_pjsip_multihomed module less aggressive when changing the address in messages. It will now only occur if the transport in use is bound to the any address OR if the system determined source address matches the bound address of the transport in use. Review: https://reviewboard.asterisk.org/r/3369/ ........ Merged revisions 410793 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17Revert changes to sorcery that accidentally got committed.Mark Michelson
These changes were still up for review and have not been approved yet. I must have had the changes in my working copy when making a different change. ........ Merged revisions 410696 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17Fix stuck channel in ARI through the introduction of synchronous bridge actions.Mark Michelson
Playing back a file to a channel in an ARI bridge would attempt to wait until the playback concluded before returning. The method used involved signaling the waiting thread in the ARI custom playback function. The problem with this is that there were some corner cases that were not accounted for: * If a bridge channel could not be found, then we never would attempt the playback but would still attempt to wait for the playback to complete. * If the bridge playfile action failed to queue, we would still attempt to wait for the playback to complete. * If the bridge playfile action were queued but some circumstance caused the playback not to occur (the bridge dies, the channel is removed from the bridge), then we would never be notified. The solution to this is to move the waiting logic into the bridge code. A new bridge API function is added to queue a synchronous action on a bridge. The waiting thread is notified when the queued frame has been freed, either due to an error occurring or due to successful playback. As a failsafe, the waiting thread has a 10 minute timeout just in case there is a frame leak somewhere. Review: https://reviewboard.asterisk.org/r/3338 ........ Merged revisions 410673 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-16stasis/app.c: Add some extra debugging for subscription countsMatthew Jordan
Events are sent to a connected ARI application based on the things that ARI application cares about. These subscriptions can be set up implicitly - such as when that ARI application creates a new object - or explicitly, via the application resource's subscription operations. Debugging *why* something was being sent to an application - or why something was not being sent to an application - was a bit tricky, as there was no debug information for the subscriptions. This patch adds some debug level 3 statements that show the subscription counts for applications. (Level 3 was chosen as it matches the verbose level 3 statements elsewhere) ........ Merged revisions 410650 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14Handle the return values of realtime updates and stores more accurately.Mark Michelson
Realtime backends' update and store callbacks return the number of rows affected, or -1 if there was a failure. There were a couple of issues: * The config API was treating 0 as a successful return, and positive values as a failure. Now the config API treats anything >= 0 as a success. * res_sorcery_realtime was treating 0 as a successful return from the store procedure, and any positive values as a failure. Now sorcery treats anything > 0 as a success. It still considers 0 a "failure" since there is no change to report to observers. Review: https://reviewboard.asterisk.org/r/3341 ........ Merged revisions 410592 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14Prevent conflicts regarding unsolicited and solicited MWI to an endpoint.Mark Michelson
If an endpoint is receiving unsolicited MWI for a mailbox and then attempts to subscribe to an AOR that provides MWI for the same mailbox, then the SUBSCRIBE is rejected with a 500 response. Review: https://reviewboard.asterisk.org/r/3345 ........ Merged revisions 410590 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14PJSIP: TOS values should be represented as decimals in sorcery objectsJonathan Rose
(closes issue ASTERISK-23235) Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3324/ ........ Merged revisions 410574 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14ARI/bridges: Forward Playback/Recording Started/Finished to bridge topicJonathan Rose
(closes issue ASTERISK-23444) Reported by: Ben Merrills Review: https://reviewboard.asterisk.org/r/3340/ ........ Merged revisions 410558 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14res_mwi_external: Clear the stasis cache entry when the external MWI is deleted.Richard Mudgett
One of the things missing when external MWI support was added was the ability to clear the stasis cache entry of deleted external MWI mailboxes. Review: https://reviewboard.asterisk.org/r/3325/ ........ Merged revisions 410555 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-13ARI: Ensure managing application receives ChannelEnteredBridge messagesKinsey Moore
This fixes an issue where a Stasis application running over ARI and subscribed to ari/events could miss the ChannelEnteredBridge event because it did not subscribe to the new bridge fast enough. To accomplish this, it subscribes the application controlling the channel to the new bridge before adding it to that bridge which required the stasis_app_control structure to maintain a reference to the stasis_app. (closes issue ASTERISK-23295) Review: https://reviewboard.asterisk.org/r/3336/ ........ Merged revisions 410527 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-13Multiple revisions 410509-410510Joshua Colp
........ r410509 | file | 2014-03-13 06:23:14 -0700 (Thu, 13 Mar 2014) | 2 lines res_pjsip_multihomed: Fix a bug where the 200 OK for a REGISTER would contain the wrong contact. ........ r410510 | file | 2014-03-13 06:24:17 -0700 (Thu, 13 Mar 2014) | 2 lines res_pjsip_multihomed: Remove change for testing fix. ........ Merged revisions 410509-410510 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12res_musiconhold.c: Generate MOH start/stop events whenever the MOH stream is ↵Richard Mudgett
started/stopped. * Made res_musiconhold.c always post the MusicOnHoldStart/MusicOnHoldStop events when it actually starts/stops the music streams. This allows the events to always happen when MOH starts/stops. The event posting code was moved to the MOH alloc/release routines. * Made channel_do_masquerade() stop any MOH on the original channel before masquerading so the original channel will get a stop event with correct information. * Cleaned up a couple odd codings in moh_files_alloc() and moh_alloc() dealing with the music state variable. (issue ASTERISK-23311) Reported by: Benjamin Keith Ford Review: https://reviewboard.asterisk.org/r/3306/ ........ Merged revisions 410493 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12res_pjsip_multihomed: Fix a bug where outgoing messages for TCP would go out ↵Joshua Colp
using UDP. This change fixes a bug where the code which changes the transport did not check whether the message is going out over UDP or not before changing it. For TCP and TLS transports we don't need to change the transport as the correct one is already chosen. ........ Merged revisions 410471 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-11res_pjsip_multihomed: Add module which places the correct address within ↵Joshua Colp
messages. Due to how messages are handled within PJSIP it is not until a message is actually sent that the destination is reliably known. This means that the addresses placed within the message may not be of the interface the message is being sent out on. This module determines what interface a message is being sent on and updates the message to contain the correct address if applicable. This module was tested by myself in a virtualized environment with multiple interfaces and also by Kinsey Moore in the following configuration: Networks: * 10.24.16.0/21 ** hard phone ** default gateway * 10.24.64.0/21 ** softphone with pjsip-based stack Transport details: bind address: 0.0.0.0 protocol: UDP All endpoints were tested with explicitly configured transports and unconfigured transports. This was tested with inbound and outbound calls, both of which were experiencing detrimental effects from incorrect IP addresses in SIP messages. These effects were only experienced by the soft phone on the 10.24.64.0 network since the messages to the hard phone on the 10.24.16.0 network had the correct IP address. (closes issue ASTERISK-23020) Reported by: xrobau Review: https://reviewboard.asterisk.org/r/3102/ ........ Merged revisions 410451 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10unqiueid: correct max uniqueid length testScott Griepentrog
This patch adds null string test prior to checking for a max uniqueid value that was added in r410157. ........ Merged revisions 410368 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10AST-2014-003: res_pjsip: When handling 401/407 responses don't assume a ↵Joshua Colp
request will have an endpoint. This change removes the assumption that an outgoing request will always have an endpoint and makes the authenticate_qualify option work once again. (closes issue ASTERISK-23210) Reported by: Joshua Colp ........ Merged revisions 410306 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08pjsip_cli: Create pjsip show channel and contact, and general cli code cleanup.George Joseph
Created the 'pjsip show channel' and 'pjsip show contact' commands. Refactored out the hated ast_hashtab. Replaced with ao2_container. Cleaned up function naming. Internal only, no public name changes. Cleaned up whitespace and brace formatting in cli code. Changed some NULL checking from "if"s to ast_asserts. Fixed some register/unregister ordering to reduce deadlock potential. Fixed ast_sip_location_add_contact where the 'name' buffer was too short. Fixed some self-assignment issues in res_pjsip_outbound_registration. (closes issue ASTERISK-23276) Review: http://reviewboard.asterisk.org/r/3283/ ........ Merged revisions 410287 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08resource_channels: Check if a passed in ID is NULL before checking its lengthMatthew Jordan
Calling strlen on a NULL string is explosive. This patch checks whether or not the passed in string is NULL or zero length before checking to see if the string is too long. ........ Merged revisions 410274 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07res_pjsip: Fix documentation for one touch recording see-also linksMatthew Jordan
The one touch recording options have several see-also links between the various configuration options. These were 'broken' by the snake casing of those options. This patch corrects the see-also links such that they reference the correct option names. ........ Merged revisions 410194 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07Make res_sorcery_realtime filter unknown retrieved results.Mark Michelson
When retrieving data from a database or other realtime backend, it's quite possible to retrieve variables that Asterisk does not care about but that are legitimate to exist. Asterisk does not need to throw a hissy fit when these variables are encountered but rather just filter them out. Review: https://reviewboard.asterisk.org/r/3305 ........ Merged revisions 410187 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07pjsip: allow and disallow show same codecsScott Griepentrog
In order to prevent confusion over the allow and disallow list of codecs being the same an option for registering a field as an alias is added. The alias field will be read from the configuration file, but afterwards is not listed as a known field. With disallow set as an alias, the CLI command pjsip show endpoint # will list the allow= field, but not the disallow field. (closes issue ASTERISK-23092) Review: https://reviewboard.asterisk.org/r/3193/ ........ Merged revisions 410190 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07uniqueid: channel linkedid, ami, ari object creation with id'sScott Griepentrog
Much needed was a way to assign id to objects on creation, and much change was necessary to accomplish it. Channel uniqueids and linkedids are split into separate string and creation time components without breaking linkedid propgation. This allowed the uniqueid to be specified by the user interface - and those values are now carried through to channel creation, adding the assignedids value to every function in the chain including the channel drivers. For local channels, the second channel can be specified or left to default to a ;2 suffix of first. In ARI, bridge, playback, and snoop objects can also be created with a specified uniqueid. Along the way, the args order to allocating channels was fixed in chan_mgcp and chan_gtalk, and linkedid is no longer lost as masquerade occurs. (closes issue ASTERISK-23120) Review: https://reviewboard.asterisk.org/r/3191/ ........ Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06moh: fix a refcount error with realtime MOHRussell Bryant
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime MOH. Investigation of the backtrace showed a corrupt mohclass, implying that it got destroyed before the code expected it to. I went looking for reference counting errors that could have caused this crash and this patch this result. It contains 2 changes. 1) Remove a usless block of code that was impossible to reach. There was even a comment indicating that it was impossible to reach. The conditional includes "!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if block with the opposite check "ast_test_flag(global_flags, MOH_CACHERTCLASSES)". There's no good reason to keep it around. 2) A similar block to #1 contained a reference counting error. It stores state->class in the local variable mohclass without increasing its reference count. The reference count on mohclass is decremented at the end of the function. This block of code probably very rarely runs, which would help explain why this system was working fine for many months before experiencing a crash. Review: https://reviewboard.asterisk.org/r/3282/ ........ Merged revisions 410043 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 410044 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 410090 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06sorcery: Create AST_SORCERY dialplan function.George Joseph
This patch creates the AST_SORCERY dialplan function which allows someone to retrieve any value from a sorcery-based config file. It's similar to AST_CONFIG. The creation of the function itself was fairly straightforward but it required changes to the underlying sorcery infrastructure that rippled into individual sorcery objects. The changes stemmed from inconsistencies in how sorcery created ast_variable objectsets from sorcery objects and the inconsistency in how individual objects used that feature especially when it came to parameters that can be specified multiple times like contact in aor and match in identify. You can read more here... http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html So, what this patch does, besides actually creating the AST_SORCERY function, is the following... * Creates ast_variable_list_append which is a helper to append one ast_variable list to another. * Modifies the ast_sorcery_object_field_register functions to accept the already-defined sorcery_fields_handler callback. * Modifies ast_sorcery_objectset_create to accept a parameter indicating return type preference...a single ast_variable with all values concatenated or an ast_variable list with multiple entries. Also fixed a few bugs. * Modifies individual sorcery object implementations to use the new function definition of the ast_sorcery_object_field_register functions. * Modifies location.c and res_pjsip_endpoint_identifier_ip.c to implement sorcery_fields_handler handlers so they return multiple occurrences as an ast_variable_list. * Added a whole bunch of tests to test_sorcery. (closes issue ASTERISK-22537) Review: http://reviewboard.asterisk.org/r/3254/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06pjsip configuration: Make transport TOS values consistent with endpointsJonathan Rose
Transport TOS values were interpreted as DSCP values without being documented as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS values have historically. This patch makes the transport TOS values behave as TOS values and makes all TOS values readable as string values (e.g. AF11). In addition, alembic scripts have been updated to use the proper field types for all TOS/COS values. (issue ASTERISK-23235) Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3304/ ........ Merged revisions 410028 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06res_stasis_recording: Add a "target_uri" field to recording events.Joshua Colp
This change adds a target_uri field to the live recording object. It contains the URI of what is being recorded. (closes issue ASTERISK-23258) Reported by: Ben Merrills Review: https://reviewboard.asterisk.org/r/3299/ ........ Merged revisions 410025 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06Don't attempt to link in an aggregate MWI subscription if an endpoint does ↵Mark Michelson
not aggregate MWI. Attempting to link a NULL object into an ao2 container had been benign previously, but since enabling DO_CRASH in the testsuite, this is now causing a crash. It's better to be right here anyway. ........ Merged revisions 410011 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandspMatthew Jordan
When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw frame would be passed to modem_connect_tones_rx. That particular routine expects the data to be in slin format. This patch looks at the frame type and, if the data is ulaw/alaw, converts the format to slin before passing it to modem_connect_tones_rx. Review: https://reviewboard.asterisk.org/r/3296 (closes issue ASTERISK-20149) Reported by: Alexandr Gordeev Tested by: Michal Rybarik patches: spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578) ........ Merged revisions 409990 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409991 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06res_musiconhold.c: Remove some unnecessary RAII_VAR() usage.Richard Mudgett
* Made the moh_register() define use useful parameter names. ........ Merged revisions 409967 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05Fix res/res_http_websocket.c build failure in 32bit due to incorrect print ↵Moises Silva
format for uint64_t git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05Fix WebRTC over WSS not workingMoises Silva
Several fixes for the WebSockets implementation in res/res_http_websocket.c * Flush the websocket session FILE* as fwrite() may not actually guarantee sending the data to the network. If we do not flush, it seems that buffering on the SSL socket for outbound messages causes issues * Refactored ast_websocket_read to take into account that SSL file descriptors may be ready to read via fread() but poll() will not actually say so because the data was already read from the network buffers and is now in the libc buffers (closes issue ASTERISK-23099) (closes issue ASTERISK-21930) Review: https://reviewboard.asterisk.org/r/3248/ ........ Merged revisions 409681 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409697 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04res_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICEJonathan Rose
ICE sessions will now be restarted if sessions are changed to use new sets of remote candidates. (closes issue ASTERISK-22911) Reported by: Vytis Valentinavičius Review: https://reviewboard.asterisk.org/r/3275/ ........ Merged revisions 409565 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409570 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03res_stasis_recording: Fix memory leak of the absolute name.Joshua Colp
........ Merged revisions 409422 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01res_pjsip_session: Set options (100rel, timers) on incoming sessions.Joshua Colp
This change passes options to the UAS creation function. This in turn sets up 100rel and session timer properties on the incoming session. Reported by Julian Russell on asterisk-users mailing list. ........ Merged revisions 409287 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27Multiple revisions 409129-409130Jonathan Rose
........ r409129 | jrose | 2014-02-27 13:19:02 -0600 (Thu, 27 Feb 2014) | 15 lines res_rtp_asterisk: Fix checklist creating problems in ICE sessions Prior to this patch, local candidate lists including SRFLX would fail to start properly when building ICE candidate check lists. This patch fixes that problem by making sure that each SRFLX candidate is associated with the proper base address so that the check list can create matches properly. This patch was written by jcolp. The issue will be left open to await testing by the issue participants. (issue ASTERISK-23213) Reported by: Andrea Suisani Review: https://reviewboard.asterisk.org/r/3256/ ........ r409130 | jrose | 2014-02-27 13:38:10 -0600 (Thu, 27 Feb 2014) | 8 lines res_rtp_asterisk: correct build error from r409129 Accidentally placed a declaration below functional code (issue ASTERISK-23213) Reported by: Andrea Suisani Review: https://reviewboard.asterisk.org/r/3256/ ........ Merged revisions 409129-409130 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409131 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27res_pjsip_sdp_rtp: Apply packetization rules on inbound SDP handlingMatthew Jordan
The setting 'use_ptime' is supposed to tell Asterisk to honour the ptime attribute in an offer, preferring it to whatever packetization preferences have been set internally. Currently, however, something rather quirky will happen: (1) The SDP answer will be constructed in create_outgoing_sdp_stream. This will use the preferences from the endpoint, such that the 200 OK response will add the packetization preferences from the endpoint, and not what was offered. (2) When the 200 response is issued, apply_negotiated_sdp_stream is called. This will call apply_packetization, which will use the ptime attribute from the offer internally. We end up telling the offerer to use the internal ptime attribute, but we end up using the offered ptime attribute. Hilarity ensues. This patch modifies the behaviour by calling apply_packetization from negotiate_incoming_sdp_stream, which is called prior to create_outgoing_sdp_stream. This causes the format preferences on the session's media object to be set to the inbound ptime value (if 'use_ptime' is enabled), such that the construction of the answer gets the right value immediately. Review: https://reviewboard.asterisk.org/r/3244/ ........ Merged revisions 408999 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-26res_ari: Make some additional error responses consistent with the rest of ↵Joshua Colp
the system. This change makes some error cases use ast_ari_response_error to construct their error responses instead of manually doing it. This ensures they are consistent with the other error responses. Based on the original patch as done by Paul Belanger on the associated review. Review: https://reviewboard.asterisk.org/r/2904/ ........ Merged revisions 408957 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408958 65c4cc65-6c06-0410-ace0-fbb531ad65f3