mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 22:03:50 +00:00
Merge 2778d451c214891ef47ee06f8e220061f8f4f6db into 96de8fd37734599d997bcb9fdd2b076d9cfb026e
This commit is contained in:
commit
15bca36489
@ -4,6 +4,8 @@
|
||||
<param name="listen-ip" value="127.0.0.1"/>
|
||||
<param name="listen-port" value="8021"/>
|
||||
<param name="password" value="ClueCon"/>
|
||||
<!-- Log the command that freeswitch received; default is false -->
|
||||
<param name="log-recv-cmd" value="true"/>
|
||||
<!--<param name="apply-inbound-acl" value="lan"/>-->
|
||||
</settings>
|
||||
</configuration>
|
||||
|
@ -108,6 +108,7 @@ static struct {
|
||||
switch_mutex_t *listener_mutex;
|
||||
switch_event_node_t *node;
|
||||
int debug;
|
||||
int log_recv_cmd;
|
||||
} globals;
|
||||
|
||||
static struct {
|
||||
@ -1726,6 +1727,10 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (globals.log_recv_cmd > 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Received from %s:%d: %s", listener->remote_ip, listener->remote_port, cmd);
|
||||
}
|
||||
|
||||
if (switch_stristr("unload", cmd) && switch_stristr("mod_event_socket", cmd)) {
|
||||
cmd = unload_cheat;
|
||||
} else if (switch_stristr("reload", cmd) && switch_stristr("mod_event_socket", cmd)) {
|
||||
@ -2887,6 +2892,8 @@ static int config(void)
|
||||
set_pref_ip(val);
|
||||
} else if (!strcmp(var, "debug")) {
|
||||
globals.debug = atoi(val);
|
||||
} else if (!strcmp(var, "log-recv-cmd")) {
|
||||
globals.log_recv_cmd = switch_true(val) ? 1 : 0;
|
||||
} else if (!strcmp(var, "nat-map")) {
|
||||
if (switch_true(val) && switch_nat_get_type()) {
|
||||
prefs.nat_map = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user