Commit Graph

12570 Commits

Author SHA1 Message Date
Steve Murphy 134d16b3d3 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
2007-07-31 21:33:37 +00:00
Tilghman Lesher 3257acb922 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
2007-07-31 18:50:06 +00:00
Tilghman Lesher ce26bea24a 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
2007-07-31 16:44:25 +00:00
Joshua Colp 1d07328918 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
2007-07-31 16:21:34 +00:00
Steve Murphy 35499c7f40 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
2007-07-31 15:59:01 +00:00
Kevin P. Fleming 5610bc06ea 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
2007-07-31 15:54:29 +00:00
Mark Michelson 768724f5e6 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
2007-07-31 15:22:32 +00:00
Kevin P. Fleming f35541734a 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
2007-07-31 15:01:27 +00:00
Kevin P. Fleming b2eb99bb47 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
2007-07-31 14:55:37 +00:00
Kevin P. Fleming 354b6dcf41 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
2007-07-31 14:54:46 +00:00
Steve Murphy 2cad4fea1a 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
2007-07-31 03:32:04 +00:00
Tilghman Lesher 20bbd09de3 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
2007-07-31 01:10:47 +00:00
Joshua Colp 3aaf122439 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
2007-07-30 20:42:28 +00:00
Russell Bryant 3ca4126887 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
2007-07-30 20:36:18 +00:00
Russell Bryant 3b49339387 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
2007-07-30 20:33:44 +00:00
Russell Bryant a27203a5bc 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
2007-07-30 20:21:05 +00:00
Jason Parker fc0ea46f04 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
2007-07-30 20:19:13 +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 048bb3d9e3 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
2007-07-30 19:39:52 +00:00
Russell Bryant 38bb9400de 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
2007-07-30 19:35:33 +00:00
Russell Bryant 06f618a1ca 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
2007-07-30 19:31:27 +00:00
Russell Bryant 935982d15b 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
2007-07-30 19:18:24 +00:00
Tilghman Lesher 059a7aa862 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
2007-07-30 19:11:28 +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
Tilghman Lesher 67bd05d9d1 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
2007-07-30 18:45:09 +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 9d2d0e3896 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
2007-07-30 17:12:58 +00:00
Joshua Colp 6e771511da Minor clean up of app_followme.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 16:02:01 +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
Russell Bryant 9d959a040e 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
2007-07-30 15:22:20 +00:00
Joshua Colp 94bef1a256 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
2007-07-30 14:53:14 +00:00
Luigi Rizzo b20ab775d5 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
2007-07-30 10:55:37 +00:00
Luigi Rizzo adc28d1e1c 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
2007-07-30 08:07:00 +00:00
Luigi Rizzo 6fe18e2403 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
2007-07-29 21:24:56 +00:00
Luigi Rizzo 597421be86 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
2007-07-29 20:55:20 +00:00
Luigi Rizzo 89f44c573e 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
2007-07-29 20:28:02 +00:00
Luigi Rizzo db10bcc41a 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
2007-07-29 20:13:32 +00:00
Luigi Rizzo fd2f3a20bc 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
2007-07-29 20:01:36 +00:00
Luigi Rizzo 5e35eab5a2 minor simplification of a conditional statement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29 10:49:32 +00:00
Luigi Rizzo c19549820e 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
2007-07-29 10:13:14 +00:00
Luigi Rizzo e5f3a6ccdb 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
2007-07-29 09:27:30 +00:00
Luigi Rizzo 692e1fe0c4 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
2007-07-29 08:58:10 +00:00
Luigi Rizzo b5c5227804 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
2007-07-29 08:19:19 +00:00
Luigi Rizzo 5ca87effb7 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
2007-07-29 00:06:35 +00:00
Luigi Rizzo 9f165b444a 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
2007-07-28 23:43:35 +00:00
Luigi Rizzo a6e169c09a more dialog_ref()/dialog_unref() calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 17:16:24 +00:00
Luigi Rizzo 5dcfd811d7 more dialog_ref()/dialog_unref() calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 16:38:07 +00:00
Luigi Rizzo d480266797 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
2007-07-28 16:25:25 +00:00
Luigi Rizzo df75ae2285 remove an unused string
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 09:32:10 +00:00
Luigi Rizzo 800e1a6a03 simplify a conditional expression using S_OR
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28 09:29:22 +00:00