Olle Johansson
3d434f14c3
Add dependency on chan_local to app_dial.
...
Dial still runs without chan_local, but will be missing forwarding functionality.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 17:31:17 +00:00
Russell Bryant
3e913c706f
* Add channel locking around datastore operations that expect the channel
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@91783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 16:38:48 +00:00
Russell Bryant
c13539cb13
Don't unlock the dialed_interfaces list until we're done messing with the iterator.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:51:22 +00:00
Russell Bryant
85e0e1919d
Allow dialing local channels from Queue() and Dial() again. There was a slight
...
flaw in the code to prevent call forwards from looping that caused this problem.
(related to issue #11486 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:38:40 +00:00
Mark Michelson
a1a592f3f0
The 'G' option for Dial() did not properly handle the case where only a 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@91273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:35:52 +00:00
Joshua Colp
335d271dda
Fix build issue on the build cluster.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 05:29:33 +00:00
Mark Michelson
7b052b78e1
A big one...
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@90735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 23:12:17 +00:00
Steve Murphy
1975b6e753
closes issue #11379 ; OK, this is an attempt to make both sides happy. To the 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@89622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 06:24:02 +00:00
Russell Bryant
db1ab4db58
Simplify the CAN_EARLY_BRIDGE macro a bit.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 14:24:49 +00:00
Joshua Colp
e7f6101587
Only attempt early bridging if the options given to Dial() permit it.
...
(closes issue #10861 )
Reported by: peekyb
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 13:49:36 +00:00
Jason Parker
86c32ff0ef
Re-order dial options to be in line with the existing alpha order.
...
Issue 10621, initial patch by junky
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-31 18:44:44 +00:00
Mark Michelson
e4cc4ef183
Fixing an error I made earlier. ast_fileexists can return -1 on failure, so 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@75405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:03:48 +00:00
Mark Michelson
402820c9e3
Restoring functionality from 1.2 wherein Retrydial will not exit if there is 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@75253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 18:16:15 +00:00
Tilghman Lesher
3a215d6a50
Merged revisions 73052 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@73053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 12:38:53 +00:00
Tilghman Lesher
badad4a542
Merged revisions 70444 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@70445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 19:29:23 +00:00
Joshua Colp
f07dfca43a
Merged revisions 68070 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@68071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 14:21:59 +00:00
Joshua Colp
1317920054
Initialize cidname variable to nothing since it may be used without having been touched. (issue #9661 reported by dimas)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 17:59:14 +00:00
Steve Murphy
dfee354cfa
Merged revisions 65172 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@65200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 22:06:27 +00:00
Russell Bryant
78989c792f
Increase the size of a buffer to support longer dial strings for channels.
...
(issue #9291 , reported and fix suggested by meni)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@64756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17 16:47:29 +00:00
Joshua Colp
03eb572457
Merged revisions 61655 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@61656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-13 19:17:08 +00:00
Joshua Colp
88e5a094b6
Merged revisions 60797 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@60798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 01:03:14 +00:00
Joshua Colp
ec6e4f6887
Merged revisions 55153 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@55154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 03:55:30 +00:00
Joshua Colp
3a1ceb4ff8
Need to check macro extension as well as macro context for directed pickup.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@54924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 18:51:15 +00:00
Joshua Colp
7722d96bea
Allow directed pickup to pick up the real context instead of the macro context if a Macro is used. (issue #8984 reported by jamesb63)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@54884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 17:02:35 +00:00
Joshua Colp
bddfe6fea7
Merged revisions 54622 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@54623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-15 16:19:39 +00:00
Joshua Colp
dadf652e26
Forward begin DTMF frames as well as end. (issue #9068 reported by mhardeman)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@54481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14 21:07:23 +00:00
Joshua Colp
1ba2aa702d
Temporarily change musicclass on channel to one specified in Dial so that the 'm' option functions properly. (issue #8969 reported by christianbee)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-09 19:33:31 +00:00
Russell Bryant
8f04a45ee9
Merged revisions 53133 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@53136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-03 20:44:20 +00:00
Joshua Colp
2c4359d9b3
Merged revisions 50295 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@50298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 04:55:13 +00:00
Joshua Colp
8d7bdfc607
Merged revisions 48584 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@48585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 21:12:07 +00:00
Kevin P. Fleming
a2f6499c0a
Merged revisions 48192 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@48193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-01 23:37:28 +00:00
Joshua Colp
335630b10c
Use a separate variable in the channel structure to store the context that the channel was dialed from. (issue #8382 reported by jiddings)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 15:51:37 +00:00
Jason Parker
67546a068c
Fix a couple of typos. Initially pointed out by mrobinson.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 23:19:46 +00:00
Joshua Colp
552ca7e926
Backport of new directed pickup (BE-85).
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@45246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 17:24:35 +00:00
Matt O'Gorman
d0a1a0033d
similar patch for verbose vs debug with minor changes
...
bug 2617
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23:45 +00:00
Steve Murphy
7c9b6e1d29
These small app documentation changes to app_dial and app_read will hopefully avert any more 7544 type bug reports\!
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 17:14:50 +00:00
Kevin P. Fleming
0a27d8bfe5
merge new_loader_completion branch, including (at least):
...
- 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
Russell Bryant
774bba093b
Merged revisions 38928 via svnmerge from
...
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: https://origsvn.digium.com/svn/asterisk/trunk@38929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 06:39:43 +00:00
Kevin P. Fleming
6d0742fc16
merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 20:44:39 +00:00
Mark Spencer
4c90cf59b7
Support hold/unhold in Zap, update IAX2 parser to know about modern commands, forward hold/unhold in dial, add hold device state
...
and implement holding in the SLA.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-08 02:24:07 +00:00
BJ Weschke
2e8a142c85
Don't ast_request a channel structure twice when a call is being forwarded. ( #7362 - twlison / vechers confirming fix)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 12:18:18 +00:00
Joshua Colp
a23af6559c
Merged revisions 33294 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r33294 | file | 2006-06-09 15:08:00 -0300 (Fri, 09 Jun 2006) | 2 lines
Handle hangup during recording of screened name (issue #7304 reported by kulldominique)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:12:46 +00:00
Olle Johansson
9f5aa13142
Rename ast_rtp_early_media to ast_rtp_early_bridge to avoid confusion.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 09:47:44 +00:00
Kevin P. Fleming
472c1ca282
simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Kevin P. Fleming
7f3cc8b886
cleanups for commit from issue #5657... set a cause code for a rejected forward request, and actually set tmp->chan to NULL when we reject the forward request
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:11:55 +00:00
BJ Weschke
871f08ec07
Add an option to app_dial, 'i', to instruct the application ignore any requests from peers to forward calls elsewhere. #5657 (johnlange w/some minor mods)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 15:52:32 +00:00
Joshua Colp
91f9966be3
Merge branch for bug 6264 (Privacy option 2 returns dial-status ANSWER / option_priority_jumping not respected) (reported by jkoopmann and branch by murf)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:00:10 +00:00
BJ Weschke
5235890be4
This is part 2/2 of the patches for #7090 . Adds one-step call parking to /trunk via builtin functions and 'k' 'K' application options added to app_dial. This also resolves #6340 .
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:43:43 +00:00
Joshua Colp
d2da48b156
Inherit channel variables when call forwarding through chan_local (issue #7095 reported by raarts)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 23:39:29 +00:00
Russell Bryant
04ecb29d03
remove almost all of the checks of the result from ast_strdupa() or alloca().
...
As it turns out, all of these checks were useless, because alloca will never
return NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 13:22:15 +00:00