aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-05Do deadlock avoidance in a couple more places. You can't lock two channelsrussell1-2/+11
at the same time without doing extra work to make sure it succeeds. (closes issue #10895, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84783 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-04callers of sig2str already add the word 'signalling' in the appropriate ↵kpfleming1-9/+9
place, so don't duplicate it git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84690 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-26Remove unused 4k of memory on the program stack (closes issue #10827)tilghman1-5/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83879 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-14If a channel does not have an owner, do not try to set a channel variable.qwell1-1/+1
This will end up making the channel variable global, which is not right. Closes issue #10720, patch by flefoll. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82394 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23report the actual channel number that was unregistered, instead of assuming ↵kpfleming1-2/+3
that the interface list consists of channels 1 through <x> with no gaps in the sequence git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80501 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17Avoid a crash in the handling of DTMF based Caller ID. It is valid forrussell1-0/+2
ast_read to return NULL in the case that the channel has been hung up. (crash reported by anonymouz666 on IRC in #asterisk-dev) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79912 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13(closes issue #10437)file1-4/+0
Reported by: haklin Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79174 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Merged revisions 78370 via svnmerge from russell1-9/+3
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r78370 | russell | 2007-08-07 12:44:04 -0500 (Tue, 07 Aug 2007) | 4 lines Revert patch committed for issue #9660. It broke E&M trunks. (closes issue #10360) (closes issue #10364) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78371 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Made VAST improvements in DTMF receiver in RADIO_RELAX mode (thanx Stevejdixon1-1/+3
W9SH), and oversight in logic in TONE_VERIFY/RELAX mode in chan_zap. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77845 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-25Merged revisions 76978 via svnmerge from murf1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76978 | murf | 2007-07-24 18:07:24 -0600 (Tue, 24 Jul 2007) | 1 line this fixes bug 10293, where the error message because defaultzone or loadzone was not defined was confusing ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@76983 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-13Merged revisions 75052 via svnmerge from russell1-3/+12
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r75052 | russell | 2007-07-13 14:10:00 -0500 (Fri, 13 Jul 2007) | 12 lines (closes issue #9660) Reported by: mmacvicar Patches submitted by: bbryant, russell Tested by: mmacvicar, marco, arcivanov, jmhunter, explidous When using a TDM400P (and probably other analog cards) there was a chance that you could hang up and pick the phone back up where it has been long enough to be not considered a flash hook, but too soon such that the device reports that it is busy and the person on the phone will only hear silence. This patch makes chan_zap more tolerant of this and gives the device a couple of seconds to succeed so the person on the phone happily gets their dialtone. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75053 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Merged revisions 74158 via svnmerge from qwell1-8/+8
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r74158 | qwell | 2007-07-09 15:18:15 -0500 (Mon, 09 Jul 2007) | 8 lines Several chan_zap options were not working on reload because they were arbitrarily disallowed when reloading some/most PRI options (such as signalling) was disallowed. Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload. This corrects that behavior. Issue 9186, patch by tzafrir. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74159 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-28Add -Wdeclaration-after-statement to AST_DEVMODE flags to catchrizzo1-1/+2
variable declarations in the middle of a block. Fix the few instances of the above spotted out by the compiler. All of this has been already done or is not applicable in trunk, so the merge of this change will be blocked. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72462 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27use the proper type for storing group number bits so that if someone ↵kpfleming1-1/+1
specifies 'group=42' it will actually work instead of being silently ignored git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72205 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20Merged revisions 70396 via svnmerge from russell1-29/+37
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r70396 | russell | 2007-06-20 13:45:38 -0500 (Wed, 20 Jun 2007) | 5 lines Fix a problem where an established call would not be properly disconnected when a PRI disconnect is received depending on which cause code was received. (issue #9588, original patch by softins, updated patch from jtexter3, and some additional feedback from mhardeman) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@70397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05Suppress a bunch of debug output unless option_debug is onrussell1-17/+29
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67457 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-30Change how channel names are generated a bit. (issue #9825 reported by eldadran)file1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66602 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-28Make the usedistinctiveringdetection option work again. (issue #9823 ↵file1-2/+1
reported by premeau) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66312 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-27I don't know what this was trying to do, but it's clearly incorrect.qwell1-5/+5
Issues 9808 and 9809. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66244 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-23Merged revisions 65588 via svnmerge from russell1-16/+31
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r65588 | russell | 2007-05-23 08:06:17 -0500 (Wed, 23 May 2007) | 3 lines Revert revision 62417 as someone reported problems with it to Mark. This was related to issue #9588. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65589 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-22List res_smdi as a dependency for app_voicemail and chan_zaprussell1-0/+1
(Thanks to mnicholson for pointing it out) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65501 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-09Merged revisions 63653 via svnmerge from mattf1-16/+18
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63653 | mattf | 2007-05-09 12:20:20 -0500 (Wed, 09 May 2007) | 2 lines Make sure we only create a DSP if it's requested on SUB_REAL ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63654 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-02a)In chan_zap, set the clid, src fields in channel_alloc call. b)in the ↵murf1-1/+1
channel_alloc func, set the cid_num and name fields from the arglist[blush]. c) don't update the channel app & app data fields if you are in the 'h' extension. d)the load_module func in cdr_radius needs to return DECLINE, SUCCESS. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62689 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-30Merged revisions 62417 via svnmerge from russell1-31/+16
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r62417 | russell | 2007-04-30 10:57:26 -0500 (Mon, 30 Apr 2007) | 4 lines This patch fixes an issue where depending on the cause code, when the network sends a PRI disconnect, the call may not be properly hung up. (issue #9588, reported and patched by softins) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62419 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-29Fix a bug that made the "language" setting in zapata.conf notrussell1-2/+1
functional. (issue #9626, reported and fixed by sergee) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62331 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-27Issue #9608 - fix some annoying DEBUG messages not controlled by ↵oej1-4/+8
option_debug (DEA). Thanks! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62095 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-25Merged revisions 61913 via svnmerge from kpfleming1-0/+9
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61913 | kpfleming | 2007-04-25 17:24:59 -0500 (Wed, 25 Apr 2007) | 2 lines handle a very bizarre race condition with channels being redirected before a simple switch can be started on them (issue #9286) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61914 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-25Merged revisions 61798 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61798 | russell | 2007-04-25 11:20:38 -0500 (Wed, 25 Apr 2007) | 3 lines Fix a typo where cid_num got copied instead of cid_ani. (issue #9587, reported and patched by xrg) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61799 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-24Merged revisions 61777 via svnmerge from dhubbard1-7/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61777 | dhubbard | 2007-04-24 13:20:31 -0500 (Tue, 24 Apr 2007) | 1 line removed #if 0 block from chan_phone, chan_zap, and chan_modem restart_monitor() ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61779 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09This is a big improvement over the current CDR fixes. It may still need ↵murf1-1/+1
refinement, but this won't have as many folks bothered. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60989 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-06Make sure we check the faxdetect option before doing fax processingmattf1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60485 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-06Merged revisions 60456 via svnmerge from mattf1-65/+76
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60456 | mattf | 2007-04-06 12:03:15 -0500 (Fri, 06 Apr 2007) | 2 lines There should only be one code path for doing DTMF conditionals on channels. This fixes it. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60459 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-08Add a missing break statement so that handling the above event does notrussell1-0/+1
incorrectly destroy the channel. (issue #9242, andrew) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@58510 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-08If we receive ZT_EVENT_REMOVED, destroy the specified channel. russell1-15/+28
(issue #7256, tzafrir) Also, update the configure script to make sure that we don't try to build chan_zap if the installed version of zaptel does not include ZT_EVENT_REMOVED. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@58320 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-14Merged revisions 54373 via svnmerge from mattf1-7/+13
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r54373 | mattf | 2007-02-14 10:25:49 -0600 (Wed, 14 Feb 2007) | 2 lines When handling glare on a PRI, move the requested channel rather than hang up the old one. Fix for 8957 and 9011. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54375 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-31Merged revisions 53045 via svnmerge from russell1-7/+10
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53046 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23Update channel drivers to use module referencing so that unloading them ↵file1-6/+2
while in use will not result in crashes. (issue #8897 reported by junky) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51788 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19Merge the changes from the /team/group/vldtmf_fixup branch.russell1-2/+2
The main bug being addressed here is a problem introduced when two SIP channels using SIP INFO dtmf have their media directly bridged. So, when a DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk would try to emulate a digit of some length by first sending a DTMF BEGIN frame and sending a DTMF END later timed off of incoming audio. However, since there was no audio coming in, the DTMF_END was never generated. This caused DTMF based features to no longer work. To fix this, the core now knows when a channel doesn't care about DTMF BEGIN frames (such as a SIP channel sending INFO dtmf). If this is the case, then Asterisk will not emulate a digit of some length, and will instead just pass through the single DTMF END event. Channel drivers also now get passed the length of the digit to their digit_end callback. This improves SIP INFO support even further by enabling us to put the real digit duration in the INFO message instead of a hard coded 250ms. Also, for an incoming INFO message, the duration is read from the frame and passed into the core instead of just getting ignored. (issue #8597, maybe others...) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51311 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19chan_zap compiles without libpri after committing 7877 patchdhubbard1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51274 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-18Merged revisions 51271 via svnmerge from dhubbard1-483/+469
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r51271 | dhubbard | 2007-01-18 17:47:10 -0600 (Thu, 18 Jan 2007) | 3 lines issue 7877: chan_zap module reload does not use default/initialized values on subsequent loads. Reset configuration variables to default values prior to parsing configuration file. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51272 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-17Instead of dividing the offset by 2 directly, make it more clear that therussell1-1/+1
offset is being scaled by the size of the elements in the buffer. (Inspired by a discussing on the asterisk-dev list about this code) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51204 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-16Merged revisions 51085 via svnmerge from file1-2/+8
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r51085 | file | 2007-01-16 00:53:31 -0500 (Tue, 16 Jan 2007) | 2 lines Add none as a valid callgroup/pickupgroup option. I consider it a bug that it would inherit it all the way down and not have any way to reset it to nothing - so that's why it is in 1.2. (issue #8296 reported by gkloepfer) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51087 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05Make codec_zap and chan_zap also depend on zaptel.qwell1-0/+1
This fixes an issue (8727) with zaptel being in a different directory, using --with-zaptel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49705 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most ↵kpfleming1-46/+51
cases git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49676 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-02remove comment that is unrelated to this functionkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49165 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-01check specifically for VLDTMF and transcoding support in the system's Zaptel ↵kpfleming1-1/+1
installation, and make only the modules that need those features dependent on them (this will allow building the other Zaptel-using parts of Asterisk against older versions of Zaptel or those on other platforms that haven't caught up yet to the Linux version) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49102 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-30Use asprintf to build the channel names instead of custom function. I ↵file1-3/+3
believe the custom function is doing some things that are not portable across all implementations. (issue #8570 reported by hterag & issue #8692 reported by nicolasg) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49070 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-10Merged revisions 48371 via svnmerge from murf1-2/+9
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48371 | murf | 2006-12-09 19:14:13 -0700 (Sat, 09 Dec 2006) | 1 line This version applies the patch suggested by stevens in bug 7836 (make inbound channel RINGING state consistent with other channels). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48372 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13Merged revisions 47522 via svnmerge from tilghman1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r47522 | tilghman | 2006-11-12 18:34:44 -0600 (Sun, 12 Nov 2006) | 2 lines Don't play dialtone if the seizing the channel fails (Bug 7754) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47523 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-10Make sure we don't use 32bits when we only need one bit.mattf1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47480 f38db490-d61c-443f-a65b-d21fe96a405b