mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
More PRI/SIP gateway stuff
**ATTENTION** you will need to libs/jrtplib/.complete ; make installall to get it to compile on existing builds as the jrtplib required changes. Added teletone DTMF to mod_wanpipe and rfc2933 DTMF to mod_exosip Added temporary poor man's daemon freeswitch -nc > /var/log/freeswitch.log then it will await a HUP git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@659 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
20
src/switch.c
20
src/switch.c
@@ -31,6 +31,14 @@
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
static int RUNNING = 0;
|
||||
|
||||
static int handle_SIGHUP(int sig)
|
||||
{
|
||||
RUNNING = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *err = NULL;
|
||||
@@ -60,8 +68,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "freeswitch Version %s Started\n\n", SWITCH_VERSION_FULL);
|
||||
|
||||
/* wait for console input */
|
||||
switch_console_loop();
|
||||
if (argv[1] && !strcmp(argv[1], "-nc")) {
|
||||
(void) signal(SIGHUP, (void *) handle_SIGHUP);
|
||||
RUNNING = 1;
|
||||
while(RUNNING) {
|
||||
switch_yield(10000);
|
||||
}
|
||||
} else {
|
||||
/* wait for console input */
|
||||
switch_console_loop();
|
||||
}
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_SHUTDOWN) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Event-Info", "System Shutting Down");
|
||||
|
Reference in New Issue
Block a user