Commit Graph

487 Commits

Author SHA1 Message Date
Kevin P. Fleming 89c41e2403 Merged revisions 48525 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48525 | kpfleming | 2006-12-16 15:14:34 -0600 (Sat, 16 Dec 2006) | 2 lines

simplify dependency tracking system, using the compiler's built-in method for generating them, and only doing dependency tracking if developer mode is enabled via the configure script

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 21:24:52 +00:00
Kevin P. Fleming 018a9c86e4 Merged revisions 48521 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48521 | kpfleming | 2006-12-16 14:12:41 -0600 (Sat, 16 Dec 2006) | 2 lines

since we really, really have to have autoconfig.h included before all other headers (especially system headers), the Makefile will now force it to happen (this will fix build problems with files like ast_expr2f.c, where we can't control the inclusion order in the file itself)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 20:19:19 +00:00
Luigi Rizzo 2703a1a9df forgot this part...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 11:23:07 +00:00
Luigi Rizzo 97ce2f8fd8 another conversion from ast_build_str to ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:56:31 +00:00
Luigi Rizzo c1220dd27e convert ast_build_str to ast_str_*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:46:20 +00:00
Luigi Rizzo 20b382cfff replace ast_build_string() with ast_str_*() functions.
This makes the code easier to follow and saves some
copies to intermediate buffers.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:33:31 +00:00
Luigi Rizzo 055abfe9d9 simplify the ast_dynamic_str_*.... routines by
renaming them to ast_str ... and putting the
struct ast_threadstorage pointer into the struct ast_str.

This makes the code a lot more readable.

At this point we can use these routines also to
replace ast_build_string().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 23:10:42 +00:00
Luigi Rizzo 961754d4b1 move the dynamic string support in a better place i.e. string.h
While doing this, add a bit of documentation, and slightly
extend the functionality as follows:
 + a max_len of -1 means that we take whatever the current size
   is, and never try to extend the buffer;
 + add support for alloca()-ted dynamic strings, which is very
   useful for all cases where we do an ast_build_string() now.

Next step is to simplify the interface by using shorter names
(e.g. ast_str as a prefix) and removing the _thread variant
of the functions by saving the threadstorage reference into
the struct ast_str. This can be done by overloading the
'type' field.

Finally, I will do my best to remove the convoluted interface
that results from trying to support platforms without va_copy().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 22:08:46 +00:00
Joshua Colp 915647d267 Merged revisions 48506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48506 | file | 2006-12-15 14:55:28 -0500 (Fri, 15 Dec 2006) | 2 lines

Turn payload_lock into bridge_lock and make it encompass all RTP structure contents that may relate to bridge information, including who we are bridged to.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 19:57:04 +00:00
Luigi Rizzo 4e427d84bd unbreak the output for http session.
Not long ago i replaced lseek() with fseek() but
forgot that filr FILE's you need ftell to
give you the current position.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 18:37:29 +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
Olle Johansson 0722c9ae77 Doxygen changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 13:36:34 +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
Luigi Rizzo 5ba11f9855 remove the macro LOAD_OH and expand it inline in the only
place where it was used.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 03:59:31 +00:00
Joshua Colp f6649ae0af Merged revisions 48472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48472 | file | 2006-12-14 12:36:12 -0500 (Thu, 14 Dec 2006) | 2 lines

Payload values on the RTP structure can change AFTER a bridge has started. This comes from the packet handling of the SIP response when indication that it was answered has been sent. Therefore we need to protect this data with a lock when we read/write. (issue #8232 reported by tgrman)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 17:39:16 +00:00
Joshua Colp 1c4c365377 Merged revisions 48461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48461 | file | 2006-12-13 22:33:30 -0500 (Wed, 13 Dec 2006) | 2 lines

Remove direct RTCP bridging. I've come to the conclusion that we should handle this through the core and not just forward it on. Should solve a few bugs.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 03:39:39 +00:00
Luigi Rizzo dd9d56b4c3 make sure that showdialplan sends only one
'Response: Success ' message even in case of
a recursive call.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-13 23:08:02 +00:00
Luigi Rizzo efbfd6ce65 clean up function manager_show_dialplan_helper()
reducing indentation and normalizing loops.

While doing this, remove some unused variables,
fix an uninitialized string (idaction), and mark
some places where the behaviour is not what we would expect
(e.g. an empty context is reported as an error same as
a non-existent one). Given that this function is
not in 1.4, the above can be changed without too many
backward compatibility concerns.

Not applicable to 1.4 or below.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-13 22:54:41 +00:00
Luigi Rizzo 77e986e0d0 properly initialize a malloc'ed buffer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-12 10:36:15 +00:00
Luigi Rizzo 1b45dc4eee normalize the scanning of "general" options in the config file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-12 10:35:10 +00:00
Luigi Rizzo 33cbc5e55e Make sure tab-completion works even when we have typed a fully
matching word (e.g. "sip<TAB>"); this is implemented by this one-line change

-               for (;; dst++, src += n) {
+               for (;src < argindex; dst++, src += n) {

However this code is not exactly trivial to understand, so
i am also adding some comments to help figuring out what it does.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-12 09:40:45 +00:00
Luigi Rizzo f6c706c71b make sure the argument to ast_malloc() is > 0.
Long explaination:

The behaviour of the underlying malloc(0) differs depending on the
operating system.  Some return NULL (SysV behaviour); some still
allocate a small chunk of memory and return a valid pointer (e.g.
traditional BSD); some (e.g. FreeBSD 6.x) return a non-null pointer
that causes a memory fault if used, even just for reading.

Given the above variety, better never call malloc(0).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 18:11:58 +00:00
Steve Murphy 2c332f0200 This update fixes the problem reported in bug 8551; that ast_app_getdata() behaves differently in trunk for the case of a null prompt.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 17:00:36 +00:00
Joshua Colp c3052f7a7e Merged revisions 48381 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48381 | file | 2006-12-11 00:36:45 -0500 (Mon, 11 Dec 2006) | 2 lines

Merge in my latest RTP changes. Break out RTP and RTCP callback functions so they no longer share a common one.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 05:38:57 +00:00
Luigi Rizzo 437f4288cd - Generalize the function ssl_setup() so that the certificate info
are passed as an argument.

- Update the code in main/http.c to use the new interface
  (the diff is large but mostly mechanical, due to the name change of
  several variables);

- And since now it is trivial, implement "AMI over TLS", and document
  the possible options in manager.conf

- And since the test client (openssl s_client -connect host:port )
  does not generate \r\n as a line terminator, make get_input()
  also accept just a \n as a line terminator (Mac users: do you
  also need the \r-only version ?)
 
The option parsing in manager.conf is not very efficient, and needs
to be cleaned up and made similar to what we have in http.conf



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-07 16:42:29 +00:00
Steve Murphy cb5e37e56c Merged revisions 47986,47995,47997,48001,48003-48004,48008-48014,48016,48018-48019 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r47986 | oej | 2006-11-24 07:00:19 -0700 (Fri, 24 Nov 2006) | 6 lines

Doxygen update
- Document cause codes
- Document a bit more on channel variables - global, predefined and local
- Fix some doxygen in channel.h. Adding one comment for two definitions does not
  work. They won't be copied to each.

................
r47995 | murf | 2006-11-24 10:40:49 -0700 (Fri, 24 Nov 2006) | 1 line

This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
................
r47997 | murf | 2006-11-24 11:17:25 -0700 (Fri, 24 Nov 2006) | 1 line

removed the svnmerge-integrated property from trunk; it's confusing svnmerge in newly created branches
................
r48001 | rizzo | 2006-11-25 02:02:42 -0700 (Sat, 25 Nov 2006) | 5 lines

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.


................
r48003 | oej | 2006-11-25 02:45:57 -0700 (Sat, 25 Nov 2006) | 9 lines

- Adding comment on suspicious memory allocation. Seems like it's never freed, but I don't
  have a clear understanding of the frame allocation/deallocation, so I just mark this
  for investigation. (Reported by Ed Guy). We're trying to see if a free() hurts...

- Doxygen comments on p2p rtp bridge stuff.  I am a bit worried about shortcutting
  rtcp this way, but will need feedback from rtcp gurus. This should work for 
  video calls too, and possibly UDPTL.


................
r48004 | oej | 2006-11-25 02:48:30 -0700 (Sat, 25 Nov 2006) | 2 lines

Changing ERROR to lesser level. Imported from 1.2/1.4

................
r48008 | rizzo | 2006-11-25 10:37:04 -0700 (Sat, 25 Nov 2006) | 7 lines

generalize a bit the functions used to create an tcp socket
and then run a service on it.
The code in manager.c does essentially the same things,
so we will be able to reuse the code in here (probably
moving it to netsock.c or another appropriate library file).


................
r48009 | mattf | 2006-11-25 13:30:04 -0700 (Sat, 25 Nov 2006) | 1 line

Updates to show linkset command
................
r48010 | mattf | 2006-11-25 13:54:38 -0700 (Sat, 25 Nov 2006) | 2 lines

Add ss7 show linkset command

................
r48011 | mattf | 2006-11-25 14:32:33 -0700 (Sat, 25 Nov 2006) | 1 line

Make sure we don't send a group reset on a group larger than 32 CICs
................
r48012 | mattf | 2006-11-25 14:35:23 -0700 (Sat, 25 Nov 2006) | 1 line

bug fix
................
r48013 | mattf | 2006-11-25 14:46:58 -0700 (Sat, 25 Nov 2006) | 1 line

Make compiler happier
................
r48014 | mattf | 2006-11-25 14:50:42 -0700 (Sat, 25 Nov 2006) | 1 line

Little fix so we use the right message
................
r48016 | murf | 2006-11-25 17:15:42 -0700 (Sat, 25 Nov 2006) | 9 lines

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

........
r48015 | murf | 2006-11-25 17:01:34 -0700 (Sat, 25 Nov 2006) | 1 line

A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
........

................
r48018 | murf | 2006-11-25 17:31:13 -0700 (Sat, 25 Nov 2006) | 9 lines

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

........
r48017 | murf | 2006-11-25 17:26:16 -0700 (Sat, 25 Nov 2006) | 1 line

might as well also document the raw values of the flag vars
........

................
r48019 | russell | 2006-11-25 23:55:33 -0700 (Sat, 25 Nov 2006) | 6 lines

- Add some comments on thread storage with a brief explanation of what it is
  as well as what the motivation is for using it.
- Add a comment by the declaration of ast_inet_ntoa() noting that this function
  is not reentrant, and the result of a previous call to the function is no
  longer valid after calling it again.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-07 16:03:56 +00:00
Luigi Rizzo 605b9a914e remove duplicated code to start the server threads, use
the infrastructure exposed in http.c earlier today.

As a bonus, now we can restart the session on a different
port just reloading the module.

On passing, fix a bug in the handling of 'enabled' in the configuration
file - previously, a missing "enabled=" line in manager.conf meant
"whatever the state was before" instead of a specific value.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 20:46:01 +00:00
Luigi Rizzo ce6804c877 Part of the transformations necessary to add TLS support,
as described in
http://lists.digium.com/pipermail/asterisk-dev/2006-December/025213.html

In detail, this commit does the following:

b) change the function get_input() to use fread() instead of read()
   to collect the data. One can still do the ast_wait_for_input() on
   the original descriptor returned by accept().

c) change the function send_string() to work on the FILE *.
   As a side effect, this change now really guarantees that
   we don't spend more than "writetimeout" milliseconds on
   each line sent.

d) modify the function action_command() so that it creates a
   temporary file descriptor to be passed to ast_cli_command(),
   and then read back the data from the temp file and write it
   to the output with send_string(). The code is similar to
   what is done in generic_http_callback() to support AMI-over-HTTP.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 18:45:19 +00:00
Luigi Rizzo 6a147ed134 Make externally visible some generic code useful to create
and implement services over tcp and/or tcp-tls.
 
This commit is nothing more than moving structure definitions
(and documentation) from main/http.c to include/asterisk/http.h
(temporary location until we find a better place), and removing the
'static' qualifier from server_root() and server_start().
 
The name change (adding the ast_ prefix as a minimum, and then
possibly a more meaningful name) is postponed to future commits.

Does not apply to other versions of asterisk.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 16:17:57 +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
Russell Bryant a44e55a3f3 Constify a bunch of the usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:23:32 +00:00
Olle Johansson fe53552f41 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 20:39:13 +00:00
Jason Parker 87f81679ee Expand on r48273 (from issue 8506), to translate more of the fskmodem stuff to English.
r48273 dealt with the comments and such, this deals with the code itself.
(This couldn't have been easily done if it weren't for 48273 - thanks again for that merbanan)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 20:15:37 +00:00
Olle Johansson 33c09cbcfa Issue #8506 - translate spanish comments in fskmodem to english (according to bug guidelines)
Thanks merbanan!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 19:41:26 +00:00
Olle Johansson 00bf07b12e Well, yes...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 11:09:23 +00:00
Olle Johansson b8fcae6d75 Reserving flags for coming code (currently in the "videocaps" branch)
implementing T.140 support in RTP.

T.140/RFC 4351 is TDD over IP - text telephony for hearing impaired.
It defines a realtime text chat, much like the old "talk" application
in Unix. 

T.140 is character by character in real time. It's not 
the same as our current MESSAGE format - that is more like IM, but
can be gatewayed to MESSAGE with a text "codec" if needed.

More patches will follow, as soon as we've separated this code from
the video capabilities functions in the videocaps branch.

Code by John Martin, Aupix (disclaimer on file)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 10:52:53 +00:00
Olle Johansson 757363eda4 - Code formatting
- remove coef_in.h and coef_out.h that was only included as data definitions in fskmodem.c

If you understand spanish, please help us translate the comments in fskmodem.c. Thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-02 13:40:13 +00:00
Olle Johansson c23bc46089 - Disable RTP timeouts during T.38 transmission
- Encapsulate RTP timers to the RTP structure, so we have one set for video and one for audio
- Document RTP keepalive configuration option
- Cleanup and document the monitor support function to hangup on RTP timeouts
- Add RTP keepalive to SIP show settings

Imported from 1.4 with modifications for trunk.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-02 12:05:40 +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
Tilghman Lesher 1b2aebad4a Merged revisions 48179 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48179 | tilghman | 2006-12-01 13:38:59 -0600 (Fri, 01 Dec 2006) | 2 lines

Double-unlock error (reported by blitzrage on IRC)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-01 19:41:02 +00:00
Joshua Colp 869101028b Merged revisions 48168 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48168 | file | 2006-11-30 16:18:24 -0500 (Thu, 30 Nov 2006) | 2 lines

Do not do a partial bridge for Google Talk since we need to handle STUN. (issue #8448 reported by phsultan)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 21:22:01 +00:00
Olle Johansson 446a06679a Documentation updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 20:34:23 +00:00
Joshua Colp f6f735f505 Merged revisions 48152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48152 | file | 2006-11-30 13:47:40 -0500 (Thu, 30 Nov 2006) | 10 lines

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

........
r48151 | file | 2006-11-30 13:42:45 -0500 (Thu, 30 Nov 2006) | 2 lines

Print certain CDR messages out at the NOTICE level versus WARNING since they can occur when used with the CDR applications and are perfectly fine. (issue #8367 reported by dartvader)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 18:49:59 +00:00
Olle Johansson 8f3abf5f30 Small update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 18:25:51 +00:00
Olle Johansson 7e4d482071 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 18:22:10 +00:00
Olle Johansson fddd385eb1 Adding some generic docs on extension and device states - watchers and providers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 17:15:54 +00:00
Olle Johansson 2bee4aba4d Change logging for p2p rtp bridge mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-29 19:44:06 +00:00
Russell Bryant eaf98f31e8 Go ahead and make this write unconditional. Making it conditional is more work
in both the append and non-append modes.  Also, always truncating the partial
write makes the behavior of the function more consistent, where in any type of
write, no partial result is left in the buffer.

Thanks for the feedback, luigi


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-29 17:37:31 +00:00
Joshua Colp d44b349211 Merged revisions 48107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48107 | file | 2006-11-29 11:50:33 -0500 (Wed, 29 Nov 2006) | 10 lines

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

........
r48106 | file | 2006-11-29 11:47:10 -0500 (Wed, 29 Nov 2006) | 2 lines

If the frame was duplicated before writing out then we need to free it. (issue #8429 reported by edguy3)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-29 16:53:27 +00:00
Russell Bryant 8ca3d51634 Remove an XXX command suggesting that this truncation should not be conditional,
and also add a more verbose comment explaining why it is only needed in the
case of appending to the string for any curious readers that come along in the
future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-29 05:08:19 +00:00
Luigi Rizzo 0b798e298d don't use outputstr in the struct mansession, it's just
an extra allocation on a path where we have way too many already.

Unfortunately the AMI-over-HTTP requires multiple copies,
because we need to generate a header, then the raw output to
an intermediate buffer, then convert it to html/xml, and
finally copy everything into a malloc'ed buffer because
that's what the generic_http_callback interface expects.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 17:08:19 +00:00
Luigi Rizzo 3dbc33ed4f initialize the dynamic string in a sane way.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 15:53:12 +00:00
Luigi Rizzo 5e7aebf9ac some simplifications to
ast_dynamic_str_thread_build_va_couldnt_we_choose_a_shorter_name()

I am unsure whether the truncation of the string in case of a failed
attempt should be done unconditionally. See the XXX mark.

Russel, ideas ?



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 14:07:09 +00:00
Luigi Rizzo 29985ff8c3 do not return 500 Internal error if the AMI command provides
no output.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 13:08:56 +00:00
Luigi Rizzo 77ae04d7c1 mosty comment and documentation cleanup on waitevent.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 12:05:25 +00:00
Luigi Rizzo 0153bdd72c Move the code to purge stale sessions to a function,
to simplify the body of the main loop of the accepting thread.
Rename purge_unused() to purge_events() so one knows what the
function does.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 11:20:39 +00:00
Luigi Rizzo 5ce08d37ca Various simplifications of the code:
+ use a wrapper around ast_carefulwrite(), used in two places,
  to make life easier when we decide to use a different interface
  to the socket.

+ put an ast_verbose() message on astman_append on a case that
  should never happen now that we use a temporary file for
  AMI-over-HTTP sessions

+ document and slightly simplify process_events() by removing
  unnecessary parentheses.

+ in get_input(), use ast_wait_for_input() instead of poll().

  We may want to move to a completely non-blocking


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 10:23:25 +00:00
Luigi Rizzo 1c570d9ba0 More informative message on invalid commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 09:43:44 +00:00
Luigi Rizzo a8e9428317 another normalization of AMI vs HTTP identification.
Should really define a macro IS_AMI(s) so it is clear what
we want to do.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 09:39:16 +00:00
Luigi Rizzo d1dcb0de2a always use managerid to determine whether this is an AMI or HTTP session,
and document it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 09:27:37 +00:00
Luigi Rizzo da80478d94 In the previous commit i forgot to set the poll_timeout to -1,
causing the http threads to do busy waiting around the socket...

Fix the mistake, sorry for the inconvenience!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 00:02:42 +00:00
Luigi Rizzo 7a6914a126 document the support for running a server on TCP/TLS and
opening an SSL socket.

We are almost ready to make this code available to other modules.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 21:25:55 +00:00
Luigi Rizzo 2e7fd7cbdb add a new http.conf option, sslbindaddr.
Because https is more secure than http, it usually
makes sense to keep this service more open than the
one on the unencrypted port.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 20:21:40 +00:00
Luigi Rizzo 3637b60b19 in the helper thread, separate the FILE * creation from the actual
function doing work on the socket. This is another generalization
to provide a generic mechanism to open TCP/TLS socket with a thread
managing the accpet and children threads managing the individual
sessions.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 19:19:48 +00:00
Luigi Rizzo a381d3552e staticize a global variable and remove an unused field structure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 18:51:10 +00:00
Luigi Rizzo 2657279cb5 generalize a bit the functions used to create an tcp socket
and then run a service on it.
The code in manager.c does essentially the same things,
so we will be able to reuse the code in here (probably
moving it to netsock.c or another appropriate library file).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-25 17:37:04 +00:00
Olle Johansson 7991366506 - Adding comment on suspicious memory allocation. Seems like it's never freed, but I don't
have a clear understanding of the frame allocation/deallocation, so I just mark this
  for investigation. (Reported by Ed Guy). We're trying to see if a free() hurts...

- Doxygen comments on p2p rtp bridge stuff.  I am a bit worried about shortcutting
  rtcp this way, but will need feedback from rtcp gurus. This should work for 
  video calls too, and possibly UDPTL.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-25 09:45:57 +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 6d270eacf4 This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-24 17:40:49 +00:00
Olle Johansson 3fd07f51f2 Doxygen update
- Document cause codes
- Document a bit more on channel variables - global, predefined and local
- Fix some doxygen in channel.h. Adding one comment for two definitions does not
  work. They won't be copied to each.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-24 14:00:19 +00:00
Joshua Colp b50fc7a502 Merged revisions 47944 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47944 | file | 2006-11-22 16:47:43 -0500 (Wed, 22 Nov 2006) | 2 lines

Video will never reach Packet2Packet bridging and can do more harm then good.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-22 21:49:11 +00:00
Joshua Colp 7b4a5105b2 Add support to set the maximum number of files open when Asterisk loads using the 'maxfiles' configuration option. (issue #7499 reported by rkarlsba)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-22 17:41:07 +00:00
Mark Spencer cc0c154f0e Restore some sense of security to manager
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-22 05:49:06 +00:00
Joshua Colp a69ac09748 Merged revisions 47897 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47897 | file | 2006-11-21 12:32:27 -0500 (Tue, 21 Nov 2006) | 2 lines

If we have the non standard G726-32 setting turned on we want to return G726-32 to the SDP, not our AAL2 string. (issue #8330 reported by voipgate)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-21 17:34:22 +00:00
Joshua Colp dcba38ebaf Merged revisions 47860 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47860 | file | 2006-11-20 14:51:36 -0500 (Mon, 20 Nov 2006) | 10 lines

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

........
r47859 | file | 2006-11-20 14:50:21 -0500 (Mon, 20 Nov 2006) | 2 lines

Don't forget to byte swap if we are exiting the smoother feed early. (issue #8287 reported by arturs)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 19:52:38 +00:00
Joshua Colp 03a7adf8ce Use RTP/RTCP fds on the RTP structure, don't bother storing them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 16:06:10 +00:00
Joshua Colp b2b966eda8 Merged revisions 47852 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47852 | file | 2006-11-20 10:58:50 -0500 (Mon, 20 Nov 2006) | 2 lines

Only remove/destroy the RTCP I/O item if it exists.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 16:04:14 +00:00
Luigi Rizzo b3867180cf comments-only change:
document a bit more when manager events are delivered
to the clients.



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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-18 20:17:06 +00:00
Luigi Rizzo f148916c23 Move this macro from cli.c to cli.h so apps can use it
without duplicating the macro or the code:

/*!
 * In many cases we need to print singular or plural
 * words depending on a count. This macro helps us e.g.
 *     printf("we have %d object%s", n, ESS(n));
 */
#define ESS(x) ((x) == 1 ? "" : "s")



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-18 20:08:17 +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
Luigi Rizzo 95a99a2469 remove a debugging message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 22:56:58 +00:00
Luigi Rizzo c32cae7e50 convert "help" to new style,
fix completion of arguments past the first one
that i broke earlier today.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 22:53:57 +00:00
Luigi Rizzo 619c4ef0ec standardize "module show [like]"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 22:02:15 +00:00
Luigi Rizzo 4589662f7f describe a bit the patterns that you can have in the commands,
and add support for wildcard (spelled as '%').

On passing fix a bug in the expansion code which was hidden and
appeared when implementing the wildcard
The fix is just the line 'src != argindex', in case someone wants
to test this on 1.4 - but i would just keep this in trunk.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 21:50:55 +00:00
Luigi Rizzo 6f9b6ba0b1 merge the implemenmtation of "core set debug" and "core set verbose".
No externally visible changes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 12:26:15 +00:00
Luigi Rizzo 867e3d6e5d introduce a bit of regexp support in the internal CLI api.
Now you can specify a cli command as
	"console autoanswer [on|off]"

which means the on|off argument is optional, or

	"console {mute|unmute}"

which means the mute|unmute argument is mandatory.

The blocks in [] or {} do not necessarily need to be at the
end of the string.

Completions for the variant parts are generated automatically.
This should significantly simplify the implementation of
the various handlers.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 11:12:13 +00:00
Luigi Rizzo 0c8f2f1e4c remove an unused function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 21:57:23 +00:00
Luigi Rizzo 5fb52f8244 reduce indentation on a large function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 14:58:24 +00:00
Luigi Rizzo e58079b067 use atomic instructions to update the inuse counters
for CLI entriesC. The lock is not protecting this field.

I wonder if the field should be declared 'volatile' as well.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 14:41:28 +00:00
Luigi Rizzo 84a5921ab5 make kevin (and 64 bit machines) happy and
remove a cast from char* to int in handling the return
values from new-style handlers.

On passing, note that main/loader.c::ast_load_resource() always return 0
so errors are not propagated up. I am not sure this is the intended
behaviour.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 14:21:30 +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
Kevin P. Fleming c4ad5399c2 Merged revisions 47701 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47701 | kpfleming | 2006-11-15 14:50:06 -0600 (Wed, 15 Nov 2006) | 2 lines

don't try to call fclose() if fopen() failed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 20:51:18 +00:00
Kevin P. Fleming 1c86ec8222 Merged revisions 47690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47690 | kpfleming | 2006-11-15 14:01:22 -0600 (Wed, 15 Nov 2006) | 20 lines

Merged revisions 47686,47688-47689 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47686 | kpfleming | 2006-11-15 13:42:05 -0600 (Wed, 15 Nov 2006) | 2 lines

clear the category's variable tail pointer as well when variables are detached from it

........
r47688 | kpfleming | 2006-11-15 13:47:43 -0600 (Wed, 15 Nov 2006) | 2 lines

when appending a list of variable to a category, ensure the tail pointer points to the last variable in the list

........
r47689 | kpfleming | 2006-11-15 13:58:46 -0600 (Wed, 15 Nov 2006) | 2 lines

when re-writing the config file, don't repeat the path if it hasn't changed

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 20:05:26 +00:00
Kevin P. Fleming 00c5f6d032 Merged revisions 47684 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47684 | kpfleming | 2006-11-15 12:43:30 -0600 (Wed, 15 Nov 2006) | 10 lines

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

........
r47682 | kpfleming | 2006-11-15 12:39:47 -0600 (Wed, 15 Nov 2006) | 2 lines

ouch... don't use printf, use ast_log/ast_verbose

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 18:44:29 +00:00
Luigi Rizzo 9ddef9890a small simplifications and localization of variables.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 17:17:07 +00:00
Luigi Rizzo b588fc320e new-style "core show channels"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 17:05:55 +00:00
Luigi Rizzo db923f638e more changes to new style of "module load" and "load".
Under FreeBSD, the filename_completion used in the above commands does
not work. Not sure why, but on passing i note that the function is
part of readline and is not reentrant, so it needs to be fixed one way
or another.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 16:39:38 +00:00
Luigi Rizzo f28f07e1b2 move another deprecated command to the new style
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 16:20:23 +00:00
Luigi Rizzo 0e9753f401 move "core set debug" to the new style, and remove duplicated
code for the deprecated handler.

On passing fix a long standing bug in find_cli() which would not
find the longest match - this part (trivial, basically
just update matchlen on a match) must go in 1.4 and possibly 1.2 as well.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 16:13:30 +00:00
Luigi Rizzo 6edcca7b8d one more step cleaning the internal CLI interface:
the NEW_CLI macro now supports extra arguments (to deprecate other commands).
use this to implement unload and reload, and remove some unused functions.
usual completion fixes (as these function accept multiple arguments).

The summary is still a bit inconsistent.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 15:02:56 +00:00
Luigi Rizzo 1781f41b3b update the internal cli api following comments from kevin.
This change basically simplifies the interface of the
new-style handler removing almost all the tricks used in
the previous implementation to achieve backward compatibility
(which is still present and guaranteed.)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 14:11:28 +00:00
Joshua Colp 993c6823e6 Merged revisions 47645 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47645 | file | 2006-11-14 23:45:24 -0500 (Tue, 14 Nov 2006) | 2 lines

If NAT detection is turned on or already detected then say NAT is active when setting the remote RTP peer when doing early bridging. (issue #8365 reported by marcelbarbulescu)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 04:47:52 +00:00
Kevin P. Fleming f04ac0ad7e Merged revisions 47641 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47641 | kpfleming | 2006-11-14 18:19:05 -0600 (Tue, 14 Nov 2006) | 2 lines

more formatting cleanup, and avoid running off the end of the string

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 00:19:35 +00:00
Joshua Colp 5861048fb6 Merged revisions 47639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47639 | file | 2006-11-14 19:14:07 -0500 (Tue, 14 Nov 2006) | 2 lines

Turn notice about unknown RTCP packet type into a debug message instead.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 00:15:38 +00:00
Luigi Rizzo fbcc8f4de2 add missing casts and remove an unused function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 22:08:20 +00:00
Luigi Rizzo 3d86c80c15 fix completion for "module reload mod_1 mod_2 ... "
(should do the same for the other similar commands, "reload", "module unload" and so on.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 17:00:39 +00:00
Luigi Rizzo a9259cd8f4 partly convert to new style set-verbose, with completion fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 16:55:27 +00:00
Luigi Rizzo 6e4ed956bc replace two deprecated functions with calls to the standard ones,
with fixes to argc/argv



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 16:38:35 +00:00
Luigi Rizzo dfd4448412 remove duplicated implementation for a deprecated function, use the
original one instead with appropriate changes in argc/argv.

This is not always applicable, but in some simple cases it is.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 16:31:57 +00:00
Luigi Rizzo abdb8002df new-style for 'core show uptime', include 'complete' support and better error checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 16:09:08 +00:00
Luigi Rizzo 7d38228d6e apply previous fix to old-style cli entries as well.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 15:55:18 +00:00
Luigi Rizzo ff5160e35c fix "core set debug atleast ",
and fix the simple case where a command can have multiple completions,
the first ones coming from keywords in previous CLI entries.

There is no solution yet for the complex case of N1 completions
from a CLI entry, followed by N2 from the next one, and so on,
because the _complete() handlers do not tell us how many matches
it generates, so we don't know how many to skip when interrogating
the other handlers.

The only solution is to avoid, as much as possible, multiple
CLI entries with the same prefix.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 15:39:03 +00:00
Luigi Rizzo fbb143b829 Bring in the improved internal API for the CLI.
WATCH OUT: this changes the binary interface (ABI) for modules,
so e.g. users of g729 codecs need a rebuilt module (but read below).

The new way to write CLI handlers is described in detail in cli.h,
and there are a few converted handlers in cli.c, look for NEW_CLI.

After converting a couple of commands i am convinced that
it is reasonably convenient to use, and it makes it easier to fix the
pending CLI issues.

On passing, note a bug with the current 'complete' architecture:
if a command is a prefix of multiple CLI entries, we miss some
of the possible options. As an example, "core set debug" can
continue with "channel" from one CLI entry, and "off" or "atleast"
from another one.

We address this problem in a separate commit
(when i have figured out a fix, that is).

ABI issues:
I asked Kevin if it was ok to make this change and he said yes.
While it would have been possible to make the change without breaking
the module ABI, the code would have been more convoluted.

I am happy to restore the old ABI (while still being able
to use the "new style" handlers) if there is demand.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 15:23:35 +00:00
Matt O'Gorman 43aefe9116 fix bytesize to 5.3kb for g723 codec and add support for multimode of tc400p
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 22:01:43 +00:00
Steve Murphy cd74836d3a This solves bug 8342, whereby a crash occurs under certain circumstances while reading a config file with comments-- a call to CB_ADD shouldn't happen if withcomments is zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 19:15:45 +00:00
Joshua Colp 209628c6e2 Return module show to a working state. (issue #8353 reported by jserve)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 16:41:45 +00:00
Luigi Rizzo 06c9ef6411 stop looking for new entries when we know we are done.
there is no functional change, so it is not necessary to
bother merging this to 1.4 now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 12:04:05 +00:00
Luigi Rizzo b2e2f3f957 free memory when unregistering an entry.
needs to be merged to 1.4



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 12:01:25 +00:00
Russell Bryant f575b7e25d Merged revisions 47492 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47492 | russell | 2006-11-11 10:18:02 -0500 (Sat, 11 Nov 2006) | 2 lines

Tweak the formatting of this new function to better conform to coding guidelines.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-11 15:22:08 +00:00
Matt O'Gorman b025702287 safe terminal output is sweet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-11 02:12:27 +00:00
Joshua Colp 0282cc1a4d A trunk that builds is a productive trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 19:51:15 +00:00
Tilghman Lesher 691363656f Merged revisions 47436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47436 | tilghman | 2006-11-10 10:51:55 -0600 (Fri, 10 Nov 2006) | 2 lines

Discussion of these CLI changes resulted in more consistency (Bug 8236)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 17:01:06 +00:00
Russell Bryant 2b2693499d Add the ability to specify multiple prompts to the Read() dialplan application,
similar to Background() and Playback().
(issue #7897, jsmith, with some modifications)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 03:59:48 +00:00
Joshua Colp 0efd51e1d2 This should already be called while locked.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 03:34:13 +00:00
Russell Bryant 7209032ffe Merged revisions 47377 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47377 | russell | 2006-11-09 11:28:15 -0500 (Thu, 09 Nov 2006) | 2 lines

fix tab completion for "core debug channel" and "core no debug channel"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 16:30:06 +00:00
Russell Bryant adf6bb1d9a Merged revisions 47375 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47375 | russell | 2006-11-09 11:24:02 -0500 (Thu, 09 Nov 2006) | 3 lines

Fix "core show channel".  Also, fix tab completion for both "core show channel"
and "core show channels".

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 16:26:47 +00:00
Russell Bryant 2ea9bb223f Merged revisions 47372 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47372 | russell | 2006-11-09 11:18:33 -0500 (Thu, 09 Nov 2006) | 3 lines

Fix "core debug channel <whatever>".  I guess someone needs to go through and
audit every CLI command that changed number of arguments ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 16:20:43 +00:00
Russell Bryant f3c0a35b6e Merged revisions 47366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47366 | russell | 2006-11-09 10:49:39 -0500 (Thu, 09 Nov 2006) | 3 lines

Fix another CLI command, "core show uptime" ...
(issue #8323, reported by johnlange, fixed by myself)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 15:51:15 +00:00
Russell Bryant 843a348841 Merged revisions 47352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47352 | russell | 2006-11-09 01:31:37 -0500 (Thu, 09 Nov 2006) | 3 lines

fix "core show version" to reflect the new number of arguments for this
CLI command (issue #8316, kshumard)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 06:35:05 +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
Kevin P. Fleming cf1203c496 restore display of G.722 codec
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 21:59:51 +00:00
Joshua Colp c5780b19c8 Display CID matching information when using dialplan show. (issue #8279 reported by caio1982)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 18:26:52 +00:00
Luigi Rizzo bdc0180292 fix "core show profile" parsing.
Needs to go in 1.4 too, but ENOTIME now



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 23:14:04 +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
Luigi Rizzo 403135f646 explain why ast_carefulwrite is written the way it is,
and also that it doesn't really work as claimed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 08:34:26 +00:00
Joshua Colp 980ce017ec Add support for manager hooks, so you could fire off manager events over IRC if you were crazy enough. (issue #5161 reported by anthm with mods by moi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-06 17:05:04 +00:00
Russell Bryant 18693a45dc Merged revisions 47196 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47196 | russell | 2006-11-04 13:10:22 -0500 (Sat, 04 Nov 2006) | 2 lines

Fix another bug in "core set debug" ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 18:12:31 +00:00
Russell Bryant 9297a1a8f9 Merged revisions 47195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47195 | russell | 2006-11-04 12:59:39 -0500 (Sat, 04 Nov 2006) | 2 lines

Really fix the "core set debug" and "core set verbose" CLI commands.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 18:11:18 +00:00
Russell Bryant 7ee7429cf7 Merged revisions 47192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47192 | russell | 2006-11-04 12:38:24 -0500 (Sat, 04 Nov 2006) | 3 lines

fix the "atleast" option to the "core set verbose" and "core set debug"
CLI commands

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 17:40:42 +00:00
Luigi Rizzo ce68e30a07 remove many unnecessary casts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 01:34:59 +00:00
Luigi Rizzo 84c8e348ba remove a useless cast
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 01:32:31 +00:00
Luigi Rizzo 0bf4235ff1 add a new cli/manager.conf option "debug" to enable/disable
debugging code in the manager.
At the moment the debugging code is very lightweight, if the option
is enabled manager messages also carry a sequence number and
the info where they have been generated e.g.

SequenceNumber: 10
File: chan_sip.c
Line: 11927
Func: handle_response_register

It is not worthwhile having this as a compile time option
right now, because the extra work involved at runtime is
just checking one variable.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-03 18:53:26 +00:00
Luigi Rizzo 55f22da63f Fix "core show channels" and "core show modules".
Not sure it applies like this to 1.4 because of 
deprecate versions of the same command(s).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-03 18:13:26 +00:00
Tilghman Lesher 79f75ec09a Merged revisions 47053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47053 | tilghman | 2006-11-02 17:49:13 -0600 (Thu, 02 Nov 2006) | 2 lines

More changes making the CLI more consistent with "category verb arguments" (continuation of issue 8236)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:55:59 +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
Joshua Colp 7f7f2fe821 Let's make application/function/hint lists read/write lists... just for kicks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 21:40:53 +00:00
Joshua Colp 8d1d9b0610 Convert translation core linked list over to read/write based one, since it spends most of it's time only reading.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 18:01:10 +00:00
Russell Bryant 881ad15f2b various whitespace changes to reduce indentation and to better conform to
formatting guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 14:15:12 +00:00