summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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 ........ Merged revisions 429064 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429084 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 ........ Merged revisions 429062 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429063 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 ........ Merged revisions 429033 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429034 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 ........ Merged revisions 429029 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429030 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 ........ Merged revisions 429000 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429001 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 ........ Merged revisions 428973 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428974 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 ........ Merged revisions 428946 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428947 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 ........ Merged revisions 428919 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428920 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 ........ Merged revisions 428892 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428893 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 ........ Merged revisions 428865 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428866 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 ........ Merged revisions 428837 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428838 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. ........ Merged revisions 428815 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428816 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 ........ Merged revisions 428789 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428790 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 ........ Merged revisions 428761 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428762 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 ........ Merged revisions 428734 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428735 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 ........ Merged revisions 428731 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01rtp_engine: Add support for transporting signed linear at 12kHz, 24kHz, ↵Joshua Colp
32kHz, 44kHz, 48kHz, 96kHz, and 192kHz over RTP. This change adds mappings in the RTP engine layer for the remaining signed linear formats. ASTERISK-24274 #close Reported by: Frankie Chin Review: https://reviewboard.asterisk.org/r/4093/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428708 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 ........ Merged revisions 428687 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428688 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 ........ Merged revisions 428655 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01channel: Extend size of buffer for codecs in "core show channeltype" CLI ↵Joshua Colp
command. The static buffer for codecs when invoking the "core show channeltype" CLI command did not have enough room for all codecs. This has been extended so it does. ASTERISK-24542 #close Reported by: snuffy patches: channeltype-tech.diff submitted by snuffy (license 5024) Review: https://reviewboard.asterisk.org/r/4204/ ........ Merged revisions 428632 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-24test_channel_feature_hooks.c: Fix unit test for DTMF hooks.Richard Mudgett
Fix the failing /channels/features/test_features_channel_dtmf unit test. DTMF emulation does not work without a stream of packets to prod the emulation code. Review: https://reviewboard.asterisk.org/r/4199/ ........ Merged revisions 428604 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-24DTMF hooks: Leaving channels need to push any collected digits into the bridge.Richard Mudgett
Any partially collected DTMF digits for a DTMF hook need to be pushed into the bridge when a channel leaves the bridging system as if there were a timeout. Review: https://reviewboard.asterisk.org/r/4199/ ........ Merged revisions 428601 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428602 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21manager: Fix could not extend string messages.Richard Mudgett
When shutting down Asterisk that has an active AMI connection, you get several "failed to extend from %d to %d" messages because use of the EVENT_FLAG_SHUTDOWN attempts to add all AMI permission strings to the event. * Created MAX_AUTH_PERM_STRING to use when creating stack based struct ast_str variables used with the authority_to_str() and user_authority_to_str() functions instead of a variety of magic numbers that could be too small. * Added a special check for EVENT_FLAG_SHUTDOWN to authority_to_str() so it will not attempt to add all permission level strings. Review: https://reviewboard.asterisk.org/r/4200/ ........ Merged revisions 428570 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428571 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428572 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21sorcery: Make is_object_field_registered handle field names that are regexes.George Joseph
As a result of https://reviewboard.asterisk.org/r/3305, res_sorcery_realtime was tossing database fields that didn't have an exact match to a sorcery registered field. This broke the ability to use regexes as field names which manifested itself as a failure of res_pjsip_phoneprov_provider which uses this capability. It also broke handling of fields that start with '@' in realtime but I don't think anyone noticed. This patch does the following... * Modifies ast_sorcery_fields_register to pre-compile the name regex. * Modifies ast_sorcery_is_object_field_registered to test the regex if it exists instead of doing an exact strcmp. * Modifies res_pjsip_phoneprov_provider with a few tweaks to get it to work with realtime. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4185/ ........ Merged revisions 428543 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428544 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21sip.conf.sample - note that media_address does not change listen address, ↵Olle Johansson
just the SDP git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21main/bridge_basic: Fix features regressions introduced by r428165Matthew Jordan
In r428165, two bugs were introduced: * Prior to entering the features retry loop, the buffer that holds the collected digits is wiped. However, this inadvertently wipes out the first collected digit on the first pass through, which is obtained in ast_stream_and_wait. This caused all of the features tests to fail. * If ast_app_dtget returns a hangup (-1), the loop would retry incorrectly. If we detect a hangup, we have to stop trying the feature. This patch fixes both issues. Review: https://reviewboard.asterisk.org/r/4196/ ........ Merged revisions 428505 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20Fix error with mixed address family ACLs.Mark Michelson
Prior to this commit, the address family of the first item in an ACL was used to compare all incoming traffic. This could lead to traffic of other IP address families bypassing ACLs. ASTERISK-24469 #close Reported by Matt Jordan Patches: ASTERISK-24469-11.diff uploaded by Matt Jordan (License #6283) AST-2014-012 ........ Merged revisions 428402 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 428417 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428422 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428425 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20AST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.Kevin Harwell
The DB dialplan function when executed from an external protocol (for instance AMI), could result in a privilege escalation. Asterisk now inhibits the DB function from being executed from an external interface if the live_dangerously option is set to no. ASTERISK-24534 Reported by: Gareth Palmer patches: submitted by Gareth Palmer (license 5169) ........ Merged revisions 428331 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 428363 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428409 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428413 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20PJSIP ACLs: Fix ACLs not loading on startup and apply/acl issues on contactJonathan Rose
The biggest problem this patch fixes is that ACLs weren't previously being loaded when the res_pjsip_acl module was loaded. Yikes. In addition, the ACL options contact_permit and contact_acl were effectively interpreted as contact_deny and this patch fixes that as well. AST-1418 #close Reported by: Thomas Thompson Review: https://reviewboard.asterisk.org/r/4120/ ASTERISK-24531 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4171/ ........ Merged revisions 428333 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428343 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20AST-2014-017 - app_confbridge: permission escalation/ class authorization.Kevin Harwell
Confbridge dialplan function permission escalation via AMI and inappropriate class authorization on the ConfbridgeStartRecord action. The CONFBRIDGE dialplan function when executed from an external protocol (for instance AMI), could result in a privilege escalation. Also, the AMI action “ConfbridgeStartRecord” could also be used to execute arbitrary system commands without first checking for system access. The AMI “ConfbridgeStopRecord” has also been updated to only run under a system authorization. Asterisk now inhibits the CONFBRIDGE function from being executed from an external interface if the live_dangerously option is set to no. Also, the “ConfbridgeStartRecord” AMI action is now only allowed to execute under a user with system level access. ASTERISK-24490 Reported by: Gareth Palmer ........ Merged revisions 428332 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428334 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428339 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20AST-2014-016: Fix crash when receiving an in-dialog INVITE with Replaces in ↵Joshua Colp
res_pjsip_refer. The implementation of INVITE with Replaces in res_pjsip_refer did not expect them to occur in-dialog. As a result it would incorrectly attempt to hang up a channel it thought was under its control. In reality the channel would be under the control of another thread. When the other thread accessed the channel it would be accessing freed memory and could crash. This change makes res_pjsip_refer not act on an in-dialog INVITE with Replaces. ASTERISK-24528 #close Reported by: Joshua Colp ........ Merged revisions 428304 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428305 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20AST-2014-015: Fix race condition in chan_pjsip when sending responses after ↵Joshua Colp
a CANCEL has been received. Due to the serialized architecture of chan_pjsip there exists a race condition where a CANCEL may be received and processed before responses (such as 180 Ringing, 183 Session Progress, and 200 OK) are sent. Since the session is in an unexpected state PJSIP will assert when this is attempted. This change makes it so that these responses are not sent on disconnected sessions. ASTERISK-24471 #close Reported by: yaron nahum ........ Merged revisions 428301 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428302 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19stringfields: Fix bug in ast_string_fields_copy.Corey Farrell
ast_string_fields_copy relies on the fact that __ast_string_field_release_active never previously zeroed pool->used, so keeping the existing pointer was "ok". Now that existing pools can be reset to 'empty', it is important to set each field to __ast_string_field_empty after releasing the memory. ASTERISK-24535 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4186/ ........ Merged revisions 428272 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428273 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19ast_str: Fix improper member access to struct ast_str members.Richard Mudgett
Accessing members of struct ast_str outside of the string manipulation API routines is invalid since struct ast_str is supposed to be treated as opaque. Review: https://reviewboard.asterisk.org/r/4194/ ........ Merged revisions 428244 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428245 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428246 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19res_pjsip_sdp_rtp: Add support for optimistic SRTP.Joshua Colp
Optimistic SRTP is the ability to enable SRTP but not have it be a fatal requirement. If SRTP can be used it will be, if not it won't be. This gives you a better chance of using it without having your sessions fail when it can't be. Encrypt all the things! Review: https://reviewboard.asterisk.org/r/3992/ ........ Merged revisions 428222 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19alembic: Fix alembic migration for 'moh_passthrough' option in res_pjsip.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19res_pjsip_refer: Ensure Refer-To is NULL terminated and parse it as a URI.Joshua Colp
There is no guarantee that when we get a Refer-To that it will be NULL terminated. As the URI parsing function requires it to be we now NULL terminate it. Additionally parsing the Refer-To as a 'To' header is needless and it can simply be done as a URI. This also fixes a problem where certain Refer-To headers would not be parsed as a 'To' header causing the REFER to fail. ASTERISK-24508 #close Reported by: Beppo Mazzucato Review: https://reviewboard.asterisk.org/r/4187/ ........ Merged revisions 428195 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428196 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-18parking_tests.c: Add missing newline on a unit test message.Richard Mudgett
........ Merged revisions 428168 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428169 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17Allow for transferer to retry when dialing an invalid extension.Mark Michelson
This allows for a configurable number of attempts for a transferer to dial an extension to transfer the call to. For Asterisk 13, the default values are such that upgrading between versions will not cause a behaivour change. For trunk, though, the defaults will be changed to be more user-friendly. Review: https://reviewboard.asterisk.org/r/4167 ........ Merged revisions 428145 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17chan_sip: Fix theoretical leak of p->refer.Corey Farrell
If transmit_refer is called when p->refer is already allocated, it leaks the previous allocation. Updated code to always free previous allocation during a new allocation. Also instead of checking if we have a previous allocation, always create a clean record. ASTERISK-15242 #close Reported by: David Woolley Review: https://reviewboard.asterisk.org/r/4160/ ........ Merged revisions 428117 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428118 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428119 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17apps/app_confbridge: Ensure 'normal' users hear message when last marked leavesMatthew Jordan
When r428077 was made for ASTERISK-24522, it failed to take into account users who are neither wait_marked nor end_marked. These users are *also* supposed to hear the 'leader has left the conference' message. Granted, this behaviour is a bit odd; however, that is how it used to work... and behaviour changes are not good. This patch ensures that if there are any 'normal' users present when the last marked user leaves the conference, the message will still be played to them. Note that this regression was caught by the Asterisk Test Suite's confbridge_nominal test, which has a quirky combination of users. ........ Merged revisions 428113 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428114 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428115 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17app_confbridge: Don't play leader leaving prompt if no one will hear itMatthew Jordan
Consider the following: - A marked user in a conference - One or more end_marked only users in the conference When the marked users leaves, we will be in the conf_state_multi_marked state. This currently will traverse the users, kicking out any who have the end_marked flags. When they are kicked, a full ast_bridge_remove is immediately called on the channels. At this time, we also unilaterally set the need_prompt flag. When the need_prompt flag is set, we then playback a sound to the bridge informing everyone that the leader has left; however, no one is left in the bridge. This causes some odd behaviour for the end_marked users - they are stuck waiting for the bridge to be unlocked. This results in them waiting for 5 or 6 seconds of dead air before hearing that they've been kicked. Unfortunately, we do have to keep the bridge locked while we're playing back the 'leader-has-left' prompt. If there are any wait_marked users in the conference, this behaviour can't be easily changed - but we do make the case of the end_marked users better with this patch. Review: https://reviewboard.asterisk.org/r/4184/ ASTERISK-24522 #close Reported by: Matt Jordan ........ Merged revisions 428077 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428078 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428079 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-16chan_pjsip: Remove AOR check when dialing and one is specified.Joshua Colp
The AOR value may contain the name of an AOR or a full SIP URI. Checking if the AOR exists can't be done as a result of this. ........ Merged revisions 428051 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428052 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-16chan_sip: Fix bug where DTLS configuration from general would copy dtlsenable.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15cel/cel_odbc: Provide microsecond precision in 'eventtime' column when possibleMatthew Jordan
This patch adds microsecond precision when inserting a CEL record into a table with an "eventtime" column of type timestamp, instead of second precision. The documentation (configs/cel_odbc.conf.sample) was already saying that the eventtime column included microseconds precision, but that was not the case. Also, without this patch, if you had a table with an "eventtime" column of type varchar, you had millisecond precision. With this patch, you also get microsecond precision in this case. Review: https://reviewboard.asterisk.org/r/3980 ASTERISK-24283 #close Reported by: Etienne Lessard patches: cel_odbc_time_precision.patch uploaded by Etienne Lessard (License 6394) ........ Merged revisions 427952 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 427953 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427954 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15chan_pjsip: Add additional log message when an AOR is specified when dialing ↵Joshua Colp
and it does not exist. ASTERISK-24499 #close Reported by: Rusty Newton ........ Merged revisions 428007 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428008 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15chan_motif / chan_pjsip: Fix incorrect "No such module" messages when reloading.Joshua Colp
For chan_motif the direct return value of the underlying config options framework was passed back. This can relay various states which the module loader would not interpet as success. It has been changed so only on errors will it report back an error. For chan_pjsip the code implemented a dummy reload function which always returned an error. This has been removed as all configuration is held within res_pjsip instead. ASTERISK-23651 #close Reported by: Rusty Newton ........ Merged revisions 427981 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427982 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15res_pjsip: Enforce requirements for session timer minimum expiration period ↵Joshua Colp
and normal expiration period. This change enforces the requirements in PJSIP for session timer configuration. The minimum expiration period must be 90 seconds or higher and the normal expiration period can not be lower than the minimum expiration period. If either of these were done the code would assert at session setup time. ASTERISK-24336 #close Reported by: Leon Rowland ........ Merged revisions 427978 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427979 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15chan_sip: Add support for setting DTLS configuration in the general section.Joshua Colp
Configuration of DTLS in the general section will be applied to any users or peers. If configuration exists at their level it overrides the general section values. ASTERISK-24128 #close Reported by: Michael K. patches: dtls_default_settings.patch submitted by Michael K. (license 6621) Review: https://reviewboard.asterisk.org/r/3867/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-14tests/test_cel: Unlock bridge on off nominal pathsMatthew Jordan
If the test fails due to memory allocation errors, we may as well attempt to unlock the bridge on the way out. ........ Merged revisions 427927 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427932 65c4cc65-6c06-0410-ace0-fbb531ad65f3