aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-10Make sure to reenable echo can after a "failed" (canceled, etc) three-way call.qwell1-0/+1
(closes issue #11335) Reported by: rebuild git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107173 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-08don't generate D-Channel "up" and "down" messages unless the channel state ↵kpfleming1-7/+13
is actually changing; also, generate the "up" message when an implicit "up" occurs due to reception of a normal event when we thought the channel was "down" git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106945 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Add a control frame to indicate the source of media has changed. Depending ↵file1-0/+3
on the underlying technology it may need to change some things. (closes issue #12148) Reported by: jcomellas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106235 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05when a PRI call must be moved to a different B channel at the request of the ↵kpfleming1-16/+23
other endpoint, ensure that any DSP active on the original channel is moved to the new one (closes issue #11917) Reported by: mavetju Tested by: mavetju git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106038 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27When we receive a known alarm, make sure that the unknown alarm flag is not ↵russell1-0/+4
still set to make sure that when we come back out of alarm, it gets reported in the log and manager interface (after discussion with tzafrir on the -dev list) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104591 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Zaptel 1.4 now exposes FXO battery state as an alarm. However, Asterisk 1.4russell1-16/+47
does not know what to do with these alarms. Only Asterisk 1.6 cares about it. So, if we get an unknown alarm in chan_zap, don't generate confusing log messages about it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104332 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Merge changes from team/russell/smdi-1.4russell1-1/+1
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-21And as a followup to revision 104026, completely remove event-relatedmmichelson1-4/+0
calls from a section of code where we know there was no event to handle or get. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104027 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-21Remove an incorrect debug message. It reported that it had received a ↵mmichelson1-2/+0
specific event and tried to report which event was received. What actually was happening was that it was reporting the number of bytes returned from a call to read(). Thanks to Jared Smith for bringing the issue up on IRC git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104026 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-20Don't wait for additional digits when overlap dialing is enabled if the ↵file1-1/+1
setup message contains the sending_complete information element. (closes issue #11785) Reported by: klaus3000 Patches: sending_complete_overlap_asterisk-1.4.17.patch.txt uploaded by klaus3000 (license 65) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103953 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Fix previous commit so that we actually disable echocanbridged if echocancel ↵qwell1-2/+8
is off. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103795 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Correct a message when echocancelwhenbridged is on, but echocancel is not.qwell1-1/+1
Issue #12019 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103790 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Fix a linked list corruption that under the right circumstancesmmichelson1-0/+3
could lead to a looped list, meaning it will traverse forever. (closes issue #11818) Reported by: michael-fig Patches: 11818.patch uploaded by putnopvut (license 60) Tested by: michael-fig git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103770 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29Allow zap groups above 30 to work properly.qwell1-3/+3
(closes issue #11590) Reported by: tbsky git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100835 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28Correct a comment which made little/no sense.qwell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100624 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09pass the right variable to get an error string... oopskpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97448 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09add error number output to ioctl failure messages to help with debuggingkpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97410 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-04Make use of the temporary channel pointer while the pvt is unlocked.russell1-5/+5
(closes issue #11675) Reported by: flefoll Patches: chan_zap.c.patch-store-owner-before-unlock uploaded by flefoll (license 244) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96449 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20Fix a deadlock in d-channel handling in chan_zap.russell1-2/+31
This deadlock was introduced by the fix to ensure that channels are properly locked when handling channel variables. There were sections of this code where the channel pvt was locked before the channel lock, when in fact it _must_ be the other way around. (closes issue #11582) Reported by: bugi git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94251 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17If a call is received with a called number IE containing nothing go to the ↵file1-1/+6
's' extension. (closes issue #9099) Reported by: kb1_kanobe2 Patches: 20070906__9099.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93250 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Issue 11574: Add dependencies on res_monitor and res_features. oej1-0/+1
I wonder if Asterisk can run at all without res_features. My guess is that there's propably a lot of more modules and the core that depends on it. Reported by: caio1982 (closes issue #11574) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Properly initialize polarity statuses, so that they are detected properly.tilghman1-8/+20
Reported by: julianjm Patch by: julianjm (Closes issue #10238) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92815 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13Fix building on newer systems which require a third arg to open() when using ↵qwell1-1/+1
O_CREAT. Issue 11238, reported by puzzled. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89254 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06Fix improbable but possible memory leaks in chan_zap.file1-2/+10
(closes issue #11166) Reported by: eliel Patches: chan_zap.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88994 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01Make sure we set the poll fds to NULL after free()ing it.qwell1-1/+3
Part of issue 11017, patch by tzafrir. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88078 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-24Correctly respect hidecalleridname configuration option.qwell1-8/+9
Simplify code slightly in the process. Issue 11079, reported by ddv2005 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86982 f38db490-d61c-443f-a65b-d21fe96a405b
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