Commit Graph

209 Commits

Author SHA1 Message Date
Tilghman Lesher 2e4b41841d Merged revisions 71291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r71291 | tilghman | 2007-06-24 12:50:24 -0500 (Sun, 24 Jun 2007) | 2 lines

Issue 10044 - chan->cdr is NULL here, so peer->cdr is what we really wanted to use

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 17:51:55 +00:00
Steve Murphy d17beedd5a Merged revisions 71230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r71230 | murf | 2007-06-22 21:29:48 -0600 (Fri, 22 Jun 2007) | 1 line

This patch is meant to fix 8433; where clid and src are lost via bridging.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-23 03:32:59 +00:00
Joshua Colp c6755754d1 Merged revisions 69847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r69847 | file | 2007-06-19 09:00:57 -0400 (Tue, 19 Jun 2007) | 10 lines

Merged revisions 69846 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69846 | file | 2007-06-19 08:57:55 -0400 (Tue, 19 Jun 2007) | 2 lines

Add parked call extension AFTER the parking slot has been announced, otherwise two threads will try to handle the same channel and it will go kaboom. (issue #9191 reported by japple)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 13:04:24 +00:00
Russell Bryant b179e2155f Convert uses of strdup() to ast_strdup()
(issue #9983, eliel)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 23:01:01 +00:00
Russell Bryant 055d82cbce Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 19:39:12 +00:00
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Russell Bryant 65e8178c2b Constify the return values of ast_parking_ext() and ast_pickup_ext()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:08:07 +00:00
Russell Bryant baf596a954 Another tiny formatting change for testing ...
(issue #9828)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 18:43:12 +00:00
Russell Bryant 6ddcfff1c7 Change "show parkedcalls" to "parkedcalls show" and mark the previous command
as deprecated.  Also, convert the CLI command to the new style.
(issue #9861, patch from eliel)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 14:45:29 +00:00
Joshua Colp 6e6d4be830 Merged revisions 67064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67064 | file | 2007-06-04 13:41:59 -0400 (Mon, 04 Jun 2007) | 2 lines

Returning a value that indicates the parking of a call was a success when it really wasn't (because the parking slot selected was in use) is the wrong thing to do. (issue #9723 reported by mdu113)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 17:43:21 +00:00
Russell Bryant 8d0124aba3 Add support for configuring named groups of custom call features in
features.conf.  This allows you to create a feature one time, and then map it
into groups for various different key mappings for the same feature, as well
as easy access control to groups of features.
(patch from bbryant)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 18:21:47 +00:00
Russell Bryant cc35dc8999 Revert changes that snuck in with revision 66724.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 18:09:50 +00:00
Russell Bryant 8ea9dcc221 Fix a crash on reload by using calloc() instead of malloc() to ensure that
data is properly initialized.
(issue #9765, reported by MatsK, patch from eliel)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 14:52:30 +00:00
Joshua Colp 5b4de10a12 Don't overwrite a pointer to the first channel... that is bad. (issue #9770 reported by tfbu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 12:58:38 +00:00
Russell Bryant 16a9f0844f Merged revisions 64426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r64426 | russell | 2007-05-15 14:52:18 -0500 (Tue, 15 May 2007) | 3 lines

Properly fix a problem that occurs when you set PARKINGEXTEN to an exten where
a call is already parked.  (issue #9723, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-15 19:57:02 +00:00
Russell Bryant 17ab54e52a Merged revisions 64353 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r64353 | russell | 2007-05-14 16:16:39 -0500 (Mon, 14 May 2007) | 4 lines

When someone requests a specific parking space using the PARKINGEXTEN variable,
ensure that no other caller is already there.
(issue #9723, reported by mdu113, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 21:17:52 +00:00
Joshua Colp 4765d4145e Merged revisions 63872 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63872 | file | 2007-05-11 11:43:14 -0400 (Fri, 11 May 2007) | 2 lines

Make the PARKINGEXTEN feature of parking actually work. (issue #9708 reported by mdu113)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11 15:48:38 +00:00
Russell Bryant a9bd9e39d5 Merged revisions 63448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63448 | russell | 2007-05-08 11:53:09 -0500 (Tue, 08 May 2007) | 4 lines

I mixed up the use of the find_feature() function, so I renamed it
find_dynamic_feature, and changed the code to use the correct lock when
using it.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:54:02 +00:00
Russell Bryant 314c874d7d I noted this on the dev list but got no response, so I just did it myself.
Lock the call features when being used in chan_sip.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:41:35 +00:00
Russell Bryant 42a62a3c21 Merged revisions 63445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63445 | russell | 2007-05-08 11:30:43 -0500 (Tue, 08 May 2007) | 2 lines

Use a read/write lock when accessing the built-in features.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:31:16 +00:00
Steve Murphy 7ec9a2fb57 According to my testing, it's better if the ast_find_call_feature func ran this way instead, as far as the snom record button is concerned
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04 18:47:19 +00:00
Steve Murphy 02337303ef a small upgrade to the coding standard, and an update to the code that triggered the upgrade.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04 17:49:20 +00:00
Steve Murphy 3ee0077f04 Added a small bit of code to support the SNOM 360's Record button. Made the find_feature func in res_features.c public, so I could use it to find the automon dial sequence as configured by the user. When the INFO packet has a Record: header with on/off, the sequence is sent as consecutive DTMF frames on the phone's channel, triggering the automon functionality. The user has to configure the automon in features.conf, and set up his dialplan accordingly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04 16:37:23 +00:00
Russell Bryant 7df63e233c In addition to making it so attended transfers don't fail unnecessarily,
add some new options to control what happens when you hangup on an attended
transfer before the target extension answers the transferred channel.  You
can now have it send the transferee back to the transferer.
(issue #8413, patch from sergee with very minor modifications by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 22:24:51 +00:00
Russell Bryant 37d94ceab9 Merged revisions 62548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r62548 | russell | 2007-05-01 16:57:10 -0500 (Tue, 01 May 2007) | 12 lines

Merged revisions 62547 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62547 | russell | 2007-05-01 16:55:19 -0500 (Tue, 01 May 2007) | 4 lines

Remove an unnecessary check that makes it so if you hang up after doing an
attended transfer before the target extension answers the channel, the transfer
is not successful.  (issue #9338, patch by svanlund)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 21:57:58 +00:00
Russell Bryant 9c8c9c5fa1 Merge changes from team/russell/issue_5841:
This patch adds a "Bridge" Manager action, as well as a "Bridge" dialplan
application.  The manager action will allow you to steal two active channels
in the system and bridge them together.  Then, the one that did not hang up
will continue in the dialplan.  Using the application will bridge the calling
channel to an arbitrary channel in the system.  Whichever channel does not
hang up here will continue in the dialplan, as well.

This patch has been touched by a bunch of people over the course of a couple
years.  Please forgive me if I have missed your name in the history of things.
The most recent patch came from issue #5841, but there is also a reference to
an earlier version of this patch from issue #4297.  The people involved in writing
and/or reviewing the code include at least: twisted, mflorrel, heath1444, davetroy, 
tim_ringenbach, moy, tmancill, serge-v, and me.  There are also positive test
reports from many people.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 20:44:44 +00:00
Steve Murphy ecaf781933 Merged revisions 60989 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line

This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered.
This also adds the mods from 1.4/r.61136;
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 05:41:34 +00:00
Steve Murphy 09c0d56c5c Merged revisions 59522 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59522 | murf | 2007-03-30 11:51:17 -0600 (Fri, 30 Mar 2007) | 1 line

several changes via kpflemings review
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-30 17:57:47 +00:00
Steve Murphy 0f11d3c8c3 Merged revisions 59486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59486 | murf | 2007-03-30 08:11:59 -0600 (Fri, 30 Mar 2007) | 1 line

These mods fix CDR issues from 8221, 8593, 8680, 8743, and perhaps others. Mainly with CDRs generated from transfer situations.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-30 14:37:21 +00:00
Olle Johansson 4561b7a83b Being picky...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:11:52 +00:00
Olle Johansson 7f0934b6f4 Simplify post_manager_event()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:01:07 +00:00
Joshua Colp b8ab0abb83 Allow the user to specify where to enable the respective features for when a parked call is picked up. (ie: transfers and parking)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 18:08:34 +00:00
Russell Bryant a8309d1a3c Merged revisions 54888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r54888 | russell | 2007-02-16 11:40:38 -0600 (Fri, 16 Feb 2007) | 3 lines

Clean up a few coding guidelines issues - spaces to tabs, use sizeof() to pass
the size of a static buffer, add spaces ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 17:44:39 +00:00
Joshua Colp ae6898cbe5 Add option to features.conf that enables parking via DTMF on picked up parked calls. (issue #9082 reported by francesco_r)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 17:41:27 +00:00
Russell Bryant f60efe347a This introduces a new dialplan function, DEVSTATE, which allows you to do some
pretty cool things.

First, you can get the device state of anything in the dialplan:
  NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})
  NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)})

Most importantly, this allows you to create custom device states so you can
control phone lamps directly from the dialplan.
  Set(DEVSTATE(Custom:mycustomlamp)=BUSY)
  ...
  exten => mycustomlamp,hint,Custom:mycustomlamp


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13 22:02:20 +00:00
Olle Johansson 38341590a3 Formatting changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 00:38:43 +00:00
Steve Murphy 80435b54a5 Merged revisions 51716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51716 | murf | 2007-01-23 13:32:54 -0700 (Tue, 23 Jan 2007) | 1 line

this mod from 8593 (dstchannel in cdr is empty when transfer call).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 20:36:08 +00:00
Joshua Colp 10e3cba61e Add parkedcalltransfers option for res_features. This basically enables/disables DTMF based transfers. If you want to get former behavior you will have to make sure it is enabled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 17:50:25 +00:00
Joshua Colp 0f456a07e3 Merged revisions 51148 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r51148 | file | 2007-01-16 12:39:50 -0500 (Tue, 16 Jan 2007) | 10 lines

Merged revisions 51145 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r51145 | file | 2007-01-16 12:36:50 -0500 (Tue, 16 Jan 2007) | 2 lines

Return previous behavior. ParkedCalls will be able to do DTMF based transfers again. trunk however will get an option to allow this to be set on/off. (issue #8804 reported by nortex)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 17:42:47 +00:00
Jason Parker 5abda34cd9 Merged revisions 49742 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49742 | qwell | 2007-01-05 18:24:38 -0600 (Fri, 05 Jan 2007) | 7 lines

Save 1 whopping byte of allocated memory!

This looks like it may have been a chicken/egg scenario..

You had to call a cleanup func, because everything was allocated.
Then since you had to call a cleanup func, you were forced to allocate - ie; strdup("").

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-06 00:28:16 +00:00
Kevin P. Fleming 87b9abc892 Merged revisions 49676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines

reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 22:43:18 +00:00
Joshua Colp d72171b6e4 Merged revisions 48155 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48155 | file | 2006-11-30 14:05:14 -0500 (Thu, 30 Nov 2006) | 10 lines

Merged revisions 48154 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48154 | file | 2006-11-30 14:04:11 -0500 (Thu, 30 Nov 2006) | 2 lines

Do not listen for DTMF on the bridge that comes into existence when ParkedCall is executed. This means native bridging can now occur for this. (issue #8406 reported by kebl0155)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 19:06:22 +00:00
Luigi Rizzo 49d03906b6 ESS-ification.
no need to bring this in 1.4, it is just code cleanup



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-18 20:17:06 +00:00
Steve Murphy 6dcb17baaf This update fulfils the request of bug 7109, which claimed the language arg to ast_stream_and_wait() was redundant. Almost all calls just used chan->language, and seeing how chan is the first argument, this certainly seems redundant. A change of language could just as easily be done by simply changing the channel language before calling.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 23:18:51 +00:00
Steve Murphy 908f176cf3 A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 21:47:49 +00:00
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
Luigi Rizzo 36a86a19dd move variable declaration in the middle of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 17:09:47 +00:00
Matt O'Gorman 198521c94a change default return extension after parking timeout.
6953 with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 00:07:37 +00:00
Joshua Colp 3e4a081e1c Make callerid fields in Manager events more consistent. CallerIDNum for number and CallerIDName for name. (issue #7976 reported by suhler)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:35:16 +00:00
Russell Bryant d2c57c5f4f Merged revisions 43779 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43779 | russell | 2006-09-27 12:55:49 -0400 (Wed, 27 Sep 2006) | 50 lines

Merged revisions 43778 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43778 | russell | 2006-09-27 12:54:30 -0400 (Wed, 27 Sep 2006) | 42 lines

Fix a problem that occurred if a user entered a digit that matched a bridge
feature that was configured using multiple digits, and the digit that was
pressed timed out in the feature digit timeout period.  For example, if blind
transfer is configured as '##', and a user presses just '#'.  In this situation,
the call would lock up and no longer pass any frames.
(issue #7977 reported by festr, and issue #7982 reported by michaels and
 valuable input provided by mneuhauser and kuj.  Fixed by me, with testing help
 and peer review from Joshua Colp).

There are a couple of issues involved in this fix:

1) When ast_generic_bridge determines that there has been a timeout, it returned
   AST_BRIDGE_RETRY.  Then, when ast_channel_bridge gets this result, it calls
   ast_generic_bridge over again with the same timestamp for the next event.
   This results in an endless loop of nothing until the call is terminated.
   This is resolved by simply changing ast_generic_bridge to return 
   AST_BRIDGE_COMPLETE when it sees a timeout.

2) I also changed ast_channel_bridge such that if in the process of calculating
   the time until the next event, it knows a timeout has already occured, to
   immediately return AST_BRIDGE_COMPLETE instead of attempting to bridge the
   channels anyway.

3) In the process of testing the previous two changes, I ran into a problem in
   res_features where ast_channel_bridge would return because it determined
   that there was a timeout.  However, ast_bridge_call in res_features would
   then determine by its own calculation that there was still 1 ms before the
   timeout really occurs.  It would then proceed, and since the bridge broke
   out and did *not* return a frame, it interpreted this as the call was over
   and hung up the channels.

   The reason for this was because ast_bridge_call in res_features and
   ast_channel_bridge in channel.c were using different times for their
   calculations.  channel.c uses the start_time on the bridge config, which
   is the time that the feature digit was recieved.  However, res_features
   had another time, 'start', which was set right before calling 
   ast_channel_bridge.  'start' will always be slightly after start_time in the
   bridge config, and sometimes enough to round up to one ms.

   This is fixed by making ast_bridge_call use the same time as 
   ast_channel_bridge for the timeout calculation.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 16:57:44 +00:00