summaryrefslogtreecommitdiff
path: root/funcs
AgeCommit message (Collapse)Author
2011-02-22Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd ↵David Vossel
audio ConfBridge, and other stuff -Functional changes 1. Dynamic global format list build by codecs defined in codecs.conf 2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf 3. Negotiation of SILK attributes in chan_sip. 4. SPEEX 32khz with translation 5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c 6. Various changes to RTP code required to properly handle the dynamic format list and formats with attributes. 7. ConfBridge now dynamically jumps to the best possible sample rate. This allows for conferences to take advantage of HD audio (Which sounds awesome) 8. Audiohooks are no longer limited to 8khz audio, and most effects have been updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT. 9. codec_resample now uses its own code rather than depending on libresample. -Organizational changes Global format list is moved from frame.c to format.c Various format specific functions moved from frame.c to format.c Review: https://reviewboard.asterisk.org/r/1104/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-15Merged revisions 307837 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r307837 | tilghman | 2011-02-15 01:02:45 -0600 (Tue, 15 Feb 2011) | 15 lines Merged revisions 307836 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r307836 | tilghman | 2011-02-15 01:01:37 -0600 (Tue, 15 Feb 2011) | 8 lines Need to retrieve the rows affected before using the associated variable. (closes issue #18795) Reported by: irroot Patches: 20110211__issue18795.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07Pass a MCID request to the bridged channel.Richard Mudgett
Pass a MCID request to the bridged channel so the bridged channel can send it to the network. The ability to send the MCID request on an ISDN span is enabled with the new chan_dahdi.conf mcid_send option. JIRA SWP-2845 JIRA ABE-2736 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-02Merged revisions 305844 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r305844 | tilghman | 2011-02-02 14:05:43 -0600 (Wed, 02 Feb 2011) | 5 lines Eliminate a file descriptor leak when using the FILE() dialplan function. (closes issue #18731) Reported by: marioabajo ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-02Replacing doc/* and asterisk.pdf with wiki linksAndrew Latham
Adding links to http(s)://wiki.asterisk.org git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-30Add Function and Application Relationships to documentationAndrew Latham
Add and extend the see-also sections to the documentation for applications and functions in an effort to expand the online documentation of the wiki. Also check for and update any links to moved documentation in the doc folder. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24According to section 19.1.2 of RFC 3261:Matthew Nicholson
For each component, the set of valid BNF expansions defines exactly which characters may appear unescaped. All other characters MUST be escaped. This patch modifies ast_uri_encode() to encode strings in line with this recommendation. This patch also adds an ast_escape_quoted() function which escapes '"' and '\' characters in quoted strings in accordance with section 25.1 of RFC 3261. The ast_uri_encode() function has also been modified to take an ast_flags struct describing the set of rules it should use when escaping characters to allow for it to escape SIP URIs in addition to HTTP URIs and other types of URIs or variations of those two URI types in the future. The ast_uri_decode() function has also been modified to accept an ast_flags struct describing the set of rules to use when decoding to enable decoding '+' as ' ' in legacy http URLs. The unit tests for these functions have also been updated. ABE-2705 Review: https://reviewboard.asterisk.org/r/1081/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-21Add DB_KEYS.Tilghman Lesher
Discussion on #asterisk on 2011-01-19: (02:07:03 PM) boch: i wonder how to cycle all entries in a tree (02:07:11 PM) leifmadsen: use While() (02:07:17 PM) leifmadsen: you need to know the tree structure already though (02:07:36 PM) boch: what you mean? (02:09:02 PM) leifmadsen: you need to know the structure prior to looping, because you can't just return the structure from the dialplan (02:09:43 PM) leifmadsen: the only way I can think of doing that is via something like writing the output of: asterisk -rx "database show" to a file, then looping through that to know the structure of the database and check everything (02:09:59 PM) leifmadsen: but at that point you're better off just using either a relational database or an external script (02:10:13 PM) boch: for example i need to know all entries in the tree (02:10:15 PM) boch: got it (02:10:20 PM) leifmadsen: exactly (02:10:22 PM) leifmadsen: that's the problem (02:10:22 PM) boch: thank you (02:13:09 PM) mateu: yeah, i'm surprised there isn't something from the dialplan like 'database show family' so one can get all keys in a family to loop over. (02:15:35 PM) leifmadsen: database shows everything (02:16:22 PM) mateu: i mean something from the dial plan that mimics 'database show <family>' (02:16:41 PM) leifmadsen: guess no one has found that important enough to program :) (02:16:52 PM) leifmadsen: at that point you should probably just use a relational database... (02:17:10 PM) mateu: i dunno (02:17:16 PM) mateu: seems pretty basic to me. (02:17:16 PM) leifmadsen: me either (02:17:19 PM) leifmadsen: sure does (02:17:24 PM) leifmadsen: no one has programmed it though (02:17:28 PM) ***leifmadsen shrugs (02:17:43 PM) mateu: ok, well at least we know how it currently stands. thanks leifmadsen (02:28:52 PM) Corydon76-home: leifmadsen: something like HASHKEYS() ? (02:30:11 PM) leifmadsen: Corydon76-home: ummm, I was thinking more like DUNDI_QUERY() and DUNDI_RESULT() (02:30:31 PM) leifmadsen: although HASHKEYS() might work (02:30:58 PM) leifmadsen: actually ya, looking at it, similar to HASHKEYS() (02:31:01 PM) leifmadsen: DBKEYS() I guess? (02:31:45 PM) Corydon76-home: So with no argument, retrieves families, with an argument, retrieves keys of that family? (02:34:02 PM) leifmadsen: ya (02:34:16 PM) leifmadsen: how would you iterate through layers of them? (02:34:30 PM) leifmadsen: i.e. family/key/key/key ? (02:34:43 PM) Corydon76-home: Essentially, yes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-14Add relationships to function documentation.Andrew Latham
Fix amatuer type mistake git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-14Add relationships to function documentation.Andrew Latham
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-07Oops, missed the actual decoding part.Tilghman Lesher
(closes issue #18046) Reported by: wdoekes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-06XML validationTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-06Add a hashcompat mode called "legacy", which translates a literal plus sign ↵Tilghman Lesher
to a space. (closes issue #18046) Reported by: wdoekes Patches: 20100930__issue18046.diff.txt uploaded by tilghman (license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-16Merged revisions 298478 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r298478 | tilghman | 2010-12-16 02:56:13 -0600 (Thu, 16 Dec 2010) | 15 lines Merged revisions 298477 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r298477 | tilghman | 2010-12-16 02:54:23 -0600 (Thu, 16 Dec 2010) | 8 lines Eliminate duplicates from container. (closes issue #18091) Reported by: bunny Patches: 20101006__issue18091.diff.txt uploaded by tilghman (license 14) Tested by: bunny ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-15Merged revisions 294989 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r294989 | tilghman | 2010-11-15 01:44:38 -0600 (Mon, 15 Nov 2010) | 15 lines Merged revisions 294988 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r294988 | tilghman | 2010-11-15 01:42:39 -0600 (Mon, 15 Nov 2010) | 8 lines It is possible to crash Asterisk by feeding the curl engine invalid data. (closes issue #18161) Reported by: wdoekes Patches: 20101029__issue18161.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-28Merged revisions 293159 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r293159 | jpeeler | 2010-10-28 11:11:08 -0500 (Thu, 28 Oct 2010) | 18 lines Merged revisions 293158 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r293158 | jpeeler | 2010-10-28 11:09:40 -0500 (Thu, 28 Oct 2010) | 11 lines Fix infinite loop in FILTER(). Specifically when you're using characters above \x7f or invalid character escapes (e.g. \xgg). (closes issue #18060) Reported by: wdoekes Patches: issue18060_func_strings_filter_infinite_loop.patch uploaded by wdoekes (license 717) Tested by: wdoekes ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-30Merged revisions 289543,289581 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r289543 | tilghman | 2010-09-30 12:50:52 -0500 (Thu, 30 Sep 2010) | 2 lines More Solaris compatibility fixes ........ r289581 | tilghman | 2010-09-30 15:23:10 -0500 (Thu, 30 Sep 2010) | 2 lines Solaris fixes. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-24Merged revisions 288713 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r288713 | tilghman | 2010-09-24 08:54:17 -0500 (Fri, 24 Sep 2010) | 12 lines Merged revisions 288712 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r288712 | tilghman | 2010-09-24 08:53:30 -0500 (Fri, 24 Sep 2010) | 5 lines Solaris won't printf a NULL. (closes issue #18041) Reported by: asgaroth ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-20Merged revisions 287647 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r287647 | dvossel | 2010-09-20 17:09:16 -0500 (Mon, 20 Sep 2010) | 21 lines Addition of the FrameHook API (AKA AwesomeHooks) So far all our tools for viewing and manipulating media streams within Asterisk have been entirely focused on audio. That made sense then, but is not scalable now. The FrameHook API lets us tap into and manipulate _ANY_ type of media or signaling passed on a channel present today or in the future. This tool is a step in the direction of expanding Asterisk's boundaries and will help generate some rather interesting applications in the future. In addition to the FrameHook API, a simple dialplan function exercising the api has been included as well. This function is called FRAME_TRACE(). FRAME_TRACE() allows for the internal ast_frames read and written to a channel to be output. Filters can be placed on this function to debug only certain types of frames. This function could be thought of as an internal way of doing ast_frame packet captures. Review: https://reviewboard.asterisk.org/r/925/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10Merged revisions 286189 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r286189 | twilson | 2010-09-10 17:04:53 -0500 (Fri, 10 Sep 2010) | 30 lines Merged revisions 286115 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines Merged revisions 286059 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines Inherit CHANNEL() writes to both sides of a Local channel Having Local (/n) channels as queue members and setting the language in the extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2 channel. Hold time report playbacks happen on the Local/...,1 channel and therefor do not play in the specified language. This patch modifies func_channel_write to call the setoption callback and pass the CHANNEL() write info to the callback. chan_local uses this information to look up the other side of the channel and apply the same changes to it. (closes issue #17673) Reported by: Guggemand Review: https://reviewboard.asterisk.org/r/903/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-08Merged revisions 285484 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285484 | tilghman | 2010-09-08 02:14:17 -0500 (Wed, 08 Sep 2010) | 2 lines Documentation only ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07Merged revisions 285373 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285373 | tilghman | 2010-09-07 16:14:03 -0500 (Tue, 07 Sep 2010) | 7 lines Add CHANNEL(checkhangup) to check whether a channel is in the process of being hanged up. (closes issue #17652) Reported by: kobaz Patches: func_channel.patch uploaded by kobaz (license 834) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02Merged revisions 284610 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r284610 | tilghman | 2010-09-02 00:20:59 -0500 (Thu, 02 Sep 2010) | 10 lines When optional_api is non-optional, force dependent modules to be loaded. (closes issue #17707) Reported by: ira Patches: 20100819__issue17707__asterisk1.8.diff.txt uploaded by tilghman (license 14) Tested by: tilghman Review: https://reviewboard.asterisk.org/r/876/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-24Merged revisions 283350 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r283350 | russell | 2010-08-24 07:49:41 -0500 (Tue, 24 Aug 2010) | 2 lines Don't attempt to release a NULL ODBC handle. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-03Merged revisions 280809 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r280809 | tilghman | 2010-08-03 15:25:10 -0500 (Tue, 03 Aug 2010) | 12 lines Sneak FIELDNUM() into 1.8. Returns a 1-based index into a list of a specified item. Matches up with FIELDQTY() and CUT(). (closes issue #17713) Reported by: gareth Patches: svn-279754.diff uploaded by gareth (license 208) Tested by: gareth, tilghman Review: https://reviewboard.asterisk.org/r/810/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@280810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21Remove built-in AES code and use optional_api insteadTerry Wilson
Review: https://reviewboard.asterisk.org/r/793/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20Add load priority order, such that preload becomes unnecessary in most casesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14Expand the caller ANI field to an ast_party_idRichard Mudgett
Expand the ani field in ast_party_caller and ast_party_connected_line to an ast_party_id. This is an extension to the ast_callerid restructuring patch in review: https://reviewboard.asterisk.org/r/702/ Review: https://reviewboard.asterisk.org/r/744/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14ast_callerid restructuringRichard Mudgett
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13Oops, XML documentation fix.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13It really cannot fail in the places below, but the stupid compiler doesn't ↵Tilghman Lesher
know that. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13Weird compiler error on Bamboo.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13FILE() now supports line-mode and writing (altering) files.Tilghman Lesher
(closes issue #16461) Reported by: skyman Patches: 20100622__issue16461.diff.txt uploaded by tilghman (license 14) Tested by: tilghman Review: https://reviewboard.asterisk.org/r/737/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09Kill some startup warnings and errors and make some messages more helpful in ↵Tilghman Lesher
tracking down the source. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08Add High Resolution Times to CDRs for AsteriskBradley Latus
People expressed an interest in having access to the exact length of calls to a finer degree than seconds. See the CHANGES and UPGRADE.txt for usage also updated the sample configs to note the change. Patch by snuffy. (closes issue #16559) Reported by: cianmaher Tested by: cianmaher, snuffy Review: https://reviewboard.asterisk.org/r/461/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08Add SRTP support for AsteriskTerry Wilson
After 5 years in mantis and over a year on reviewboard, SRTP support is finally being comitted. This includes generic CHANNEL dialplan functions that work for getting the status of whether a call has secure media or signaling as defined by the underlying channel technology and for setting whether or not a new channel being bridged to a calling channel should have secure signaling or media. See doc/tex/secure-calls.tex for examples. Original patch by mikma, updated for trunk and revised by me. (closes issue #5413) Reported by: mikma Tested by: twilson, notthematrix, hemanshurpatel Review: https://reviewboard.asterisk.org/r/191/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-03Handle OOM errors more gracefully.Tilghman Lesher
(closes issue #17084) Reported by: falves11 Patches: issue17084_162_A.diff uploaded by falves11 (license 374) Tested by: falves11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-30Needs to be wrapped in <para>Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-28Setup environment variables for the benefit of child processes and disallow ↵Tilghman Lesher
changing them. (closes issue #14899) Reported by: jmls Patches: 20090916__issue14899.diff.txt uploaded by tilghman (license 14) Tested by: jmls git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17Enhancements to connected line and redirecting work.Mark Michelson
From reviewboard: Digium has a commercial customer who has made extensive use of the connected party and redirecting information present in later versions of Asterisk Business Edition and which is to be in the upcoming 1.8 release. Through their use of the feature, new problems and solutions have come about. This patch adds several enhancements to maximize usage of the connected party and redirecting information functionality. First, Asterisk trunk already had connected line interception macros. These macros allow you to manipulate connected line information before it was sent out to its target. This patch adds the same feature except for redirecting information instead. Second, the ast_callerid and ast_party_id structures have been enhanced to provide a "tag." This tag can be set with func_callerid, func_connectedline, func_redirecting, and in the case of DAHDI, mISDN, and SIP channels, can be set in a configuration file. The idea behind the callerid tag is that it can be set to whatever value the administrator likes. Later, when running connected line and redirecting macros, the admin can read the tag off the appropriate structure to determine what action to take. You can think of this sort of like a channel variable, except that instead of having the variable associated with a channel, the variable is associated with a specific identity within Asterisk. Third, app_dial has two new options, s and u. The s option lets a dialplan writer force a specific caller ID tag to be placed on the outgoing channel. The u option allows the dialplan writer to force a specific calling presentation value on the outgoing channel. Fourth, there is a new control frame subclass called AST_CONTROL_READ_ACTION added. This was added to correct a very specific situation. In the case of SIP semi-attended (blond) transfers, the party being transferred would not have the opportunity to run a connected line interception macro to possibly alter the transfer target's connected line information. The issue here was that during a blond transfer, the SIP transfer code has no bridged channel on which to queue the connected line update. The way this was corrected was to add this new control frame subclass. Now, we queue an AST_CONTROL_READ_ACTION frame on the channel on which the connected line interception macro should be run. When ast_read is called to read the frame, ast_read responds by calling a callback function associated with the specific read action the control frame describes. In this case, the action taken is to run the connected line interception macro on the transferee's channel. Review: https://reviewboard.asterisk.org/r/652/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-07Double free crashTilghman Lesher
(closes issue #17245) Reported by: thedavidfactor Patches: 20100426__issue17245.diff.txt uploaded by tilghman (license 14) Tested by: murraytm git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@261917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-21Add small documentation update to func_callcompletion.c.Mark Michelson
This directs users to documents which can help explain the concepts and configuration options settable with the function. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-19Commit compromise I suggested on review 608.Mark Michelson
This allows for multiple SRV queries to be done from the dialplan for the same service on a single call while still allowing one to bypass the call to SRVQUERY if they so please. Taking action since no comments had been left for a while. This can easily be reverted if needed. External tests still pass. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-13Address Russell's comments on func_srv from reviewboard.Mark Michelson
* Change copyright date * Place channel in autoservice when doing SRV lookup * Get rid of trailing whitespace * Change logic in load_module function git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09Fix some compiler errors that popped up after the CCSS merge.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09Merge Call completion support into trunk.Mark Michelson
From Reviewboard: CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date overview of the architecture can be found in the file doc/CCSS_architecture.pdf in the CCSS branch. Off the top of my head, the big differences between what is implemented and what is in the document are as follows: 1. We did not end up modifying the Hangup application at all. 2. The document states that a single call completion monitor may be used across multiple calls to the same device. This proved to not be such a good idea when implementing protocol-specific monitors, and so we ended up using one monitor per-device per-call. 3. There are some configuration options which were conceived after the document was written. These are documented in the ccss.conf.sample that is on this review request. For some basic understanding of terminology used throughout this code, see the ccss.tex document that is on this review. This implements CCBS and CCNR in several flavors. First up is a "generic" implementation, which can work over any channel technology provided that the channel technology can accurately report device state. Call completion is requested using the dialplan application CallCompletionRequest and can be canceled using CallCompletionCancel. Device state subscriptions are used in order to monitor the state of called parties. Next, there is a SIP-specific implementation of call completion. This method uses the methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion using SIP signaling. There are a few things to note here: * The agent/monitor terminology used throughout Asterisk sometimes is the reverse of what is defined in the referenced draft. * Implementation of the draft required support for SIP PUBLISH. I attempted to write this in a generic-enough fashion such that if someone were to want to write PUBLISH support for other event packages, such as dialog-state or presence, most of the effort would be in writing callbacks specific to the event package. * A subportion of supporting PUBLISH reception was that we had to implement a PIDF parser. The PIDF support added is a bit minimal. I first wrote a validation routine to ensure that the PIDF document is formatted properly. The rest of the PIDF reading is done in-line in the call-completion-specific PUBLISH-handling code. In other words, while there is PIDF support here, it is not in any state where it could easily be applied to other event packages as is. Finally, there are a variety of ISDN-related call completion protocols supported. These were written by Richard Mudgett, and as such I can't really say much about their implementation. There are notes in the CHANGES file that indicate the ISDN protocols over which call completion is supported. Review: https://reviewboard.asterisk.org/r/523 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09func_srv and explicit specification of a remote IP for SIP.Mark Michelson
From Review Board: There are two interrelated changes here. First, there is the introduction of func_srv. This adds two new read-only dialplan functions, SRVQUERY and SRVRESULT. They work very similarly to the ENUMQUERY and ENUMRESULT functions, except that this allows one to query SRV records instead. In order to facilitate this work, I added a couple of new API calls to srv.h. ast_srv_get_record_count tells the number of records returned by an SRV lookup. This number is calculated at the time of the SRV lookup. ast_srv_get_nth_record allows one to get a numbered SRV record. Second, there is the modification to chan_sip that allows one to specify a hostname or IP address (along with a port) to send an outgoing INVITE to when dialing a SIP peer. This goes hand-in-hand with func_srv. You can query SRV records and then use the host and port from the results to dial via a specific host instead of what is configured in sip.conf. Review: https://reviewboard.asterisk.org/r/608 SWP-1200 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-03Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.Richard Mudgett
SWP-1229 ABE-2161 * Ensure chan_local.c:local_call() will not leak cid.cid_dnid when copying. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-20Fix memory corruption found by unit tests.Russell Bryant
ast_str_reset() was being called on a potentially uninitialized pointer. Valgrind is my hero, once again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253579 65c4cc65-6c06-0410-ace0-fbb531ad65f3