Commit Graph

362 Commits

Author SHA1 Message Date
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Tilghman Lesher 1af7ea2df1 Merged revisions 122130 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122130 | tilghman | 2008-06-12 10:11:30 -0500 (Thu, 12 Jun 2008) | 4 lines

Occasionally, the alertpipe loses its nonblocking status, so detect and correct
that situation before it causes a deadlock.  (Reported and tested by ctooley
via #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 15:14:37 +00:00
Tilghman Lesher 467c6f5f90 Merged revisions 121861 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121861 | tilghman | 2008-06-11 13:18:16 -0500 (Wed, 11 Jun 2008) | 3 lines

Make calls to ast_assert() actually test something, so that the error message
printed is not nonsensical (reported by mvanbaak via #asterisk-bugs).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-11 18:19:24 +00:00
Joshua Colp 610faf1132 Merged revisions 121442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121442 | file | 2008-06-10 09:52:06 -0300 (Tue, 10 Jun 2008) | 4 lines

Update BRIDGEPEER variable before we do a generic bridge in case we just broke out of a native bridge and fell through to generic.
(closes issue #12815)
Reported by: ramonpeek

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 12:54:39 +00:00
Russell Bryant 85a631f767 arbitrary formatting change to test a mantis change
(closes issue #12824)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:53:26 +00:00
Russell Bryant 0bee0c65b2 Minor formatting change to test a mantis change ...
(closes issue #12824)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:48:26 +00:00
Russell Bryant 90cb28f89c Merged revisions 121280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121280 | russell | 2008-06-09 11:35:40 -0500 (Mon, 09 Jun 2008) | 10 lines

Do not attempt to do emulation if an END digit is received and the length is
less than the defined minimum digit length, and the other end only wants END
digits (SIP INFO, for example).

(closes issue #12778)
Reported by: tsearle
Patches:
      12778.rev1.txt uploaded by russell (license 2)
Tested by: tsearle

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:37:08 +00:00
Russell Bryant 51051ce949 Add lock tracking for rwlocks. Previously, lock.h only had the ability to
hold tracking information for mutexes.  Now, the "core show locks" output
will output information about who is holding a rwlock when a thread is
waiting on it.

(closes issue #11279)
Reported by: ys
Patches:
      trunk_lock_utils.v8.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 18:26:51 +00:00
Michiel van Baak f1e9371da8 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Russell Bryant 7d2d373d6f Minor formatting change to test a mantis change ...
(issue #12674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 20:45:25 +00:00
Russell Bryant 08f91c1192 Merged revisions 116463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines

Add ast_assert(), which can be used to handle fatal errors.  It is only compiled
in if dev-mode is enabled, and only aborts if DO_CRASH is defined.
(inspired by issue #12650)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 21:40:43 +00:00
Mark Michelson b6aef57619 Merged revisions 116088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116088 | mmichelson | 2008-05-13 18:47:49 -0500 (Tue, 13 May 2008) | 12 lines

A change to the way channel locks are handled when DEBUG_CHANNEL_LOCKS is defined.

After debugging a deadlock, it was noticed that when DEBUG_CHANNEL_LOCKS
is enabled in menuselect, the actual origin of channel locks is obscured
by the fact that all channel locks appear to happen in the function
ast_channel_lock(). This code change redefines ast_channel_lock to be a
macro which maps to __ast_channel_lock(), which then relays the proper
file name, line number, and function name information to the core lock
functions so that this information will be displayed in the case that
there is some sort of locking error or core show locks is issued.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 23:54:01 +00:00
Tilghman Lesher b5a127daac Modify TIMEOUT() to be accurate down to the millisecond.
(closes issue #10540)
 Reported by: spendergrass
 Patches: 
       20080417__bug10540.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01 23:06:23 +00:00
Michiel van Baak 08e674bce0 Pass the hangup cause all the way to the calling app/channel.
(closes issue #11328)
Reported by: rain
Patches:
      20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14)
brought up-to-date to trunk by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-24 22:16:48 +00:00
Russell Bryant 96638d7bb5 re-add a fix that got lost with a recent change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 20:25:56 +00:00
Jason Parker efb767e432 Convert several DEBUG logs into ast_debug.
(closes issue #12444)
Reported by: IgorG
Patches:
      channel_c_debug.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 15:20:47 +00:00
Mark Michelson 0270776ca5 Merged revisions 114117 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114117 | mmichelson | 2008-04-14 12:41:03 -0500 (Mon, 14 Apr 2008) | 11 lines

Increase the retry count when attempting to show channels. This apparently
cleared an issue someone was seeing when attempting to show channels when
the load was high.

(closes issue #11667)
Reported by: falves11
Patches:
      11677.txt uploaded by russell (license 2)
Tested by: falves11


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 17:42:20 +00:00
Mark Michelson 9ddc843fbe Merged revisions 114106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114106 | mmichelson | 2008-04-14 09:58:02 -0500 (Mon, 14 Apr 2008) | 5 lines

Save a local copy of the generate callback prior to unlocking the channel in
case the generate callback goes NULL on us after the channel is unlocked. Thanks
to Russell for pointing this need out to me.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 15:01:36 +00:00
Mark Michelson be02a94138 Merged revisions 113065 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113065 | mmichelson | 2008-04-07 11:08:45 -0500 (Mon, 07 Apr 2008) | 13 lines

This fix prevents a deadlock that was experienced in chan_local. There was
deadlock prevention in place in chan_local, but it would not work in a specific
case because the channel was recursively locked. By unlocking the channel prior
to calling the generator's generate callback in ast_read_generator_actions(), we
prevent the recursive locking, and therefore the deadlock.

(closes issue #12307)
Reported by: callguy
Patches:
      12307.patch uploaded by putnopvut (license 60)
Tested by: callguy


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 16:12:30 +00:00
Joshua Colp 738e4ec94e Add a special dialplan variable to chan_sip which will cause an audio file to be played upon completion of an attended transfer.
(closes issue #9239)
Reported by: sunder


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25 15:18:41 +00:00
Russell Bryant 3c6cf5dcc5 Add some fixes that I made in regards to wideband codec handling to get
G.722 music on hold working for me.

(issue #12164, reported by milazzo and jsmith, patches by me)

res/res_musiconhold.c:
 - I moved a single line so that the sample queue update happened before
   ast_write().  The reason that this was a bug is that the G.722 frame
   originally says it has 320 samples in it (which is correct).  However,
   when the frame is written to a channel that uses RTP, main/rtp.c modifies
   the frame to cut the number of samples in half before it sends it on
   the wire.  This is to account for the stupid incorrect G.722 spec that
   makes it so we have to lie about the number of samples with RTP.  I should
   probably go and re-work the RTP code so it doesn't modify the frame so
   that a bug like this won't happen in the future.  However, this change to
   MOH is harmless.

main/channel.c:
 - I made two fixes in regards to generator timing.  Generators use samples
   for timing.  However, this code assumed 8 kHz samples.  In one case, it was
   a hard coded 160 samples, that is now written as the sample rate / 50.  The
   other place was dealing with timing a generator based on frames coming from
   the other direction.  However, that would have only worked if the sample
   rates for the formats in both directions were the same.  The code now takes
   into account that the sample rates may differ, and scales the generator
   samples accordingly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 17:41:22 +00:00
Russell Bryant 835df7d30f Merged revisions 108583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines

Fix another issue that was causing crashes in chanspy.  This introduces a new
datastore callback, called chan_fixup().  The concept is exactly like the
fixup callback that is used in the channel technology interface.  This callback
gets called when the owning channel changes due to a masquerade.  Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.

(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:40:43 +00:00
Russell Bryant b38cb44acd Merged revisions 108135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108135 | russell | 2008-03-12 14:57:42 -0500 (Wed, 12 Mar 2008) | 40 lines

(closes issue #12187, reported by atis, fixed by me after some brainstorming
 on the issue with mmichelson)

- Update copyright info on app_chanspy.

- Fix a race condition that caused app_chanspy to crash.  The issue was that
  the chanspy datastore magic that was used to ensure that spyee channels did
  not disappear out from under the code did not completely solve the problem.
  It was actually possible for chanspy to acquire a channel reference out of
  its datastore to a channel that was in the middle of being destroyed.  That
  was because datastore destruction in ast_channel_free() was done near the
  end.  So, this left the code in app_chanspy accessing a channel that was
  partially, or completely invalid because it was in the process of being free'd
  by another thread.  The following sort of shows the code path where the race 
  occurred:

  =============================================================================
  Thread 1 (PBX thread for spyee chan)  ||   Thread 2 (chanspy)
  --------------------------------------||-------------------------------------
  ast_channel_free()                    ||
    - remove channel from channel list  ||
    - lock/unlock the channel to ensure ||
      that no references retrieved from ||
      the channel list exist.           ||
  --------------------------------------||-------------------------------------
                                        || channel_spy()
    - destroy some channel data         ||  - Lock chanspy datastore
                                        ||  - Retrieve reference to channel
                                        ||  - lock channel
                                        ||  - Unlock chanspy datastore
  --------------------------------------||-------------------------------------
     - destroy channel datastores       ||
        - call chanspy datastore d'tor  ||  
          which NULL's out the ds'      ||  - Operate on the channel ...
          reference to the channel      ||     
                                        ||
    - free the channel                  || 
                                        ||
                                        ||  - unlock the channel
  --------------------------------------||-------------------------------------
  =============================================================================

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 19:59:05 +00:00
Russell Bryant f7e28b12fe Merged revisions 108031 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108031 | russell | 2008-03-12 11:59:07 -0500 (Wed, 12 Mar 2008) | 4 lines

Destroy the channel lock after the channel datastores.

(inspired by issue #12187)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 17:02:57 +00:00
Russell Bryant 86fe5cc800 Merged revisions 107102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107102 | russell | 2008-03-10 12:13:17 -0500 (Mon, 10 Mar 2008) | 2 lines

Resolve a compiler warning.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 17:13:34 +00:00
Russell Bryant 541039ce1b Merged revisions 107099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107099 | russell | 2008-03-10 11:58:57 -0500 (Mon, 10 Mar 2008) | 3 lines

Fix a race condition where the generator can go away
(closes issue #12175, reported by edantie, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 16:59:13 +00:00
Joshua Colp 733a740922 Merged revisions 106788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106788 | file | 2008-03-07 15:32:00 -0400 (Fri, 07 Mar 2008) | 4 lines

Ignore source update control frame.
(closes issue #12168)
Reported by: plack

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 19:33:09 +00:00
Tilghman Lesher 8718878490 Merged revisions 106552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines

Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:54:47 +00:00
Joshua Colp 496adc6fc0 Merged revisions 106235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:43:22 +00:00
Tilghman Lesher cfc1df4c1a Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 23:04:29 +00:00
Russell Bryant 8372a9bf08 3) In addition to merging the changes below, change trunk back to a regular
LIST instead of an RWLIST.  The way this list works makes it such that
   a RWLIST provides no additional benefit.  Also, a mutex is needed for
   use with the thread condition.


Merged revisions 105563 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105563 | russell | 2008-03-03 09:50:43 -0600 (Mon, 03 Mar 2008) | 24 lines

Merge in some changes from team/russell/autoservice-nochans-1.4

These changes fix up some dubious code that I came across while auditing what
happens in the autoservice thread when there are no channels currently in
autoservice.

1) Change it so that autoservice thread doesn't keep looping around calling
   ast_waitfor_n() on 0 channels twice a second.  Instead, use a thread condition
   so that the thread properly goes to sleep and does not wake up until a
   channel is put into autoservice.

   This actually fixes an interesting bug, as well.  If the autoservice thread
   is already running (almost always is the case), then when the thread goes
   from having 0 channels to have 1 channel to autoservice, that channel would
   have to wait for up to 1/2 of a second to have the first frame read from it.

2) Fix up the code in ast_waitfor_nandfds() for when it gets called with no
   channels and no fds to poll() on, such as was the case with the previous code
   for the autoservice thread.  In this case, the code would call alloca(0), and
   pass the result as the first argument to poll().  In this case, the 2nd
   argument to poll() specified that there were no fds, so this invalid pointer
   shouldn't actually get dereferenced, but, this code makes it explicit and
   ensures the pointers are NULL unless we have valid data to put there.

(related to issue #12116)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:59:50 +00:00
Joshua Colp b21ca22fb0 Merged revisions 105560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105560 | file | 2008-03-03 11:28:59 -0400 (Mon, 03 Mar 2008) | 7 lines

It is possible for no audio to pass between the current digit and next digit so expand logic that clears emulation to AST_FRAME_NULL.
(closes issue #11911)
Reported by: edgreenberg
Patches:
      v1-11911.patch uploaded by dimas (license 88)
Tested by: tbsky

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:30:29 +00:00
Jason Parker 63ab8ad66c Make sure to mask out non-audio first as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 22:35:23 +00:00
Jason Parker 59bdc278be Maybe we should set the value before we test it? Fixes an issue people have been seeing (unreported?) with file playback not working.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 22:23:04 +00:00
Joshua Colp 227112138e Merged revisions 103801 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103801 | file | 2008-02-18 19:56:48 -0400 (Mon, 18 Feb 2008) | 10 lines

Ensure that emulated DTMFs do not get interrupted by another begin frame.
(closes issue #11740)
Reported by: gserra
Patches:
      v1-11740.patch uploaded by dimas (license 88)
(closes issue #11955)
Reported by: tsearle
(closes issue #10530)
Reported by: xmarksthespot

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 23:58:38 +00:00
Joshua Colp e54da94808 Add a non-invasive API for application level manipulation of T38 on a channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it.
(closes issue #11873)
Reported by: dimas
Patches:
      v4-t38-api.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 23:47:01 +00:00
Olle Johansson f04d5fb83d Make sure we can set up calls without audio (text+video).
And ... it works!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 17:12:13 +00:00
Tilghman Lesher 26755e3882 Context tracing for channels
(closes issue #11268)
 Reported by: moy
 Patches: 
       chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 04:43:33 +00:00
Jason Parker 72bc8a7c7d Fix up some doxygen issues.
(closes issue #11996)
Patches:
      bug_11996_doxygen.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 17:29:08 +00:00
Joshua Colp 9587f09103 Add support for allowing a native bridge to happen when the L option is enabled. The RTP bridging could already handle this, it just needed to be enabled in the main bridging code.
(issue #10647)
Reported by: samdell3


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 16:17:15 +00:00
Russell Bryant 1c74c549d7 Merged revisions 100581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100581 | russell | 2008-01-28 11:15:41 -0600 (Mon, 28 Jan 2008) | 9 lines

Make some deadlock related fixes.  These bugs were discovered and reported
internally at Digium by Steve Pitts.
 - Fix up chan_local to ensure that the channel lock is held before the local
   pvt lock.
 - Don't hold the channel lock when executing the timing function, as it can
   cause a deadlock when using chan_local.  This actually changes the code back
   to be how it was before the change for issue #10765.  But, I added some other
   locking that I think will prevent the problem reported there, as well.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 17:21:24 +00:00
Russell Bryant 87800e1913 Make a couple more uses of ARRAY_LEN, and convert some spaces to tabs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 04:43:14 +00:00
Russell Bryant e8f7cbf358 - Simplify a line with ARRAY_LEN()
- Make a few little formatting changes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 04:30:44 +00:00
Russell Bryant 79be2b8b0e These readlocks always fail for me on my mac, and I saw it happen again
today on another mac.  We ignore the return value of locking operations almost
everywhere in Asterisk.  So, ignore these, as well, so Asterisk will actually
work on systems where this is occurring while I look into what the issue is.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 00:56:14 +00:00
Joshua Colp 1d47c036dd Some more cosmetic changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 03:34:57 +00:00
Joshua Colp 15515ec671 Add some spacing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 03:30:56 +00:00
Olle Johansson b8aa3248ec Add a generic function to set the bridged call PVT unique id string
as a channel variable BRIDGEPVTCALLID

This is important for call tracing in log files and CDRs, so that
the SIP callID can be traced along servers.

The CHANNEL dialplan function won't work here, since the outbound
channel is gone when we need the Call-ID.

Other channel drivers may now implement the same function :-),
but this patch only supports chan_sip.so.

Inspired by (issue #11816)
Reported by: ctooley

Patch by oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:35:10 +00:00
Russell Bryant d09fdcf61d Add AST_FORMAT_SLINEAR16 to the list for ast_best_codec()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 23:20:37 +00:00
Mark Michelson e04aa9eed4 Merged revisions 98315 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98315 | mmichelson | 2008-01-11 13:10:57 -0600 (Fri, 11 Jan 2008) | 5 lines

Properly report the hangup cause as no answer when someone does not answer

(closes issue #10574, reported by boch, patched by moy)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:12:05 +00:00
Tilghman Lesher afb2031389 Allow the uniqueid to be used for searching for a channel in the list.
Reported and initially patched by: michael-fig
(Closes issue #11340)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 21:27:57 +00:00
Russell Bryant b749217bcb Merged revisions 95024 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r95024 | russell | 2007-12-27 15:40:02 -0600 (Thu, 27 Dec 2007) | 9 lines

Don't report a syntax error when an empty string is passed to ast_get_group.
Just return 0.

(closes issue #11540)
Reported by: tzafrir
Patches: 
      group_empty.diff uploaded by tzafrir (license 46)
	   -- slightly changed by me

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 21:41:22 +00:00
Russell Bryant f853918c53 Leave a note for a minor bug that was pointed out by d1mas
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 18:19:46 +00:00
Tilghman Lesher 9c1dcfea5a Merged revisions 94767 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94767 | tilghman | 2007-12-24 13:36:59 -0600 (Mon, 24 Dec 2007) | 5 lines

Race: we need to wait to queue a NewChannel event until after the channel is
inserted into the channel list.  The reason is because some manager users
immediately queue requests from the channel when they see that event and are
confused when Asterisk reports no such channel. (Closes issue #11632)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 19:43:36 +00:00
Mark Michelson 5e7f167073 Merged revisions 93625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93625 | mmichelson | 2007-12-18 11:02:48 -0600 (Tue, 18 Dec 2007) | 6 lines

Rework deadlock avoidance used in ast_write, since it meant that agent channels which were being monitored
had one audio file recorded and one empty audio file saved.

(closes issue #11529, reported by atis patched by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 17:05:19 +00:00
Olle Johansson 1e07078c60 Changes to manager events in channel.c
- Newstate event
        - Now has "CalleridNum" for numeric caller id, like Newchannel
        - The event does not send "<unknown>" for unknown caller IDs just an empty field
- Newstate and Newchannel events
        - these have changed headers
        "State"         -> ChannelStateDesc     Text based channel state
                        -> ChannelState         Numeric channel state
        - The events does not send "<unknown>" for unknown caller IDs just an empty field

- Newstate event
        - Now has "CalleridNum" for numeric caller id, like Newchannel
        - The event does not send "<unknown>" for unknown caller IDs just an empty field

- Link and Unlink events
        - The "Link" and "Unlink" bridge events in channel.c are now renamed to "Bridge"
        - The link state is in the bridgestate: header as "Link" or "Unlink"
        - For channel.c bridges, "Bridgetype: core" is added. This opens up for
          bridge events in rtp.c and channel drivers

- The "Rename" manager event has a renamed header, to use the same
        terminology for the current channel as other events
        - Oldname       -> Channel

(Moremanager)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 15:29:05 +00:00
Joshua Colp 3faa47ab5b Instead of iterating through the entire epoll events array just look at the ones that will actually contain data. (props to eliel on IRC for this)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 04:37:36 +00:00
Jason Parker 0ef0259302 Merged revisions 90876 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11454)
........
r90876 | qwell | 2007-12-04 11:28:08 -0600 (Tue, 04 Dec 2007) | 4 lines

If we fail to create a channel after allocating a timing fd, we need to make sure to close it.

Issue 11454, patch by eliel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 17:38:51 +00:00
Tilghman Lesher 0147028b51 Avoid an additional function call. Reported by: eliel Patch by: eliel (Closes issue #11438)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 20:30:02 +00:00
Joshua Colp 46d2c050c5 Merged revisions 90548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90548 | file | 2007-12-03 14:40:56 -0400 (Mon, 03 Dec 2007) | 2 lines

Preserve the indication currently playing on a channel when a masquerade operation happens. (issue #BE-88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 18:44:16 +00:00
Russell Bryant 53a5f22849 Merged revisions 90145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines

This set of changes is to make some callerID handling thread-safe.
The ast_set_callerid() function needed to lock the channel.  Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 00:28:10 +00:00
Joshua Colp 867b734868 Merged revisions 89577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89577 | file | 2007-11-26 11:34:38 -0400 (Mon, 26 Nov 2007) | 6 lines

If channel allocation fails because the alert pipe could not be created also free the scheduler context.
(closes issue #11355)
Reported by: eliel
Patches:
      main.channel.c.patch uploaded by eliel (license 64)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 15:36:27 +00:00
Olle Johansson 595961655a Try to get channel.h and channel.c aligned in regards to ast_set_callerid as well
as change name of variables to follow the rest of the naming.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-25 19:33:33 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 915b97d300 move internal function declarations to include/asterisk/_private.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 22:18:21 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Luigi Rizzo 09d9cce1d8 access channel locks through ast_channel_lock/unlock/trylock and not
through ast_mutex primitives.

To detect all occurrences, I have renamed the lock field in struct ast_channel
so it is clear that it shouldn't be used directly.

There are some uses in res/res_features.c (see details of the diff)
that are error prone as they try and lock two channels without
caring about the order (or without explaining why it is safe).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 16:20:47 +00:00
Tilghman Lesher 5112f2b7e9 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 23:08:54 +00:00
Tilghman Lesher 36d9a5aaf3 Add callerid to the Hangup manager event.
Reported by: outtolunc
Patch by: outtolunc
Closes issue #11248


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 22:59:05 +00:00
Kevin P. Fleming a34bbab643 use simpler technique for removing known entries from lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 00:54:38 +00:00
Tilghman Lesher 061e5a1674 Merged revisions 89184 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89184 | tilghman | 2007-11-12 11:29:17 -0600 (Mon, 12 Nov 2007) | 5 lines

Fix two cases of memory corruption caused by background threads.
Reported by: atis
Patch by: tilghman
Fixes issue #10923

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 17:44:04 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
Joshua Colp 0971b51cfc Remove native bridging check for DTMF based transfers. Thanks to the last batch of RTP changes it is no longer required for the media stream to go through Asterisk if DTMF is going over signalling. It will simply reinvite back as needed.
(closes issue #11172)
Reported by: ibc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 20:55:58 +00:00
Mark Michelson 57c4409689 Merged revisions 88826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88826 | mmichelson | 2007-11-05 17:29:29 -0600 (Mon, 05 Nov 2007) | 6 lines

Reworked deadlock avoidance in __ast_read. Restored audio to 
callback agents.

(closes issue #11071, reported by callguy, patched by me, tested by callguy and Ted Brown)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 23:31:00 +00:00
Russell Bryant 7df9905e71 Merged revisions 88709 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88709 | russell | 2007-11-05 14:11:04 -0600 (Mon, 05 Nov 2007) | 20 lines

Merge the last bit of changes from asterisk/team/russell/readq-1.4

The issue here is that the channel frame readq handling got broken when the
code was converted to use the linked list macros.  It caused corruption of the
list head and tail pointers.  So, I fixed up the usage of the linked list
macros and in passing, simplified the code.  I also documented what the code
is doing, as it was a bit difficult to figure out at first.

This bug showed itself with crashes showing messed up head/tail pointers for
the readq.  However, there are a couple of crashes that aren't quite as obvious,
but I think may be related.  So, if your bug gets closed by this commit, but
you still have a problem, please reopen or create a new bug report.

(closes issue #10936)
(closes issue #10595)
(closes issue #10368)
(closes issue #11084)
(closes issue #10040)
(closes issue #10840)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 20:14:48 +00:00
Russell Bryant 6677325afc Merged revisions 88624 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88624 | russell | 2007-11-05 11:46:02 -0600 (Mon, 05 Nov 2007) | 5 lines

Fix up datastore handling in ast_do_masquerade().  The code is intended to move
any channel datastores from the old channel to the new one.  However, it did
not use the linked list macros properly to accomplish the task.  The existing
code would only work if there was only a single datastore on the old channel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 17:52:08 +00:00
Luigi Rizzo 08b10da53b Simplify the implementation and the API for stringfields;
details and examples are in include/asterisk/stringfields.h.

Not applicable to older branches except for 1.4 which will
receive a fix for the routines that free memory pools.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-04 19:44:31 +00:00
Kevin P. Fleming c6a8d45f43 Merged revisions 87069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87069 | kpfleming | 2007-10-25 18:03:11 -0500 (Thu, 25 Oct 2007) | 2 lines

appending one list to another should leave the first list empty, and not require the user to do that

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-25 23:11:28 +00:00
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 20:05:18 +00:00
Russell Bryant a54eca55cf Merged revisions 86750 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86750 | russell | 2007-10-22 10:52:48 -0500 (Mon, 22 Oct 2007) | 8 lines

Don't leak a frame in the case that an END frame is received and the time since
the BEGIN is less than that of the defined minimum DTMF duration.

(closes issue #11051)
Reported by: casper
Patches:
      channel.c.86664.diff uploaded by casper (license 55)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 15:57:02 +00:00
Joshua Colp 150964ab0e Merged revisions 86663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86663 | file | 2007-10-22 11:27:03 -0300 (Mon, 22 Oct 2007) | 6 lines

Move log message to before the frame it references is freed.
(closes issue #11050)
Reported by: slavon
Patches:
      channel.c.86662.diff uploaded by casper (license 55)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 14:28:07 +00:00
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:29:40 +00:00
Russell Bryant 155aaf947f Merged revisions 86330 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86330 | russell | 2007-10-18 13:03:10 -0500 (Thu, 18 Oct 2007) | 10 lines

The channel needs to stay locked while running timer callbacks, as they access
and modify channel data that may change elsewhere.  I went through every timer
callback in the source tree to make sure that none of them did any additional
locking that could introduce deadlocks, and all is well.

(closes issue #10765)
Reported by: Ivan
Patches:
      ast_1_4_11_svn_patch_channel_rc.diff uploaded by Ivan (license 229)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-18 18:06:49 +00:00
Russell Bryant e97a723cf1 Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
(closes issue #10724)
Reported by: eliel
Patches: 
      chan_skinny.c.patch uploaded by eliel (license 64)
      chan_oss.c.patch uploaded by eliel (license 64)
      chan_mgcp.c.patch2 uploaded by eliel (license 64)
      pbx_config.c.patch uploaded by seanbright (license 71)
      iax2-provision.c.patch uploaded by eliel (license 64)
      chan_gtalk.c.patch uploaded by eliel (license 64)
      pbx_ael.c.patch uploaded by seanbright (license 71)
      file.c.patch uploaded by seanbright (license 71)
      image.c.patch uploaded by seanbright (license 71)
      cli.c.patch uploaded by moy (license 222)
      astobj2.c.patch uploaded by moy (license 222)
      asterisk.c.patch uploaded by moy (license 222)
      res_limit.c.patch uploaded by seanbright (license 71)
      res_convert.c.patch uploaded by seanbright (license 71)
      res_crypto.c.patch uploaded by seanbright (license 71)
      app_osplookup.c.patch uploaded by seanbright (license 71)
      app_rpt.c.patch uploaded by seanbright (license 71)
      app_mixmonitor.c.patch uploaded by seanbright (license 71)
      channel.c.patch uploaded by seanbright (license 71)
      translate.c.patch uploaded by seanbright (license 71)
      udptl.c.patch uploaded by seanbright (license 71)
      threadstorage.c.patch uploaded by seanbright (license 71)
      db.c.patch uploaded by seanbright (license 71)
      cdr.c.patch uploaded by moy (license 222)
      pbd_dundi.c.patch uploaded by moy (license 222)
      app_osplookup-rev83558.patch uploaded by moy (license 222)
      res_clioriginate.c.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11 19:03:06 +00:00
Tilghman Lesher e9221b062e Merged revisions 85158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85158 | tilghman | 2007-10-09 16:55:06 -0500 (Tue, 09 Oct 2007) | 5 lines

This commit fixes the following issues:
- Deadlock in ast_write (issue #10406)
- Deadlock in ast_read (issue #10406)
- Possible mutex initialization error in lock.h (issue #10571)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09 22:21:49 +00:00
Joshua Colp 914cd4a7cf Merged revisions 84990 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84990 | file | 2007-10-08 12:03:07 -0300 (Mon, 08 Oct 2007) | 4 lines

Don't keep trying to native bridge if either of the channels are involved in a masquerade operation to be done.
(closes issue #10696)
Reported by: tbelder

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-08 15:05:05 +00:00
Dwayne M. Hubbard 71a0672560 Merged revisions 84274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84274 | dhubbard | 2007-10-01 16:25:37 -0500 (Mon, 01 Oct 2007) | 1 line

moved get_base_channel() code from action_redirect to ast_channel_masquerade() for issue 7706 and BE-160
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 21:31:16 +00:00
Tilghman Lesher d3904a21c4 Merged revisions 84049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84049 | tilghman | 2007-09-28 00:30:22 -0500 (Fri, 28 Sep 2007) | 3 lines

Avoid a deadlock with ALL of the locks in the masquerade function, not just the
pairs of channels.  (Closes issue #10406)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-28 05:37:16 +00:00
Russell Bryant 9f64905d4e Merged revisions 83432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines

gcc 4.2 has a new set of warnings dealing with cosnt pointers.  This set of
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: https://origsvn.digium.com/svn/asterisk/trunk@83433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 14:40:10 +00:00
Joshua Colp a565584d05 Fix memory issue that crept up with Russell's testing. It is *not* proper to free the frame we get in ast_write.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-06 22:34:44 +00:00
Joshua Colp 352fd9d942 Merged revisions 81437 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81437 | file | 2007-09-04 10:46:23 -0300 (Tue, 04 Sep 2007) | 4 lines

(closes issue #10476)
Reported by: mdu113
Only look for the end of a digit when waiting for a digit. This in turn disables emulation in the core.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-04 13:47:33 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Russell Bryant 040a5f20f9 * Constify the uid field of channel datastores
* Convert some spaces to tabs in func_volume
* Add a note in channel.h making it clear that none of the datastore API calls
  lock the channel they are given, so the channel should be locked before
  calling the functions that take a channel argument.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 18:32:56 +00:00
Joshua Colp 9264d5007a (closes issue #10427)
Reported by: pj
Two of the three places ast_waitfor_nandfds could branch off to did not clear outfd and exception. If the calling function did not clear these there was a chance they could get a false positive on testing to see whether they were set.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 14:17:43 +00:00
Steve Murphy 4f98b05cd5 Don't ask me why, but waitfordigit will immediately return a 1 on my system, unless the outfd is initialized to -1 before calling the nandfds func
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 13:46:58 +00:00
Russell Bryant 5f0c3e7dbc constify the return value of reason2str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:23:38 +00:00
Steve Murphy 526d1f39a2 Merged revisions 79099 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79099 | murf | 2007-08-10 14:53:43 -0600 (Fri, 10 Aug 2007) | 1 line

From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 21:03:06 +00:00
Joshua Colp 22114b509d Add support for using epoll instead of poll. This should increase scalability and is done in such a way that we should be able to add support for other poll() replacements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 21:44:58 +00:00
Joshua Colp 602198c402 Merge audiohooks branch into trunk. This is a new API for developers to listen and manipulate the audio going through a channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 19:30:52 +00:00
Joshua Colp 9ef1b0a974 Extend the ast_senddigit and ast_dtmf_stream API calls to allow the duration of the DTMF digit(s) to be specified and make the SendDTMF application have the capability to use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 21:52:30 +00:00
Joshua Colp 431c60f818 Merged revisions 78275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78275 | file | 2007-08-06 18:41:13 -0300 (Mon, 06 Aug 2007) | 2 lines

Add additional DTMF log messages to help when debugging issues.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 21:43:09 +00:00
Luigi Rizzo f66dbeb8f3 print formats as 0x%x instead of %d in a warning message.
Being bitmasks, it is a lot easier to read this way.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 19:42:25 +00:00
Russell Bryant ad094d5109 Merged revisions 77785 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77785 | russell | 2007-07-30 13:55:15 -0500 (Mon, 30 Jul 2007) | 3 lines

file and I both committed changes for issue #10301.  Remove a duplicated
assignment to restore the original value of the previous channel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 18:56:29 +00:00
Russell Bryant a2fc80d4a6 Merged revisions 77780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77780 | russell | 2007-07-30 12:29:43 -0500 (Mon, 30 Jul 2007) | 16 lines

(closes issue #10301)
Reported by: fnordian
Patches:
      asterisk-1.4.9-channel.c.patch uploaded by fnordian (license 110)
      Additional changes by me

Fix some problems in channel_find_locked() which can cause an infinite loop.
The reference to the previous channel is set to NULL in some cases.  These changes
ensure that the reference to the previous channel gets restored before needing
it again.

I'm not convinced that the code that is setting it to NULL is really the right
thing to do.  However, I am making these changes to fix the obvious problem
and just leaving an XXX comment that it needs a better explanation that what
is there now.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 17:31:29 +00:00
Joshua Colp 3733874f49 Merged revisions 77771 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77771 | file | 2007-07-30 12:47:52 -0300 (Mon, 30 Jul 2007) | 6 lines

(closes issue #10301)
Reported by: fnordian
Patches:
      asterisk-1.4.9-channel.c.patch uploaded by fnordian (license 110)
Restore previous behavior where if we failed to lock the channel we wanted we would return to exactly the same point as if we had just reentered the function.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 15:49:30 +00:00
Joshua Colp 7bd9b905e4 Merged revisions 77460 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77460 | file | 2007-07-26 20:19:04 -0300 (Thu, 26 Jul 2007) | 4 lines

(closes issue #10302)
Reported by: litnialex
If a DTMF end frame comes from a channel without a begin and it is going to a technology that only accepts end frames (aka INFO) then use the minimum DTMF duration if one is not in the frame already.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 23:20:25 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Mark Michelson b37f7ab577 Merged revisions 77154 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77154 | mmichelson | 2007-07-25 16:52:47 -0500 (Wed, 25 Jul 2007) | 3 lines

chan->emulate_dtmf_duration is an unsigned int, not a signed int, so use %u instead of %d in the format string


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 21:53:35 +00:00
Russell Bryant d5b4fde291 Merged revisions 76132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76132 | russell | 2007-07-20 13:22:24 -0500 (Fri, 20 Jul 2007) | 6 lines

Use the define that specifies the default length of an artificially created
DTMF digit in the ast_senddigit() function.  The define is set to 100ms by
default, which is the same thing that this function was using.  But, using
the define lets changes take effect in this case, as well as the others where
it was already used.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 18:28:15 +00:00
Steve Murphy 0e969271ae After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 23:24:27 +00:00
Steve Murphy 5ac24b25d3 This corrects the problem with flags and %lld formats on 64-bit machines, where uint64_t is NOT acceptable for %lld, and also works on 32-bit machines. At least, with gcc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 14:35:07 +00:00
Steve Murphy 8a7732f067 via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:40:29 +00:00
Joshua Colp 1f86a8bc2d Merged revisions 74922 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74922 | file | 2007-07-12 16:17:59 -0300 (Thu, 12 Jul 2007) | 2 lines

Whoops... didn't want this to be returned to 0 each iteration.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-12 19:19:03 +00:00
Joshua Colp 8f3a5481dc Merged revisions 74888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74888 | file | 2007-07-12 14:16:28 -0300 (Thu, 12 Jul 2007) | 2 lines

When waiting for a digit ensure that a begin frame was received with it, not just an end frame. (issue #10084 reported by rushowr)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-12 17:17:56 +00:00
Joshua Colp f4943f3211 Merged revisions 73355 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r73355 | file | 2007-07-05 11:21:44 -0300 (Thu, 05 Jul 2007) | 10 lines

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

........
r73349 | file | 2007-07-05 11:19:14 -0300 (Thu, 05 Jul 2007) | 2 lines

Tweak spy locking. (issue #9951 reported by welles)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 14:22:58 +00:00
Joshua Colp 73d33590ba Merged revisions 72888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r72888 | file | 2007-07-02 11:32:59 -0300 (Mon, 02 Jul 2007) | 2 lines

Added additional DTMF debug messages for when emulation occurs.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 14:39:49 +00:00
Joshua Colp 809c1398d7 Merged revisions 72257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72257 | file | 2007-06-27 16:25:24 -0400 (Wed, 27 Jun 2007) | 10 lines

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

........
r72256 | file | 2007-06-27 16:23:24 -0400 (Wed, 27 Jun 2007) | 2 lines

I may possibly get shot for doing this... but... defer CDR processing until after the channel has been dealt with. This should eliminate all of the issues with channels going funky (SIP/PRI) when you are posting CDRs to a database that is either slow or unavailable and do not want to enable batching.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 20:26:53 +00:00
Joshua Colp 7feaaaaf04 Merged revisions 72148 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r72148 | file | 2007-06-27 13:31:50 -0400 (Wed, 27 Jun 2007) | 2 lines

Make the ast_read_noaudio API call behave better under circumstances where DTMF emulation was happening and a generator was setup. (issue #10065 reported by stevefeinstein)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 17:34:26 +00:00
Steve Murphy cd97d6a687 Merged revisions 70062 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r70062 | murf | 2007-06-19 12:23:23 -0600 (Tue, 19 Jun 2007) | 9 lines

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

........
r70053 | murf | 2007-06-19 12:07:59 -0600 (Tue, 19 Jun 2007) | 1 line

This fixes 9246, where channel variables are not available in the 'h' exten, on a 'ZOMBIE' channel. The fix is to consolidate the channel variables during a masquerade, and then copy the merged variables back onto the clone, so the zombie has the same vars that the 'original' has.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 18:31:29 +00:00
Joshua Colp afe63aec33 Merged revisions 69987 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r69987 | file | 2007-06-19 12:24:31 -0400 (Tue, 19 Jun 2007) | 10 lines

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

........
r69986 | file | 2007-06-19 12:21:29 -0400 (Tue, 19 Jun 2007) | 2 lines

Update BRIDGEPEER variable if set to the new channel name when a masquerade happens. (issue #9699 reported by dimas)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 16:25:57 +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
Russell Bryant cf06bdb312 Merged revisions 69010 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69010 | russell | 2007-06-12 14:13:41 -0500 (Tue, 12 Jun 2007) | 12 lines

In ast_channel_make_compatible(), just return if the channels' read and write
formats already match up.  There are code paths that call this function on a
pair of channels multiple times.  This made calls fail that were using g729
in some cases.  The reason is that codec_g729a will unregister itself from the
list of available translators will all licenses are in use.  So, the first
time the function got called, the right translation path was allocated.
However, the second time it got called, the code would not find a translation
path to/from g729 and make the call fail, even if the channel actually already
had a g729 translation path allocated.

(SPD-32)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 19:19:09 +00:00
Joshua Colp b3475e429a Minor code cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 13:58:13 +00:00
Joshua Colp a9043635ed Change channel list to read/write list... I'm crazy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 14:41:39 +00:00
Joshua Colp eb56cb6b92 Merged revisions 68683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r68683 | file | 2007-06-11 10:33:12 -0400 (Mon, 11 Jun 2007) | 10 lines

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

........
r68682 | file | 2007-06-11 10:29:58 -0400 (Mon, 11 Jun 2007) | 2 lines

Improve deadlock handling of the channel list. (issue #8376 reported by one47)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 14:35:02 +00:00
Joshua Colp ef7b38e065 Merged revisions 68157 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r68157 | file | 2007-06-07 14:39:52 -0400 (Thu, 07 Jun 2007) | 2 lines

Fix logic when doing a name based channel search for a structure when you want to start from a specific point in the channel list. (issue #9324 reported by slavon)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 18:41:17 +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 18101ff0e3 Merged revisions 67716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r67716 | russell | 2007-06-06 11:55:59 -0500 (Wed, 06 Jun 2007) | 13 lines

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

........
r67715 | russell | 2007-06-06 11:40:51 -0500 (Wed, 06 Jun 2007) | 5 lines

We have some bug reports showing crashes due to a double free of a channel.
Add a sanity check to ast_channel_free() to make sure we don't go on trying
to free a channel that wasn't found in the channel list.
(issue #8850, and others...)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 16:58:28 +00:00
Russell Bryant 2b25070414 Merged revisions 66076 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r66076 | russell | 2007-05-24 17:23:59 -0500 (Thu, 24 May 2007) | 1 line

if the string field init fails, clean up the stuff that was allocated already
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 22:25:55 +00:00
Russell Bryant 9065eb1054 Merged revisions 66070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r66070 | russell | 2007-05-24 17:07:39 -0500 (Thu, 24 May 2007) | 2 lines

Check the result of ast_string_field_init() in ast_channel_alloc()

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 22:08:33 +00:00
Russell Bryant 90d6885701 Add a new feature for Music on Hold. If you set the "digit" option for a
class in musiconhold.conf, a caller on hold may press this digit to switch
to listening to that music class.
  This involved adding a new callback for generators, which allow generators
to get notified of DTMF from the channel they are running on.  Then, a callback
was implemented for the music on hold generators.
(patch from bbryant)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 18:52:59 +00:00
Joshua Colp f02ea9e076 Merged revisions 64240 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r64240 | file | 2007-05-14 13:23:51 -0400 (Mon, 14 May 2007) | 2 lines

Fix scenario where if a phone that simply called Echo() put itself on hold it could never get off hold.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 17:25:25 +00:00
Olle Johansson 78d3244554 Merged revisions 64157 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r64157 | oej | 2007-05-14 12:39:12 +0200 (Mon, 14 May 2007) | 2 lines

Add hangupcause when we lack codecs for transcoding

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 10:40:50 +00:00
Joshua Colp 9427cf5dd6 Merged revisions 63698 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63698 | file | 2007-05-09 15:22:39 -0400 (Wed, 09 May 2007) | 2 lines

Use the DTMF frame on the channel when returning a DTMF frame from AST_FRAME_NULL or AST_FRAME_VOICE.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 19:24:27 +00:00
Russell Bryant 56254ee491 Merged revisions 63612 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63612 | russell | 2007-05-09 11:55:27 -0500 (Wed, 09 May 2007) | 5 lines

Modify ast_senddigit_begin() to use the same assumptions used elsewhere in the
code in that if a channel does not have a send_digit_begin() callback, it only
cares about DTMF END events.  (pointed out by Michael Neuhauser on the
asterisk-dev list)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 19:21:35 +00:00
Russell Bryant 39dd02d542 Merged revisions 63608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63608 | russell | 2007-05-09 11:43:50 -0500 (Wed, 09 May 2007) | 5 lines

Only call ast_senddigit_begin() in ast_senddigit() if the channel has a 
send_digit_begin() callback.  Checking the END_DTMF_ONLY flag was the
wrong thing to do, because that flag indicates that a *bridged* channel
only wants DTMF END events coming from this channel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 16:44:33 +00:00
Joshua Colp 5394364048 Merged revisions 63286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r63286 | file | 2007-05-07 17:45:01 -0400 (Mon, 07 May 2007) | 10 lines

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

........
r63285 | file | 2007-05-07 17:39:52 -0400 (Mon, 07 May 2007) | 2 lines

Properly handle what happens during a masquerade in relation to group counting. (issue #9657 reported by ramonpeek)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-07 21:47:08 +00:00
Russell Bryant 1e3b1a576c Merged revisions 62942 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62942 | russell | 2007-05-03 10:23:13 -0500 (Thu, 03 May 2007) | 17 lines

Fix YADB (Yet Another DTMF Bug) ((C) Russell Bryant, 2007, TM, Patent Pending).

This set of changes came from a debugging session I had with Dwayne Hubbard.
When he called into his home FXO, ran the Echo application, and pressed a
digit, the digit would be echoed back and would never end.  This is fixed,
along with a couple other little improvements.

* When chan_zap is in the middle of playing a digit to a channel, it feeds
  back null frames, not voice frames.  So, I have modified ast_read to check
  the timing on emulated DTMF when it receives null frames, in addition to
  where it was doing this on voice frames.
* Make a tweak to setting the duration on emulated DTMF digits.  If there was
  no duration specified, it set it to be the minimum, instead of the default.
* Instead of timing the emulated digits off of the number of samples in audio
  frames that pass through, just use time values.  Now there is no code in this
  section that assumes 8kHz audio.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 15:23:44 +00:00
Russell Bryant 255f151582 Merged revisions 62789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62789 | russell | 2007-05-02 17:59:09 -0500 (Wed, 02 May 2007) | 20 lines

Merge changes from team/russell/inband_dtmf ...

Fix some issues related to generating inband DTMF.  There are two changes here:

1)   The list of DTMF tones in the senddigit_begin() function explicitly
   specified 100ms of the tone followed by 100ms of silence.  This really
   broke things with the way that Asterisk now wants complete control
   over when the digit begins and ends.  So, regardless of what Asterisk
   really wanted to do, this was going to play out the tone at the length it
   wanted to.  This caused various problems like DTMF translation to inband to
   be extremely unreliable.
     The list of tones has been changed so that the correct DTMF tone is played
   indefinitely until Asterisk tells it to stop.

2) ast_write() had to be modified to let a DTMF_END frame get processed even
   when a generator is present.  This is how the tone will finally get stopped.

(issues #8944, #9250, #9348, maybe others.  Thanks to mdu113 from #8944 for
 the testing and feedback!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 23:00:07 +00:00
Steve Murphy fe7068a51b Merged revisions 62689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62689 | murf | 2007-05-02 11:10:50 -0600 (Wed, 02 May 2007) | 1 line

a)In chan_zap, set the clid, src fields in channel_alloc call. b)in the 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: https://origsvn.digium.com/svn/asterisk/trunk@62690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 17:24:03 +00:00
Russell Bryant 007fa5e0be Merged revisions 62005 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62005 | file | 2007-04-25 22:19:51 -0500 (Wed, 25 Apr 2007) | 2 lines

Missed an ast_app_group_discard during merge. Thanks blitzrage!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 03:24:01 +00:00
Joshua Colp 8b2b3e172b Merged revisions 61805 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r61805 | file | 2007-04-25 15:21:54 -0400 (Wed, 25 Apr 2007) | 10 lines

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

........
r61804 | file | 2007-04-25 14:52:50 -0400 (Wed, 25 Apr 2007) | 2 lines

Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 19:27:42 +00:00
Russell Bryant 94459660a3 Merged revisions 61781 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61781 | russell | 2007-04-24 14:00:06 -0500 (Tue, 24 Apr 2007) | 6 lines

Improve DTMF handling in ast_read() even more in response to a discussion on
the asterisk-dev mailing list.  I changed the enforced minimum length of a
digit from 100ms to 80ms.  Furthermore, I made it now enforce a gap of 45ms in
between digits.  These values are not configurable in a configuration file
right now, but they can be easily changed near the top of main/channel.c.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 19:03:16 +00:00
Russell Bryant fa0e814a69 Merged revisions 61763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61763 | russell | 2007-04-23 12:57:32 -0500 (Mon, 23 Apr 2007) | 4 lines

Ensure that digits passing through Asterisk have a reasonable minimum length.
It is currently 100 ms.  If someone thinks this should be different, feel free
to speak up.  (related to issues #8944, #9250, and #9348)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-23 17:58:15 +00:00
Tilghman Lesher 47dd5a15af Issue 6082 - New DTMF event for manager
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 23:55:26 +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
Tilghman Lesher 590cb3a6fa Expand datastores to add the notion of inheritance. This will be needed for
the conversion of IAX2 variables from the current custom method to ast_storage.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-03 14:40:18 +00:00
Russell Bryant b4a29c3782 Constify the list of codec preferences.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-01 20:24:59 +00:00
Tilghman Lesher b0f60e7496 Merged revisions 56685 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r56685 | tilghman | 2007-02-25 08:46:41 -0600 (Sun, 25 Feb 2007) | 11 lines

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

........
r56684 | tilghman | 2007-02-25 08:38:03 -0600 (Sun, 25 Feb 2007) | 3 lines

Issue 9130 - If prev is the last item on the channel list, then evaluating
additional conditions (e.g. name prefix) will cause a NULL dereference.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-25 14:53:40 +00:00
Olle Johansson 75d387acbc Doxygen additions, corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-24 20:29:41 +00:00
Joshua Colp afc99294fa Merged revisions 56231 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r56231 | file | 2007-02-22 13:49:39 -0500 (Thu, 22 Feb 2007) | 10 lines

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

........
r56230 | file | 2007-02-22 13:44:24 -0500 (Thu, 22 Feb 2007) | 2 lines

Only change the original or clone channel if it's the channel behind the proxy channel, not if it's just a regular bridged channel.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 18:53:22 +00:00
Olle Johansson ba32ee49d0 Adding Realtime Text support (T.140) to Asterisk
T.140/RFC 2793 is a live communication channel, originally
created for IP based text phones for hearing impaired. 
Feels very much like the old Unix talk application.

This code is developed and disclaimed by John Martin of Aupix, UK.
Tested for interoperability by myself and Omnitor in Sweden,
the company that wrote most of the specifications.

A big thank you to everyone involved in this.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 13:35:44 +00:00
Joshua Colp 8470ee5cd0 Merged revisions 54290 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r54290 | file | 2007-02-13 20:09:40 -0500 (Tue, 13 Feb 2007) | 2 lines

Add G722 to ast_best_codec. If anyone disagrees with it's placement, feel free to change it. (issue #9045 reported by gork)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14 01:12:21 +00:00
Russell Bryant 10c4a5fef7 Simplify a small bit of logic.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-12 15:40:23 +00:00
Paul Cadach 85ad583544 Merged revisions 53879 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r53879 | pcadach | 2007-02-10 01:07:11 -0800 (Сбт, 10 Фев 2007) | 1 line

Provide correct DTMF duration
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-10 09:21:22 +00:00
Russell Bryant dab41a355d Merged revisions 51848 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r51848 | russell | 2007-01-23 18:59:58 -0600 (Tue, 23 Jan 2007) | 14 lines

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

........
r51843 | russell | 2007-01-23 18:57:28 -0600 (Tue, 23 Jan 2007) | 6 lines

Fix an issue related to synchronization of recordings when using Monitor().
The bug is a miscalculation of the amount to seek the stream for writing to
disk when the number of samples coming in and out of a channel do not match up.
(issue #8298, #8887, report and patch by guillecabeza, patch files created and
 testing done by whoiswes)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 01:00:57 +00:00
Joshua Colp 21b53af31d Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 00:11:32 +00:00
Russell Bryant dcca8f345f Merged revisions 51311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51311 | russell | 2007-01-19 11:49:38 -0600 (Fri, 19 Jan 2007) | 23 lines

Merge the changes from the /team/group/vldtmf_fixup branch.

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: https://origsvn.digium.com/svn/asterisk/trunk@51314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19 18:06:03 +00:00
Luigi Rizzo 5b9114fa73 include "asterisk/zapata.h" to get the zaptel headers.
this should be the last one left around...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19 16:40:25 +00:00
Jason Parker 11dd11e5a1 Merged revisions 51241 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51241 | qwell | 2007-01-18 12:28:29 -0600 (Thu, 18 Jan 2007) | 2 lines

Fix an issue with deprecated commands

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 18:36:17 +00:00
Joshua Colp c71d6c12f7 Don't hold channel lock while sleeping/waiting for audio stream to get setup. (issue #8834 reported by phsultan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 19:43:13 +00:00
Joshua Colp d986f00e73 Merged revisions 50727 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50727 | file | 2007-01-13 01:00:24 -0500 (Sat, 13 Jan 2007) | 2 lines

Only write a frame out to the channel if one exists. There are cases where one may not and would therefore cause the channel driver to segfault. (issue #8434 reported by slimey)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-13 06:01:49 +00:00
Kevin P. Fleming 17ea9c930e make the automatic post-answer delay happen only when the answer is 'automatic' (not done by the Answer() dialplan application)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-12 15:01:46 +00:00
Kevin P. Fleming 1439e0fa75 when a channel gets automatically answered by an application, sleep a bit to give the audio path (for VOIP channels) time to be setup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 23:42:14 +00:00
Tilghman Lesher 33d5a8a582 Reduce duplication of code (Issue 6542)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-07 14:32:20 +00:00
Joshua Colp a9c3429b07 Merged revisions 49675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49675 | file | 2007-01-05 17:14:47 -0500 (Fri, 05 Jan 2007) | 2 lines

Don't keep repeating the warning over and over when the end of the call is reached. (issue #8724 reported by xrg)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 22:18:03 +00:00
Kevin P. Fleming 3f7899c9da small formatting fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-30 13:26:43 +00:00
Kevin P. Fleming adca0ff14b Merged revisions 49006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49006 | kpfleming | 2006-12-27 16:06:56 -0600 (Wed, 27 Dec 2006) | 2 lines

since these variables all have static duration, none of them need initializers (they default to zero anyway)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27 22:14:33 +00:00
Luigi Rizzo 09f75aa6dc rename the structs struct tone_zone_sound and struct tone_zone
defined in indications.h to ind_tone_zone_sound and ind_tone_zone,
to avoid conflicts with the structs with the same names
defined in tonezone.h

Hope i haven't missed any instance.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-25 06:38:09 +00:00
Luigi Rizzo a2e6c6277f same as in other places, check that generator->release is not NULL
before calling it.
This allows generators to set it to NULL when they have nothing to
do there.

Later, the three copies of the code that releases a generator
should be moved to a function.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-21 19:36:42 +00:00
Luigi Rizzo b6d1722c83 remove ast_safe_string_alloc() - it is completely
equivalent to asprintf().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 15:44:59 +00:00
Luigi Rizzo 1122621981 constify ast_state2str() and note it is not reentrant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 04:03:42 +00:00
Russell Bryant 17a2888d2e Staticize one, and Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:28:56 +00:00
Olle Johansson e3b099c12a Formatting fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-01 20:49:06 +00:00
Luigi Rizzo d7b26b6bf8 set pointers to NULL after freeing memory to avoid multiple free()
probably 1.4/1.2 issue as well if someone can look into that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-25 09:02:42 +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
Paul Cadach fc58bec502 Merged revisions 44809 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44809 | pcadach | 2006-10-10 23:44:54 +0700 (Втр, 10 Окт 2006) | 1 line

CHANNEL() function sometime mix parameter and value
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 08:18:41 +00:00
Joshua Colp 0f15e43add Merged revisions 47707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47707 | file | 2006-11-15 16:33:41 -0500 (Wed, 15 Nov 2006) | 2 lines

We need to ensure timelimit stuff is included as well so warnings get played. (issue #8050 reported by KNK)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 21:36:13 +00:00
Steve Murphy 2e375b388e This mod via bug 7531
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 23:17:27 +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
Tilghman Lesher a8d3ee89c6 Merged revisions 46078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46078 | tilghman | 2006-10-23 22:01:00 -0500 (Mon, 23 Oct 2006) | 3 lines

Pass through a frame if we don't know what it is, rather than trying to pass a
NULL, which will segfault a channel driver (Bug 8149)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-24 03:09:48 +00:00
Russell Bryant bd53e7ee4c Extend the thread storage API such that a custom initialization function can
be called for each thread specific object after they are allocated.  Note that
there was already the ability to define a custom cleanup function.  Also, if
the custom cleanup function is used, it *MUST* call free on the thread
specific object at the end.  There is no way to have this magically done that
I can think of because the cleanup function registered with the pthread
implementation will only call the function back with a pointer to the
thread specific object, not the parent ast_threadstorage object.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 01:00:57 +00:00
Russell Bryant 40b8afd54f Merged revisions 45441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45441 | russell | 2006-10-17 22:41:36 -0400 (Tue, 17 Oct 2006) | 7 lines

Don't attempt to access private data members of the pthread_mutex_t object,
because this does not work on all linux systems.  Instead, just access
the reentrancy field in the ast_mutex_info struct when DEBUG_THREADS is
enabled.  If DEBUG_CHANNEL_LOCKS is enabled, the developer probably has
DEBUG_THREADS on as well.
(issue #8139, me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 02:46:39 +00:00
Kevin P. Fleming 696f9ed677 Merged revisions 45408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45408 | kpfleming | 2006-10-17 17:24:10 -0500 (Tue, 17 Oct 2006) | 3 lines

optimize the 'quick response' code a bit more... no more malloc() or memset() for each response
expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 22:24:45 +00:00
Joshua Colp b5f2589e33 Add Masquerade manager event which trips when a masquerade happens (issue #7840 reported by moy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 17:10:16 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +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
Joshua Colp becd11ddb8 Merged revisions 43695 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43695 | file | 2006-09-26 16:09:41 -0400 (Tue, 26 Sep 2006) | 2 lines

Slight overhaul of the whisper support. 1. We need to duplicate the frame from ast_translate 2. We need to ensure we always have signed linear coming in for signed linear combining. 3. We need to ensure we are always feeding signed linear out. 4. Properly store and restore write format when beeping on the channel we are whispering on. 5. Properly discontinue the stream on the channel for the beep. (issue #8019 reported by timkelly1980)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:11:44 +00:00
Kevin P. Fleming acf824fe5e Merged revisions 43486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43486 | kpfleming | 2006-09-22 10:51:13 -0500 (Fri, 22 Sep 2006) | 2 lines

all the Linux systems I have don't use '__m_count' for this field, so I don't know where this came from...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 16:25:04 +00:00
Tilghman Lesher 2b55678e1f Remove deprecated CLI apps from the core
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:17:39 +00:00
Joshua Colp 1c764935f2 SS7 marked the start of an open season for trunk again but here's something minor - abstract early bridging into the technology so that we don't always assume they use RTP and try it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 19:27:26 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Joshua Colp 0f3eaaf703 Merged revisions 42600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42600 | file | 2006-09-09 16:24:19 -0400 (Sat, 09 Sep 2006) | 2 lines

Only truly consider the channel in the same format if the format matches the raw format OR if a translation path already exists to translate between them. (issue #7887 reported by softins & issue #7803 reported by alvaro_palma_aste). Thanks goes to stubert for giving me access to a box and showing me a scenario where this occured.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 20:25:45 +00:00
Joshua Colp 160cea6139 Merged revisions 42452 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42452 | file | 2006-09-08 14:50:43 -0400 (Fri, 08 Sep 2006) | 2 lines

Swap spies during masquerading

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 18:53:41 +00:00