summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
AgeCommit message (Collapse)Author
2012-08-21Fix misuses of asprintf throughout the code.Mark Michelson
This fixes three main issues * Change asprintf() uses to ast_asprintf() so that it pairs properly with ast_free() and no longer causes MALLOC_DEBUG to freak out. * When ast_asprintf() fails, set the pointer NULL if it will be referenced later. * Fix some memory leaks that were spotted while taking care of the first two points. (Closes issue ASTERISK-20135) reported by Richard Mudgett Review: https://reviewboard.asterisk.org/r/2071 ........ Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371592 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Clean up ManagerEvent Dial documentationMatthew Jordan
The paragraph describing the SubEvent belongs with the SubEvent parameter itself, and not with its enum values. The order of parsing was placing the description after the last enum, which isn't correct. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29Hangup handlers - Dialplan subroutines that run when the channel hangs up.Richard Mudgett
Hangup handlers are an alternative to the h extension. They can be used in addition to the h extension. The idea is to attach a Gosub routine to a channel that will execute when the call hangs up. Whereas which h extension gets executed depends on the location of dialplan execution when the call hangs up, hangup handlers are attached to the call channel. You can attach multiple handlers that will execute in the order of most recently added first. (closes issue ASTERISK-19549) Reported by: Mark Murawski Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2002/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Add AMI event documentationMatthew Jordan
This patch adds the core changes necessary to support AMI event documentation in the source files of Asterisk, and adds documentation to those AMI events defined in the core application modules. Event documentation is built from the source by two new python scripts, located in build_tools: get_documentation.py and post_process_documentation.py. The get_documentation.py script mirrors the actions of the existing AWK get_documentation scripts, except that it will scan the entirety of a source file for Asterisk documentation. Upon encountering it, if the documentation happens to be an AMI event, it will attempt to extract information about the event directly from the manager event macro calls that raise the event. The post_process_documentation.py script combines manager event instances that are the same event but documented in multiple source files. It generates the final core-[lang].xml file. As this process can take longer to complete than a typical 'make all', it is only performed if a new make target, 'full', is chosen. Review: https://reviewboard.asterisk.org/r/1967/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Check if PBX was started and fix F and F(x) action logic in Dial application.Richard Mudgett
........ Merged revisions 369258 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369259 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-14Allow non-normal execution routines to be able to run on hungup channels.Richard Mudgett
* Make non-normal dialplan execution routines be able to run on a hung up channel. This is preparation work for hangup handler routines. * Fixed ability to support relative non-normal dialplan execution routines. (i.e., The context and exten are optional for the specified dialplan location.) Predial routines are the only non-normal routines that it makes sense to optionally omit the context and exten. Setting a hangup handler also needs this ability. * Fix Return application being able to restore a dialplan location exactly. Channels without a PBX may not have context or exten set. * Fixes non-normal execution routines like connected line interception and predial leaving the dialplan execution stack unbalanced. Errors like missing Return statements, popping too many stack frames using StackPop, or an application returning non-zero could leave the dialplan stack unbalanced. * Fixed the AGI gosub application so it cleans up the dialplan execution stack and handles the autoloop priority increments correctly. * Eliminated the need for the gosub_virtual_context return location. Review: https://reviewboard.asterisk.org/r/1984/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-05Convert AST_FLAG_ANSWERED_ELSEWHERE usage to AST_CAUSE_ANSWERED_ELSEWHEREKinsey Moore
This was essentially duplicated functionality where normal channels used AST_CAUSE_ANSWERED_ELSEWHERE while local channels and queues used AST_FLAG_ANSWERED_ELSEWHERE. This removes the flag and converts that usage into AST_CAUSE_ANSWERED_ELSEWHER usage. Review: https://reviewboard.asterisk.org/r/1944 (closes issue ASTERISK-19865) Patch-by: Birger Harzenetter git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-24Fix Dial I option ignored if dial forked and one fork redirects.Richard Mudgett
The Dial and Queue I option is intended to block connected line updates and redirecting updates. However, it is a feature that when a call is locally redirected, the I option is disabled if the redirected call runs as a local channel so the administrator can have an opportunity to setup new connected line information. Unfortunately, the Dial and Queue I option is disabled for *all* forked calls if one of those calls is redirected. * Make the Dial and Queue I option apply to each outgoing call leg independently. Now if one outgoing call leg is locally redirected, the other outgoing calls are not affected. * Made Dial not pass any redirecting updates when forking calls. Redirecting updates do not make sense for this scenario. * Made Queue not pass any redirecting updates when using the ringall strategy. Redirecting updates do not make sense for this scenario. * Fixed deadlock potential with chan_local when Dial and Queue send redirecting updates for a local redirect. * Converted the Queue stillgoing flag to a boolean bitfield. (closes issue ASTERISK-19511) Reported by: rmudgett Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1920/ ........ Merged revisions 367678 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367679 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE)Kinsey Moore
This is the starting point for the Asterisk 11: Who Hung Up work and provides a framework which will allow channel drivers to report the types of hangup cause information available in SIP_CAUSE without incurring the overhead of the MASTER_CHANNEL dialplan function. The initial implementation only includes cause generation for chan_sip and does not include cause code translation utilities. This change deprecates SIP_CAUSE and replaces its method of reporting cause codes with the new framework. This change also deprecates the 'storesipcause' option in sip.conf. Review: https://reviewboard.asterisk.org/r/1822/ (Closes issue SWP-4221) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Tweak app_dial predial documentation.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Run predial routine on local;2 channel where you would expect.Richard Mudgett
Before this patch, the predial routine executes on the ;1 channel of a local channel pair. Executing predial on the ;1 channel of a local channel pair is of limited utility. Any channel variables set by the predial routine executing on the ;1 channel will not be available when the local channel executes dialplan on the ;2 channel. * Create ast_pre_call() and an associated pre_call() technology callback to handle running the predial routine. If a channel technology does not provide the callback, the predial routine is simply run on the channel. Review: https://reviewboard.asterisk.org/r/1903/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28PreDial - Ability to run dialplan on callee and caller channels before Dial.Richard Mudgett
Thanks to Mark Murawski for the initial patch and feature definition. (closes issue ASTERISK-19548) Reported by: Mark Murawski Review: https://reviewboard.asterisk.org/r/1878/ Review: https://reviewboard.asterisk.org/r/1229/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23Make app_dial and app_queue use new macro and gosub calls.Richard Mudgett
* Simplify some code in app_dial and app_queue by calling ast_app_exec_macro() and ast_app_exec_sub(). * Fix minor locking issue in app_dial for post-answer macro/gosub MACRO/GOSUB_RESULT=GOTO: handling. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-21Update app_dial M and U option GOTO return value documentation.Richard Mudgett
........ Merged revisions 362997 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 362998 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20Use ast_channel_lock_both() where it was inlined before.Richard Mudgett
The CHANNEL_DEADLOCK_AVOIDANCE() feature of preserving where the channel lock was originally obtained is overkill where ast_channel_lock_both() was inlined. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06Remove unnecessary error message in app_dial.cKinsey Moore
The error message for failure to stop autoservice after a gosub or macro call during a dial was removed for macro while Asterisk 1.4 was still being actively developed. The corresponding gosub error message was never removed. (closes issue ASTERISK-19551) ........ Merged revisions 361329 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 361330 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22Adds F option to Bridge applicationJonathan Rose
Similar to dial and queue F option. (Closes issue ASTERISK-19282) Reported by: To Patches: bridge_f-v3.diff uploaded by To (license 6347) Review: https://reviewboard.asterisk.org/r/1825/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-16Revert the pre-dial addition.Mark Michelson
The code may be just fine, but it had not received a "ship it!" on review board yet. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15Add options PreDial options 'b' and 'B' to app_dialMark Murawki
* Added 'b' and 'B' options to Dial. These options will allow you to run last-minute dialplan on the caller and callee channels while the Dial application is executing, but before the call is started. For example you can use the 'b' option to run dialplan on the callee channel to get the name of the newly created channel right away. Review: https://reviewboard.asterisk.org/r/1229/ (closes issue: ASTERISK-19548) Reported by: Mark Murawski Tested by: Mark Murawski, Stefan Schmidt git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15Add missing connected line macro calls to initial dial for Dial and Queue apps.Richard Mudgett
The connected line interception macros do not get executed when the outgoing channel is initially created and that channel's caller-id is implicitly imported into the incoming channel's connected line data. If you are using the interception macros, you would expect that they get run for every change to a channel's connected line information outside of normal dialplan execution. Review: https://reviewboard.asterisk.org/r/1817/ ........ Merged revisions 359609 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359620 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14Fix Dial m and r options and forked calls generating warnings for voice frames.Richard Mudgett
When connected line support was added, the wait_for_answer() variable single changed its meaning slightly. Unfortunately, the places where single was used did not necessarily get updated to reflect that change. Also audio/video frames were sent to all forked calls when the endpoints were never made compatible. * Don't pass audio/video media frames when the channels have not been made compatible. * Added handling of AST_CONTROL_SRCCHANGE to app_dial.c. * Fixed app_dial.c passing on AST_CONTROL_HOLD because that frame can also pass a requested MOH class. (closes issue ASTERISK-16901) Reported by: Chris Gentle (closes issue ASTERISK-17541) Reported by: clint Review: https://reviewboard.asterisk.org/r/1805/ ........ Merged revisions 359344 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359355 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359357 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-03-08Resolve a few more cases of variable shadowing.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Fix copying of CDR(accountcode) to local channels.Walter Doekes
In r203638, during the addition of the Channel Event Logging, in mid-2009, this got broken in trunk and ended up in asterisk 1.8 and higher. This fixes so the CDR(accountcode) from the calling channel is available to dialed channels again as well as showing up properly in the CDR's. (closes issue ASTERISK-19384) Reported by: jamicque Patches: accountcode.patch (License #6033) by jamicque Review: https://reviewboard.asterisk.org/r/1775/ Reviewed by: Richard Mudgett ........ Merged revisions 357575 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357576 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357577 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-27Deprecated macro usage for connected line, redirecting, and CCSSKinsey Moore
This commit adds GoSub alternatives to connected line, redirecting, and CCSS macro hooks so that macro can finally be deprecated. This also adds deprecation warnings for those features when used and in documentation. Review: https://reviewboard.asterisk.org/r/1760/ (closes issue SWP-4256) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357013 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-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-02-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 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-11Make FollowMe optionally update connected line information when the ↵Richard Mudgett
accepting endpoint is bridged. Like Dial and Queue, FollowMe needs to deal with AST_CONTROL_CONNECTED_LINE information so when the parties are initially bridged, the connected line information will be correct. * Added the 'I' option just like the app_dial and app_queue 'I' option. * Made 'N' option ignored if the call is already answered. (closes issue ASTERISK-18969) Reported by: rmudgett Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1656/ ........ Merged revisions 350364 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350415 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350416 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-12-23Fix missing doc tags found while fixing ASTERISK-18689Kinsey Moore
Add missing <variable></variable> tags in app_dial documentation. ........ Merged revisions 348992 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348993 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05Merged revisions 339512 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339512 | rmudgett | 2011-10-05 12:01:46 -0500 (Wed, 05 Oct 2011) | 9 lines Merged revisions 339511 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339511 | rmudgett | 2011-10-05 12:01:01 -0500 (Wed, 05 Oct 2011) | 1 line Fix Dial F option notes formatting. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03Merged revisions 339145 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339145 | lmadsen | 2011-10-03 14:55:15 -0500 (Mon, 03 Oct 2011) | 13 lines Merged revisions 339144 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339144 | lmadsen | 2011-10-03 14:54:52 -0500 (Mon, 03 Oct 2011) | 6 lines Make documentation for Dial() options 'F' and 'F()' more clear. (Closes issue ASTERISK-18646) Reported by: Physis Heckman Tested by: Richard Mudgett ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26Merged revisions 337974 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r337974 | rmudgett | 2011-09-26 14:35:23 -0500 (Mon, 26 Sep 2011) | 37 lines Merged revisions 337973 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r337973 | rmudgett | 2011-09-26 14:30:39 -0500 (Mon, 26 Sep 2011) | 30 lines Fix deadlock when using dummy channels. Dummy channels created by ast_dummy_channel_alloc() should be destoyed by ast_channel_unref(). Using ast_channel_release() needlessly grabs the channel container lock and can cause a deadlock as a result. * Analyzed use of ast_dummy_channel_alloc() and made use ast_channel_unref() when done with the dummy channel. (Primary reason for the reported deadlock.) * Made app_dial.c:dial_exec_full() not call ast_call() holding any channel locks. Chan_local could not perform deadlock avoidance correctly. (Potential deadlock exposed by this issue. Secondary reason for the reported deadlock since the held lock was part of the deadlock chain.) * Fixed some uses of ast_dummy_channel_alloc() not checking the returned channel pointer for failure. * Fixed some potential chan=NULL pointer usage in func_odbc.c. Protected by testing the bogus_chan value. * Fixed needlessly clearing a 1024 char auto array when setting the first char to zero is enough in manager.c:action_getvar(). (closes issue ASTERISK-18613) Reported by: Thomas Arimont Patches: jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: Thomas Arimont ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20Merged revisions 337120 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r337120 | mjordan | 2011-09-20 17:49:36 -0500 (Tue, 20 Sep 2011) | 28 lines Merged revisions 337118 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r337118 | mjordan | 2011-09-20 17:38:54 -0500 (Tue, 20 Sep 2011) | 21 lines Fix for incorrect voicemail duration in external notifications This patch fixes an issue where the voicemail duration was being reported with a duration significantly less than the actual sound file duration. Voicemails that contained mostly silence were reporting the duration of only the sound in the file, as opposed to the duration of the file with the silence. This patch fixes this by having two durations reported in the __ast_play_and_record family of functions - the sound_duration and the actual duration of the file. The sound_duration, which is optional, now reports the duration of the sound in the file, while the actual full duration of the file is reported in the duration parameter. This allows the voicemail applications to use the sound_duration for minimum duration checking, while reporting the full duration to external parties if the voicemail is kept. (issue ASTERISK-2234) (closes issue ASTERISK-16981) Reported by: Mary Ciuciu, Byron Clark, Brad House, Karsten Wemheuer, KevinH Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1443 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19Merged revisions 336659 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r336659 | rmudgett | 2011-09-19 13:51:19 -0500 (Mon, 19 Sep 2011) | 38 lines Merged revisions 336658 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r336658 | rmudgett | 2011-09-19 13:46:40 -0500 (Mon, 19 Sep 2011) | 31 lines Made Dial d and H options no longer immediately auto-answer the calling leg. The Dial d and H options break DTMF attended transfer atxferdropcall option. 1) Party A calls party B. 2) Party B does a DTMF attended transfer to Party C. If the dialplan uses the Dial d or H options to call Party C then the Dial application answers the call immediately before initiating the call leg to Party C. The premature answer causes the transfer code to not invoke the atxferdropcall=no behavior for a blonde transfer since Party C has "answered". The transfer code thinks that Party B has "consulted" with Party C when Party B hangs up and completes the transfer to Party A. Party A now hears ringback until Party C actually answers. ASTERISK-13294 Dial d option. ASTERISK-11067 Dial H option to disconnect before answer. The referenced issues made Dial answer with the d and H options because many SIP and ISDN phones cannot send DTMF before the call is connected. * Made require the dialplan to control when or if the call needs to be answered to use the Dial application d and H options. (The call is no longer surprise answered when using the Dial d or H options.) Review: https://reviewboard.asterisk.org/r/1381/ JIRA AST-623 JIRA AST-666 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12Merged revisions 335346 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r335346 | kmoore | 2011-09-12 09:22:15 -0500 (Mon, 12 Sep 2011) | 17 lines Merged revisions 335341 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r335341 | kmoore | 2011-09-12 09:21:17 -0500 (Mon, 12 Sep 2011) | 10 lines Ensure frames are not written to dialed channel if ringback is requested When a single channel was dialed and there was media to be forwarded to the calling channel, the media was written without regard for ringback causing silence to be heard in some circumstances. This regression was introduced when the meaning of "single" changed to mean only the number of channels dialed. (closes issue ASTERISK-18083) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-09Merged revisions 335078 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r335078 | mjordan | 2011-09-09 11:27:01 -0500 (Fri, 09 Sep 2011) | 29 lines Merged revisions 335064 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r335064 | mjordan | 2011-09-09 11:09:09 -0500 (Fri, 09 Sep 2011) | 23 lines Updated SIP 484 handling; added Incomplete control frame When a SIP phone uses the dial application and receives a 484 Address Incomplete response, if overlapped dialing is enabled for SIP, then the 484 Address Incomplete is forwarded back to the SIP phone and the HANGUPCAUSE channel variable is set to 28. Previously, the Incomplete application dialplan logic was automatically triggered; now, explicit dialplan usage of the application is required. Additionally, this patch adds a new AST_CONTOL_FRAME type called AST_CONTROL_INCOMPLETE. If a channel driver receives this control frame, it is an indication that the dialplan expects more digits back from the device. If the device supports overlap dialing it should attempt to notify the device that the dialplan is waiting for more digits; otherwise, it can handle the frame in a manner appropriate to the channel driver. (closes issue ASTERISK-17288) Reported by: Mikael Carlsson Tested by: Matthew Jordan Review: https://reviewboard.asterisk.org/r/1416/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-12Merged revisions 331644 via svnmerge from Jonathan Rose
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331644 | jrose | 2011-08-12 11:18:57 -0500 (Fri, 12 Aug 2011) | 9 lines Merged revisions 331635 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331635 | jrose | 2011-08-12 10:49:17 -0500 (Fri, 12 Aug 2011) | 1 line Fixes 32bit compilation warnings brought on by 331634 in app_dial and app_meetme ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-11Merged revisions 331579 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331579 | qwell | 2011-08-11 16:54:54 -0500 (Thu, 11 Aug 2011) | 13 lines Merged revisions 331578 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331578 | qwell | 2011-08-11 16:46:39 -0500 (Thu, 11 Aug 2011) | 6 lines Use proper values for 64-bit option flags. Also, reusing bits es no bueno, so change the value of a duplicate. (issue ASTERISK-18239) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-18Merged revisions 328664 via svnmerge from Mark Murawki
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328664 | markm | 2011-07-18 16:50:13 -0400 (Mon, 18 Jul 2011) | 15 lines Merged revisions 328663 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328663 | markm | 2011-07-18 16:47:04 -0400 (Mon, 18 Jul 2011) | 9 lines app_dial may double free a channel datastore When starting a call with originate, and having the callee channel run Bridge() on pickup, we will double free the dialed_interface_info datastore, causing a crash. Make sure to check if the datastore still exists before trying to free it. (closes issue ASTERISK-17917) Reported by: Mark Murawski Tested by: Mark Murawski ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328665 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-29Merged revisions 325537 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r325537 | mnicholson | 2011-06-29 10:34:47 -0500 (Wed, 29 Jun 2011) | 2 lines don't do native/remote bridging if a framehook is active on the channel ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25Merged revisions 320823 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r320823 | rmudgett | 2011-05-25 12:06:38 -0500 (Wed, 25 May 2011) | 18 lines The AMI Newstate event contains different information between v1.4 and v1.8. The addition of connected line support in v1.8 changes the behavior of the channel caller ID somewhat. The channel caller ID value no longer time shares with the connected line ID on outgoing call legs. The timing of some AMI events/responses output the connected line ID as caller ID. These party ID's are now separate. * The ConnectedLineNum and ConnectedLineName headers were added to many AMI events/responses if the CallerIDNum/CallerIDName headers were also present. (closes issue #18252) Reported by: gje Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1227/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-18Merged revisions 319529 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r319529 | twilson | 2011-05-18 13:05:34 -0700 (Wed, 18 May 2011) | 24 lines Merged revisions 319528 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r319528 | twilson | 2011-05-18 13:02:06 -0700 (Wed, 18 May 2011) | 17 lines Merged revisions 319527 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r319527 | twilson | 2011-05-18 12:56:08 -0700 (Wed, 18 May 2011) | 10 lines Fix app_dial ring groups Revert part of r315643. We need to remove the datastore here as well. The code in bridging code will catch anything that app_dial might miss. (closes issue #19311) Reported by: mspuhler Patches: issue_19311_no_answer.diff uploaded by elguero (license 37) ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26Merged revisions 315644 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r315644 | twilson | 2011-04-26 14:39:01 -0700 (Tue, 26 Apr 2011) | 32 lines Merged revisions 315643 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r315643 | twilson | 2011-04-26 14:27:44 -0700 (Tue, 26 Apr 2011) | 25 lines Merged revisions 315596 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r315596 | twilson | 2011-04-26 14:16:10 -0700 (Tue, 26 Apr 2011) | 18 lines Allow transfer loops without allowing forwarding loops We try to avoid the situation where two phones may be forwarded to each other causing an infinite loop by storing each dialed interface in a channel datastore and checking the list before dialing out. This works, but currently breaks situations like A calls B, A transfers B to C, B transfers C to A, and A transfers C to B. Since human interaction is happening here and not an automated forwarding loop, it should be allowed. This patch removes the dialed_interfaces datastore when a call is bridged (a suggestion from the brilliant mmichelson). If a call is being bridged, it should be safe to assume that we aren't stuck in a loop. Since we are now handling this is the bridge code, the previous attempts at handling it in app_dial and app_queue are removed. Review: https://reviewboard.asterisk.org/r/1195/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26Merged revisions 315452 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r315452 | rmudgett | 2011-04-26 13:00:34 -0500 (Tue, 26 Apr 2011) | 1 line Add missing set of name valid flag when dialing. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-19Merged revisions 314203 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r314203 | lmadsen | 2011-04-19 09:24:25 -0500 (Tue, 19 Apr 2011) | 15 lines Merged revisions 314202 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r314202 | lmadsen | 2011-04-19 09:23:39 -0500 (Tue, 19 Apr 2011) | 7 lines Update seconds to milliseconds in ast_verb output. (closes issue #19084) Reported by: smurfix Patches: app_dial.patch uploaded by smurfix (license 547) Tested by: lmadsen, smurfix ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314204 65c4cc65-6c06-0410-ace0-fbb531ad65f3