← Volver al índice de módulos

sipcapture

The sipcapture module stores incoming/outgoing SIP messages in a database. Kamailio can capture SIP messages in three modes * IPIP encapsulation.
📊 Monitorización y Logging Kamailio 6.1 30 parámetros 12 funciones

Descripción general

The sipcapture module stores incoming/outgoing SIP messages in a database. Kamailio can capture SIP messages in three modes * IPIP encapsulation. (ETHHDR+IPHDR+IPHDR+UDPHDR). * Monitoring/mirroring port. * Homer encapsulation protocol mode (HEP v1, v2, v3). The capturing can be turned on/off using rpc commands. Example: kamctl rpc sipcapture.status on kamctl rpc sipcapture.status off

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/sipcapture.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/sipcapture

Parámetros de configuración

ParámetroTipoDescripción
db_url str 3.2. table_name (str) 3.3. mt_mode (str) 3.4. hash_source (str) 3.5. db_insert_mode (integer) 3.6. capture_on (integer) 3.7. capture_mode (str) 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (
table_name str 3.3. mt_mode (str) 3.4. hash_source (str) 3.5. db_insert_mode (integer) 3.6. capture_on (integer) 3.7. capture_mode (str) 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (integer) 3.10. raw_mon
mt_mode str 3.4. hash_source (str) 3.5. db_insert_mode (integer) 3.6. capture_on (integer) 3.7. capture_mode (str) 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (integer) 3.10. raw_moni_capture_on (integ
hash_source str 3.5. db_insert_mode (integer) 3.6. capture_on (integer) 3.7. capture_mode (str) 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (integer) 3.10. raw_moni_capture_on (integer) 3.11. raw_socket_li
db_insert_mode integer 3.6. capture_on (integer) 3.7. capture_mode (str) 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (integer) 3.10. raw_moni_capture_on (integer) 3.11. raw_socket_listen (string) 3.12. raw_interf
capture_on integer 3.7. capture_mode (str) 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (integer) 3.10. raw_moni_capture_on (integer) 3.11. raw_socket_listen (string) 3.12. raw_interface (string) 3.13. raw_soc
capture_mode str 3.8. hep_capture_on (integer) 3.9. raw_ipip_capture_on (integer) 3.10. raw_moni_capture_on (integer) 3.11. raw_socket_listen (string) 3.12. raw_interface (string) 3.13. raw_sock_children (integer) 3.1
hep_capture_on integer 3.9. raw_ipip_capture_on (integer) 3.10. raw_moni_capture_on (integer) 3.11. raw_socket_listen (string) 3.12. raw_interface (string) 3.13. raw_sock_children (integer) 3.14. promiscuous_on (integer) 3.
raw_ipip_capture_on integer 3.10. raw_moni_capture_on (integer) 3.11. raw_socket_listen (string) 3.12. raw_interface (string) 3.13. raw_sock_children (integer) 3.14. promiscuous_on (integer) 3.15. raw_moni_bpf_on (integer) 3.16.
raw_moni_capture_on integer 3.11. raw_socket_listen (string) 3.12. raw_interface (string) 3.13. raw_sock_children (integer) 3.14. promiscuous_on (integer) 3.15. raw_moni_bpf_on (integer) 3.16. capture_node (str) 3.17. insert_ret
raw_socket_listen string 3.12. raw_interface (string) 3.13. raw_sock_children (integer) 3.14. promiscuous_on (integer) 3.15. raw_moni_bpf_on (integer) 3.16. capture_node (str) 3.17. insert_retries (integer) 3.18. insert_retry
raw_interface string 3.13. raw_sock_children (integer) 3.14. promiscuous_on (integer) 3.15. raw_moni_bpf_on (integer) 3.16. capture_node (str) 3.17. insert_retries (integer) 3.18. insert_retry_timeout (integer) 3.19. call
raw_sock_children integer 3.14. promiscuous_on (integer) 3.15. raw_moni_bpf_on (integer) 3.16. capture_node (str) 3.17. insert_retries (integer) 3.18. insert_retry_timeout (integer) 3.19. callid_aleg_header (str) 3.20. topoh_u
promiscuous_on integer 3.15. raw_moni_bpf_on (integer) 3.16. capture_node (str) 3.17. insert_retries (integer) 3.18. insert_retry_timeout (integer) 3.19. callid_aleg_header (str) 3.20. topoh_unmask (int) 3.21. nonsip_hook (
raw_moni_bpf_on integer 3.16. capture_node (str) 3.17. insert_retries (integer) 3.18. insert_retry_timeout (integer) 3.19. callid_aleg_header (str) 3.20. topoh_unmask (int) 3.21. nonsip_hook (int) 3.22. event_callback (str)
capture_node str 3.17. insert_retries (integer) 3.18. insert_retry_timeout (integer) 3.19. callid_aleg_header (str) 3.20. topoh_unmask (int) 3.21. nonsip_hook (int) 3.22. event_callback (str) 3.23. capture_bad_msgs (i
insert_retries integer 3.18. insert_retry_timeout (integer) 3.19. callid_aleg_header (str) 3.20. topoh_unmask (int) 3.21. nonsip_hook (int) 3.22. event_callback (str) 3.23. capture_bad_msgs (int)
insert_retry_timeout integer 3.19. callid_aleg_header (str) 3.20. topoh_unmask (int) 3.21. nonsip_hook (int) 3.22. event_callback (str) 3.23. capture_bad_msgs (int)
callid_aleg_header str 3.20. topoh_unmask (int) 3.21. nonsip_hook (int) 3.22. event_callback (str) 3.23. capture_bad_msgs (int)
topoh_unmask int 3.21. nonsip_hook (int) 3.22. event_callback (str) 3.23. capture_bad_msgs (int)
nonsip_hook int 3.22. event_callback (str) 3.23. capture_bad_msgs (int)
event_callback str 3.23. capture_bad_msgs (int)
capture_bad_msgs int 3.1. db_url (str)
db_url str Database URL.
table_name str Name of the table's name used to store the SIP messages. Can contain multiple tables, separated by "|".
mt_mode str Name of the mode used for storing data in multiple tables. Modes can be "rand" (random), "round_robin" (use a round_robin algorithm) or "hash" (use hashing to determine the table to store). These mode
hash_source str The field of the SIP message used for hashing, when mt_mode is set to "hash". The value can be "call_id", "to_user" or "from_user".
db_insert_mode integer If set to 1, use INSERT DELAYED to store sip message into capture table when the DB driver has support for it. If no INSERT DELAYED support is offered by DB driver, then standard INSERT is used.
capture_on integer Parameter to enable/disable capture globally (on(1)/off(0))
capture_mode str This parameter can be used for defining a capture mode which can be used in the sip_capture calls as a parameter. A capture mode has a name and some parameters. It must be defined in the format: name=

Funciones exportadas

sip_capture([table], [cmode])

4.2. report_capture([table], [cid], [data]) 4.3. float2int(fval, ival) 4.4. sip_capture_forward(uri)

report_capture([table], [cid], [data])

4.3. float2int(fval, ival) 4.4. sip_capture_forward(uri)

float2int(fval, ival)

4.4. sip_capture_forward(uri)

sip_capture_forward(uri)

4.1. sip_capture([table], [cmode])

sip_capture([table], [cmode])

Store the current processed HEP/IPIP SIP message in a database. It is stored in the form prior applying changes made to it.

sip_capture()

usage ... sip_capture(); ... sip_capture("sip_capture_call_20160124"); ... sip_capture("", "cmode"); ...

report_capture([table], [cid], [data])

Store the current processed HEP REPORT message in a database.

report_capture()

usage ... report_capture(); ... report_capture("report_data", "$ci"); ... report_capture("report_data", "$ci", "{\"MOS\":4.1,\"PACKET_LOST\":100"}); ...

float2int(fval, ival)

Return the value of atof(fval) * atoi(ival). On case the result is 0, then -1 is returned.

report_capture()

usage ... $var(res) = float2int("10.5", "1"); ...

sip_capture_forward(uri)

Forward the HEP packet to an address specified by the parameter uri (it has to be a sip uri format). The function should be used inside event_route[sipcapture:request]. After using this function, add a return 0 in order to stop processing further the

sip_capture_forward()

usage ... event_route[sipcapture:request] { ... if(src_ip==1.2.3.4) { sip_capture_forward("sip:2.3.4.5:5090"); return 0; } ... } ...

Autores y contribuidores

Alexandr Dubovikov <alexandr.dubovikov@gmail.com>

Copyright © 2011-15 SIPCAPTURE ORG
Copyright © 2011 QSC AG
Copyright © 2011 http://www.qsc.de

Módulos relacionados

debugger dlgs rtjson siptrace statistics xlog