aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
AgeCommit message (Collapse)AuthorFilesLines
2008-08-05(closes issue #12982)murf1-2/+7
Reported by: bcnit Tested by: murf I discovered that also, in the previous bug fixes and changes, the cdr.conf 'unanswered' option is not being obeyed, so I fixed this. And, yes, there are two 'answer' times involved in this scenario, and I would agree with you, that the first answer time is the time that should appear in the CDR. (the second 'answer' time is the time that the bridge was begun). I made the necessary adjustments, recording the first answer time into the peer cdr, and then using that to override the bridge cdr's value. To get the 'unanswered' CDRs to appear, I purposely output them, using the dial cmd to mark them as DIALED (with a new flag), and outputting them if they bear that flag, and you are in the right mode. I also corrected one small mention of the Zap device to equally consider the dahdi device. I heavily tested 10-sec-wait macros in dial, and without the macro call; I tested hangups while the macro was running vs. letting the macro complete and the bridge form. Looks OK. Removed all the instrumentation and debug. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@135799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-14Add a check to the CAN_EARLY_BRIDGE macro in app_dial tommichelson1-6/+7
be sure there are no audiohooks present on the channels involved. This fixed a one-way audio situation I had in my test setup. I couldn't find any open issues that suggested one-way audio with regards to mixmonitor (or other audiohook) usage, though. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@130792 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08Cause SIP to return a 480 instead of a 404 when a sip peer exists, but is nottilghman1-0/+1
registered. (closes issue #12885) Reported by: ibc Patches: 20080701__bug12885__2.diff.txt uploaded by Corydon76 (license 14) Tested by: ibc git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@129149 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13Remove extra option from previous solution attempttwilson1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122617 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13This should fix the behavior of the 'T' dial feature being passed ↵twilson1-14/+25
incorrectly to the transferee when builtin_atxfers are used. Also, doing a builtin_atxfer to parking was broken and is fixed here as well. (closes issue #11898) Reported by: sergee Tested by: otherwiseguy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122589 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-11Backport fix for 11520--for some reason I didn't do this back in February ↵twilson1-0/+63
when I patched for trunk. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@121992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-02Fix another typo in documentationrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@119530 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-01small typo fix 'retires' => 'retries'mvanbaak1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@119478 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-14If the datastore has been moved to another channel due to a masquerade, thenmmichelson1-2/+8
freeing the datastore here causes an eventual double free when the new channel hangs up. We should only free the datastore if we were able to successfully remove it from the channel we are referencing (i.e. the datastore was not moved). (closes issue #12359) Reported by: pguido git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114112 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-10Move where unanswered CDRs are dropped to the CDR core, not everything uses ↵file1-19/+0
app_dial. (closes issue #11516) Reported by: ys Patches: branch_1.4_cdr.diff uploaded by ys (license 281) Tested by: anest, jcapp, dartvader git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107016 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Add a control frame to indicate the source of media has changed. Depending ↵file1-1/+7
on the underlying technology it may need to change some things. (closes issue #12148) Reported by: jcomellas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106235 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22Add dependency on chan_local to app_dial.oej1-0/+5
Dial still runs without chan_local, but will be missing forwarding functionality. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99592 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07* Add channel locking around datastore operations that expect the channelrussell1-26/+43
to be locked. * Document why we don't record Local channels in the dialed interfaces list. * Remove the dialed variable as it isn't needed. * Restructure some code for clarity and coding guidelines stuff git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91783 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Don't unlock the dialed_interfaces list until we're done messing with the ↵russell1-1/+1
iterator. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91693 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Allow dialing local channels from Queue() and Dial() again. There was a slightrussell1-1/+1
flaw in the code to prevent call forwards from looping that caused this problem. (related to issue #11486) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91677 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05The 'G' option for Dial() did not properly handle the case where only a ↵mmichelson1-2/+4
label was provided. This was due to the fact that the answering channel did not have an extension set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto on the answering channel since it is a wasteful call. The answering channel and the calling channel are both directed to the same extension and context, just different priorities, so we can just copy the values from the calling channel to the answering channel and increment the answering channel's priority. (closes issue #11382, reported by jon, patch by me with correction by jon) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91273 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Fix build issue on the build cluster.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90798 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03A big one...mmichelson1-71/+77
This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop. This is accomplished by creating a datastore on the calling channel which has a linked list of all devices dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore is detached from the channel and destroyed. This change also introduces some side effects to the code which I shall enumerate here: 1. Datastore inheritance has been backported from trunk into 1.4 2. A large chunk of code has been removed from app_dial. This chunk is the section of code which handles the call forward case after the channel has been requested but before it has been called. This was removed because call-forwarding still works fine without it, it makes the code less error-prone should it need changing, and it made this set of changes much less painful to just have the forwarding handled in one place in each module. 3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore which is attached to the channel may be created and attached in either app_dial or app_queue, so they need a common place to find the datastore info. This approach was taken in case similar datastores are needed in the future, there will be a common place to add them. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90735 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27closes issue #11379; OK, this is an attempt to make both sides happy. To the ↵murf1-1/+21
cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89622 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Simplify the CAN_EARLY_BRIDGE macro a bit.russell1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Only attempt early bridging if the options given to Dial() permit it.file1-4/+7
(closes issue #10861) Reported by: peekyb git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84158 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-31Re-order dial options to be in line with the existing alpha order.qwell1-8/+8
Issue 10621, initial patch by junky git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81412 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Fixing an error I made earlier. ast_fileexists can return -1 on failure, so ↵mmichelson1-2/+2
I need to be sure that we only enter the if statement if it is successful. Related to my fix to issue #10186 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Restoring functionality from 1.2 wherein Retrydial will not exit if there is ↵mmichelson1-5/+16
no announce file specified. This change makes it so that if there is no announce file specified, the application will continue until finished (or caller hangs up). If a bogus announce file is specified, then a warning message will be printed saying that the file could not be found, but execution will still continue. (closes issue #10186, reported by jon, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75253 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-03Merged revisions 73052 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r73052 | tilghman | 2007-07-03 07:34:14 -0500 (Tue, 03 Jul 2007) | 2 lines RetryDial should accept a 0 argument, but it does not, because atoi does not distinguish between 0 and error (closes issue #10106) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73053 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20Merged revisions 70444 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r70444 | tilghman | 2007-06-20 14:25:54 -0500 (Wed, 20 Jun 2007) | 2 lines Issue 9997 - Timelimit times out the wrong channel ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@70445 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-07Merged revisions 68070 via svnmerge from file1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68070 | file | 2007-06-07 10:19:40 -0400 (Thu, 07 Jun 2007) | 2 lines Allow the 'g' option to work if used with the 'S' option. (issue #9888 reported by gasparz) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-04Initialize cidname variable to nothing since it may be used without having ↵file1-2/+2
been touched. (issue #9661 reported by dimas) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67066 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-18Merged revisions 65172 via svnmerge from murf1-0/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r65172 | murf | 2007-05-18 14:56:20 -0600 (Fri, 18 May 2007) | 1 line This update will fix the situation that occurs as described by 9717, where when several targets are specified for a dial, if any one them reports FAIL, the whole call gets FAIL, even though others were ringing OK. I rearranged the priorities, so that a new disposition, NULL, is at the lowest level, and the disposition get init'd to NULL. Then, next up is FAIL, and next up is BUSY, then NOANSWER, then ANSWERED. All the related set routines will only do so if the disposition value to be set to is greater than what's already there. This gives the intended effect. So, if all the targets are busy, you'd get BUSY for the call disposition. If all get BUSY, but one, and that one rings is not answered, you get NOANSWER. If by some freak of nature, the NULL value doesn't get overridden, then the disp2str routine will report NOANSWER as before. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-17Increase the size of a buffer to support longer dial strings for channels.russell1-1/+1
(issue #9291, reported and fix suggested by meni) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@64756 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-13Merged revisions 61655 via svnmerge from file1-4/+12
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61655 | file | 2007-04-13 15:15:12 -0400 (Fri, 13 Apr 2007) | 2 lines Add OUTBOUND_GROUP_ONCE variable to app_dial. This behaves the same as OUTBOUND_GROUP except it will get unset after use so it won't get accidentally inherited. (issue #BE-140) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61656 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09Merged revisions 60797 via svnmerge from file1-4/+5
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60797 | file | 2007-04-08 20:59:29 -0400 (Sun, 08 Apr 2007) | 2 lines When calling a device that then forwards us elsewhere... we have to make our channels compatible if it is the only channel being dialed. (issue #9445 reported by marcelbarbulescu) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60798 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-17Merged revisions 55153 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r55153 | file | 2007-02-16 22:53:45 -0500 (Fri, 16 Feb 2007) | 2 lines Answer the channel before recording privacy information. (issue #8926 reported by lmamane) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@55154 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Need to check macro extension as well as macro context for directed pickup.file1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54924 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Allow directed pickup to pick up the real context instead of the macro ↵file1-1/+4
context if a Macro is used. (issue #8984 reported by jamesb63) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54884 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-15Merged revisions 54622 via svnmerge from file1-9/+13
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r54622 | file | 2007-02-15 11:14:40 -0500 (Thu, 15 Feb 2007) | 2 lines Use a separate variable to indicate execution should continue instead of the return value. (issue #8842 reported by pluto70) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54623 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-14Forward begin DTMF frames as well as end. (issue #9068 reported by mhardeman)file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54481 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-09Temporarily change musicclass on channel to one specified in Dial so that ↵file1-1/+11
the 'm' option functions properly. (issue #8969 reported by christianbee) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53749 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-03Merged revisions 53133 via svnmerge from russell1-4/+9
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53133 | russell | 2007-02-03 14:38:13 -0600 (Sat, 03 Feb 2007) | 4 lines set the DIALSTATUS variable to contain "INVALIDARGS" when the dial application exits early because of invalid arguments instead of just leaving it empty. (issue #8975) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53136 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-10Merged revisions 50295 via svnmerge from file1-5/+15
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r50295 | file | 2007-01-09 23:51:06 -0500 (Tue, 09 Jan 2007) | 2 lines Add another return value to dial_exec_full that indicates execution is going to continuing at a new extension/context/priority and to just let it slide. (issue #8598 reported by jon) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50298 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-19Merged revisions 48584 via svnmerge from file1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48584 | file | 2006-12-19 16:10:26 -0500 (Tue, 19 Dec 2006) | 2 lines Free localuser structure when we fail to dial (issue #8612 reported by rizzo) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48585 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-01Merged revisions 48192 via svnmerge from kpfleming1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48192 | kpfleming | 2006-12-01 17:30:59 -0600 (Fri, 01 Dec 2006) | 2 lines if Dial() is going to send music-on-hold to the calling party, it has to send PROGRESS first to ensure that the reverse audio path has been setup first (BE-106) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48193 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-20Use a separate variable in the channel structure to store the context that ↵file1-3/+3
the channel was dialed from. (issue #8382 reported by jiddings) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47850 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-16Fix a couple of typos. Initially pointed out by mrobinson.qwell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47782 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-16Backport of new directed pickup (BE-85).file1-0/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@45246 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19similar patch for verbose vs debug with minor changesmogorman1-1/+1
bug 2617 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-06These small app documentation changes to app_dial and app_read will ↵murf1-1/+2
hopefully avert any more 7544 type bug reports\! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42111 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-21/+10
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05Merged revisions 38928 via svnmerge from russell1-1/+8
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38928 | russell | 2006-08-05 02:37:59 -0400 (Sat, 05 Aug 2006) | 3 lines make sure the priv-callerintros directory exists before trying to create a file there (issue #7659, patch by hads, with some modifications by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38929 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵kpfleming1-5/+5
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37988 f38db490-d61c-443f-a65b-d21fe96a405b