summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-12-17Fix printf problems with high ascii characters after r413586 (1.8).Walter Doekes
In r413586 (1.8) various casts were added to silence gcc 4.10 warnings. Those fixes included things like: -out += sprintf(out, "%%%02X", (unsigned char) *ptr); +out += sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii characters, but for the high range that yields e.g. FFFFFFC3 when C3 is expected. This changeset: - fixes those casts to use the 'hh' unsigned char modifier instead - consistently uses %02x instead of %2.2x (or other non-standard usage) - adds a few 'h' modifiers in various places - fixes a 'replcaes' typo - dev/urandon typo (in 13+ patch) Review: https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close Reported by: Stefan27 (on IRC) ........ Merged revisions 429673 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429674 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-16res_pjsip_config_wizard: fix test breakageGeorge Joseph
Fix test breakage caused by not checking for res_pjsip before calling ast_sip_get_sorcery. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4269/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-16chan_sip: Allow T.38 switch-over when SRTP is in use.Joshua Colp
Previously when SRTP was enabled on a channel it was not possible to switch to T.38 as no crypto attributes would be present. This change makes it so it is now possible. If a T.38 re-invite comes in SRTP is terminated since in practice you can't encrypt a UDPTL stream. Now... if we were doing T.38 over RTP (which does exist) then we'd have a chance but almost nobody does that so here we are. ASTERISK-24449 #close Reported by: Andreas Steinmetz patches: udptl-ignore-srtp-v2.patch submitted by Andreas Steinmetz (license 6523) ........ Merged revisions 429632 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-16res_pjsip_t38: Fix T.38 failure when peer reinvites immediately.Joshua Colp
If a remote endpoint reinvites to T.38 immediately the state machine will go into a peer reinvite state. If a T.38 capable application (such as ReceiveFax) queries it will receive this state. Normally the application will then indicate so that the channel driver will queue up the T.38 offer previously received. Once it receives this offer the application will act normally and negotiate. The res_pjsip_t38 module incorrectly partially squashed this indication. This would cause the application to think the request had failed when in reality it had actually worked. This change makes it so that no T.38 control frames (or indications) are squashed. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-15res_pjsip_config_wizard: Allow streamlined config of common pjsip scenariosGeorge Joseph
res_pjsip_config_wizard ------------------ * This is a new module that adds streamlined configuration capability for chan_pjsip. It's targetted at users who have lots of basic configuration scenarios like 'phone' or 'agent' or 'trunk'. Additional information can be found in the sample configuration file at config/samples/pjsip_wizard.conf.sample. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4190/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-15Activate persistent subscriptions when they are recreated.Mark Michelson
Prior to this change, recreating persistent subscriptions would create the subscription but would not activate it. This led to subscriptions being listed in the "NULL" state by diagnostics and not sending NOTIFYs when expected. Review: https://reviewboard.asterisk.org/r/4261 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12loader: Move definition of ast_module_reload from _private.h to module.hGeorge Joseph
No functionality change. Just move the definition of ast_module_reload from _private.h to module.h so it can be public. Also removed the include of _private.h from manager.c since ast_module_load was the only reason for including it. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12DEBUG_THREADS: Fix regression and lock tracking initialization problems.Richard Mudgett
This patch started with David Lee's patch at https://reviewboard.asterisk.org/r/2826/ and includes a regression fix introduced by the ASTERISK-22455 patch. The initialization of a mutex's lock tracking structure was not protected in a critical section. This is fine for any mutex that is explicitly initialized, but a static mutex may have its lock tracking double initialized if multiple threads attempt the first lock simultaneously. * Added a global mutex to properly serialize initialization of the lock tracking structure. The painful global lock can be mitigated by adding a double checked lock flag as discussed on the original review request. * Defer lock tracking initialization until first use. * Don't be "helpful" and initialize an uninitialized lock when DEBUG_THREADS is enabled. Debug code is not supposed to fix or change normal code behavior. We don't need a lock initialization race that would force a re-setup of lock tracking. Lock tracking already handles initialization on first use. * Properly handle allocation failures of the lock tracking structure. * No need to initialize tracking data in __ast_pthread_mutex_destroy() just to turn around and destroy it. The regression introduced by ASTERISK-22455 is the result of manipulating a pthread_mutex_t struct outside of the pthread library code. The pthread_mutex_t struct seems to have a global linked list pointer member that can get changed by other threads. Therefore, saving and restoring the contents of a pthread_mutex_t struct is a bad thing. Thanks to Thomas Airmont for finding this obscure regression. * Don't overwrite the struct ast_lock_track.reentr_mutex member to restore tracking data in __ast_cond_wait() and __ast_cond_timedwait(). The pthread_mutex_t struct must be treated as a read-only opaque variable. Miscellaneous other items fixed by this patch: * Match ast_suspend_lock_info() with ast_restore_lock_info() in __ast_cond_timedwait(). * Made some uninitialized lock sanity checks return EINVAL and try a DO_THREAD_CRASH. * Fix bad canlog initialization expressions. ASTERISK-24614 #close Reported by: Thomas Airmont Review: https://reviewboard.asterisk.org/r/4247/ Review: https://reviewboard.asterisk.org/r/2826/ ........ Merged revisions 429539 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12res/res_agi: Make Verbose message for 'stream file' match other playbacksMatthew Jordan
The Verbose message displayed when a file is played back via 'stream file' was formatted differently than other playbacks: * It didn't include the channel name * It didn't include the channel language It does, however, include the playback offset as well as any escape digits. That information was kept; however, this patch updates the formatting to more closely match the Verbose messages displayed when a file is played back by 'control stream file', Playback, ControlPlayback, or any other file playback operation. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12Add 11 merge propertiesMatthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12media: Fix crash when determining sample count of a frame during shutdown.Joshua Colp
When shutting down Asterisk the codecs are cleaned up. As a result anything attempting to get a codec based on ID or details will find that no codec exists. This currently occurs when determining the sample count of a frame. This code did not take this situation into account. This change fixes this by getting the codec directly from the format and eliminates the lookup. This is both faster and also provides a guarantee that the codec will exist and will be valid. ASTERISK-24604 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4260/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12chan_pjsip: Race between channel answer and bridge setup when using direct mediaKevin Harwell
When direct media is enabled and a pjsip channel is answered a race would occur between the handling of the answer and bridge setup. Sometimes the media negotiation would take place after the native bridge was setup. This resulted in a NULL media address, which in turn resulted in Asterisk using its address as the remote media address when sending a reinvite. This patch makes the chan_pjsip answer handler synchronous thus alleviating the race condition (the bridge won't start setting things up until after it returns). ASTERISK-24563 #close Reported by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4257/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12Fix crash for sorcery misconfigsDavid M. Lee
res_pjsip_outbound_publish was missing the CHECK_PJSIP_MODULE_LOADED() call in load_module, and would crash with a segfault if res_pjsip declined to load. Review: https://reviewboard.asterisk.org/r/4258/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12PJSIP: Allow use of 'inactive' streams for holdKinsey Moore
This allows use of the 'inactive' stream direction identifier to be used for hold where 'sendonly' is normally used. Some Seimens phones use 'inactive' and this change allows music on hold to operate properly. Review: https://reviewboard.asterisk.org/r/4252/ Reported by: Steve Pitts ........ Merged revisions 429432 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12Sorcery: Log when old config remains in useKinsey Moore
This adds a log message notifying the user that a stale configuration is in place upon reload when a config object fails to load. This situation can end up causing confusion when the object failed to load but exists from a previous config load especially when the old config is significantly different from the new config. Review: https://reviewboard.asterisk.org/r/4250/ Reported by: Thomas Thompson ........ Merged revisions 429429 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12res_pjsip_session: Delay sending BYE if a re-INVITE transaction is in progress.Joshua Colp
Given the scenario where a PJSIP channel is in a native RTP bridge with direct media and the channel is then hung up the code will currently re-INVITE the channel back to Asterisk and send a BYE at the same time. Many SIP implementations dislike this greatly. This change makes it so that if a re-INVITE transaction is in progress the BYE is queued to occur after the completion of the transaction (be it through normal means or a timeout). Review: https://reviewboard.asterisk.org/r/4248/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12res_pjsip_session: Fix issue where a declined media stream in a re-INVITE ↵Joshua Colp
would fail SDP negotiation. In the past the SDP negotiation within res_pjsip_session was made more tolerant of certain situations. The only case where SDP negotiation will fail is when a major error occurs during negotiation. Receiving an already declined media stream is not considered a major error. When producing the local SDP the logic took this into account so on the initial INVITE the declined media stream did not cause an SDP negotiation failure. Unfortunately the logic for handling media streams with a handler did not mirror this logic and considered an already declined media stream an error and thus failed the SDP negotiation. This change makes the logic between both situations match so only under major errors will the SDP negotiation fail. ASTERISK-24607 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4254/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-11ARI/AMI: Include language in standard channel snapshot outputKevin Harwell
The CHANGES verbiage for the "language" addition had been put under the wrong release. This moves it to be under 13.1 to 13.2 changes. ASTERISK-24553 Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-11Recorded merge of revisions 429378 from ↵Kinsey Moore
http://svn.asterisk.org/svn/asterisk/branches/12 ........ Fix incorrect patch applied in r429354 The patch that was applied was another pending patch. This swaps them out. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-11Recorded merge of revisions 429354 from ↵Kinsey Moore
http://svn.asterisk.org/svn/asterisk/branches/12 ........ Stasis: Update unittest for channel snapshots This adjusts the unit test for channel snapshots to take the new language key into account. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-11Stasis: Update unittest for channel snapshotsKinsey Moore
This adjusts the unit test for channel snapshots to take the new language key into account. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-10ARI/AMI: Include language in standard channel snapshot outputKevin Harwell
Adding information about including "language" in the standard channel snapshot output to the CHANGES file. Note the actual source changes have already been previously committed. ASTERISK-24553 Reported by: Matt Jordan ........ Merged revisions 429325 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-10res_http_websocket: Fix crash due to double freeing memory when receiving a ↵Joshua Colp
payload length of zero. Frames with a payload length of 0 were incorrectly handled in res_http_websocket. Provided a frame with a payload had been received prior it was possible for a double free to occur. The realloc operation would succeed (thus freeing the payload) but be treated as an error. When the session was then torn down the payload would be freed again causing a crash. The read function now takes this into account. This change also fixes assumptions made by users of res_http_websocket. There is no guarantee that a frame received from it will be NULL terminated. ASTERISK-24472 #close Reported by: Badalian Vyacheslav Review: https://reviewboard.asterisk.org/r/4220/ Review: https://reviewboard.asterisk.org/r/4219/ ........ Merged revisions 429270 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429272 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-10PJSIP: Fix assert on initial mass qualifyKinsey Moore
This fixes the MWI test regressions caused by r429127 and ensures that contacts have non-zero qualify_frequency before attempting scheduling. ........ Merged revisions 429245 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09core: avoid possible asterisk -r crash from long idScott Griepentrog
When connecting to the remote console, an id string is first provided that consts of the hostname, pid, and version. This is parsed by the remote instance using a buffer that may be too short, and can allow a buffer overrun because it is not terminated. This patch adds termination and a larger buffer. Review: https://reviewboard.asterisk.org/r/4182/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09ARI/AMI: Include language in standard channel snapshot outputKevin Harwell
The channel "language" was already part of a channel snapshot, however is was not sent out over AMI or ARI. This patch makes it so the channel "language" is included in the appropriate AMI or ARI events. ASTERISK-24553 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4245/ ........ Merged revisions 429204 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09Direct Media calls within private network sometimes get one way audioKevin Harwell
When endpoints with direct_media enabled, behind a firewall (Asterisk on a separate network) and were bridged sometimes Asterisk would send the ip address of the firewall in the sdp to one of the phones in the reinvite resulting in one way audio. When sending the reinvite Asterisk will retrieve the media address from the associated rtp instance, but if frames were being read this can be overwritten with another address (in this case the firewall's). This patch ensures that Asterisk uses the original device address when using direct media. ASTERISK-24563 Reported by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4216/ ........ Merged revisions 429195 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09res_pjsip_outbound_publish: stack overflow when using non-default sorcery wizardKevin Harwell
When using a non-default sorcery wizard (in this instance realtime) for outbound publishes Asterisk will crash after a stack overflow occurs due to the code infinitely recursing. The fix entails removing the outbound publish state dependency from the outbound publish sorcery object and instead keeping an in memory container that can be used to lookup the state when needed. ASTERISK-24514 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/4178/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09ari: Add support for specifying an originator channel when originating.Joshua Colp
If an originator channel is specified when originating a channel the linked ID of it will be applied to the newly originated outgoing channel. This allows an association to be made between the two so it is known that the originator has dialed the originated channel. ASTERISK-24552 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4243/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09PJSIP: Stagger outbound qualifiesKinsey Moore
This change staggers initiation of outbound qualify (OPTIONS) attempts to reduce instantaneous server load and prevent network congestion. Review: https://reviewboard.asterisk.org/r/4246/ ASTERISK-24342 #close Reported by: Richard Mudgett ........ Merged revisions 429127 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-08AMI/ARI: Update version to 2.6.0/1.6.0 respectively for new featuresMatthew Jordan
AMI/ARI are getting a few enhancements in the next release of Asterisk 13. Per semantic versioning, that warrants a bump in the minor version number, as it reflects a backwards compatible change. Hence, this commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-08Fix a crash that would occur when receiving a 491 response to a reinvite.Mark Michelson
The reviewboard description does a fine job of summarizing this, so here it is: A reporter discovered that Asterisk would crash when attempting to retransmit a reinvite that had previously received a 491 response. The crash occurred because a pjsip_tx_data structure was being saved for reuse, but its reference count was not being increased. The result was that the pjsip_tx_data was being freed before we were actually done with it. When we attempted to re-use the structure when re-sending the reinvite, Asterisk would crash. The fix implemented here is not to try holding onto the pjsip_tx_data at all. Instead, when we reschedule sending the reinvite, we create a brand new pjsip_tx_data and send that instead. Because of this change, there is no need for an ast_sip_session_delayed_request structure to have a pjsip_tx_data on it any more. So any code referencing its use has been removed. When this initial fix was introduced, I encountered a second crash when processing a subsequent 200 OK on a rescheduled reinvite. The reason was that when rescheduling the reinvite, we gave the wrong location for a response callback. This has been fixed in this patch as well. ASTERISK-24556 #close Reported by Abhay Gupta Review: https://reviewboard.asterisk.org/r/4233 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-08Add new AMI and ARI events for connected line changes on a channel.Mark Michelson
The AMI event is called NewConnectedLine and the ARI event is called ChannelConnectedLine. ASTERISK-24554 #close Reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/4231 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-08Stasis: Fix StasisStart/End order and missing eventsKinsey Moore
This corrects several bugs that currently exist in the stasis application code. * After a masquerade, the resulting channels have channel topics that do not match their uniqueids ** Masquerades now swap channel topics appropriately * StasisStart and StasisEnd messages are leaked to observer applications due to being published on channel topics ** StasisStart and StasisEnd publishing is now properly restricted to controlling apps via app topics * Race conditions exist where StasisStart and StasisEnd messages due to a masquerade may be received out of order due to being published on different topics ** These messages are now published directly on the app topic so this is now a non-issue * StasisEnds are sometimes missing when sent due to masquerades and bridge swaps into and out of Stasis() ** This was due to StasisEnd processing adjusting message-sent flags after Stasis() had already exited and Stasis() had been re-entered ** This was corrected by adjusting these flags prior to sending the message while the initial Stasis() application was still shutting down Review: https://reviewboard.asterisk.org/r/4213/ ASTERISK-24537 #close Reported by: Matt DiMeo ........ Merged revisions 429061 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-06res/res_monitor: Reset in/out sample counts on Monitor startMatthew Jordan
When repeatedly starting/stopping a Monitor on a channel, the accumulated in/out sample counts are never reset to 0. This can cause inadvertent jumps in the recordings, as the code in the channel core will determine incorrectly that a jump in the recorded file position should occur. Setting the sample counts to 0 simply reflects the initial state a Monitor should be in when it is started, as this is the initial count that would be on the channels at that time. ASTERISK-24573 #close Reported by: Nuno Borges patches: 24573.patch uploaded by Nuno Borges (License 6116) ........ Merged revisions 429031 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429032 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-06apps/app_meetme: Apply default values on initial load with no config fileMatthew Jordan
When the app_meetme module is loaded without its configuration file, the module settings aren't initialized. In particular, this impacts the use of logging realtime members. This patch guarantees that we always set the default module settings on initial load. Review: https://reviewboard.asterisk.org/r/4242/ ASTERISK-24572 #close Reported by: Nuno Borges patches: 24572.patch uploaded by Nuno Borges (License 6116) ........ Merged revisions 429027 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429028 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-05sorcery: Add additional observer capabilities.George Joseph
Add new global, instance and wizard observers. instance_created wizard_registered wizard_unregistered instance_destroying instance_loading instance_loaded wizard_mapped object_type_registered object_type_loading object_type_loaded wizard_loading wizard_loaded Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4215/ ........ Merged revisions 428999 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-04main/test: Fix compilation issue on 32-bit systemsMatthew Jordan
On a 32-bit system, a type of intmax_t will result in a compilation warning when formatted as a 'long int'. Use the format specifier of %jd (which was what was used originally in manager.c) to format the JSON extracted integer on both 32-/64-bit systems. ........ Merged revisions 428972 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-04main/test: Fix race condition between AMI topic and Test Suite topicMatthew Jordan
This patch fixes a race condition between the raising of test AMI events (which drive many tests in the Asterisk Test Suite) and other AMI events. Prior to this patch, the Stasis messages published to the test topic were not forwarded to the AMI topic. Instead, the code in manager had a dedicated handler for test messages that was independent of the topics forwarded to the AMI topic. This results in no synchronization between the test messages and the rest of the Stasis messages published out over AMI. In some test with very tight timing constraints, this can result in out of order messages and spurious test failures. Properly forwarding the Test Suite topic to the AMI topic ensures that the messages are synchronized properly. This patch does that, and moves the message handling to the Stasis definition of the Test Suite message in test.c as well. Review: https://reviewboard.asterisk.org/r/4221/ ........ Merged revisions 428945 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-03tests/test_cel: Add test_cel_attended_transfer_bridges_link to racey testsMatthew Jordan
Despite failing less often, the ordering of the ATTENDEDTRANSFER event and the BRIDGE_EXIT event for the Alice and David channels is not defined. This makes the test still fail. ........ Merged revisions 428918 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-03tests/test_cel: Fix CEL unit test failures caused by attended transfer changesMatthew Jordan
When the publication of attended transfer messages were pushed to another thread, some subtle race conditions were introduced with the CEL unit tests. This patch fixes one of them, and pushes the other to ASTERISK-22367, which already exists to fix another bouncy CEL unit test. In particular, this patch fixes the test_cel_attended_transfer_bridges_link test, and defers the test_cel_attended_transfer_bridges_swap test to the aforementioned JIRA issue. ASTERISK-22367 ........ Merged revisions 428891 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-03apps/app_voicemail: Fix crash with IMAP when streams are opened simultaneouslyMatthew Jordan
The UW IMAP library is instrinsically not thread-safe, and relies upon higher level applications to guarantee thread safety. For the most part, this is provided by the vms object, which provides locking for individual streams. Unfortunately, this is not sufficient for calls to mail_open which create the IMAP stream. mail_open can, on some systems, call into a UW IMAP specific function for determining the address of a system based on a hostname, ip_nametoaddr. In the ip6_unix implementation of this function, static variables are used to hold parsing buffers. This can cause a crash if multiple threads attempt to convert a hostname to an address at the same time. Locking on a single mail stream is not sufficient to prevent simultaneous access to these static variables. In the IMAP library, this function can be called from the mail_open and imap_status functions. As the imap_status function is not used by app_voicemail, locking on access to mail_open is sufficient to prevent any mangling of the buffers. Review: https://reviewboard.asterisk.org/r/4188/ ASTERISK-24516 #close Reported by: David Duncan Ross Palmer Tested by: David Duncan Ross Palmer patches: ASTERISK-24516.diff uploaded by David Duncan Ross Palmer (License 6660) ........ Merged revisions 428863 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428864 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02CHANGES: Add item for new 'pjsip show identif(y|ies) commandsGeorge Joseph
Tested-by: George Joseph ........ Merged revisions 428836 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02tests/test_stasis: Resolve compilation issues from Asterisk 12 mergeMatthew Jordan
When merging the changes up stream in r428687, I missed the fact that the signature for stasis_message_type_create was changed. This patch fixes the compilation issues introduced by that merge. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02pbx/pbx_loopback: Speed up switches by avoiding unneeded lookupsMatthew Jordan
This patch makes a small rearrangement to only do dialplan lookups during loopback switches if the pattern matches. Prior to this patch, the dialplan lookups were always performed, even when the result would be discarded. Dialplan lookups can be very costly if remote switches - like DUNDi - are present. In those cases extension matching is sped up considerably, making the issue of lost digits more manageable. As collateral damage, 6 trailing spaces were killed. Review: https://reviewboard.asterisk.org/r/4211 ASTERISK-24577 #close Reported by: Birger Harzenetter patches: ast-loopback.patch uploaded by Birger Harzenetter (License 5870) ........ Merged revisions 428787 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428788 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02res_pjsip_refer: Fix issue where native bridge may not occur upon completion ↵Joshua Colp
of a transfer. There are two methods within res_pjsip_refer for keeping track of the state of a transfer. The first is a framehook which looks at frames passing by to determine the state. The second subscribes to know when the channel joins a bridge. In the case when the channel joins the bridge the framehook is *NOT* removed and this prevents the native RTP bridging technology from getting used. This change gets the channel and if it still exists remove the framehook. Review: https://reviewboard.asterisk.org/r/4218/ ........ Merged revisions 428760 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02config: Create ast_variable_find_in_list()George Joseph
Add const char *ast_variable_find_in_list(const struct ast_variable *list, const char *variable); ast_variable_find() requires a config category to search whereas ast_variable_find_in_list() just needs the root list element which is useful if you don't have a category. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4217/ ........ Merged revisions 428733 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02res_pjsip_endpoint_identifier_ip: Add 'show identify(ies)' cli commandsGeorge Joseph
While troubleshooting other things I realized there were no pjsip cli commands for identify. This patch adds them. It also also fixes a reference leak when a 'show endpoint' displayed identifies and properly sets the return code if load_module can't allocate a cli formatter structure. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4212/ ........ Merged revisions 428725 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01main/stasis: Allow subscriptions to use a threadpool for message deliveryMatthew Jordan
Prior to this patch, all Stasis subscriptions would receive a dedicated thread for servicing published messages. In contrast, prior to r400178 (see review https://reviewboard.asterisk.org/r/2881/), the subscriptions shared a thread pool. It was discovered during some initial work on Stasis that, for a low subscription count with high message throughput, the threadpool was not as performant as simply having a dedicated thread per subscriber. For situations where a subscriber receives a substantial number of messages and is always present, the model of having a dedicated thread per subscriber makes sense. While we still have plenty of subscriptions that would follow this model, e.g., AMI, CDRs, CEL, etc., there are plenty that also fall into the following two categories: * Large number of subscriptions, specifically those tied to endpoints/peers. * Low number of messages. Some subscriptions exist specifically to coordinate a single message - the subscription is created, a message is published, the delivery is synchronized, and the subscription is destroyed. In both of the latter two cases, creating a dedicated thread is wasteful (and in the case of a large number of peers/endpoints, harmful). In those cases, having shared delivery threads is far more performant. This patch adds the ability of a subscriber to Stasis to choose whether or not their messages are dispatched on a dedicated thread or on a threadpool. The threadpool is configurable through stasis.conf. Review: https://reviewboard.asterisk.org/r/4193 ASTERISK-24533 #close Reported by: xrobau Tested by: xrobau ........ Merged revisions 428681 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01app_record: Fix bug where using the 'k' option and hanging up would trim 1/4 ↵Joshua Colp
of a second of the recording. The Record dialplan function trims 1/4 of a second from the end of recordings in case they are terminated because of DTMF. When hanging up, however, you don't want this to happen. This change makes it so on hangup this does not occur. ASTERISK-24530 #close Reported by: Ben Smithurst patches: app_record_v2.diff submitted by Ben Smithurst (license 6529) Review: https://reviewboard.asterisk.org/r/4201/ ........ Merged revisions 428653 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428654 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428655 65c4cc65-6c06-0410-ace0-fbb531ad65f3