mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 04:36:42 +00:00
Add application layer keepalive options to sofia and expose config options
This commit is contained in:
parent
471b3d33fd
commit
d5ec949142
@ -268,6 +268,9 @@ typedef enum {
|
|||||||
PFLAG_FIRE_MESSAGE_EVENTS,
|
PFLAG_FIRE_MESSAGE_EVENTS,
|
||||||
PFLAG_SEND_DISPLAY_UPDATE,
|
PFLAG_SEND_DISPLAY_UPDATE,
|
||||||
PFLAG_RUNNING_TRANS,
|
PFLAG_RUNNING_TRANS,
|
||||||
|
PFLAG_TCP_KEEPALIVE,
|
||||||
|
PFLAG_TCP_PINGPONG,
|
||||||
|
PFLAG_TCP_PING2PONG,
|
||||||
/* No new flags below this line */
|
/* No new flags below this line */
|
||||||
PFLAG_MAX
|
PFLAG_MAX
|
||||||
} PFLAGS;
|
} PFLAGS;
|
||||||
@ -680,6 +683,9 @@ struct sofia_profile {
|
|||||||
switch_port_t ws_port;
|
switch_port_t ws_port;
|
||||||
char *wss_ip;
|
char *wss_ip;
|
||||||
switch_port_t wss_port;
|
switch_port_t wss_port;
|
||||||
|
int tcp_keepalive;
|
||||||
|
int tcp_pingpong;
|
||||||
|
int tcp_ping2pong;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -2443,8 +2443,14 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
|
|||||||
NTATAG_USE_SRV(0)),
|
NTATAG_USE_SRV(0)),
|
||||||
TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_NAPTR),
|
TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_NAPTR),
|
||||||
NTATAG_USE_NAPTR(0)),
|
NTATAG_USE_NAPTR(0)),
|
||||||
|
TAG_IF(sofia_test_pflag(profile, PFLAG_TCP_PINGPONG),
|
||||||
|
TPTAG_PINGPONG(profile->tcp_pingpong)),
|
||||||
|
TAG_IF(sofia_test_pflag(profile, PFLAG_TCP_PING2PONG),
|
||||||
|
TPTAG_PINGPONG(profile->tcp_ping2pong)),
|
||||||
TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_SRV503),
|
TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_SRV503),
|
||||||
NTATAG_SRV_503(0)),
|
NTATAG_SRV_503(0)),
|
||||||
|
TAG_IF(sofia_test_pflag(profile, PFLAG_TCP_KEEPALIVE),
|
||||||
|
TPTAG_KEEPALIVE(profile->tcp_keepalive)),
|
||||||
NTATAG_DEFAULT_PROXY(profile->outbound_proxy),
|
NTATAG_DEFAULT_PROXY(profile->outbound_proxy),
|
||||||
NTATAG_SERVER_RPORT(profile->server_rport_level),
|
NTATAG_SERVER_RPORT(profile->server_rport_level),
|
||||||
NTATAG_CLIENT_RPORT(profile->client_rport_level),
|
NTATAG_CLIENT_RPORT(profile->client_rport_level),
|
||||||
@ -3697,6 +3703,15 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
|
|||||||
} else if (!strcasecmp(var, "sip-capture") && switch_true(val)) {
|
} else if (!strcasecmp(var, "sip-capture") && switch_true(val)) {
|
||||||
sofia_set_flag(profile, TFLAG_CAPTURE);
|
sofia_set_flag(profile, TFLAG_CAPTURE);
|
||||||
nua_set_params(profile->nua, TPTAG_CAPT(mod_sofia_globals.capture_server), TAG_END());
|
nua_set_params(profile->nua, TPTAG_CAPT(mod_sofia_globals.capture_server), TAG_END());
|
||||||
|
} else if (!strcasecmp(var, "tcp-keepalive") && !zstr(val)) {
|
||||||
|
profile->tcp_keepalive = atoi(val);
|
||||||
|
sofia_set_pflag(profile, PFLAG_TCP_KEEPALIVE);
|
||||||
|
} else if (!strcasecmp(var, "tcp-pingpong") && !zstr(val)) {
|
||||||
|
profile->tcp_pingpong = atoi(val);
|
||||||
|
sofia_set_pflag(profile, PFLAG_TCP_PINGPONG);
|
||||||
|
} else if (!strcasecmp(var, "tcp-ping2pong") && !zstr(val)) {
|
||||||
|
profile->tcp_ping2pong = atoi(val);
|
||||||
|
sofia_set_pflag(profile, PFLAG_TCP_PING2PONG);
|
||||||
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
|
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
|
||||||
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
|
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
|
||||||
} else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
|
} else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user