From a0ab2cd35d91ba0080f9fb870d82aa90a51a0d6c Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 28 Nov 2012 18:40:32 +0000 Subject: nearly finished except latency --- vpn/mfe.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 vpn/mfe.c (limited to 'vpn/mfe.c') diff --git a/vpn/mfe.c b/vpn/mfe.c new file mode 100644 index 0000000..f8c44bb --- /dev/null +++ b/vpn/mfe.c @@ -0,0 +1,70 @@ +// +// Filename: mfe.c +// +#define Version "000" +// +// Edit date: 2010-03-30 +// +// Facility: Asterisk +// +// Abstract: My First Externalivr +// +// Environment: Asterisk +// +// Author: Steven L. Edwards +// +// Modified by +// +// 000 2010-03-30 SLE Create. + + +#include +#include +#include + +#include + +int main(int argc, char **argv) +{ + auto char event[256]; + auto int idx; + + // Set the syslog ident + openlog("mfe", LOG_PID, LOG_USER); + + // announce ourselves + syslog(LOG_ERR, "Starting."); + + // show how we were executed + idx = 0; + syslog(LOG_ERR, "argc = %d", argc); + while (idx < argc) + { + syslog(LOG_ERR + , "arg[%d] = \"%s\"" + , idx + , argv[idx] + ); + ++idx; + } + + // play a file + printf("S,demo-congrats\n"); + fflush(stdout); + + // read events + while (NULL != fgets(event, sizeof(event), stdin)) + { + syslog(LOG_ERR, event); + if ('#' == *event) + { + break; + } + } + + // Function exit + return(EXIT_SUCCESS); // return function status + +} +// end of main() +// (end of mfe.c) \ No newline at end of file -- cgit v1.2.3