diff options
| author | Comment <tim@gray.(none)> | 2012-11-28 18:40:32 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2012-11-28 18:40:32 +0000 |
| commit | a0ab2cd35d91ba0080f9fb870d82aa90a51a0d6c (patch) | |
| tree | 0e0fd44d0f07ccf1ea4a5f1e30a03e0203300321 /vpn/mfe.c | |
| parent | 75c277c10f206f5bf3799caa03a52f40c1c8b6cf (diff) | |
nearly finished except latency
Diffstat (limited to 'vpn/mfe.c')
| -rw-r--r-- | vpn/mfe.c | 70 |
1 files changed, 70 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <syslog.h> + +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 |
