summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2011-05-26Use va_copy for stringfieldsTerry Wilson
The ast_string_field_build_va functions were written to take to separate va_lists to work around FreeBSD 4 not having va_copy defined. In the end, we don't support anything using gcc < 3 anyway because we use va_copy all over the place anyway. This patch just simplifies things by removing the second va_list function arguments in favor of va_copy. Review: https://reviewboard.asterisk.org/r/1233/ --This line, and those below, will be ignored-- M include/asterisk/stringfields.h M main/utils.c M main/channel.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25Merged revisions 320796 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r320796 | rmudgett | 2011-05-25 11:23:11 -0500 (Wed, 25 May 2011) | 17 lines Give zombies a safe channel driver to use. Recent crashes from zombie channels suggests that they need a safe home to goto. When a masquerade happens, the physical part of the zombie channel is hungup. The hangup normally sets the channel private pointer to NULL. If someone then blindly does a callback to the channel driver, a crash is likely because the private pointer is NULL. The masquerade now sets the channel technology of zombie channels to the kill channel driver. Related to the following issues: (issue #19116) (issue #19310) Review: https://reviewboard.asterisk.org/r/1224/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-23Merged revisions 320560 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r320560 | kpfleming | 2011-05-23 10:47:14 -0500 (Mon, 23 May 2011) | 4 lines Don't generate spurious "No: command not found" messages when running the configure script on a system that has neither gmime-config nor pkg-config. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-17Option needed for Q931_IE_TIME_DATE to be optional in CONNECT message.Richard Mudgett
The NEC SV8300 rejects the Q931_IE_TIME_DATE for Q.SIG. Add option to specify if and how much of the current time is put in Q931_IE_TIME_DATE. * Send date/time ie never. * Send date/time ie date only. * Send date/time ie date and hour. * Send date/time ie date, hour, and minute. * Send date/time ie date, hour, minute, and second. * Send date/time ie default: Libpri will send date and hhmm only when in NT PTMP mode to support ISDN phones. (closes issue #19221) Reported by: kenner JIRA SWP-3396 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16Merged revisions 319085 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r319085 | pabelanger | 2011-05-16 10:35:21 -0400 (Mon, 16 May 2011) | 10 lines Support gmime-2.4 (closes issue #18863) Reported by: tzafrir Patches: gmime-2.4-18.diff uploaded by tzafrir (license 46) Tested by: tzafrir Review: https://reviewboard.asterisk.org/r/1213/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12Merged revisions 318671 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r318671 | alecdavis | 2011-05-13 10:52:08 +1200 (Fri, 13 May 2011) | 30 lines Fix directed group pickup feature code *8 with pickupsounds enabled Since 1.6.2, the new pickupsound and pickupfailsound in features.conf cause many issues. 1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked. 2). dialplan applications for directed_pickups shouldn't beep. 3). feature code for directed pickup should beep on success/failure if configured. Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite. Moved app_directed:pickup_do() to features:ast_do_pickup(). Functions below, all now use the new ast_do_pickup() app_directed_pickup.c: pickup_by_channel() pickup_by_exten() pickup_by_mark() pickup_by_part() features.c: ast_pickup_call() (closes issue #18654) Reported by: Docent Patches: ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license 585) Tested by: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett Review: https://reviewboard.asterisk.org/r/1185/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318672 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-26Merged revisions 315503 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r315503 | tilghman | 2011-04-26 14:32:50 -0500 (Tue, 26 Apr 2011) | 28 lines Merged revisions 315502 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r315502 | tilghman | 2011-04-26 14:22:52 -0500 (Tue, 26 Apr 2011) | 21 lines Merged revisions 315501 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r315501 | tilghman | 2011-04-26 14:18:46 -0500 (Tue, 26 Apr 2011) | 14 lines Fix the bounds-checking code. The code that set the bit within the select bitfield was correct, but the bounds-checking code was not. The change to that line uses the new _bitsize macro for clarity. Also, FD_ZERO macro did not zero-out anything but the first word of the bitfield, so this could have caused problems with modules using that macro with the expanded bitfield. (closes issue #18773) Reported by: jamicque Patches: 20110423__issue18773.diff.txt uploaded by tilghman (license 14) Tested by: chris-mac ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21New HD ConfBridge conferencing application.David Vossel
Includes a new highly optimized and customizable ConfBridge application capable of mixing audio at sample rates ranging from 8khz-192khz. Review: https://reviewboard.asterisk.org/r/1147/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20Introduction of the JITTERBUFFER dialplan function.David Vossel
Review: https://reviewboard.asterisk.org/r/1157/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20Merged revisions 314417 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r314417 | rmudgett | 2011-04-20 11:54:02 -0500 (Wed, 20 Apr 2011) | 1 line AST_CONTROL_XXX comment changes. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18Problems with ISDN MWI to phones.Richard Mudgett
The "controlling user number" is always the number of the voice mail box which is identical with the subscriber number itself. This number which is listed in the ISDN phone MWI menu cannot be called back to contact the voice mail box. The controlling user number should be made configurable. JIRA ABE-2738 JIRA SWP-2846 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18Merged revisions 314017 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r314017 | dvossel | 2011-04-18 08:41:06 -0500 (Mon, 18 Apr 2011) | 17 lines sip codec negotiation of dynamic rtp payloads error fix This patch fixes how chan_sip handles dynamic rtp payload types it does not understand. At the moment if a dynamic payload's mime type does not match one we understand, the payload does not get removed from our payload table. As a result of this, the payload is set to whatever dynamic codec we use internally for that payload number on outgoing INVITES. This is incorrect. This patch fixes this by properly checking the rtpmap set function's return code to make sure it was found. The function can return both -1 and -2 depending on the source of the mismatch. We were just checking -1 explicitly. Review: https://reviewboard.asterisk.org/r/1169/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-11Merged revisions 313279 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r313279 | lmadsen | 2011-04-11 14:36:40 -0500 (Mon, 11 Apr 2011) | 21 lines Merged revisions 313278 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r313278 | lmadsen | 2011-04-11 14:33:03 -0500 (Mon, 11 Apr 2011) | 14 lines Merged revisions 313277 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r313277 | lmadsen | 2011-04-11 14:30:20 -0500 (Mon, 11 Apr 2011) | 6 lines Fix detection of OpenSSL 1.0 (closes issue #19093) Reported by: tzafrir Patches: detect_openssl_10.diff uploaded by tzafrir (license 46) ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01New Feature for chan_dahdi. 4 length pattern matching.Jonathan Rose
In chan_dahdi.conf, the user can now use length 4 patterns in addition to the usual length 2 patterns. The s ntax remains the same and the method used to track the pattern history will only change when using the length 4 patterns. (closes issue SWP-3250) Code: jrose rmudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01Merged revisions 312286,312288 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r312286 | tilghman | 2011-04-01 05:44:33 -0500 (Fri, 01 Apr 2011) | 2 lines Reload must react correctly against a possibly changed table, so dropping the conditional reload flag. ................ r312288 | tilghman | 2011-04-01 05:58:45 -0500 (Fri, 01 Apr 2011) | 21 lines Merged revisions 312287 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r312287 | tilghman | 2011-04-01 05:51:24 -0500 (Fri, 01 Apr 2011) | 14 lines Merged revisions 312285 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r312285 | tilghman | 2011-04-01 05:36:42 -0500 (Fri, 01 Apr 2011) | 7 lines Found some leaking file descriptors while looking at ast_FD_SETSIZE dead code. (issue #18969) Reported by: oej Patches: 20110315__issue18969__14.diff.txt uploaded by tilghman (license 14) ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-31Fix function reference in comment.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-11Mix Monitor: Now with r and t options.Jonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-07Merged revisions 309808 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r309808 | tilghman | 2011-03-06 18:54:42 -0600 (Sun, 06 Mar 2011) | 14 lines Merged revisions 309251 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r309251 | tilghman | 2011-03-01 19:06:02 -0600 (Tue, 01 Mar 2011) | 7 lines Revert previous 2 commits, and instead conditionally redefine the same macro used in flex 2.5.35 that clashed with our workaround. Not surprisingly, the workaround was exactly the same code as was provided by the Flex maintainers, albeit in two different places, in different macros. This should fix the FreeBSD builds, which have an older version of Flex. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04Add setvar option to calendaringTerry Wilson
Adding the setvar option with variable substitution on the value allows things like setting the outbound caller id name to the summary of a calendar event, etc. Values could be chained together as they are appended in order to do some scripting if necessary. Review: https://reviewboard.asterisk.org/r/1134/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-28Merged revisions 309035 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r309035 | tilghman | 2011-02-28 05:10:28 -0600 (Mon, 28 Feb 2011) | 15 lines Merged revisions 309033-309034 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r309033 | tilghman | 2011-02-28 04:43:12 -0600 (Mon, 28 Feb 2011) | 4 lines A later version of flex already includes the fwrite workaround code, which if used twice causes a compilation error. Detect whether Flex will compile without the workaround; if so, suppress our workaround code. ........ r309034 | tilghman | 2011-02-28 05:07:52 -0600 (Mon, 28 Feb 2011) | 2 lines Clarify meaning, removing double negative (stupid!) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 307879 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307879 | rmudgett | 2011-02-15 10:13:55 -0600 (Tue, 15 Feb 2011) | 37 lines No response sent for SIP CC subscribe/resubscribe request. Asterisk does not send a response if we try to subscribe for call completion after we have received a 180 Ringing. You can only subscribe for call completion when the call has been cleared. When we receive the 180 Ringing, for this call, its call-completion state is 'CC_AVAILABLE'. If we then send a subscribe message to Asterisk, it trys to change the call-completion state to 'CC_CALLER_REQUESTED'. Because this is an invalid state change, it just ignores the message. The only state Asterisk will accept our subscribe message is in the 'CC_CALLER_OFFERED' state. Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears the call by sending a CANCEL. Asterisk should always send a response. Even if its a negative one. The fix is to allow for the CCSS core to notify a CC agent that a failure has occurred when CC is requested. The "ack" callback is replaced with a "respond" callback. The "respond" callback has a parameter indicating either a successful response or a specific type of failure that may need to be communicated to the requester. (closes issue #18336) Reported by: GeorgeKonopacki Tested by: mmichelson, rmudgett JIRA SWP-2633 (closes issue #18337) Reported by: GeorgeKonopacki Tested by: mmichelson JIRA SWP-2634 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-10Fixes bug in chan_sip where nativeformats are not set correctly.David Vossel
The nativeformats field was being overwritten when it should have been appended too. This caused some format capabilities to be lost briefly and some log warnings to be output. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307433 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-04Add ISDN display ie text handling options to chan_dahdi.conf.Richard Mudgett
The display ie handling can be controlled independently in the send and receive directions with the following options: * Block display text data. * Use display text in SETUP/CONNECT messages for name. * Use display text for COLP name updates (FACILITY/NOTIFY as appropriate). * Pass arbitrary display text during a call. Sent in INFORMATION messages. Received from any message that the display text was not used as a name. If the display options are not set then the options default to legacy behavior. The arbitrary display text is exchanged between bridged channels using the AST_FRAME_TEXT frame type. To send display text from the dialplan use the SendText() application when the arbitrary display text option is enabled. JIRA SWP-2688 JIRA ABE-2693 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306396 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-31Merged revisions 305040 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r305040 | tilghman | 2011-01-31 01:51:40 -0600 (Mon, 31 Jan 2011) | 2 lines Use the non-specific API aliases, to avoid a problem with building the utils directory. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31Merged revisions 304950 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r304950 | tilghman | 2011-01-31 00:41:36 -0600 (Mon, 31 Jan 2011) | 18 lines Change mutex tracking so that it only consumes memory in the core mutex object when it's actually being used. This reduces the overall size of a mutex which was 3016 bytes before this back down to 216 bytes (this is on 64-bit Linux with a glibc-implemented mutex). The exactness of the numbers here may vary slightly based upon how mutexes are implemented on a platform, but the long and short of it is that prior to this commit, chan_iax2 held down 98MB of memory on a 64-bit system for nothing more than a table of 32767 locks. After this commit, the same table occupies a mere 7MB of memory. (closes issue #18194) Reported by: job Patches: 20110124__issue18194.diff.txt uploaded by tilghman (license 14) Tested by: tilghman Review: https://reviewboard.asterisk.org/r/1066 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26Merged revisions 304245 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r304245 | mnicholson | 2011-01-26 14:43:27 -0600 (Wed, 26 Jan 2011) | 20 lines Merged revisions 304244 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r304244 | mnicholson | 2011-01-26 14:42:16 -0600 (Wed, 26 Jan 2011) | 13 lines Merged revisions 304241 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r304241 | mnicholson | 2011-01-26 14:38:22 -0600 (Wed, 26 Jan 2011) | 6 lines This patch modifies chan_sip to route responses to the address the request came from. It also modifies chan_sip to respect the maddr parameter in the Via header. ABE-2664 Review: https://reviewboard.asterisk.org/r/1059/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26Merged revisions 303907 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r303907 | mnicholson | 2011-01-25 14:56:12 -0600 (Tue, 25 Jan 2011) | 2 lines Reimplemented fax session reservation to reverse the ABI breakage introduced in r297486. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24Merged revisions 303549 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r303549 | russell | 2011-01-24 14:51:37 -0600 (Mon, 24 Jan 2011) | 45 lines Merged revisions 303548 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines Merged revisions 303546 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines Fix channel redirect out of MeetMe() and other issues with channel softhangup. Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped working properly. This issue includes a patch that resolves the issue by removing a call to ast_check_hangup() from app_meetme.c. I left that in my patch, as it doesn't need to be there. However, the rest of the patch fixes this problem with or without the change to app_meetme. The key difference between what happens before and after this patch is the effect of the END_OF_Q control frame. After END_OF_Q is hit in ast_read(), ast_read() will return NULL. With the ast_check_hangup() removed, app_meetme sees this which causes it to exit as intended. Checking ast_check_hangup() caused app_meetme to exit earlier in the process, and the target of the redirect saw the condition where ast_read() returned NULL. Removing ast_check_hangup() works around the issue in app_meetme, but doesn't solve the issue if another application did the same thing. There are also other edge cases where if an application finishes at the same time that a redirect happens, the target of the redirect will think that the channel hung up. So, I made some changes in pbx.c to resolve it at a deeper level. There are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to abort the hangup process. My patch extends this to remove the END_OF_Q frame from the channel's read queue, making the "abort hangup" more complete. This same technique was used in every place where a softhangup flag was cleared. (closes issue #18585) Reported by: oej Tested by: oej, wedhorn, russell Review: https://reviewboard.asterisk.org/r/1082/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303551 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 302680 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r302680 | tilghman | 2011-01-19 15:23:31 -0600 (Wed, 19 Jan 2011) | 16 lines Merged revisions 302675 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r302675 | tilghman | 2011-01-19 15:22:45 -0600 (Wed, 19 Jan 2011) | 9 lines Merged revisions 302663 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r302663 | tilghman | 2011-01-19 15:20:28 -0600 (Wed, 19 Jan 2011) | 2 lines Add some API documentation ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20New astobj2 flag for issuing a callback without locking the container.David Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20Some scheduler API cleanup and improvements.Russell Bryant
Previously, I had added the ast_sched_thread stuff that was a generic scheduler thread implementation. However, if you used it, it required using different functions for modifying scheduler contents. This patch reworks how this is done and just allows you to optionally start a thread on the original scheduler context structure that has always been there. This makes it trivial to switch to the generic scheduler thread implementation without having to touch any of the other code that adds or removes scheduler entries. In passing, I made some naming tweaks to add ast_ prefixes where they were not there before. Review: https://reviewboard.asterisk.org/r/1007/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-18Merged revisions 298960 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines Merged revisions 298957 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines Merged revisions 298905 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines Let Asterisk find better backtrace information with libbfd. The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search for better symbol information within both the Asterisk binary, as well as loaded modules, to assist when using inline backtraces to track down problems. Review: https://reviewboard.asterisk.org/r/1055/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-12Add support for several platforms to obtain the real thread ID.Jeff Peeler
Already had the pthread ID which is not the same. The most obvious enhancement is in the "core show threads" output. As stated in the utils header, if the platform isn't supported -1 is reported (instead of the process ID previously). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-10Merged revisions 298051 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r298051 | tilghman | 2010-12-10 10:26:46 -0600 (Fri, 10 Dec 2010) | 18 lines Merged revisions 298050 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r298050 | tilghman | 2010-12-10 10:24:13 -0600 (Fri, 10 Dec 2010) | 11 lines Portability issue on OpenSolaris. Also detect the required structure element, because OpenSolaris defines SIOCGIFHWADDR, but without support for IP sockets. (closes issue #18442) Reported by: ranjtech Patches: 20101209__issue18442.diff.txt uploaded by tilghman (license 14) Tested by: ranjtech ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-03Merged revisions 297157,297486,297495 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r297157 | mnicholson | 2010-12-01 13:47:33 -0600 (Wed, 01 Dec 2010) | 2 lines Changed some NOTICE and WARNING messages to DEBUG messages. ........ r297486 | mnicholson | 2010-12-02 15:30:47 -0600 (Thu, 02 Dec 2010) | 6 lines Add support for reserving a fax session before answering the channel. Note: this change breaks ABI compatibility. FAX-217 ........ r297495 | mnicholson | 2010-12-03 09:21:52 -0600 (Fri, 03 Dec 2010) | 4 lines Print a DEBUG message instead of a WARNING message when the selected fax tech does not support reserving sessions. Answer the channel before quering it for t.38 support. This is necessary for the query to work properly over local channels. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-01Merged revisions 296992 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296992 | tilghman | 2010-12-01 11:01:56 -0600 (Wed, 01 Dec 2010) | 19 lines Merged revisions 296991 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296991 | tilghman | 2010-12-01 11:01:00 -0600 (Wed, 01 Dec 2010) | 12 lines Merged revisions 296990 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines Clarify documentation on how we store codec preference lists. (closes issue #18397) Reported by: birgita ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-30Add a comment on why the reserved bit is reserved.Tilghman Lesher
Came up when reviewing discussion on the CODEC PREFS IE in IAX2. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-30move devices from hints into an ao2_containerStefan Schmidt
by splitting up devices from hints into an own ao2_container the callback to get these devices for statechange handling is faster. with this changes the length of a device used in a hint isnt longer restricted to 80 characters. Tests showed that calling handle_statechange is 40 times faster if no hints are used and 25 times faster if there are any hints. (closes issue #17928) Reported by: mdu113 Tested by: schmidts Review: https://reviewboard.asterisk.org/r/1003/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29Merged revisions 296534 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296534 | tilghman | 2010-11-29 01:28:44 -0600 (Mon, 29 Nov 2010) | 20 lines Merged revisions 296533 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines I love standards. There are so many to choose from. Except when there isn't one. Linux and *BSD disagree on the elements within the ucred structure. Detect which one is in use on the system. (closes issue #18384) Reported by: bjm Patches: cred-diffs uploaded by bjm (license 473) 20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14) 20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14) Tested by: tilghman, bjm ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-27Merged revisions 296429 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r296429 | tilghman | 2010-11-27 03:58:57 -0600 (Sat, 27 Nov 2010) | 5 lines Also don't build DEBUG_FD_LEAKS when STANDALONE2 is defined. (closes issue #18385) Reported by: cmaj ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-22Merged revisions 295866 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r295866 | rmudgett | 2010-11-22 13:36:10 -0600 (Mon, 22 Nov 2010) | 60 lines Merged revisions 295843 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines Merged revisions 295790 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call. To recreate the problem: 1) Party A calls Party B 2) Invoke CLI "channel redirect" command to redirect channel call leg associated with A. 3) All associated channels are hung up. Note that if the CLI command were done on the channel call leg associated with B it works. This regression was a result of the fix for issue #16946 (https://reviewboard.asterisk.org/r/740/). The regression affects all features that use an async goto to execute the dialplan because of an external event: Channel redirect, AMI redirect, SIP REFER, and FAX detection. The struct ast_channel._softhangup code is a mess. The variable is used for several purposes that do not necessarily result in the call being hung up. I have added doxygen comments to describe how the various _softhangup bits are used. I have corrected all the places where the variable was tested in a non-bit oriented manner. The primary fix is the new AST_CONTROL_END_OF_Q frame. It acts as a weak hangup request so the soft hangup requests that do not normally result in a hangup do not hangup. JIRA SWP-2470 JIRA SWP-2489 (closes issue #18171) Reported by: SantaFox (closes issue #18185) Reported by: kwemheuer (closes issue #18211) Reported by: zahir_koradia (closes issue #18230) Reported by: vmarrone (closes issue #18299) Reported by: mbrevda (closes issue #18322) Reported by: nerbos Review: https://reviewboard.asterisk.org/r/1013/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-20Merged revisions 295711 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r295711 | russell | 2010-11-19 18:50:00 -0600 (Fri, 19 Nov 2010) | 36 lines Merged revisions 295710 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r295710 | russell | 2010-11-19 18:45:51 -0600 (Fri, 19 Nov 2010) | 29 lines Fix cache of device state changes for multiple servers. This patch addresses a regression where device states across multiple servers were not being processing completely correctly. The code works to determine the overall state by looking at the last known state of a device on each server. However, there was a regression due to some invasive rewrites of how the cache works that led to the cache only storing the last device state change for a device, regardless of which server it was on. The code is set up to cache device state change events by ensuring that each event in the cache has a unique device name + entity ID (server ID). The code that was responsible for comparing raw information elements (which EID is) always returned a match due to a memcmp() with a length of 0. There isn't much code to fix the actual bug. This patch also introduces a new CLI command that was very useful for debugging this problem. The command allows you to dump the contents of the event cache. (closes issue #18284) Reported by: klaus3000 Patches: issue18284.rev1.txt uploaded by russell (license 2) Tested by: russell, klaus3000 (closes issue #18280) Reported by: klaus3000 Review: https://reviewboard.asterisk.org/r/1012/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-18Merged revisions 295441 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r295441 | pabelanger | 2010-11-18 13:02:12 -0500 (Thu, 18 Nov 2010) | 11 lines Merged revisions 295440 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r295440 | pabelanger | 2010-11-18 12:51:34 -0500 (Thu, 18 Nov 2010) | 4 lines Fix compiler warnings when using openssl-dev 1.0.0+ Review: https://reviewboard.asterisk.org/r/1016/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09Merged revisions 294430 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r294430 | tilghman | 2010-11-09 14:33:05 -0600 (Tue, 09 Nov 2010) | 15 lines Merged revisions 294429 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r294429 | tilghman | 2010-11-09 14:27:23 -0600 (Tue, 09 Nov 2010) | 8 lines Detect GMime properly on systems where gmime flags and libs are configured with pkg-config. (closes issue #16155) Reported by: jcollie Patches: 20100917__issue16155.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294431 65c4cc65-6c06-0410-ace0-fbb531ad65f3