dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

360 Commits

Author SHA1 Message Date
rizzo 4b06443b14 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: http://svn.digium.com/svn/asterisk/trunk@48332 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 18:45:19 +00:00
rizzo dcd0e21c1b 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: http://svn.digium.com/svn/asterisk/trunk@48324 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 16:17:57 +00:00
russell 0a0c8869de Staticize one, and Constify a bunch of usage strings for CLI commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48303 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 07:28:56 +00:00
russell 8048b9c718 Constify a bunch of the usage strings for CLI commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48302 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 07:23:32 +00:00
oej c1729817c5 Doxygen updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48277 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-05 20:39:13 +00:00
qwell 4bbefa5c47 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: http://svn.digium.com/svn/asterisk/trunk@48276 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-05 20:15:37 +00:00
oej 0fca2eac77 Issue #8506 - translate spanish comments in fskmodem to english (according to bug guidelines)
Thanks merbanan!


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48273 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-05 19:41:26 +00:00
oej b4c95c1876 Well, yes...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48259 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-05 11:09:23 +00:00
oej 1158861b78 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: http://svn.digium.com/svn/asterisk/trunk@48258 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-05 10:52:53 +00:00
oej 59e97e4914 - 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: http://svn.digium.com/svn/asterisk/trunk@48205 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-02 13:40:13 +00:00
oej 10d3f3f5ba - 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: http://svn.digium.com/svn/asterisk/trunk@48200 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-02 12:05:40 +00:00
oej 1b52b6dedd Formatting fix
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48188 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-01 20:49:06 +00:00
tilghman fb583000ba 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: http://svn.digium.com/svn/asterisk/trunk@48180 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-01 19:41:02 +00:00
file a9383ac927 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: http://svn.digium.com/svn/asterisk/trunk@48169 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 21:22:01 +00:00
oej 7d8d79e3ae Documentation updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48164 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 20:34:23 +00:00
file 3ab05b5d97 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: http://svn.digium.com/svn/asterisk/trunk@48153 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 18:49:59 +00:00
oej 2a63b905a5 Small update
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48150 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 18:25:51 +00:00
oej 33bdb442ed Doxygen updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48149 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 18:22:10 +00:00
oej 91e2cd809f Adding some generic docs on extension and device states - watchers and providers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48139 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30 17:15:54 +00:00
oej 4dcfb7d284 Change logging for p2p rtp bridge mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48111 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-29 19:44:06 +00:00
russell 700f9d585c 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: http://svn.digium.com/svn/asterisk/trunk@48109 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-29 17:37:31 +00:00
file 230fa9e998 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: http://svn.digium.com/svn/asterisk/trunk@48108 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-29 16:53:27 +00:00
russell 02a84d116b 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: http://svn.digium.com/svn/asterisk/trunk@48103 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-29 05:08:19 +00:00
rizzo b507cb90af 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: http://svn.digium.com/svn/asterisk/trunk@48090 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 17:08:19 +00:00
rizzo 41ac55742c initialize the dynamic string in a sane way.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48086 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 15:53:12 +00:00
rizzo b24855a833 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: http://svn.digium.com/svn/asterisk/trunk@48084 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 14:07:09 +00:00
rizzo a522c1ce0f do not return 500 Internal error if the AMI command provides
no output.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48083 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 13:08:56 +00:00
rizzo 062fee49d6 mosty comment and documentation cleanup on waitevent.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48082 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 12:05:25 +00:00
rizzo bdf4f81f22 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: http://svn.digium.com/svn/asterisk/trunk@48081 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 11:20:39 +00:00
rizzo 917af9ad51 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: http://svn.digium.com/svn/asterisk/trunk@48080 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 10:23:25 +00:00
rizzo 30830453fb More informative message on invalid commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48079 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 09:43:44 +00:00
rizzo 8cc315343f 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: http://svn.digium.com/svn/asterisk/trunk@48078 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 09:39:16 +00:00
rizzo e8f45989fe always use managerid to determine whether this is an AMI or HTTP session,
and document it.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48077 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 09:27:37 +00:00
rizzo 9718f1cb7d 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: http://svn.digium.com/svn/asterisk/trunk@48074 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-28 00:02:42 +00:00
rizzo 4975453032 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: http://svn.digium.com/svn/asterisk/trunk@48073 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-27 21:25:55 +00:00
rizzo ac91407f47 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: http://svn.digium.com/svn/asterisk/trunk@48071 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-27 20:21:40 +00:00
rizzo 3a0d25f9f8 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: http://svn.digium.com/svn/asterisk/trunk@48067 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-27 19:19:48 +00:00
rizzo b728b58d5a staticize a global variable and remove an unused field structure.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48062 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-27 18:51:10 +00:00
rizzo 461f2afa7c 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: http://svn.digium.com/svn/asterisk/trunk@48008 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-25 17:37:04 +00:00
oej 7e46c70622 - 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: http://svn.digium.com/svn/asterisk/trunk@48003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-25 09:45:57 +00:00
rizzo 61fb066b4c 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: http://svn.digium.com/svn/asterisk/trunk@48001 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-25 09:02:42 +00:00
murf ca7e77d4ef This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47995 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-24 17:40:49 +00:00
oej 5a2011b9d7 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: http://svn.digium.com/svn/asterisk/trunk@47986 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-24 14:00:19 +00:00
file 3a1622bdf6 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: http://svn.digium.com/svn/asterisk/trunk@47945 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-22 21:49:11 +00:00
file ef39327764 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: http://svn.digium.com/svn/asterisk/trunk@47933 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-22 17:41:07 +00:00
markster 47f912f6e6 Restore some sense of security to manager
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47912 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-22 05:49:06 +00:00
file f6bcd15af8 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: http://svn.digium.com/svn/asterisk/trunk@47898 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-21 17:34:22 +00:00
file 334a20e194 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: http://svn.digium.com/svn/asterisk/trunk@47861 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-20 19:52:38 +00:00
file 184bdb13e0 Use RTP/RTCP fds on the RTP structure, don't bother storing them.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47854 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-20 16:06:10 +00:00
file 6b706ba403 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: http://svn.digium.com/svn/asterisk/trunk@47853 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-20 16:04:14 +00:00