Functions
<function>tcp_conid_alive(conid)</function> Check the state of a TCP or WS connection ID Meaning of the parameters is as follows: conid (optional): the Kamailio internal connection id (as in the $conid pseudovariable). Retuns values: 1: Connection is OK -1: Connection has errors, does not exist or is about to be closed) <function>tcp_conid_alive</function> usage
<function>tcp_conid_state(conid)</function> Check the state of a TCP or WS connection ID Meaning of the parameters is as follows: conid (optional): the Kamailio internal connection id (as in the $conid pseudovariable). Retuns values: 1: Connection is OK 2: Socket is accepting incoming connections 3: Socket is setting up outgoing connection -1: Connection does not exist (or was closed) -2: Socket has reached EOF -3: Socket error has occured. Connection will likely close. -4: Socket is in unknow bad state. Connection will likely close. <function>tcp_conid_state</function> usage
<function>tcp_keepalive_enable([conid], idle, count, interval)</function> Enables keepalive on a TCP connection. Meaning of the parameters is as follows: conid (optional): the kamailio internal connection id on which TCP keepalive will be enabled. If no parameter is given, the keepalive mechanism will be enabled on the current message source connection. idle (seconds): the time before the first keepalive packet is sent out. count: number of non-acked keepalive before reseting the connection. interval (seconds): time between two keepalive probes. Retuns 1 on success, -1 on failure. <function>tcp_keepalive_enable</function> usage
<function>tcp_keepalive_disable([conid])</function> Disables keepalive on a TCP connection. Meaning of the parameters is as follows: conid (optional): the kamailio internal connection id on which TCP keepalive will be disabled. If no parameter is given, the keepalive mechanism will be disabled on the current message source connection. Retuns 1 on success, -1 on failure. <function>tcp_keepalive_disable</function> usage
<function>tcp_set_connection_lifetime([conid], lifetime)</function> Sets the connection lifetime of a connection (TCP). Meaning of the parameters is as follows: conid (optional): the kamailio internal connection id on which to set the new lifetime. If no parameter is given, it will be set on the current message source connection. lifetime (seconds): the new connection lifetime. Retuns 1 on success, -1 on failure. <function>tcp_set_connection_lifetime</function> usage
<function>tcp_enable_closed_event([conid])</function> Explicitly enables the "tcp:closed" event route on a TCP connection. Meaning of the parameters is as follows: conid (optionnal): the kamailio internal connection id. If no parameter is given, it will be enabled on the current message source connection. Retuns 1 on success, -1 on failure. <function>tcp_set_closed_event</function> usage