aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
AgeCommit message (Collapse)AuthorFilesLines
2008-06-12Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff ↵jpeeler1-2/+2
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-03-11fix various other problems found by gcc 4.3kpfleming1-5/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107464 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Safely use the strncat() function.tilghman1-10/+5
(closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106552 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29fixed potential segfault in misdn show channels CLI commandcrichter1-1/+9
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100793 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27When deleting a task from the scheduler, ignoring the return value couldtilghman1-1/+1
possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100465 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-03make sure frame is completely clean, before we send it to asterisk as DTMF. ↵crichter1-0/+1
If we don't make it clean, it happens that one way audio occurs.. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96199 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-03when overlapdial was used and no number was dialed, the call was dropped, ↵crichter1-1/+8
now we just jump into the s extension, which makes a lot more sense. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96198 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14fixed the sequencing of WAITING_4DIGS state setting and overlap_task thread ↵crichter1-1/+1
starting. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92934 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20added RR patch from iroot #10908, thanks.crichter1-5/+7
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89445 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12if we're NT and no number was dialed and overlapdial is set, we wait for the ↵crichter1-0/+11
ISDN timeout instead of starting our own timer. added a comment for the misdn.conf.sample for the overlapdial config option. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12added restart all interfaces Restart_Indicator, to automatically send a ↵crichter1-7/+10
RESTART after the L2 of a PTP Port comes up. Also fixed some places where we have send a RELEASE without need for it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89172 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12fixed a state/event issue with overlapdial=yes when no extension matched. ↵crichter1-2/+1
removed the general sending of a RELEASE_COMPLETE when we receive a RELEASE, this is done by mISDNuser/mISDN. This makes it possible to use asterisk-1.4 with mISDN trunk, but requires users of mISDN/mISDNuser-1.1.X to upgrade to at least mISDNuser-1.1.6 (when using the NT mode at all) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89171 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12aded ntkeepcalls option, to avoid droÃpping calls when the L2 goes down on ↵crichter1-1/+4
a PTP link. There are some pbx which do turn off the L1 for a very short while and restart it immediately. normally T310 should be started and after 10 seconds or so the calls should be dropped, this is a simple fix wihtout this timer. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89169 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22we send DISCONNECT instead of RELEASE/RELEASE_COMPLETE if the dialplan does ↵crichter1-4/+2
not match after an overlap call. Also added out_cause=1 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86598 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-02terminate USERUSER String with 0crichter1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84345 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-26Fix building chan_misdn under dev-mode. (please run the configure scriptrussell1-7/+8
with --enable-dev-mode so this doesn't happen again ...) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83910 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-24fixed round_robin group dial method, this never worked well on BRI Ports (2 ↵crichter1-51/+55
channels) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83620 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set ofrussell1-5/+5
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19removed comment which violates the coding guidelines.crichter1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83024 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19added 'astdtmf' option to allow configuring the asterisk dtmf detector ↵crichter1-4/+16
instead of the mISDN_dsp ones. also added the patch from irroot #10190, so that dtmf tones detected by the asterisk detector are passed outofband to asterisk, to make any use of dtmf tones at all. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83023 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-11fixed a hold/retrieve issue.crichter1-3/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82249 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-30Fixed some warnings.crichter1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81373 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-30Fixed a severe issue where a misdn_read would lock the channel, but read wouldcrichter1-12/+37
not return because it blocks. later chan_misdn would try to queue a frame like a AST_CONTROL_ANSWER which could result in a deadlock situation. misdn_read will now not block forever anymore, and we don't queue the ANSWER frame at all when we already was called with misdn_answer -> answer would be called twice. Also we don't explicitly send a RELEASE_COMPLETE on receiption of a RELEASE anymore, because mISDN does that for us, this resulted in a problem on some switches, which would block our port after some calls for a short while. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81367 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23make chan_misdn compile without warningsdhubbard1-76/+86
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80601 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17sometimes we don't need to signal dtmf tones to asterisk, we just want them ↵crichter1-4/+5
to go through as inband. Otherwise they might be generated by the other channel partner and then there is a double tone. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79833 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13(closes issue #10437)file1-7/+1
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-10fixed a bug with the useruser information element. We send them now also in ↵crichter1-0/+9
the disconnect message. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78936 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-04Merged revisions 73207 via svnmerge from crichter1-1/+6
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r73207 | crichter | 2007-07-04 10:20:54 +0200 (Mi, 04 Jul 2007) | 1 line bad bug in overlapdial case, we called start_pbx multiple times, because the state wasn't changed.. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73208 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-03Merged revisions 73004 via svnmerge from crichter1-5/+0
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r73004 | crichter | 2007-07-03 10:04:35 +0200 (Di, 03 Jul 2007) | 1 line fixed issue, that misdn_l2l1_check could only be called from mISDN Source channels.. #9449 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73005 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02Merged revisions 72585 via svnmerge from crichter1-1/+13
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72585 | crichter | 2007-06-29 15:08:26 +0200 (Fr, 29 Jun 2007) | 1 line check if the bchannel stack id is already used, if so don't use it a second time. Also added a release_chan lock, so that the same chan_list object cannot be freed twice. chan_misdn does not crash anymore on heavy load with these changes. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72852 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02Merged revisions 72099 via svnmerge from crichter1-2/+4
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72099 | crichter | 2007-06-27 15:22:37 +0200 (Mi, 27 Jun 2007) | 1 line simplified generation for dummy bchannels, also we mark them as dummies, so they are not used later as real-bchannels, optimized the RESTART mechanisms, we block a channel now on cause:44, and send out a RESTART automatically, then on reception of RESTART_ACKNOWLEDGE we unblock the channel again. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72851 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 70341 via svnmerge from crichter1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r70341 | crichter | 2007-06-20 17:29:09 +0200 (Mi, 20 Jun 2007) | 1 line fixed a bug that was introduced by copy and paste in the last commit ..bchannels weren't cleaned properly. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71214 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 70672 via svnmerge from crichter1-1/+0
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r70672 | crichter | 2007-06-21 15:11:29 +0200 (Do, 21 Jun 2007) | 1 line we activate the bchannels in TE mode on incoming calls only when we want to connect the call. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71123 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 70311 via svnmerge from crichter1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r70311 | crichter | 2007-06-20 16:47:59 +0200 (Mi, 20 Jun 2007) | 1 line on receiption of cause:44 we mark the channel as in use and inform the user about the situation, we need to test the RESTART stuff then. Also shuffled the empty_chan_in_stack function after the bchannel cleaning functions, to avoid race conditions. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 69887 via svnmerge from crichter1-1/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r69887 | crichter | 2007-06-19 15:23:04 +0200 (Di, 19 Jun 2007) | 1 line when we send out a SETUP, but get no response, we should cleanup everything after reception of a hangup. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71120 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 68887 via svnmerge from crichter1-3/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68887 | crichter | 2007-06-12 10:35:22 +0200 (Di, 12 Jun 2007) | 1 line if the bridged partner is mISDN too we should not send dtmf tones, they are transmitted inband always ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 68874 via svnmerge from crichter1-7/+8
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68874 | crichter | 2007-06-12 09:48:52 +0200 (Di, 12 Jun 2007) | 1 line if we have already some digits, we just stop the tones. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71096 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11Merged revisions 68732 via svnmerge from crichter1-0/+12
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68732 | crichter | 2007-06-11 18:49:00 +0200 (Mo, 11 Jun 2007) | 1 line added check for NULL Pointer when calling misdn_new. Asterisk does not allow us to create channels anymore when stop gracefully is used :). also modified the restart_indicator to 0 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68733 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11Merged revisions 68631 via svnmerge from crichter1-15/+20
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68631 | crichter | 2007-06-11 11:18:01 +0200 (Mo, 11 Jun 2007) | 1 line fixed problem that the dummybc chanels had no lock, checking for the lock now. Also fixed the channel restart stuff, we can now specify and restart particular channels too. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68644 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05Merged revisions 67306 via svnmerge from crichter1-161/+151
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r67306 | crichter | 2007-06-05 17:39:43 +0200 (Di, 05 Jun 2007) | 1 line simplified the EVENT_SETUP handling in the cb_events function a lot. Commented the different possibilities a bit and made functions of shared code. When the dialed extension does not exist in the extensions.conf we'll jump into the 'i' extension if this does exist, else we disconnect the call with the cause:1 = No Route to Destination. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67329 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05Merged revisions 67209 via svnmerge from crichter1-0/+11
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r67209 | crichter | 2007-06-05 12:05:45 +0200 (Di, 05 Jun 2007) | 1 line added possibility to deactivate bridging per port ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67210 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Merged revisions 65767 via svnmerge from crichter1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r65767 | crichter | 2007-05-24 11:19:58 +0200 (Do, 24 Mai 2007) | 1 line we should only activate the generator in chan_misdn, when asterisk hask not yet taken the call (WAITING4DIGS state). Alerting audio will be generated fomr asterisk for example. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65768 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-22Merged revisions 65328 via svnmerge from crichter1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r65328 | crichter | 2007-05-22 09:46:39 +0200 (Di, 22 Mai 2007) | 1 line we stop the tones only when we're in the pre-call phase, otherwise e.g. when in CONNECTED state we should not stop tones when we receive an Information Message ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65342 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-18Merged revisions 64902 via svnmerge from crichter1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r64902 | crichter | 2007-05-18 10:24:08 +0200 (Fr, 18 Mai 2007) | 1 line we *need* to send a PROCEEDING when sending_complete is set, even if need_more_infos is requested. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@64904 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-16Merged revisions 64513 via svnmerge from crichter1-10/+11
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r64513 | crichter | 2007-05-16 10:23:42 +0200 (Mi, 16 Mai 2007) | 1 line in the case immediate=yes, we directly jump into the dialplan, where people can use PlayTones to indicate a Dialtone, so we don't need to to that by ourself. also we should not do a dialtone_indicate for incoming calls on a TE port in overlapdialmode. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@64515 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-09Merged revisions 62945,63402,63519 via svnmerge from crichter1-16/+144
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r62945 | crichter | 2007-05-03 17:39:21 +0200 (Do, 03 Mai 2007) | 1 line when we're in state WAITING4DIGS, we use the asterisk tone-generator which prods us, so we can't just return -1 in misdn_write in this case. Added a MISDN_KEYPAD channel variable, and fixed the sending of keypad. this enables us to modify the call forward parameters in the switch. ........ r63402 | crichter | 2007-05-08 17:07:37 +0200 (Di, 08 Mai 2007) | 1 line added application misdn_check_l2l1 which tries to pull up the L1/L2 on all ports that have the layers down in a group. It waits then for a timeout. This helps for scenarios where multiple PMP BRIs are grouped together, or where a provider has a faulty PTP Implementation, that looses the L2 after a while. ........ r63519 | crichter | 2007-05-09 13:26:16 +0200 (Mi, 09 Mai 2007) | 1 line release_chan frees ch, so we should never touch ch after release_chan, this may cause segfaults. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-03Merged revisions 61357,61770,62885 via svnmerge from crichter1-4/+9
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61357 | crichter | 2007-04-11 14:05:57 +0200 (Mi, 11 Apr 2007) | 1 line some fixes for PMP Hold/Retrieve, it should work now, when briding=no ........ r61770 | crichter | 2007-04-24 15:50:05 +0200 (Di, 24 Apr 2007) | 1 line added lock for sending messages to avoid double sending. shuffled some empty_chans after the cb_event calls, this avoids that a release_complete from a quite different call releases a fresh created setup by accident. ........ r62885 | crichter | 2007-05-03 15:59:00 +0200 (Do, 03 Mai 2007) | 1 line fixed the problem that misdn_write did not return -1 when called with 0 samples in a frame this resultet in a deadlock in some circumstances, when the call ended because of a busy extension. added encoding of keypad. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62912 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-11Don't export AOCD variables on misdn_hangup anymore, this was mainly a fix ↵nadi1-3/+0
for trunk.. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61443 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-11Export AOCD variables on misdn_hangup.nadi1-3/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61373 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-11Ignore facility messages in case we don't have a corresponding channel object.nadi1-11/+18
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61372 f38db490-d61c-443f-a65b-d21fe96a405b