summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
AgeCommit message (Collapse)Author
2011-04-18Merged revisions 314068 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r314068 | rmudgett | 2011-04-18 11:02:12 -0500 (Mon, 18 Apr 2011) | 7 lines Unclear code in app_dial.c. Make code formatting clear. (closes issue #19134) Reported by: oej ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-11Merged revisions 313368-313369 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r313368 | rmudgett | 2011-04-11 18:03:02 -0500 (Mon, 11 Apr 2011) | 2 lines Backport a restructuring change from trunk to make the next change stand out. ........ r313369 | rmudgett | 2011-04-11 18:08:02 -0500 (Mon, 11 Apr 2011) | 13 lines Frames from the inbound channel should go to all outbound channels in app_dial.c. In app_dial.c:wait_for_answer() frames from the inbound channel should be sent to all outbound channels instead of only if there is just one outbound channel. Control frames like AST_CONTROL_CONNECTED_LINE need to be passed to all of the the outbound channels. This can happen if a blond transfer is done by a remote switch on the inbound channel. JIRA AST-443 JIRA SWP-2730 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-18Merged revisions 311295 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r311295 | rmudgett | 2011-03-17 21:22:07 -0500 (Thu, 17 Mar 2011) | 35 lines Merged revision 310986 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r310986 | rmudgett | 2011-03-16 13:56:28 -0500 (Wed, 16 Mar 2011) | 28 lines Dial() o option broke when connected line feature added. The patch restores the o option behavior and adds the ability to specify the CallerID. The Dial o and f options are complementary to each other. The o option stores the CallerID on the outgoing channel as the channel's CallerID. The f option forces the CallerID sent by the outgoing channel. o(x) - The argument 'x' is optional. If not present, then specify that the CallerID that was present on the *calling* channel be stored as the CallerID on the *called* channel. This was the behavior of Asterisk 1.0 and earlier. If present, then specify the CallerID stored on the *called* channel. Note that o(${CALLERID(all)}) is similar to option o without parameters. f(x) - The argument 'x' is optional and its presence changes the behavior of this option. If not present, then force the outgoing CallerID on a call-forward or deflection to the dialplan extension for this Dial() using a dialplan 'hint'. For example, some PSTNs do not allow CallerID to be set to anything other than the numbers assigned to you. If present, then force the outgoing CallerID to 'x'. Patches: jira_abe_2752_dial_fo_options.patch uploaded by rmudgett (license 664) Tested by: rmudgett JIRA ABE-2752 JIRA SWP-3096 .......... ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-15Merged revisions 307962 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307962 | rmudgett | 2011-02-15 13:52:45 -0600 (Tue, 15 Feb 2011) | 1 line Don't crash when forcing caller id. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-14Merged revisions 307750 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307750 | tilghman | 2011-02-14 00:50:23 -0600 (Mon, 14 Feb 2011) | 23 lines Calling a gosub routine defined in AEL from Dial/Queue ceased to work. A bug in AEL did not distinguish between the "s" extension generated by AEL and an "s" extension that was required to exist by the chan_dahdi (or another channel) that was not supplied with a starting extension. Therefore, AEL made incorrect assumptions about what commands were permissable in the context. This was fixed by making AEL generate a different extension name. However, Dial and Queue make additional assumptions about the name of the default gosub extension. Therefore, they needed to be brought into line with a "macro" rendered by AEL (as a gosub), without breaking traditional dialplans written without the aid of AEL. Related to (issue #18480) Reported by: nivek (closes issue #18729) Reported by: kkm Patches: 20110209__issue18729.diff.txt uploaded by tilghman (license 14) 018729-dial-queue-gosub-try3.patch uploaded by kkm (license 888) Tested by: kkm ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307751 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-04Merged revisions 306324 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r306324 | rmudgett | 2011-02-04 12:53:06 -0600 (Fri, 04 Feb 2011) | 9 lines Don't send redirecting updates to the caller if the dialplan forked the call. Each fork in the dial could be redirected and confuse the caller. For ISDN the DivLeg1 and DivLeg3 messages would get confused because ISDN redirects calls in sequence not in parallel. * Also fixed a formatting inconsistency in app_dial.c and make a warning message more useful about what frame type could not be written. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31Merged revisions 305254 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r305254 | qwell | 2011-01-31 17:07:00 -0600 (Mon, 31 Jan 2011) | 24 lines Merged revisions 305253 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r305253 | qwell | 2011-01-31 16:59:34 -0600 (Mon, 31 Jan 2011) | 17 lines Merged revisions 305252 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r305252 | qwell | 2011-01-31 16:56:54 -0600 (Mon, 31 Jan 2011) | 10 lines Prevent a crash when dialing a technology with no destination (ex: Dial(SIP/)) chan_iax2 and other channel drivers already had code to prevent this. The attempt that app_dial was making to prevent it was not correct, so I fixed that. (closes issue #18371) Reported by: gbour Patches: 18371.patch uploaded by gbour (license 1162) ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-20Merged revisions 302918 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r302918 | lmadsen | 2011-01-20 09:45:39 -0600 (Thu, 20 Jan 2011) | 16 lines Merged revisions 302917 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r302917 | lmadsen | 2011-01-20 09:42:05 -0600 (Thu, 20 Jan 2011) | 8 lines Option L() is milliseconds, not seconds. > Change the verbose output of option L() to say milliseconds and not seconds > as the value is in milliseconds. > > (closes issue #18264) > Reported by: jacco > Patches: > app_dial_patch.txt uploaded by lmadsen (license 10) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24Merged revisions 296002 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296002 | russell | 2010-11-24 11:13:08 -0600 (Wed, 24 Nov 2010) | 52 lines Merged revisions 296001 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296001 | russell | 2010-11-24 11:03:16 -0600 (Wed, 24 Nov 2010) | 45 lines Merged revisions 296000 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296000 | russell | 2010-11-24 10:48:39 -0600 (Wed, 24 Nov 2010) | 38 lines Handle failures building translation paths more effectively. The problem scenario occurred on a heavily loaded system that was using the codec_dahdi module and exceeded the hardware transcoding capacity. The failure mode at that point was not good. The report came in to us as an Asterisk lock-up. The "core show locks" shows a ton of threads locked up (but no obvious deadlock). Upon deeper investigation, when the system is in this state, the CPU was maxed out. The CPU was being consumed by the Asterisk logger spewing messages on every audio frame for calls set up after transcoder capacity was reached. The purpose of this patch is to make Asterisk handle failures to create a translation path in a more graceful manner. If we can't translate, then the call just needs to be dropped, as it's not going to work. These are the changes: 1) In set_format() of channel.c (which is called by set_read_format() and set_write_format()), it was ignoring if ast_translator_build_path() failed and returned NULL. It now pays attention to that case and returns a result reflecting failure. With this change in place, the bridging code will immediately detect a failure and end the bridge instead of proceeding to try to bridge frames that can't be translated and making channel drivers freak out by sending them frames in a format they weren't expecting. 2) In ast_indicate_data() of channel.c, failure of ast_playtones_start() was ignored. It is now reflected in the return value of the function. This didn't turn out to have any affect on the bug, but seemed like a good change to leave in. 3) In app_dial(), when only sending a call to a single endpoint, it will attempt to do some bridging of its own of early audio. It uses make_compatible() when it's going to do this. However, it ignored failure from make compatible. So, even with the fix from #1, if there was early audio going through app_dial, there would still be a period of invalid frames passing through. After detecting failure here, Dial() exits. ABE-2658 ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-21Merged revisions 292413 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r292413 | pabelanger | 2010-10-20 20:07:17 -0400 (Wed, 20 Oct 2010) | 24 lines Merged revisions 292412 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r292412 | pabelanger | 2010-10-20 20:05:45 -0400 (Wed, 20 Oct 2010) | 17 lines Merged revisions 292411 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r292411 | pabelanger | 2010-10-20 20:00:51 -0400 (Wed, 20 Oct 2010) | 10 lines Record priv-recordintro as sln, not gsm This removes the gsm->sln step when transcoding priv-recordintro. (closes issue #18176) Reported by: pabelanger Patches: chan_sip.diff uploaded by pabelanger (license 224) ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-06Merged revisions 290614 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r290614 | rmudgett | 2010-10-06 13:50:37 -0500 (Wed, 06 Oct 2010) | 12 lines Merged revision 290613 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r290613 | rmudgett | 2010-10-06 13:42:41 -0500 (Wed, 06 Oct 2010) | 5 lines Eliminate a redundant test for AST_CONTROL_REDIRECTING. Eliminate redundant test for AST_CONTROL_REDIRECTING that prevents running the redirecting interception macro if it is defined. .......... ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-21Merged revisions 288079-288080 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r288079 | rmudgett | 2010-09-21 15:29:51 -0500 (Tue, 21 Sep 2010) | 2 lines Protect channel access in CONNECTED_LINE and REDIRECTING interception macro launch code. ........ r288080 | rmudgett | 2010-09-21 15:29:59 -0500 (Tue, 21 Sep 2010) | 8 lines Simplify locking code for REDIRECTING interception macro when forwarding a call. Simplified the locking code by using a local copy of the redirecting party information in app_dial.c:do_forward() and app_queue.c:wait_for_answer() for launching the REDIRECTING interception macro when a call is forwarded. Reduced the lock time of the 'o->chan' and 'in' channels. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-10Merged revisions 281568 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r281568 | russell | 2010-08-10 12:48:42 -0500 (Tue, 10 Aug 2010) | 22 lines Merged revisions 281567 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r281567 | russell | 2010-08-10 12:47:13 -0500 (Tue, 10 Aug 2010) | 15 lines Merged revisions 281566 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r281566 | russell | 2010-08-10 12:45:45 -0500 (Tue, 10 Aug 2010) | 8 lines Reset visible indication after answer. (closes issue #17641) Reported by: klaus3000 Patches: ast1.6.2.9-app_dial-visible_indication.patch.txt uploaded by klaus3000 (license 65) Tested by: schmidts ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@281570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23Merged revisions 279227 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r279227 | rmudgett | 2010-07-23 17:20:47 -0500 (Fri, 23 Jul 2010) | 21 lines Merged revisions 279207 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r279207 | rmudgett | 2010-07-23 17:11:23 -0500 (Fri, 23 Jul 2010) | 14 lines Merged revisions 279206 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r279206 | rmudgett | 2010-07-23 16:56:44 -0500 (Fri, 23 Jul 2010) | 7 lines SIP promiscuous redirect could fail to dial the redirect. The ast_channel was created with one variable to ast_request() but the call to ast_call() that initiates the outgoing call was using a different variable. The two variables are not equivalent if the call_forward string included a channel technology specifier. e.g., SIP/200 ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14ast_callerid restructuringRichard Mudgett
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09Merged revisions 275027 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r275027 | mnicholson | 2010-07-09 11:04:21 -0500 (Fri, 09 Jul 2010) | 8 lines Clear the AST_CDR_FLAG_DIALED flag for channels going into the pbx via the G option in app_dial (closes issue #17592) Reported by: jamicque Patches: G-flag-cdr-fix1.diff uploaded by mnicholson (license 96) Tested by: jamicque, mnicholson ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02Generic Advice of Charge.Richard Mudgett
Asterisk Generic AOC Representation - Generic AOC encode/decode routines. (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame) - AST_CONTROL_AOC frame type to represent generic encoded AOC data - Manager events for AOC-S, AOC-D, and AOC-E messages Asterisk App Support - app_dial AOC-S pass-through support on call setup - app_queue AOC-S pass-through support on call setup AOC Unit Tests - AOC Unit Tests for encode/decode routines - AOC Unit Test for manager event representation. SIP AOC Support - Pass-through of generic AOC-D and AOC-E messages to snom phones via the snom AOC specification. - Creation of chan_sip page3 flags for the addition of the new 'snom_aoc_enabled' sip.conf option. IAX AOC Support - Natively supports AOC pass-through through the use of the new AST_CONTROL_AOC frame type DAHDI AOC Support - ETSI PRI full AOC Pass-through support - 'aoc_enable' chan_dahdi.conf option for independently enabling pass-through of AOC-S, AOC-D, AOC-E. - 'aoce_delayhangup' option for retrieving AOC-E on disconnect. - DAHDI A() dial string option for requesting AOC services. example usage: ;requests AOC-S, AOC-D, and AOC-E on call setup exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e)) Review: https://reviewboard.asterisk.org/r/552/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-01Set app and appdata fields when a Dial is redirectedTerry Wilson
(closes issue #17204) Reported by: one47 Tested by: twilson, one47 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26Remove redundant ast_conntected_line_free call.Mark Michelson
This wouldn't cause any problems, but it's certainly not needed either. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-20Dial and queue connected line update macro not always run when expected.Richard Mudgett
The connected line update macro would not get run if the connected line number string was empty. The number could be empty if the connected line update did not update a number but the name. It should be run if there was an AST_CONTROL_CONNECTED_LINE frame received for pending dials and queues. Renamed and added some more comments for some confusing identifiers directly connected to the related code. Also fixed a memory leak in app_queue. Review: https://reviewboard.asterisk.org/r/669/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17Enhancements to connected line and redirecting work.Mark Michelson
From reviewboard: Digium has a commercial customer who has made extensive use of the connected party and redirecting information present in later versions of Asterisk Business Edition and which is to be in the upcoming 1.8 release. Through their use of the feature, new problems and solutions have come about. This patch adds several enhancements to maximize usage of the connected party and redirecting information functionality. First, Asterisk trunk already had connected line interception macros. These macros allow you to manipulate connected line information before it was sent out to its target. This patch adds the same feature except for redirecting information instead. Second, the ast_callerid and ast_party_id structures have been enhanced to provide a "tag." This tag can be set with func_callerid, func_connectedline, func_redirecting, and in the case of DAHDI, mISDN, and SIP channels, can be set in a configuration file. The idea behind the callerid tag is that it can be set to whatever value the administrator likes. Later, when running connected line and redirecting macros, the admin can read the tag off the appropriate structure to determine what action to take. You can think of this sort of like a channel variable, except that instead of having the variable associated with a channel, the variable is associated with a specific identity within Asterisk. Third, app_dial has two new options, s and u. The s option lets a dialplan writer force a specific caller ID tag to be placed on the outgoing channel. The u option allows the dialplan writer to force a specific calling presentation value on the outgoing channel. Fourth, there is a new control frame subclass called AST_CONTROL_READ_ACTION added. This was added to correct a very specific situation. In the case of SIP semi-attended (blond) transfers, the party being transferred would not have the opportunity to run a connected line interception macro to possibly alter the transfer target's connected line information. The issue here was that during a blond transfer, the SIP transfer code has no bridged channel on which to queue the connected line update. The way this was corrected was to add this new control frame subclass. Now, we queue an AST_CONTROL_READ_ACTION frame on the channel on which the connected line interception macro should be run. When ast_read is called to read the frame, ast_read responds by calling a callback function associated with the specific read action the control frame describes. In this case, the action taken is to run the connected line interception macro on the transferee's channel. Review: https://reviewboard.asterisk.org/r/652/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09Merge Call completion support into trunk.Mark Michelson
From Reviewboard: CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date overview of the architecture can be found in the file doc/CCSS_architecture.pdf in the CCSS branch. Off the top of my head, the big differences between what is implemented and what is in the document are as follows: 1. We did not end up modifying the Hangup application at all. 2. The document states that a single call completion monitor may be used across multiple calls to the same device. This proved to not be such a good idea when implementing protocol-specific monitors, and so we ended up using one monitor per-device per-call. 3. There are some configuration options which were conceived after the document was written. These are documented in the ccss.conf.sample that is on this review request. For some basic understanding of terminology used throughout this code, see the ccss.tex document that is on this review. This implements CCBS and CCNR in several flavors. First up is a "generic" implementation, which can work over any channel technology provided that the channel technology can accurately report device state. Call completion is requested using the dialplan application CallCompletionRequest and can be canceled using CallCompletionCancel. Device state subscriptions are used in order to monitor the state of called parties. Next, there is a SIP-specific implementation of call completion. This method uses the methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion using SIP signaling. There are a few things to note here: * The agent/monitor terminology used throughout Asterisk sometimes is the reverse of what is defined in the referenced draft. * Implementation of the draft required support for SIP PUBLISH. I attempted to write this in a generic-enough fashion such that if someone were to want to write PUBLISH support for other event packages, such as dialog-state or presence, most of the effort would be in writing callbacks specific to the event package. * A subportion of supporting PUBLISH reception was that we had to implement a PIDF parser. The PIDF support added is a bit minimal. I first wrote a validation routine to ensure that the PIDF document is formatted properly. The rest of the PIDF reading is done in-line in the call-completion-specific PUBLISH-handling code. In other words, while there is PIDF support here, it is not in any state where it could easily be applied to other event packages as is. Finally, there are a variety of ISDN-related call completion protocols supported. These were written by Richard Mudgett, and as such I can't really say much about their implementation. There are notes in the CHANGES file that indicate the ISDN protocols over which call completion is supported. Review: https://reviewboard.asterisk.org/r/523 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-03Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.Richard Mudgett
SWP-1229 ABE-2161 * Ensure chan_local.c:local_call() will not leak cid.cid_dnid when copying. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-03Using the Dial application f option when the call is forwarded will likely ↵Richard Mudgett
crash. Fix app_dial.c:do_forward() OPT_FORCECLID setting cid.cid_num with a stack allocated string instead of a heap allocated string. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-31Add documentation clarifying when 't' and 'T' can be used.Leif Madsen
(closes issue #17021) Reported by: kovzol Tested by: lmadsen, kovzol, davidw, ebroad git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-20Resolve compiler warnings on FreeBSD.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03Removed cdrflags from ast_channel structure.Richard Mudgett
Only chan_dahdi set a value in cdrflags. Everyone else just copied it around the system. Noone cared about any value it may have contained. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-02Properly respect GOSUB_RESULT as to what to do with the master channel.Tilghman Lesher
Previously, we would parse GOSUB_RESULT, but not actually do anything with it. Also, allow GOSUB_RETVAL to be inherited back across a peer/master channel. (closes issue #16687) Reported by: bklang Patches: app_dial-preserve-gosub_retval.patch uploaded by bklang (license 919) (with modifications) (closes issue #16686) Reported by: bklang Patches: app_dial-respect-gosub_result.patch uploaded by bklang (license 919) (with modifications) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-05Mismerged a bit.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-05Add a missing part of the connected line work into trunk.Mark Michelson
Part of the work done for connected line was to add an optional argument to the 'f' option to allow for the connected party information of the outgoing channel to be set to the argument provided. This was overlooked during the merge of the work to trunk and is being added back now. The CHANGES file has also been updated to note this change. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-19app_dial optional parameter to option 'r' to allow play indication from ↵Alec L Davis
indications.conf (closes issue #14504) Reported by: alecdavis Tested by: alecdavis,jsmith Patch app_dial.play_ring_indications.diff7.txt uploaded by alecdavis (license 585) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13Display a list of channel variables in each channel-oriented event.Tilghman Lesher
(Closes AST-33) Reviewboard: https://reviewboard.asterisk.org/r/368/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Added the 'a' option to app dial and modified app_dial to set the answertime ↵Matthew Nicholson
when the called channel answers. This change causes answertime to be correct even if the called channel hangs up during an announcement triggered by the A() option. (closes issue #15936) Reported by: falves11 Patches: dial-macro-billsec-fix1.diff uploaded by mnicholson (license 96) dial-caller-answer1.diff uploaded by mnicholson (license 96) Tested by: falves11, mnicholson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Merged revisions 227827 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r227827 | mnicholson | 2009-11-04 14:52:27 -0600 (Wed, 04 Nov 2009) | 10 lines This patch modifies the Dial application to monitor the calling channel for hangups while playing back announcements. (closes issue #16005) Reported by: falves11 Patches: dial-announce-hangup-fix1.diff uploaded by mnicholson (license 96) Tested by: mnicholson, falves11 Review: https://reviewboard.asterisk.org/r/407/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Expand codec bitfield from 32 bits to 64 bits.Tilghman Lesher
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02Merged revisions 226889 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r226889 | file | 2009-11-02 14:08:11 -0400 (Mon, 02 Nov 2009) | 11 lines Fix a bug where the recorded privacy introduction file would not get removed if the caller hung up while the called party had not yet answered. This was fixed by introducing an argument to the 'n' option which, when enabled, removes the introduction file under all scenarios. This was done to preserve the behavior that has existed for quite some time. (closes issue #14674) Reported by: ulogic Patches: bug14674.patch uploaded by jpeeler (license 325) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19Merged revisions 224565 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r224565 | file | 2009-10-19 16:47:50 -0300 (Mon, 19 Oct 2009) | 5 lines Do not attempt early media bridging (ie: direct RTP setup) if options are enabled that should prevent it. (closes issue #14763) Reported by: cupotka ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-12Merged revisions 223804 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r223804 | jpeeler | 2009-10-12 18:12:50 -0500 (Mon, 12 Oct 2009) | 8 lines Ensure ringing continues for branched calls after progress is received While waiting for an answer, don't send progress for branched calls for which ringing was sent. (closes issue #15028) Reported by: fnordian ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09Fix potential memory leaks.Mark Michelson
ABE-1998 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24Add bridge related dial flags to the bridge appJeff Peeler
Most of the functionality here is gained simply by setting the feature flag on the bridge config. However, the dial limit functionality has been moved from app_dial to the features code and has been made public so both app_dial and the bridge app can use it. (closes issue #13165) Reported by: tim_ringenbach Patches: app_bridge_options_r138998.diff uploaded by tim ringenbach (license 540), modified by me git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24Merged revisions 208592 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r208592 | russell | 2009-07-24 13:38:24 -0500 (Fri, 24 Jul 2009) | 7 lines Do not log an ERROR if autoservice_stop() returns -1. This does not indicate an error. A return of -1 just means that the channel has been hung up. (reported in #asterisk-dev) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14I AM A TERRIBLE PERSONMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14Reset the sentringing indication when redirects occur.Mark Michelson
If a redirecting control frame is processed or a call forward occurs, we need to reset the sentringing flag so that we can send another ringing indication to the phone that may contain a connected line update. AST-164 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26Merge the new Channel Event Logging (CEL) subsystem.Russell Bryant
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-07Global var cleanup - constification and removing unused vars.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-03ast_call_forward() todo notes and originate flag copy.David Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01Add the ability to execute connected line interception macros.Mark Michelson
When connected line updates are received or generated in the middle of an application call, it is now possible to execute a macro to manipulate the connected line data. This way, phone numbers may be manipulated to be more presentable to users, names may be changed for...whatever reason, or whatever else needs to be done may be. Review: https://reviewboard.asterisk.org/r/256 AST-165 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30Merged revisions 198251 via svnmerge from Sean Bright
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r198251 | seanbright | 2009-05-29 22:46:41 -0400 (Fri, 29 May 2009) | 8 lines Treat an empty FORWARD_CONTEXT the same way we treat a missing one. (closes issue #15056) Reported by: p_lindheimer Patches: 05292009_bug15056.diff uploaded by seanbright (license 71) Tested by: p_lindheimer ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3