Summary: | ASTERISK-11288: [patch] Add TCP socket support to app_externalivr.c | ||
Reporter: | Chris Tooley (ctooley) | Labels: | |
Date Opened: | 2008-01-23 15:15:54.000-0600 | Date Closed: | 2008-03-14 15:02:33 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) eivr_tcp_generic.patch ( 1) eivr_tcp_sockets.patch | |
Description: | This change adds the ability to communicate over a TCP socket instead of forking a child process. Use by putting "ivr://eivrhost[:port]" in place of the command inside ExternalIvr(). ****** ADDITIONAL INFORMATION ****** Depends on Bug ASTERISK-1176825 being resolved with that patch applied. | ||
Comments: | By: Jason Parker (jparker) 2008-01-23 15:51:14.000-0600 How about something like "socket://" or "tcp://" rather than "ivr://"? ivr is pretty generic, and doesn't give a clear indication as to what it's actually doing. By: Jason Parker (jparker) 2008-01-23 15:56:07.000-0600 There are also quite a few coding guidelines violations - especially in eivr_connect_socket(). Mostly lack of spaces in function calls and single line if's like "if (blah) do_stuff;". I'd also like to see it avoid using goto in new functions if at all possible (in the case of eivr_connect_socket(), it's only returning unit, and not doing any cleanup type of stuff) By: James Golovich (jamesgolovich) 2008-02-11 01:44:39.000-0600 What about using the tcp/tls generic routines that exist in trunk now for this instead of reimplementing the setup/teardown routines. That would also make it easy to extend to using TLS connections By: Jeff Peeler (jpeeler) 2008-02-13 15:36:39.000-0600 Talked to ctooley on IRC, he's going to try and work the changes in. By: Jeff Peeler (jpeeler) 2008-03-10 12:25:54 eivr_tcp_generic.patch needs to get looked at, assigning to russell By: Russell Bryant (russell) 2008-03-12 16:56:17 I have reviewed the latest patch. Here are the last things that need to be changed, and then it can be merged. 1) Fix compiling under --enable-dev-mode. There are some vars in the middle of a block. 2) eivr_comm() needs a new argument, which is the FILE * that was already opened for the socket as a part of client_start(). Then if that is provided, commands/events should be handled on that FILE *. Also, be sure to close that FILE * before freeing the instance struct. 3) There is now an ast_tcptls_server_instance_destroy() func. Use it instead of free() By: Digium Subversion (svnbot) 2008-03-13 13:54:58 Repository: asterisk Revision: 108404 U trunk/apps/app_externalivr.c ------------------------------------------------------------------------ r108404 | jpeeler | 2008-03-13 13:54:57 -0500 (Thu, 13 Mar 2008) | 6 lines (closes issue ASTERISK-11288) Reported by: ctooley Patches: eivr_tcp_generic.patch uploaded by jpeeler (license 325) This change adds the ability to communicate over a TCP socket instead of forking a child process. ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=108404 By: Digium Subversion (svnbot) 2008-03-14 15:02:33 Repository: asterisk Revision: 108795 _U branches/1.6.0/ ------------------------------------------------------------------------ r108795 | russell | 2008-03-14 15:02:31 -0500 (Fri, 14 Mar 2008) | 32 lines Blocked revisions 108404,108439,108523,108639 via svnmerge ........ r108404 | jpeeler | 2008-03-13 13:59:04 -0500 (Thu, 13 Mar 2008) | 6 lines (closes issue ASTERISK-11288) Reported by: ctooley Patches: eivr_tcp_generic.patch uploaded by jpeeler (license 325) This change adds the ability to communicate over a TCP socket instead of forking a child process. ........ r108439 | russell | 2008-03-13 14:54:44 -0500 (Thu, 13 Mar 2008) | 8 lines Merge changes from team/jamesgolovich/chan_sip-ast_str This set of changes removes the hard coded maximum packet size of 4kB from chan_sip. It now starts by allocating 1kB, and growing the buffer as needed to accommodate large packets. (closes issue ASTERISK-8320, reported by mikma, patch by jamesgolovich) ........ r108523 | jpeeler | 2008-03-13 15:38:56 -0500 (Thu, 13 Mar 2008) | 1 line set variable to NULL to prevent uninitialized warning ........ r108639 | jpeeler | 2008-03-13 18:12:59 -0500 (Thu, 13 Mar 2008) | 1 line documenting changes as a result of adding TCP functionality to ExternalIVR ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=108795 |