asterisk/asterisk.git
12 years agoExtend the ast_senddigit and ast_dtmf_stream API calls to allow the duration of the...
Joshua Colp [Mon, 6 Aug 2007 21:52:30 +0000 (21:52 +0000)]
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

12 years agoMerged revisions 78275 via svnmerge from
Joshua Colp [Mon, 6 Aug 2007 21:43:09 +0000 (21:43 +0000)]
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

12 years agoMerged revisions 78242 via svnmerge from
Russell Bryant [Mon, 6 Aug 2007 20:45:09 +0000 (20:45 +0000)]
Merged revisions 78242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78242 | russell | 2007-08-06 15:44:09 -0500 (Mon, 06 Aug 2007) | 4 lines

Fix an issue where dynamic threads can get free'd, but still exist in the
dynamic thread list.
(closes issue #10392, patch from Mihai, with credit to his colleague, Pete)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78243 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChange the fsk filter used in CID and TDD decode to an integer based implementation
Doug Bailey [Mon, 6 Aug 2007 19:52:40 +0000 (19:52 +0000)]
Change the fsk filter used in CID and TDD decode to an integer based implementation

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFixing a compiler warning which warns that a variable may be used unitialized. Thanks...
Mark Michelson [Mon, 6 Aug 2007 17:51:09 +0000 (17:51 +0000)]
Fixing a compiler warning which warns that a variable may be used unitialized. Thanks to mvanbaak for pointing this out.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78192 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78103 via svnmerge from
Mark Michelson [Mon, 6 Aug 2007 16:54:51 +0000 (16:54 +0000)]
Merged revisions 78103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines

Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers.
Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the
IP address.

In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78186 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78184 via svnmerge from
Russell Bryant [Mon, 6 Aug 2007 16:51:30 +0000 (16:51 +0000)]
Merged revisions 78184 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78184 | russell | 2007-08-06 11:50:54 -0500 (Mon, 06 Aug 2007) | 5 lines

Fix the return value of AST_LIST_REMOVE().  This shouldn't be causing any
problems, though, because the only code that uses the return value only checks
to see if it is NULL.
(closes issue #10390, pointed out by mihai)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78185 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78182 via svnmerge from
Joshua Colp [Mon, 6 Aug 2007 16:34:15 +0000 (16:34 +0000)]
Merged revisions 78182 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78182 | file | 2007-08-06 13:32:44 -0300 (Mon, 06 Aug 2007) | 2 lines

It is possible for a transfer to occur before the remote device has our tag in which case they send none in the transfer. In this case we need to not fail the transfer dialog lookup.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78183 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78180 via svnmerge from
Jason Parker [Mon, 6 Aug 2007 16:31:42 +0000 (16:31 +0000)]
Merged revisions 78180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #9938)
........
r78180 | qwell | 2007-08-06 11:30:51 -0500 (Mon, 06 Aug 2007) | 5 lines

Fix an issue with using UpdateConfig (manager action) where escaped semicolons
 in a config would be converted to just semicolons (\; to ;)

Issue 9938

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78181 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoImplement setvar functionality in chan_skinny
Jason Parker [Mon, 6 Aug 2007 16:08:11 +0000 (16:08 +0000)]
Implement setvar functionality in chan_skinny

Closes issue #10379, patch by mvanbaak.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78179 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78172 via svnmerge from
Joshua Colp [Mon, 6 Aug 2007 15:28:28 +0000 (15:28 +0000)]
Merged revisions 78172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78172 | file | 2007-08-06 12:27:24 -0300 (Mon, 06 Aug 2007) | 4 lines

(closes issue #10355)
Reported by: wdecarne
Now that we pass through RTP timestamp information we need to make the allowed timestamp skew considerably less. There are situations where a source may change and due to the timestamp difference the receiver will experience an audio gap since we did not indicate by setting the marker bit that the source changed.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78173 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years ago(closes issue #10381)
Joshua Colp [Mon, 6 Aug 2007 14:37:52 +0000 (14:37 +0000)]
(closes issue #10381)
Reported by: yehavi
Use the filename we parsed using the standard parsing when launching the application specified to ExternalIVR.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78168 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78166 via svnmerge from
Joshua Colp [Mon, 6 Aug 2007 14:20:04 +0000 (14:20 +0000)]
Merged revisions 78166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78166 | file | 2007-08-06 11:18:20 -0300 (Mon, 06 Aug 2007) | 4 lines

(closes issue #10383)
Reported by: rizzo
Include stdlib.h so NULL gets defined for gethostbyname_r checks.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78167 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoBlocked revisions 78146 via svnmerge
Tilghman Lesher [Sun, 5 Aug 2007 14:19:19 +0000 (14:19 +0000)]
Blocked revisions 78146 via svnmerge

........
r78146 | tilghman | 2007-08-05 09:18:00 -0500 (Sun, 05 Aug 2007) | 2 lines

Portability fix for devmode compiling (closes bug #10382)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78147 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78143 via svnmerge from
Russell Bryant [Sun, 5 Aug 2007 04:16:43 +0000 (04:16 +0000)]
Merged revisions 78143 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78143 | russell | 2007-08-04 23:15:31 -0500 (Sat, 04 Aug 2007) | 2 lines

Fix compilation failure when MALLOC_DEBUG is enabled, but DEBUG_THREADS is not

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78144 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMake this module build on my mac
Russell Bryant [Sun, 5 Aug 2007 04:01:28 +0000 (04:01 +0000)]
Make this module build on my mac

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78142 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78139 via svnmerge from
Tilghman Lesher [Sun, 5 Aug 2007 03:42:35 +0000 (03:42 +0000)]
Merged revisions 78139 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78139 | tilghman | 2007-08-04 22:29:01 -0500 (Sat, 04 Aug 2007) | 2 lines

If peer is not found, the error message is misleading (should be peer not found, not ACL failure)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix building res_crypto on systems that init locks with constructors.
Russell Bryant [Sun, 5 Aug 2007 03:14:24 +0000 (03:14 +0000)]
Fix building res_crypto on systems that init locks with constructors.

The problem was that res_crypto now has a RWLIST named "keys".  The macro
for defining this list defines a function used as a constructor for the list
called "init_keys".  However, there was another function called init_keys in
this module for a CLI command.  The fix is just to prepend the generated
functions with underscores.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78138 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78101 via svnmerge from
Russell Bryant [Fri, 3 Aug 2007 20:21:41 +0000 (20:21 +0000)]
Merged revisions 78101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78101 | russell | 2007-08-03 15:14:06 -0500 (Fri, 03 Aug 2007) | 10 lines

(closes issue #10194)
Reported by: blitzrage
Patches:
      bug0010194 uploaded by vovochka
Tested by: blitzrage

Fix a problem when you call Voicemail() with multiple mailboxes specified and
ODBC_STORAGE is in use.  The audio part of the message was only given to the
first mailbox specified.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78102 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78095 via svnmerge from
Russell Bryant [Fri, 3 Aug 2007 19:41:42 +0000 (19:41 +0000)]
Merged revisions 78095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78095 | russell | 2007-08-03 14:39:49 -0500 (Fri, 03 Aug 2007) | 28 lines

Add some improvements to lock debugging.  These changes take effect
with DEBUG_THREADS enabled and provide the following:

 * This will keep track of which locks are held by which thread as well as
   which lock a thread is waiting for in a thread-local data structure.  A
   reference to this structure is available on the stack in the dummy_start()
   function, which is the common entry point for all threads.  This information
   can be easily retrieved using gdb if you switch to the dummy_start() stack
   frame of any thread and print the contents of the lock_info variable.

 * All of the thread-local structures for keeping track of this lock information
   are also stored in a list so that the information can be dumped to the CLI
   using the "core show locks" CLI command.  This introduces a little bit of a
   performance hit as it requires additional underlying locking operations
   inside of every lock/unlock on an ast_mutex.  However, the benefits of
   having this information available at the CLI is huge, especially considering
   this is only done in DEBUG_THREADS mode.  It means that in most cases where
   we debug deadlocks, we no longer have to request access to the machine to
   analyze the contents of ast_mutex_t structures.  We can now just ask them
   to get the output of "core show locks", which gives us all of the information
   we needed in most cases.

I also had to make some additional changes to astmm.c to make this work when
both MALLOC_DEBUG and DEBUG_THREADS are enabled.  I disabled tracking of one
of the locks in astmm.c because it gets used inside the replacement memory
allocation routines, and the lock tracking code allocates memory.  This caused
infinite recursion.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78063 via svnmerge from
Russell Bryant [Fri, 3 Aug 2007 17:02:00 +0000 (17:02 +0000)]
Merged revisions 78063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78063 | russell | 2007-08-03 12:01:07 -0500 (Fri, 03 Aug 2007) | 4 lines

Only pass through HOLD and UNHOLD control frames when the mohinterpret option
is set to "passthrough".  This was pointed out by Kevin in the middle of a
training session.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78064 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 78028 via svnmerge from
Russell Bryant [Fri, 3 Aug 2007 02:05:02 +0000 (02:05 +0000)]
Merged revisions 78028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78028 | russell | 2007-08-02 21:04:22 -0500 (Thu, 02 Aug 2007) | 6 lines

Don't reuse the timespec that was set to 0 in the previous timedwait as it
will just return immediately.  Also, fix some logic so the thread's lock
isn't unlocked twice in the weird case of dynamic threads getting acquired
right after a timeout.
(pointed out by SteveK)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78029 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77996 via svnmerge from
Jason Parker [Thu, 2 Aug 2007 21:54:54 +0000 (21:54 +0000)]
Merged revisions 77996 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #9779)
........
r77996 | qwell | 2007-08-02 16:53:39 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure we actually allow 6 chars to be sent.
Also make note of the "A" option of date format.

Issue 9779, modifications by DEA, wedhorn, and myself.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77997 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77993 via svnmerge from
Jason Parker [Thu, 2 Aug 2007 20:23:20 +0000 (20:23 +0000)]
Merged revisions 77993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10325)
........
r77993 | qwell | 2007-08-02 15:22:40 -0500 (Thu, 02 Aug 2007) | 5 lines

If a device disconnects, the session will go away.
If this happens during call setup, we need to give up.

Issue 10325.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77994 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77949 via svnmerge from
Russell Bryant [Thu, 2 Aug 2007 19:26:12 +0000 (19:26 +0000)]
Merged revisions 77949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77949 | russell | 2007-08-02 14:25:14 -0500 (Thu, 02 Aug 2007) | 5 lines

Fix the case where a dynamic thread times out waiting for something to do
during the first time it runs.  This shouldn't ever happen, but we should
account for it anyway.
(pointed out by pete, who works with mihai)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77950 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77947 via svnmerge from
Jason Parker [Thu, 2 Aug 2007 18:43:29 +0000 (18:43 +0000)]
Merged revisions 77947 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10299)
........
r77947 | qwell | 2007-08-02 13:42:36 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure we clear the prompt status message on a hangup.
Also rearrange messages to better fit with what a wireshark trace shows it should be.

Issue 10299, initial patch and solution by sbisker, modified by me to fit with wireshark trace.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77948 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77945 via svnmerge from
Steve Murphy [Thu, 2 Aug 2007 18:32:34 +0000 (18:32 +0000)]
Merged revisions 77945 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r77945 | murf | 2007-08-02 12:21:40 -0600 (Thu, 02 Aug 2007) | 9 lines

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

........
r77942 | murf | 2007-08-02 11:56:37 -0600 (Thu, 02 Aug 2007) | 1 line

This patch hopefully solves 10141; The user is running with it, and it doesn't appear to harm asterisk's operation, and may prevent a crash. I'll store it in 1.2, as we have shut down support on 1.2, but since I developed the patch before support finished, and it might affect 1.4 and trunk, I'm going ahead with it.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77946 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77943 via svnmerge from
Russell Bryant [Thu, 2 Aug 2007 18:05:23 +0000 (18:05 +0000)]
Merged revisions 77943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77943 | russell | 2007-08-02 13:04:43 -0500 (Thu, 02 Aug 2007) | 9 lines

Fix another race condition in the handling of dynamic threads.  If the dynamic
thread timed out waiting for something to do, but was acquired to perform an
action immediately afterwords, then wait on the condition again to give the
other thread a chance to finish setting up the data for what action this thread
should perform.  Otherwise, if it immediately continues, it will perform the
wrong action.
(reported on IRC by mihai, patch by me)
(related to issue #10289)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix an issue that Simon pointed out to me on IRC. There were cases in the
Russell Bryant [Thu, 2 Aug 2007 17:09:42 +0000 (17:09 +0000)]
Fix an issue that Simon pointed out to me on IRC.  There were cases in the
trunk version of find_idle_thread() where the old full frame processing
information was not cleared out.  This would have caused full frames to get
deferred for processing by threads that weren't actually processing frames for
that call.  Nice catch!!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77941 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77939 via svnmerge from
Russell Bryant [Thu, 2 Aug 2007 16:58:26 +0000 (16:58 +0000)]
Merged revisions 77939 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77939 | russell | 2007-08-02 11:56:04 -0500 (Thu, 02 Aug 2007) | 4 lines

Add another sanity check to vnak_retransmit().  This check ensures that frames
that have already been marked for deletion don't get retransmitted.
(closes issue #10361, patch from mihai)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77940 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77894 via svnmerge from
Jason Parker [Thu, 2 Aug 2007 15:16:53 +0000 (15:16 +0000)]
Merged revisions 77894 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10358)
........
r77894 | qwell | 2007-08-02 10:15:45 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure that we show the correct extension if dialed from a macro
"From: 5555" rather than "From: s"

Issue 10358, initial patch by DEA, reworked by me to use S_OR, tested by sbisker

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77895 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77890 via svnmerge from
Jason Parker [Wed, 1 Aug 2007 22:31:07 +0000 (22:31 +0000)]
Merged revisions 77890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10291)
........
r77890 | qwell | 2007-08-01 17:28:56 -0500 (Wed, 01 Aug 2007) | 4 lines

Put in some additional debug information for softkey/stimulus messages.

Issue 10291, patch by DEA.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77891 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77887 via svnmerge from
Russell Bryant [Wed, 1 Aug 2007 22:24:23 +0000 (22:24 +0000)]
Merged revisions 77887 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77887 | russell | 2007-08-01 17:16:17 -0500 (Wed, 01 Aug 2007) | 23 lines

Fix some race conditions which have been causing weird problems in chan_iax2.
The most notable problem is that people have been seeing storms of VNAK frames
being sent due to really old frames mysteriously being in the retransmission
queue and never getting removed.

It was possible that a dynamic thread got created, but did not acquire its lock
before the thread that created it signals it to perform an action.  When this
happens, the thread will sleep until it hits a timeout, and then get destroyed.
So, the action never gets performed and in some cases, means a frame doesn't
get transmitted and never gets freed since the scheduler never gets a chance
to reschedule transmission.

Another less severe race condition is in the handling of a timeout for a dynamic
thread.  It was possible for it to be acquired to perform at action at the same
time that it hit a timeout.  When this occurs, whatever action it was acquired
for would never get performed.

(patch contributed by Mihai and SteveK)
(closes issue #10289)
(closes issue #10248)
(closes issue #10232)
(possibly related to issue #10359)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77889 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77886 via svnmerge from
Tilghman Lesher [Wed, 1 Aug 2007 22:19:34 +0000 (22:19 +0000)]
Merged revisions 77886 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77886 | tilghman | 2007-08-01 17:14:47 -0500 (Wed, 01 Aug 2007) | 2 lines

Voicemail with ODBC_STORAGE defined does not compile cleanly (missing def)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77888 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77883 via svnmerge from
Jason Parker [Wed, 1 Aug 2007 21:12:02 +0000 (21:12 +0000)]
Merged revisions 77883 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77883 | qwell | 2007-08-01 16:08:42 -0500 (Wed, 01 Aug 2007) | 7 lines

Fix an issue that caused one-way audio on some newer devices (specifically the 7921),
 due to sending packets in the wrong order during hangup.

Also make sure we clear tones/messages on the correct line/instance.

Issue 10291, patch by DEA, tested by sbisker and myself.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd the Ring time in the CONNECT on the queue_log and on the Manager event AgentConnect
Jason Parker [Wed, 1 Aug 2007 20:05:13 +0000 (20:05 +0000)]
Add the Ring time in the CONNECT on the queue_log and on the Manager event AgentConnect

Closes issue #10349, patch by eliel

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77879 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoInstead of adding the SOLARIS check to each HAVE_SYSINFO check let's just make the...
Joshua Colp [Wed, 1 Aug 2007 19:37:59 +0000 (19:37 +0000)]
Instead of adding the SOLARIS check to each HAVE_SYSINFO check let's just make the sysinfo autoconf logic a bit pickier about what it considers a usable sysinfo.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77878 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoSolaris does not have a sysinfo like we know of on Linux.
Joshua Colp [Wed, 1 Aug 2007 19:12:36 +0000 (19:12 +0000)]
Solaris does not have a sysinfo like we know of on Linux.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77876 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDon't look for /dev/urandom when cross compiling. Just assume it is not available.
Joshua Colp [Wed, 1 Aug 2007 18:56:31 +0000 (18:56 +0000)]
Don't look for /dev/urandom when cross compiling. Just assume it is not available.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77875 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoBlocked revisions 77871 via svnmerge
Joshua Colp [Wed, 1 Aug 2007 18:10:25 +0000 (18:10 +0000)]
Blocked revisions 77871 via svnmerge

........
r77871 | file | 2007-08-01 15:08:51 -0300 (Wed, 01 Aug 2007) | 4 lines

(closes issue #10351)
Reported by: ftarz
Some platforms don't like it when you pass NULL to vsnprintf so pass "" instead.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77872 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77869 via svnmerge from
Joshua Colp [Wed, 1 Aug 2007 18:01:33 +0000 (18:01 +0000)]
Merged revisions 77869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines

Add some fixes for building on Solaris.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77870 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77867 via svnmerge from
Joshua Colp [Wed, 1 Aug 2007 17:53:09 +0000 (17:53 +0000)]
Merged revisions 77867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77867 | file | 2007-08-01 14:52:11 -0300 (Wed, 01 Aug 2007) | 2 lines

Whoops, I meant R_5 not R5.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77868 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77865 via svnmerge from
Joshua Colp [Wed, 1 Aug 2007 17:47:05 +0000 (17:47 +0000)]
Merged revisions 77865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77865 | file | 2007-08-01 14:42:52 -0300 (Wed, 01 Aug 2007) | 2 lines

And for my last trick... make sure that if gethostbyname_r is exported by a library that it is used.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77866 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77863 via svnmerge from
Joshua Colp [Wed, 1 Aug 2007 17:27:09 +0000 (17:27 +0000)]
Merged revisions 77863 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77863 | file | 2007-08-01 14:22:35 -0300 (Wed, 01 Aug 2007) | 2 lines

Extend autoconf logic to determine which version of gethostbyname_r is on the system.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77864 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoConvert code that checks the _softhangup member of ast_channel directory to use
Russell Bryant [Wed, 1 Aug 2007 15:39:54 +0000 (15:39 +0000)]
Convert code that checks the _softhangup member of ast_channel directory to use
the ast_check_hangup() funciton.  This function takes scheduled hangups into
account.
(closes issue #10230, patch by Juggie)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77858 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoConvert CLI helpers list to rwlist.
Joshua Colp [Wed, 1 Aug 2007 15:28:02 +0000 (15:28 +0000)]
Convert CLI helpers list to rwlist.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77857 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77854 via svnmerge from
Mark Michelson [Wed, 1 Aug 2007 14:09:45 +0000 (14:09 +0000)]
Merged revisions 77854 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77854 | mmichelson | 2007-08-01 09:08:57 -0500 (Wed, 01 Aug 2007) | 8 lines

Fixes an issue I introduced to queues wherein a queue with joinempty=yes would kick people out of the queue because of erroneously
thinking the 'n' option was in use.

(closes issue #10320, reported by jfitzgibbon, patched by me, tested by blitzrage and me)

Thank you blitzrage for all the testing you've done lately with queues! It's much appreciated!

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77855 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77852 via svnmerge from
Mark Michelson [Wed, 1 Aug 2007 14:02:19 +0000 (14:02 +0000)]
Merged revisions 77852 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77852 | mmichelson | 2007-08-01 08:59:59 -0500 (Wed, 01 Aug 2007) | 7 lines

If a queue uses dynamic realtime members, then the member list should be updated after each attempt to call the queue.
This fixes an issue where if a caller calls into a queue where no one is logged in, they would wait forever even if a member
logged in at some point.

(closes issue #10346, reported by and tested by blitzrage, patched by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77853 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoTwould help if we actually defined ->mod before comparing against it (reported and...
Tilghman Lesher [Wed, 1 Aug 2007 04:36:15 +0000 (04:36 +0000)]
Twould help if we actually defined ->mod before comparing against it (reported and fixed by Juggie via IRC).

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77851 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77844 via svnmerge from
Steve Murphy [Tue, 31 Jul 2007 21:33:37 +0000 (21:33 +0000)]
Merged revisions 77844 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r77844 | murf | 2007-07-31 14:59:10 -0600 (Tue, 31 Jul 2007) | 9 lines

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

........
r77842 | murf | 2007-07-31 13:19:35 -0600 (Tue, 31 Jul 2007) | 1 line

This probably isn't super-general, but it's a first stab at using kill -11 to generate a core file instead of gcore.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77847 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd some documentation detailing an aspect of dialplan functions, as requested by...
Tilghman Lesher [Tue, 31 Jul 2007 18:50:06 +0000 (18:50 +0000)]
Add some documentation detailing an aspect of dialplan functions, as requested by Russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77838 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd func_lock, which creates dialplan mutexes, and note that the Macro apps are now...
Tilghman Lesher [Tue, 31 Jul 2007 16:44:25 +0000 (16:44 +0000)]
Add func_lock, which creates dialplan mutexes, and note that the Macro apps are now deprecated.
(Closes issue #10264)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77834 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77831 via svnmerge from
Joshua Colp [Tue, 31 Jul 2007 16:21:34 +0000 (16:21 +0000)]
Merged revisions 77831 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77831 | file | 2007-07-31 13:17:09 -0300 (Tue, 31 Jul 2007) | 2 lines

Add a flag to the speech API that allows an engine to set whether it received results or not.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77833 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agothanks to Russel, for pointing out that the dialoglist_lock/unlock routines also...
Steve Murphy [Tue, 31 Jul 2007 15:59:01 +0000 (15:59 +0000)]
thanks to Russel, for pointing out that the dialoglist_lock/unlock routines also need to be macros if DETECT_DEADLOCKS is set

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77829 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77827 via svnmerge from
Kevin P. Fleming [Tue, 31 Jul 2007 15:54:29 +0000 (15:54 +0000)]
Merged revisions 77827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77827 | kpfleming | 2007-07-31 10:53:42 -0500 (Tue, 31 Jul 2007) | 2 lines

DETECT_DEADLOCKS can't be enabled without DEBUG_THREADS or it does nothing

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77828 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77824 via svnmerge from
Mark Michelson [Tue, 31 Jul 2007 15:22:32 +0000 (15:22 +0000)]
Merged revisions 77824 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77824 | mmichelson | 2007-07-31 10:21:22 -0500 (Tue, 31 Jul 2007) | 6 lines

This patch makes Asterisk send 100 Trying provisional responses upon receipt of re-invites. This makes it so that if there are two or more Asterisk
servers between endpoints, the Asterisk servers will not keep retransmitting the re-invites.

(closes issue #10274, reported by cstadlmann, patched by me with approval from file)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77825 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agothere is no use in having functions that have no code in them, and hide the locking...
Kevin P. Fleming [Tue, 31 Jul 2007 15:01:27 +0000 (15:01 +0000)]
there is no use in having functions that have no code in them, and hide the locking info when DEBUG_THREADS is enabled... i could have fixed this to be dependent on DEBUG_THREADS, but it would be just as easy for someone to add their test/debugging code to the macros as it would have been to the functions

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77821 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agouse a different method for overriding the send_digit_begin pointer, as the old one...
Kevin P. Fleming [Tue, 31 Jul 2007 14:55:37 +0000 (14:55 +0000)]
use a different method for overriding the send_digit_begin pointer, as the old one fails to compile on my 64-bit system with gcc-4.1 and --enable-dev-mode turned on

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77820 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoumm... let's build with --enable-dev-mode, mmkay?
Kevin P. Fleming [Tue, 31 Jul 2007 14:54:46 +0000 (14:54 +0000)]
umm... let's build with --enable-dev-mode, mmkay?

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77819 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoDiscovered in experiments on core files: if you wrap the lock and unlock calls with...
Steve Murphy [Tue, 31 Jul 2007 03:32:04 +0000 (03:32 +0000)]
Discovered in experiments on core files: if you wrap the lock and unlock calls with sip_pvt_lock and sip_pvt_unlock, you lose the tracing info you would normally get via DETECT_DEADLOCKS; so I turn these two functions into macros when DETECT_DEADLOCKS is called. This way, you get meaningful stuff in the file and func slots in the lock_info struct.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77810 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMostly cleanup of documentation to substitute the pipe with the comma, but a few...
Tilghman Lesher [Tue, 31 Jul 2007 01:10:47 +0000 (01:10 +0000)]
Mostly cleanup of documentation to substitute the pipe with the comma, but a few other formatting cleanups, too.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAdd support for call forwarding and timeouts to the dialing API.
Joshua Colp [Mon, 30 Jul 2007 20:42:28 +0000 (20:42 +0000)]
Add support for call forwarding and timeouts to the dialing API.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77801 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoChange another unnecessary use of the increment operator to explicitly set the var...
Russell Bryant [Mon, 30 Jul 2007 20:36:18 +0000 (20:36 +0000)]
Change another unnecessary use of the increment operator to explicitly set the var to 1

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77800 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoExplicitly set a variable to 1 instead of using the increment operator.
Russell Bryant [Mon, 30 Jul 2007 20:33:44 +0000 (20:33 +0000)]
Explicitly set a variable to 1 instead of using the increment operator.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77799 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77794 via svnmerge from
Russell Bryant [Mon, 30 Jul 2007 20:21:05 +0000 (20:21 +0000)]
Merged revisions 77794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77794 | russell | 2007-07-30 15:16:43 -0500 (Mon, 30 Jul 2007) | 8 lines

Fix an issue that could potentially cause corruption of the global iax frame
queue.  In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro.  However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong.  :)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77797 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77795 via svnmerge from
Jason Parker [Mon, 30 Jul 2007 20:19:13 +0000 (20:19 +0000)]
Merged revisions 77795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10083)
........
r77795 | qwell | 2007-07-30 15:17:08 -0500 (Mon, 30 Jul 2007) | 6 lines

Applications like SayAlpha() should not hang up the channel if you
 request an "unknown" character such as a comma.
Instead, skip the character and move on.

Issue 10083, initial patch by jsmith, modified by me.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77796 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoprint formats as 0x%x instead of %d in a warning message.
Luigi Rizzo [Mon, 30 Jul 2007 19:42:25 +0000 (19:42 +0000)]
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

12 years agoFix the return value of ast_agi_fdprintf() to include the result from ast_carefulwrite()
Russell Bryant [Mon, 30 Jul 2007 19:39:52 +0000 (19:39 +0000)]
Fix the return value of ast_agi_fdprintf() to include the result from ast_carefulwrite()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77792 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoImprove ast_agi_fdprintf() by using the ast_str() API.
Russell Bryant [Mon, 30 Jul 2007 19:35:33 +0000 (19:35 +0000)]
Improve ast_agi_fdprintf() by using the ast_str() API.
 * Use a thread local ast_str for building the string that will be written out
   to the console for debug, and to the FD for the AGI itself, instead of allocating
   a buffer on the heap every time the function is called.
 * Use the information contained within the ast_str to determine how many bytes
   need to be written instead of calling strlen().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77791 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRemove an XXX comment noting that it would be nice for a declaration to be
Russell Bryant [Mon, 30 Jul 2007 19:31:27 +0000 (19:31 +0000)]
Remove an XXX comment noting that it would be nice for a declaration to be
inside of a function.  (Yes, it would!)  Replace it with a note that explains
why it can't be done using the way that the AST_THREADSTORAGE macro is
currently defined.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77790 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77788 via svnmerge from
Russell Bryant [Mon, 30 Jul 2007 19:18:24 +0000 (19:18 +0000)]
Merged revisions 77788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77788 | russell | 2007-07-30 14:13:31 -0500 (Mon, 30 Jul 2007) | 10 lines

(closes issue #10279)
Reported by: seanbright
Patches:
      res_agi.carefulwrite.1.4.07252007.patch uploaded by seanbright (license 71)
      res_agi.carefulwrite.trunk.07252007.patch uploaded by seanbright (license 71)

Allow the "agi_network: yes" line to be printed out in the AGI debug output.
Also, allow partial writes to be handled when writing out this line just like
it is for all of the others.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77789 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCleanup of res_agi, ensuring thread safety (closes issue #10288)
Tilghman Lesher [Mon, 30 Jul 2007 19:11:28 +0000 (19:11 +0000)]
Cleanup of res_agi, ensuring thread safety (closes issue #10288)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77787 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77785 via svnmerge from
Russell Bryant [Mon, 30 Jul 2007 18:56:29 +0000 (18:56 +0000)]
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

12 years agoMerged revisions 77783 via svnmerge from
Tilghman Lesher [Mon, 30 Jul 2007 18:45:09 +0000 (18:45 +0000)]
Merged revisions 77783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r77783 | tilghman | 2007-07-30 13:43:55 -0500 (Mon, 30 Jul 2007) | 10 lines

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

........
r77782 | tilghman | 2007-07-30 13:40:54 -0500 (Mon, 30 Jul 2007) | 2 lines

Revert change in revision 71656, even though it fixed a bug, because many people were depending upon the (broken) behavior.

........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77784 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77780 via svnmerge from
Russell Bryant [Mon, 30 Jul 2007 17:31:29 +0000 (17:31 +0000)]
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

12 years agoMerged revisions 77778 via svnmerge from
Joshua Colp [Mon, 30 Jul 2007 17:12:58 +0000 (17:12 +0000)]
Merged revisions 77778 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77778 | file | 2007-07-30 14:11:02 -0300 (Mon, 30 Jul 2007) | 4 lines

(closes issue #10327)
Reported by: kkiely
Instead of directly mucking with the extension/context/priority of the channel we are transferring when it has a PBX simply call ast_async_goto on it. This will ensure that the channel gets handled properly and sent to the right place.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77779 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMinor clean up of app_followme.
Joshua Colp [Mon, 30 Jul 2007 16:02:01 +0000 (16:02 +0000)]
Minor clean up of app_followme.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77773 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77771 via svnmerge from
Joshua Colp [Mon, 30 Jul 2007 15:49:30 +0000 (15:49 +0000)]
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

12 years agoResolve some compiler warnings so that I can build under dev mode
Russell Bryant [Mon, 30 Jul 2007 15:22:20 +0000 (15:22 +0000)]
Resolve some compiler warnings so that I can build under dev mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77770 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 77768 via svnmerge from
Joshua Colp [Mon, 30 Jul 2007 14:53:14 +0000 (14:53 +0000)]
Merged revisions 77768 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r77768 | file | 2007-07-30 11:51:44 -0300 (Mon, 30 Jul 2007) | 12 lines

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

........
r77767 | file | 2007-07-30 11:50:02 -0300 (Mon, 30 Jul 2007) | 4 lines

(closes issue #10334)
Reported by: ramonpeek
Pass through the return value from macro_exec through the MacroIf application.

........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77769 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agominor code rearrangements:
Luigi Rizzo [Mon, 30 Jul 2007 10:55:37 +0000 (10:55 +0000)]
minor code rearrangements:
+ place the link field at the beginning of struct sip_pvt,
  and not somewhere in the middle;

+ in __sip_reliable_xmit, remove a duplicate assignment, and
  put the statements in a more logical order (i.e. first copy
  the payload and associated info, then copy arguments from the
  caller, then finish initializing the headers...)

nothing to backport.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77766 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agorename handle_request() to handle_incoming(), as the former
Luigi Rizzo [Mon, 30 Jul 2007 08:07:00 +0000 (08:07 +0000)]
rename handle_request() to handle_incoming(), as the former
was misleading - the function deals with all incoming packets, be
them requests or responses.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77753 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomove some dialog-only flags to proper variables, namely
Luigi Rizzo [Sun, 29 Jul 2007 21:24:56 +0000 (21:24 +0000)]
move some dialog-only flags to proper variables, namely
SIP_NOVIDEO, SIP_DIALOG_ANSWEREDELSEWHERE, SIP_PAGE2_NOTEXT,
SIP_PAGE2_OUTGOING_CALL
These are seldom used so the diff is relatively small.

Note that 'OUTGOING_CALL' is dangerously similar to another
dialog flag, 'SIP_OUTGOING', so the description will need to
clarify the different meaning of the two.

Also note that the description of NOTEXT is a bit unclear - does
it mean we don't support it, or 'not requested or not supported' ?

On passing fix a comment referring to video instead of text.

Finally, mark with XXX a possibly misleading debugging message.
(maybe the latter is worth backporting).

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77739 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agouse a function, cli_yesno(), to produce the output Yes or No for
Luigi Rizzo [Sun, 29 Jul 2007 20:55:20 +0000 (20:55 +0000)]
use a function, cli_yesno(), to produce the output Yes or No for
CLI lines. This helps maintaining consistency on output, slightly
improves readability, and maybe one day will make it easier to
translate the output in other languages (though i have a hard time
believing that a CLI user who needs 'yes' and 'no' to be translated
can actually figure out what he/she is doing!)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77726 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomove the two remaining peer flags to proper variables.
Luigi Rizzo [Sun, 29 Jul 2007 20:28:02 +0000 (20:28 +0000)]
move the two remaining peer flags to proper variables.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77725 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomove RT_FROMCONTACT to a proper sip_peer field.
Luigi Rizzo [Sun, 29 Jul 2007 20:13:32 +0000 (20:13 +0000)]
move RT_FROMCONTACT to a proper sip_peer field.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77712 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMove some global 'flags' to individual variables.
Luigi Rizzo [Sun, 29 Jul 2007 20:01:36 +0000 (20:01 +0000)]
Move some global 'flags' to individual variables.

Start putting these variables in a single struct (called 'sip_cfg' for the time
being, but it could as well be 'global' or some other name) so it
is easy, when reading the code, to figure out what they are for.

The downside of using struct fields instead of individual global
variables is that the compiler cannot tell if there are unused fields.
But the advantage of not cluttering the namespace and manilpulating
all these variables at once certainly overcome the disadvantagess.

Nothing to backport, again.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77711 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agominor simplification of a conditional statement
Luigi Rizzo [Sun, 29 Jul 2007 10:49:32 +0000 (10:49 +0000)]
minor simplification of a conditional statement

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77697 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agobuild the version of sip_tech with no send_digit_begin
Luigi Rizzo [Sun, 29 Jul 2007 10:13:14 +0000 (10:13 +0000)]
build the version of sip_tech with no send_digit_begin
at load time instead of duplicating the initializer.
This should remove the risk of forgetting fields in the
initializer.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77684 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoremove bit position from description of SIP_* flags.
Luigi Rizzo [Sun, 29 Jul 2007 09:27:30 +0000 (09:27 +0000)]
remove bit position from description of SIP_* flags.

use AST_FORMAT_AUDIO_MASK instead of playing with AST_FORMAT_MAX_AUDIO
to determine audio formats.
There is a dubious use of AST_FORMAT_MAX_AUDIO in sip_request_call()
which surely needs fixing, namely:

        /* mask request with some set of allowed formats.
         * XXX this needs to be fixed.
         * The original code uses AST_FORMAT_AUDIO_MASK, but it is
         * unclear what to use here. We have global_capabilities, which is
         * configured from sip.conf, and sip_tech.capabilities, which is
         * hardwired to all audio formats.
         */

The latter is possibly something to backport when fixed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77682 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoback on cleaning up the usage of flags.
Luigi Rizzo [Sun, 29 Jul 2007 08:58:10 +0000 (08:58 +0000)]
back on cleaning up the usage of flags.
Move together flags used in the same way (e.g. dialog only,
dialog-peer, ...) so it will become easier to deal with them
in a more systematic way.
This is being done in stages so it will be easier to detect
breakage, if any should occur.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77669 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomore documentation on internal representation of incoming SIP messages.
Luigi Rizzo [Sun, 29 Jul 2007 08:19:19 +0000 (08:19 +0000)]
more documentation on internal representation of incoming SIP messages.

Remove definitions for now-unused flags, and add references to print
routines for other flags.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77668 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomake register_unref() return NULL so it is easy to cleanup
Luigi Rizzo [Sun, 29 Jul 2007 00:06:35 +0000 (00:06 +0000)]
make register_unref() return NULL so it is easy to cleanup
the original pointer while calling the function.

on passing add some comments on one of the places where it
is used, and explain why it is safe there.

again, a no-op for practical purposes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77654 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoadd some documentation to auto_congest(), and some
Luigi Rizzo [Sat, 28 Jul 2007 23:43:35 +0000 (23:43 +0000)]
add some documentation to auto_congest(), and some
dialog_ref/unref (they are a no-op at the moment).
Also clean a pointer after freeing memory to avoid
dangling references, and write a for() loop in canonical form.

In practice, everything in this commit is a no-op.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77653 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomore dialog_ref()/dialog_unref() calls
Luigi Rizzo [Sat, 28 Jul 2007 17:16:24 +0000 (17:16 +0000)]
more dialog_ref()/dialog_unref() calls

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77650 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomore dialog_ref()/dialog_unref() calls
Luigi Rizzo [Sat, 28 Jul 2007 16:38:07 +0000 (16:38 +0000)]
more dialog_ref()/dialog_unref() calls

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77648 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agostart introducing hooks for reference counts on dialog descriptors.
Luigi Rizzo [Sat, 28 Jul 2007 16:25:25 +0000 (16:25 +0000)]
start introducing hooks for reference counts on dialog descriptors.
This commit is, for all practical purposes, a no-op, as it only
introduces the dialog_ref() and dialog_unref() methods, and uses them
in a few places (not all the places where they would be needed).

The goal is to start annotating the code with these calls, so the transition
to a proper container will be easier.

Nothing to backport.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77647 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoremove an unused string
Luigi Rizzo [Sat, 28 Jul 2007 09:32:10 +0000 (09:32 +0000)]
remove an unused string

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77631 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agosimplify a conditional expression using S_OR
Luigi Rizzo [Sat, 28 Jul 2007 09:29:22 +0000 (09:29 +0000)]
simplify a conditional expression using S_OR

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77630 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agomake use of received= and rport= fields in sip replies.
Luigi Rizzo [Sat, 28 Jul 2007 07:44:16 +0000 (07:44 +0000)]
make use of received= and rport= fields in sip replies.

In a nutshell, these fields are used to tell a sip entity
the address and port its request came from, and are extremely
useful in the presence of NATs, especially with symmetric NATs
where STUN is totally ineffective.

This patch stores the address and port in the 'ourip' field of
the dialog descriptor, so they can be reused in subsequent transactions.
As it is, it works well for things like REGISTER requiring authentication,
because the second REGISTER request (with auth credentials) will carry
the correct address. Maybe it can also be useful, in case of an address
change, to do one or both of the following:

+ propagate the new address to the parent user/peer descriptor so that new
  dialogs will use the correct address from the beginning.
  This is trivial to implement, I am just waiting for feedback on this.

+ re-issue a request in case of an address change. This a lot less trivial,
  maybe unnecessary, and probably covered by the previous item.

I would seriously consider this patch for addition to 1.4 and 1.2.
The code is very little intrusive, and it would solve in a correct
way the nat traversal problems for which externip/externaddr/stunaddr
are only a partial and expensive workaround.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77616 65c4cc65-6c06-0410-ace0-fbb531ad65f3