aboutsummaryrefslogtreecommitdiffstats
path: root/res
AgeCommit message (Collapse)AuthorFilesLines
2008-08-25This patch reverts the changes made via 139347, and 139635, as usersmurf1-44/+0
are seeing adverse difference. I will un-close 13251. Back to the drawing board/ concept/ beginning/ whatever! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139764 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-22I found some problems with the code I committed earlier, whenmurf1-0/+8
I merged them into trunk, so I'm coming back to clean up. And, in the process, I found an error in the code I added to trunk and 1.6.x, that I'll fix using this patch also. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-21(closes issue #13251)murf1-0/+36
Reported by: sergee Tested by: murf THis is a bold move for a static release fix, but I wouldn't have made it if I didn't feel confident (at least a *bit* confident) that it wouldn't mess everyone up. The reasoning goes something like this: 1. We simply cannot do anything with CDR's at the current point (in pbx.c, after the __ast_pbx_run loop). It's way too late to have any affect on the CDRs. The CDR is already posted and gone, and the remnants have been cleared. 2. I was very much afraid that moving the running of the 'h' extension down into the bridge code (where it would be now practical to do it), would result in a lot more calls to the 'h' exten, so I implemented it as another exten under another name, but found, to my pleasant surprise, that there was a 1:1 correspondence to the running of the 'h' exten in the pbx_run loop, and the new spot at the end of the bridge. So, I ifdef'd out the current 'h' loop, and moved it into the bridge code. The only difference I can see is the stuff about the AST_PBX_KEEPALIVE, and hopefully, if this is still an important decision point, I can replicate it if there are complaints. To be perfectly honest, the KEEPALIVE situation is not totally clear to me, and how it relates to a post-bridge situation is less clear. I suspect the users will point out everything in total clarity if this steps on anyone's toes! 3. I temporarily swap the bridge_cdr into the channel before running the 'h' exten, which makes it possible for users to edit the cdr before it goes out the door. And, of course, with the endbeforehexten config var set, the users can also get at the billsec/duration vals. After the h exten finishes, the cdr is swapped back and processing continues as normal. Please, all who deal with CDR's, please test this version of Asterisk, and file bug reports as appropriate! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139347 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-11Deallocate database connection handle on disconnect, as we allocate anothertilghman1-3/+14
one on connect. (closes issue #13271) Reported by: dveiga git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@137138 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05(closes issue #12982)murf1-8/+30
Reported by: bcnit Tested by: murf I discovered that also, in the previous bug fixes and changes, the cdr.conf 'unanswered' option is not being obeyed, so I fixed this. And, yes, there are two 'answer' times involved in this scenario, and I would agree with you, that the first answer time is the time that should appear in the CDR. (the second 'answer' time is the time that the bridge was begun). I made the necessary adjustments, recording the first answer time into the peer cdr, and then using that to override the bridge cdr's value. To get the 'unanswered' CDRs to appear, I purposely output them, using the dial cmd to mark them as DIALED (with a new flag), and outputting them if they bear that flag, and you are in the right mode. I also corrected one small mention of the Zap device to equally consider the dahdi device. I heavily tested 10-sec-wait macros in dial, and without the macro call; I tested hangups while the macro was running vs. letting the macro complete and the bridge form. Looks OK. Removed all the instrumentation and debug. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@135799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31(closes issue #11849)murf1-5/+14
Reported by: greyvoip Tested by: murf OK, a few days of debugging, a bunch of instrumentation in chan_sip, main/channel.c, main/pbx.c, etc. and 5 solid notebook pages of notes later, I have made the small tweek necc. to get the start time right on the second CDR when: A Calls B B answ. A hits Xfer button on sip phone, A dials C and hits the OK button, A hangs up C answers ringing phone B and C converse B and/or C hangs up But does not harm the scenario where: A Calls B B answ. B hits xfer button on sip phone, B dials C and hits the OK button, B hangs up C answers ringing phone A and C converse A and/or C hangs up The difference in start times on the second CDR is because of a Masquerade on the B channel when the xfer number is sent. It ends up replacing the CDR on the B channel with a duplicate, which ends up getting tossed out. We keep a pointer to the first CDR, and update *that* after the bridge closes. But, only if the CDR has changed. I hope this change is specific enough not to muck up any current CDR-based apps. In my defence, I assert that the previous information was wrong, and this change fixes it, and possibly other similar scenarios. I wonder if I should be doing the same thing for the channel, as I did for the peer, but I can't think of a scenario this might affect. I leave it, then, as an exersize for the users, to find the scenario where the chan's CDR changes and loses the proper start time. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@134883 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-30launch_netscript sometimes returns -1, which fails to set AGISTATUS. Maptilghman1-1/+1
failure to -1, so that AGISTATUS is always set. (closes issue #13199) Reported by: smw1218 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@134480 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-18Fix a bug in blind transfers where the BLINDTRANSFER variable isn't always ↵bbryant1-2/+2
set to the other end of the blind transfer. (closes issue #12586) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@131915 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-10Oopstilghman1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@129741 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03The CDRfix4/5/6 omnibus cdr fixes.murf1-116/+59
(closes issue #10927) Reported by: murf Tested by: murf, deeperror (closes issue #12907) Reported by: falves11 Tested by: murf, falves11 (closes issue #11849) Reported by: greyvoip As to 11849, I think these changes fix the core problems brought up in that bug, but perhaps not the more global problems created by the limitations of CDR's themselves not being oriented around transfers. Reopen if necc, but bug reports are not the best medium for enhancement discussions. We need to start a second-generation CDR standardization effort to cover transfers. (closes issue #11093) Reported by: rossbeer Tested by: greyvoip, murf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@127663 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13fixed dahdi compatability header from assuming either dahdi or zaptel is ↵jpeeler1-1/+1
installed (may not have either) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122663 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13This should fix the behavior of the 'T' dial feature being passed ↵twilson1-3/+53
incorrectly to the transferee when builtin_atxfers are used. Also, doing a builtin_atxfer to parking was broken and is fixed here as well. (closes issue #11898) Reported by: sergee Tested by: otherwiseguy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122589 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff ↵jpeeler3-17/+19
should continue working. Release announcement to follow. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12(closes issue #12193)jpeeler1-7/+24
Reported by: davidw Patch by: Corydon76, modified by me to work properly with ParkAndAnnounce app git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-11Backport fix for 11520--for some reason I didn't do this back in February ↵twilson1-1/+16
when I patched for trunk. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@121992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05Ignore appended resource when comparing JIDs.phsultan1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120675 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05It turns out that searching on the forwarding station isn't very useful forrussell1-16/+74
most people, so pull in the changes that allow searching for SMDI messages based on other components of the SMDI message. Also, update the SMDI documentation. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120671 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-02Do not link the guest account with any configured XMPP client (inphsultan1-5/+18
jabber.conf). The actual connection is made when a call comes in Asterisk. Fix the ast_aji_get_client function that was not able to retrieve an XMPP client from its JID. (closes issue #12085) Reported by: junky Tested by: phsultan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@119740 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-19Use the right pthread lock and condition when waiting.file1-1/+14
(closes issue #12664) Reported by: tomo1657 Patches: res_smdi.c.patch uploaded by tomo1657 (license 484) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117135 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Avoid zombies when the channel exits before the AGI.tilghman1-1/+5
(closes issue #12648) Reported by: gkloepfer Patches: 20080514__bug12648.diff.txt uploaded by Corydon76 (license 14) Tested by: gkloepfer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116466 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-06Switch to using ast_random() rather than just rand().qwell1-1/+1
This does not fix the bug reported, but I believe it is correct. (from issue #12446) Patches: bug_12446.diff uploaded by snuffy (license 35) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115418 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-29Change warning message to debug, since there are cases where 0 results is ↵qwell1-2/+1
perfectly fine. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114829 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-23Fix reload/unload for res_musiconhold module.qwell1-19/+38
(closes issue #11575) Reported by: sunder Patches: M11575_14_rev3.diff uploaded by junky (license 177) bug11575_trunk.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114594 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-22Trivial change to read the number of samples from a frame before calling ↵russell1-1/+1
ast_write() git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114545 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-22After a parked call times out, allow the call back to the parker to time out.russell1-1/+1
(closes issue #10890) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114542 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-19MOH usage information needs a terminating newline, or elsetilghman1-3/+3
"asterisk -rx 'help moh reload'" will hang. Reported via -dev list, fixed by me. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114297 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-17Use keepalives effectively in order diagnose bug #12432.phsultan1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114198 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-17Add special case for when the agi cannot be executed, to comply with the ↵tilghman1-1/+10
documentation that we return failure in that case. (closes issue #12462) Reported by: fmueller Patches: 20080416__bug12462.diff.txt uploaded by Corydon76 (license 14) Tested by: fmueller git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114195 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-11Fix a race condition that may happen between a sip hangupmmichelson1-1/+19
and a "core show channel" command. This patch adds locking to prevent the resulting crash. (closes issue #12155) Reported by: tsearle Patches: show_channels_crash2.patch uploaded by tsearle (license 373) Tested by: tsearle git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114063 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Add sanity checking for position resuming. We *have* to make sure that the ↵file1-2/+8
position does not exceed the total number of files present, and we have to make sure that the position's filename is the same as previous. These values can change if a music class is reloaded and give unpredictable behavior. (closes issue #11663) Reported by: junky git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110035 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14Fix a potential segfault if chan (or chan->music_state) is NULL.qwell1-13/+16
Closes issue #12210, credit to edantie for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108682 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Make sure the visible indication is on the right channel so when the ↵file1-0/+1
masquerade happens the proper indication is enacted. (closes issue #11707) Reported by: iam git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107646 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-03Fix type for astNumChannels.qwell1-1/+1
(closes issue #12114) Reported by: jeffg Patches: 12114.patch uploaded by jeffg (license 192) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105572 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-29Fix a potential memory leakphsultan1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105326 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-29Automatically create new buddy upon reception of a presence stanza ofphsultan1-19/+12
type subscribed. (closes issue #12066) Reported by: ffadaie Patches: branch-1.4-12066-1.diff uploaded by phsultan (license 73) trunk-12066-1.diff uploaded by phsultan (license 73) Tested by: ffadaie, phsultan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105209 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Inherit language from the transfering channel on a blind transfer.qwell1-3/+4
(closes issue #11682) Reported by: caio1982 Patches: local_atxfer_lang3-1.4.diff uploaded by caio1982 (license 22) Tested by: caio1982, victoryure git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104598 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Only stop the MWI monitor thread if it was actually started.file1-1/+3
(closes issue #12086) Reported by: francesco_r git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104536 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Merge changes from team/russell/smdi-1.4russell1-295/+848
This commit brings in a significant set of changes to the SMDI support in Asterisk. There were a number of bugs in the current implementation, most notably being that it was very likely on busy systems to pop off the wrong message from the SMDI message queue. So, this set of changes fixes the issues discovered as well as introducing some new ways to use the SMDI support which are required to avoid the bugs with grabbing the wrong message off of the queue. This code introduces a new interface to SMDI, with two dialplan functions. First, you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access details in the message using the SMDI_MSG() function. A side benefit of this is that it now supports more than just chan_zap. For example, with this implementation, you can have some FXO lines being terminated on a SIP gateway, but the SMDI link in Asterisk. Another issue with the current implementation is that it is quite common that the station ID that comes in on the SMDI link is not necessarily the same as the Asterisk voicemail box. There are now additional directives in the smdi.conf configuration file which let you map SMDI station IDs to Asterisk voicemail boxes. Yet another issue with the current SMDI support was related to MWI reporting over the SMDI link. The current code could only report a MWI change when the change was made by someone calling into voicemail. If the change was made by some other entity (such as with IMAP storage, or with a web interface of some kind), then the MWI change would never be sent. The SMDI module can now poll for MWI changes if configured to do so. This work was inspired by and primarily done for the University of Pennsylvania. (also related to issue #9260) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104119 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-07Specify which digit string was matched in debug message.qwell1-1/+1
(closes issue #11949) Reported by: dimas Patches: v1-feature-debug.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102858 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-06ensure that all remaining multi-object modules are built using their proper ↵kpfleming1-0/+2
CFLAGS and include directory paths git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102627 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-05Perform dialing asynchronously when using the originate CLI command so the ↵file1-2/+2
CLI does not appear to block. (closes issue #11927) Reported by: bbhoss git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102378 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-311. Prevent the addition of an extra '/' to the beginning of an absolute ↵mmichelson1-7/+22
pathname. 2. If ast_monitor_change_fname is called and the new filename is the same as the old, then exit early and don't set the filename_changed field in the monitor structure. Setting it in this case was causing ast_monitor_stop to erroneously delete them. (closes issue #11741) Reported by: garlew Tested by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101531 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28Fix a crash in ast_masq_park_call()russell1-1/+5
(issue #11342) Reported by: DEA Patches: res_features-park.txt uploaded by DEA (license 3) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100626 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23Oops, should have checked for a NULL obj, here, tootilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99775 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22Add more dependencies on chan_local and add a note to the description of ↵oej1-0/+4
chan_local so that people don't disable it in menuselect just to clean up. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99594 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-21Permit the user to specify number of seconds that a connection may remain idle,tilghman1-5/+20
which fixes a crash on reconnect with the MyODBC driver. (closes issue #11798) Reported by: Corydon76 Patches: 20080119__res_odbc__idlecheck.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99341 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18This should at least temporarily fix a problem where the 't' Dialtwilson1-2/+2
option is incorrectly passed to the transferee when built-in attended transfers are used. There is still a problem with 'T', but better to fix some problems than no problems while we work on it. (closes issue #7904) Reported by: k-egg Patches: transfer-fix-b14-r97657.diff uploaded by sergee (license 138) Tested by: sergee, otherwiseguy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99032 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-12Add a connection timeout attribute, as that was what was intended with thetilghman1-0/+1
login timeout, but ODBC divides it up into 2 different timeouts. (Closes issue #11745) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98467 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11If the channel is hungup during RECORD FILE send a result code of -1 to be ↵file1-1/+1
uniform with everything else. (closes issue #11743) Reported by: davevg Patches: res_agi.diff uploaded by davevg (license 209) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98317 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Fix saying the parking space number to the caller doing the parking ...russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97529 f38db490-d61c-443f-a65b-d21fe96a405b