summaryrefslogtreecommitdiff
path: root/res/res_agi.c
AgeCommit message (Collapse)Author
2012-09-25res_agi: async_agi responsiveness improvement on datastore problemsJonathan Rose
This patch changes get_agi_cmd so that the return can be checked to differentiate between an empty list success and something that triggered an error. This in turn allows launch_asyncagi to detect these errors and break free from the command processing loop so that the async agi can be ended more cleanly (closes issue ASTERISK-20109) Reported by: Jeremiah Gowdy Patches: jgowdy-7-9-2012.diff uploaded by Jeremiah Gowdy (license 6358) (Modified by me to fix some logical issues and apply to trunk) Review: https://reviewboard.asterisk.org/r/2117/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25res_agi: Add message indicating need for \n character in verbose messageJonathan Rose
The while loop responsible for reading AGI messages from a fastAGI service can end up looping indefinitely when an AGI script fails to indicate the end of a message with a \n character. This patch adds an indication that we are expecting a \n character to end the message to make it more clear to users that this is necessary if they are receiving this warning over and over. (issue ASTERISK-20061) Reported by: Eike Kuiper ........ Merged revisions 370494 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370495 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17Fix places in resources where a negative return value could impact executionMatthew Jordan
This patch addresses a number of modules in resources that did not handle the negative return value from function calls adequately. This includes: * res_agi.c: if the result of the read function is a negative number, indicating some failure, the result would instead be treated as the number of bytes read. This patch now treats negative results in the same manner as an end of file condition, with the exception that it also logs the error code indicated by the return. * res_musiconhold.c: if spawn_mp3 fails to assign a file descriptor to srcfd, and instead assigns a negative value, that file descriptor could later be passed to functions that require a valid file descriptor. If spawn_mp3 fails, we now immediately retry instead of continuing in the logic. * res_rtp_asterisk.c: if no codec can be matched between two RTP instances in a peer to peer bridge, we immediately return instead of attempting to use the codec payload type as an index to determine the appropriate negotiated codec. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 362364 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Finalize ast_channel opaquificationTerry Wilson
Review: https://reviewboard.asterisk.org/r/1786/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Add IPv6 support to FastAGI.Sean Bright
Review: https://reviewboard.asterisk.org/r/1774/ Reviewed by: Simon Perreault, Mark Michelson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Opaquification for ast_format structs in struct ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14res_agi: Add AGIEXITONHANGUP variable.Russell Bryant
This patch adds a variable AGIEXITONHANGUP for res_agi. If this variable is set to "yes" on a channel, AGI() will exit immediately once a channel hangup has been detected. This was the behavior of AGI() in Asterisk 1.4 and earlier and is still desired by some people. Review: https://reviewboard.asterisk.org/r/1734/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-15Make FastAGI HANGUP show up in AGI debug output.Richard Mudgett
* Change from using send() to ast_agi_send() so the HANGUP shows up in the AGI debug output. (closes issue ASTERISK-18723) Reported by: James Van Vleet Patches: jira_asterisk_18723_v1.8.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 345431 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345432 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20Fix AGI exec Park to honor the Park application parameters.Richard Mudgett
The fix for ASTERISK-12715 and ASTERISK-12685 added a check for the Park application because the channel needed to be masqueraded to prevent a crash. Since the Park application now always masquerades the channel into the parking lot, the special check is no longer needed. The fix also resulted in AGI exec Park attempting to double park the call and not honor the Park application parameters. * Removed no longer necessary call to ast_masq_park_call() by AGI exec for the Park application. (Reverts -r146923) * Fix Park application to only return 0 or -1. The AGI exec Park was causing broken pipe error messages because the Park application returned 1 on successful park. (closes issue ASTERISK-18737) ........ Merged revisions 341717 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341718 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10Merged revisions 340109 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340109 | mnicholson | 2011-10-10 09:15:41 -0500 (Mon, 10 Oct 2011) | 18 lines Merged revisions 340108 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines Load the proper XML documentation when multiple modules document the same application. This patch adds an optional "module" attribute to the XML documentation spec that allows the documentation processor to match apps with identical names from different modules to their documentation. This patch also fixes a number of bugs with the documentation processor and should make it a little more efficient. Support for multiple languages has also been properly implemented. ASTERISK-18130 Review: https://reviewboard.asterisk.org/r/1485/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29Just formatting.Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-13Merged revisions 323154 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323154 | lmadsen | 2011-06-13 15:00:41 -0400 (Mon, 13 Jun 2011) | 6 lines Tweak documentation for AGI Hangup command. (closes issue ASTERISK-17999) Reported by: Ben Klang Patches: hangup-doc.diff - uploaded by Ben Klang (License #5876) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-28Merged revisions 321436 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321436 | rmudgett | 2011-05-27 19:27:52 -0500 (Fri, 27 May 2011) | 4 lines Some hagi launch cleanup. Inspired by issue 19256. This patch would also fix the crash. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03Merged revisions 316265 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines Fix a bunch of compiler warnings generated by gcc 4.6.0. Most of these are -Wunused-but-set-variable, but there were a few others mixed in here, as well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-22Merged revisions 314780 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r314780 | russell | 2011-04-22 09:02:23 -0500 (Fri, 22 Apr 2011) | 18 lines Merged revisions 314778 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r314778 | russell | 2011-04-22 08:58:03 -0500 (Fri, 22 Apr 2011) | 11 lines Initialize buffers in getvar and getvarfull. Initialize the buffers used to hold the result from GET VARIABLE or GET VARIABLE FULL. The bug report shows func_read returning garbage in the result. It assumed that the buffer passed in was initialized, like many other functions do. In the more common code path (through the dialplan), it is initialized, so just initialize it here too. (closes issue #19050) Reported by: johnz ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18Merged revisions 314069 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r314069 | rmudgett | 2011-04-18 11:10:10 -0500 (Mon, 18 Apr 2011) | 22 lines The AsyncAGI command loop is lax in the value it returns for the return status. * Return correct status: SUCCESS/FAILED/HANGUP. Previously, abnormal exits from the command loop such as hangup would return SUCCESS. * The "asyncagi break" command now returns SUCCESS and is now the only way to break the command loop with that status. Previously, it returned FAILED. * The AMI event AsyncAGI End is no longer sent if the AsyncAGI Start event is not sent. Previously, this happened because of an error setting up the AGI pipes. * All executed AGI commands now get an AsyncAGI Exec result event. Previously, if the command returned failure (because of hangup), the command loop just exited with FAILURE and did not send the AsyncAGI Exec result event. * Makes sure that the channel frame queue is empty on hangup. Review: https://reviewboard.asterisk.org/r/1183/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13Merged revisions 313700 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r313700 | rmudgett | 2011-04-13 17:52:47 -0500 (Wed, 13 Apr 2011) | 5 lines Revert flushing stale AsyncAGI commands from -r313615. It looks like it was intentional to leave any commands or in-flight commands in the queue in case Async AGI is run again on the call. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13Merged revisions 313658 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r313658 | rmudgett | 2011-04-13 12:47:43 -0500 (Wed, 13 Apr 2011) | 2 lines Miscellaneous AGI diagnostic message cleanup and code optimization. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13Merged revisions 313615 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r313615 | rmudgett | 2011-04-13 12:18:49 -0500 (Wed, 13 Apr 2011) | 5 lines * Add missing channel lock to handle_cli_agi_add_cmd(). * Flush any Async AGI commands left over from earlier Async AGI control of the call. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13Merged revisions 313588 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r313588 | rmudgett | 2011-04-13 11:31:50 -0500 (Wed, 13 Apr 2011) | 55 lines Merged revisions 313579 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r313579 | rmudgett | 2011-04-13 11:29:49 -0500 (Wed, 13 Apr 2011) | 48 lines Merged revisions 313545 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r313545 | rmudgett | 2011-04-13 11:21:24 -0500 (Wed, 13 Apr 2011) | 41 lines Asterisk does not hangup a channel after endpoint hangs up. If the call that the dialplan started an AGI script for is hungup while the AGI script is in the middle of a command then the AGI script is not notified of the hangup. There are many AGI Exec commands that this can happen with. The reported applications have been: Background, Wait, Read, and Dial. Also the AGI Get Data command. * Don't wait on the Asterisk channel after it has hung up. The channel is likely to never need servicing again. * Restored the AGI script's ability to return the AGI_RESULT_HANGUP value in run_agi(). It previously only could return AGI_RESULT_SUCCESS or AGI_RESULT_FAILURE after the DeadAGI and AGI applications were merged. (closes issue #17954) Reported by: mn3250 Patches: issue17954_v1.8.patch uploaded by rmudgett (license 664) issue17954_v1.6.2.patch uploaded by rmudgett (license 664) issue17954_v1.4.patch uploaded by rmudgett (license 664) Tested by: rmudgett JIRA SWP-2171 (closes issue #18492) Reported by: devmod Tested by: rmudgett JIRA SWP-2761 (closes issue #18935) Reported by: nvitaly Tested by: astmiv, rmudgett JIRA SWP-3216 (closes issue #17393) Reported by: siby Tested by: rmudgett JIRA SWP-2727 Review: https://reviewboard.asterisk.org/r/1165/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04Replace ast_log(LOG_DEBUG, ...) with ast_debug()Paul Belanger
(closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 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-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-19Merged revisions 302549 via svnmerge from Sean Bright
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r302549 | seanbright | 2011-01-19 13:43:11 -0500 (Wed, 19 Jan 2011) | 17 lines Merged revisions 302548 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r302548 | seanbright | 2011-01-19 13:37:09 -0500 (Wed, 19 Jan 2011) | 10 lines Properly handle partial reads from fgets() when handling AGIs. When fgets() failed with EAGAIN, we were continually decrementing the available space left in our buffer, resulting in botched command handling. (closes issue #16032) Reported by: notahat Patches: agi_buffer_patch2.diff uploaded by fnordian (license 110) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-22Revert to the previous behavior of AGI command WAIT FOR DIGIT, since theErin Spiceland
behavior of the command with this patch is almost exactly like that of GET DATA. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-19Add extra functionality to AGI command WAIT FOR DIGIT.Erin Spiceland
Add the ability to play a sound file, listen for more than just one digit, specify escape characters. Backwards compatible (to work with only timeout specified). (closes issue #15531) Reported by: diLLec Patches: asterisk-res_agi-203638-patched.patch uploaded by diLLec (license 839) Tested by: diLLec, espiceland git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295554 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-27Merged revisions 288927 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r288927 | russell | 2010-09-27 08:03:43 -0500 (Mon, 27 Sep 2010) | 2 lines Fix some documentation typos and spelling errors. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-27Merged revisions 288925 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r288925 | russell | 2010-09-27 07:42:10 -0500 (Mon, 27 Sep 2010) | 2 lines Fix a documentation spelling error. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288926 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-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-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-07-02Fix various typos reported by LintianTzafrir Cohen
(Also fix the typos in the comments) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16MSG_OOB flag on HANGUP packet removed.Paul Belanger
Per Tilghman's request on IRC (#asterisk-bugs). (closes issue #17506) Reported by: brycebaril Tested by: pabelanger, tilghman git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-27Fix compile on systems without HAVE_NULLSAFE_PRINTF defined.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@259617 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-25handle_speechset has 4 arguments.Leif Madsen
Update code to reflect that handle_speechset has 4 arguments. (closes issue #17093) Reported by: gpatri Patches: res_agi.patch uploaded by gpatri (license 1014) Tested by: pabelanger, mmichelson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Solaris doesn't like outputting a NULL to a %s in format strings.Tilghman Lesher
Detect all platforms that don't like that, either, and ensure that when documentation is missing, we pass a non-NULL pointer when outputting the corresponding documentation. (closes issue #16689) Reported by: bklang Patches: 20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/497/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-19Create iterative method for querying SRV results, and use that for finding ↵Tilghman Lesher
AGI servers. (closes issue #14775) Reported by: _brent_ Patches: 20091215__issue14775.diff.txt uploaded by tilghman (license 14) hagi-5.patch uploaded by brent (license 388) Tested by: _brent_ Reviewboard: https://reviewboard.asterisk.org/r/378/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-08Initialize variables that we attempt to free later.Tilghman Lesher
(closes issue #16302) Reported by: yahsyn Patches: 20091124__issue16302.diff.txt uploaded by tilghman (license 14) Tested by: yahsyn git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04Merged revisions 237405 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r237405 | tilghman | 2010-01-04 12:19:00 -0600 (Mon, 04 Jan 2010) | 16 lines Add a flag to disable the Background behavior, for AGI users. This is in a section of code that relates to two other issues, namely issue #14011 and issue #14940), one of which was the behavior of Background when called with a context argument that matched the current context. This fix broke FreePBX, however, in a post-Dial situation. Needless to say, this is an extremely difficult collision of several different issues. While the use of an exception flag is ugly, fixing all of the issues linked is rather difficult (although if someone would like to propose a better solution, we're happy to entertain that suggestion). (closes issue #16434) Reported by: rickead2000 Patches: 20091217__issue16434.diff.txt uploaded by tilghman (license 14) 20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14) Tested by: rickead2000 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04Fix timeout for AGI command speech recognize.Jeff Peeler
(closes issue #16297) Reported by: semond git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-23Merged revisions 236184 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r236184 | tilghman | 2009-12-22 20:55:24 -0600 (Tue, 22 Dec 2009) | 4 lines If EXEC only gets a single argument, don't crash when the second is used. (closes issue #16504) Reported by: bklang ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236186 65c4cc65-6c06-0410-ace0-fbb531ad65f3