aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-18Merged revisions 328664 via svnmerge from markm1-1/+2
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: http://svn.digium.com/svn/asterisk/trunk@328665 f38db490-d61c-443f-a65b-d21fe96a405b
2011-07-14Merged revisions 328247 via svnmerge from lmadsen1-0/+1
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: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-29Merged revisions 325537 via svnmerge from mnicholson1-1/+3
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: http://svn.digium.com/svn/asterisk/trunk@325538 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-25Merged revisions 320823 via svnmerge from rmudgett1-0/+4
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: http://svn.digium.com/svn/asterisk/trunk@320825 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-18Merged revisions 319529 via svnmerge from twilson1-0/+11
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: http://svn.digium.com/svn/asterisk/trunk@319530 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-26Merged revisions 315644 via svnmerge from twilson1-8/+0
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: http://svn.digium.com/svn/asterisk/trunk@315670 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-26Merged revisions 315452 via svnmerge from rmudgett1-0/+2
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: http://svn.digium.com/svn/asterisk/trunk@315453 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-19Merged revisions 314203 via svnmerge from lmadsen1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@314204 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-18Merged revisions 314068 via svnmerge from rmudgett1-5/+8
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: http://svn.digium.com/svn/asterisk/trunk@314079 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-11Merged revisions 313368-313369 via svnmerge from rmudgett1-10/+16
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: http://svn.digium.com/svn/asterisk/trunk@313383 f38db490-d61c-443f-a65b-d21fe96a405b
2011-03-18Merged revisions 311295 via svnmerge from rmudgett1-81/+200
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: http://svn.digium.com/svn/asterisk/trunk@311296 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-15Merged revisions 307962 via svnmerge from rmudgett1-2/+2
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: http://svn.digium.com/svn/asterisk/trunk@307963 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-14Merged revisions 307750 via svnmerge from tilghman1-2/+12
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: http://svn.digium.com/svn/asterisk/trunk@307751 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-04Add ISDN display ie text handling options to chan_dahdi.conf.rmudgett1-21/+41
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: http://svn.digium.com/svn/asterisk/trunk@306396 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-04Merged revisions 306324 via svnmerge from rmudgett1-15/+17
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: http://svn.digium.com/svn/asterisk/trunk@306325 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-31Merged revisions 305254 via svnmerge from qwell1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@305255 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-20Merged revisions 302918 via svnmerge from lmadsen1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@302919 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-24Merged revisions 296002 via svnmerge from russell1-1/+10
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: http://svn.digium.com/svn/asterisk/trunk@296034 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-21Merged revisions 292413 via svnmerge from pabelanger1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@292414 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-06Merged revisions 290614 via svnmerge from rmudgett1-2/+1
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: http://svn.digium.com/svn/asterisk/trunk@290615 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-21Merged revisions 288079-288080 via svnmerge from rmudgett1-8/+8
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: http://svn.digium.com/svn/asterisk/trunk@288081 f38db490-d61c-443f-a65b-d21fe96a405b
2010-08-10Merged revisions 281568 via svnmerge from russell1-1/+2
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: http://svn.digium.com/svn/asterisk/trunk@281570 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-23Merged revisions 279227 via svnmerge from rmudgett1-3/+6
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: http://svn.digium.com/svn/asterisk/trunk@279245 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14ast_callerid restructuringrmudgett1-46/+67
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: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Merged revisions 275027 via svnmerge from mnicholson1-0/+5
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: http://svn.digium.com/svn/asterisk/trunk@275028 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Generic Advice of Charge.rmudgett1-0/+30
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: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-01Set app and appdata fields when a Dial is redirectedtwilson1-0/+2
(closes issue #17204) Reported by: one47 Tested by: twilson, one47 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266786 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26Remove redundant ast_conntected_line_free call.mmichelson1-1/+0
This wouldn't cause any problems, but it's certainly not needed either. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266098 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-20Dial and queue connected line update macro not always run when expected.rmudgett1-14/+17
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: http://svn.digium.com/svn/asterisk/trunk@264669 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17Enhancements to connected line and redirecting work.mmichelson1-6/+61
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: http://svn.digium.com/svn/asterisk/trunk@263541 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-09Merge Call completion support into trunk.mmichelson1-9/+98
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: http://svn.digium.com/svn/asterisk/trunk@256528 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-03Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.rmudgett1-14/+16
SWP-1229 ABE-2161 * Ensure chan_local.c:local_call() will not leak cid.cid_dnid when copying. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256104 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-03Using the Dial application f option when the call is forwarded will likely ↵rmudgett1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@256103 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-31Add documentation clarifying when 't' and 'T' can be used.lmadsen1-2/+4
(closes issue #17021) Reported by: kovzol Tested by: lmadsen, kovzol, davidw, ebroad git-svn-id: http://svn.digium.com/svn/asterisk/trunk@255504 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-20Resolve compiler warnings on FreeBSD.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253538 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-03Removed cdrflags from ast_channel structure.rmudgett1-3/+0
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: http://svn.digium.com/svn/asterisk/trunk@250565 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-02Properly respect GOSUB_RESULT as to what to do with the master channel.tilghman1-5/+11
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: http://svn.digium.com/svn/asterisk/trunk@244393 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05Mismerged a bit.mmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@237882 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05Add a missing part of the connected line work into trunk.mmichelson1-8/+25
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: http://svn.digium.com/svn/asterisk/trunk@237803 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-19app_dial optional parameter to option 'r' to allow play indication from ↵alecdavis1-10/+60
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: http://svn.digium.com/svn/asterisk/trunk@235740 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-13Display a list of channel variables in each channel-oriented event.tilghman1-3/+4
(Closes AST-33) Reviewboard: https://reviewboard.asterisk.org/r/368/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@230111 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Added the 'a' option to app dial and modified app_dial to set the answertime ↵mnicholson1-2/+18
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: http://svn.digium.com/svn/asterisk/trunk@227897 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Merged revisions 227827 via svnmerge from mnicholson1-13/+62
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: http://svn.digium.com/svn/asterisk/trunk@227829 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Expand codec bitfield from 32 bits to 64 bits.tilghman1-18/+18
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-02Merged revisions 226889 via svnmerge from file1-1/+29
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: http://svn.digium.com/svn/asterisk/trunk@226890 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-19Merged revisions 224565 via svnmerge from file1-4/+6
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: http://svn.digium.com/svn/asterisk/trunk@224567 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-12Merged revisions 223804 via svnmerge from jpeeler1-1/+3
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: http://svn.digium.com/svn/asterisk/trunk@223832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-09Fix potential memory leaks.mmichelson1-7/+14
ABE-1998 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@223211 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-24Add bridge related dial flags to the bridge appjpeeler1-108/+1
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: http://svn.digium.com/svn/asterisk/trunk@220344 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-24Merged revisions 208592 via svnmerge from russell1-1/+0
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: http://svn.digium.com/svn/asterisk/trunk@208593 f38db490-d61c-443f-a65b-d21fe96a405b