← Volver al índice de módulos

http_async_client

This module performs asynchronous HTTP queries.
🌐 WebRTC y Transporte Kamailio 6.1 30 parámetros 3 funciones

Descripción general

This module performs asynchronous HTTP queries.

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

Parámetros de configuración

ParámetroTipoDescripción
workers integer 3.2. connection_timeout (integer) 3.3. hash_size (integer) 3.4. tls_version (integer) 3.5. tls_verify_host (integer) 3.6. tls_verify_peer (integer) 3.7. curl_verbose (integer) 3.8. curl_follow_redirec
connection_timeout integer 3.3. hash_size (integer) 3.4. tls_version (integer) 3.5. tls_verify_host (integer) 3.6. tls_verify_peer (integer) 3.7. curl_verbose (integer) 3.8. curl_follow_redirect (integer) 3.9. memory_manager (s
hash_size integer 3.4. tls_version (integer) 3.5. tls_verify_host (integer) 3.6. tls_verify_peer (integer) 3.7. curl_verbose (integer) 3.8. curl_follow_redirect (integer) 3.9. memory_manager (string) 3.10. tls_client_c
tls_version integer 3.5. tls_verify_host (integer) 3.6. tls_verify_peer (integer) 3.7. curl_verbose (integer) 3.8. curl_follow_redirect (integer) 3.9. memory_manager (string) 3.10. tls_client_cert (string) 3.11. tls_clie
tls_verify_host integer 3.6. tls_verify_peer (integer) 3.7. curl_verbose (integer) 3.8. curl_follow_redirect (integer) 3.9. memory_manager (string) 3.10. tls_client_cert (string) 3.11. tls_client_key (string) 3.12. tls_ca_pa
tls_verify_peer integer 3.7. curl_verbose (integer) 3.8. curl_follow_redirect (integer) 3.9. memory_manager (string) 3.10. tls_client_cert (string) 3.11. tls_client_key (string) 3.12. tls_ca_path (string) 3.13. tcp_keepalive
curl_verbose integer 3.8. curl_follow_redirect (integer) 3.9. memory_manager (string) 3.10. tls_client_cert (string) 3.11. tls_client_key (string) 3.12. tls_ca_path (string) 3.13. tcp_keepalive (integer) 3.14. tcp_ka_idle
curl_follow_redirect integer 3.9. memory_manager (string) 3.10. tls_client_cert (string) 3.11. tls_client_key (string) 3.12. tls_ca_path (string) 3.13. tcp_keepalive (integer) 3.14. tcp_ka_idle (integer) 3.15. tcp_ka_interval (in
memory_manager string 3.10. tls_client_cert (string) 3.11. tls_client_key (string) 3.12. tls_ca_path (string) 3.13. tcp_keepalive (integer) 3.14. tcp_ka_idle (integer) 3.15. tcp_ka_interval (integer)
tls_client_cert string 3.11. tls_client_key (string) 3.12. tls_ca_path (string) 3.13. tcp_keepalive (integer) 3.14. tcp_ka_idle (integer) 3.15. tcp_ka_interval (integer)
tls_client_key string 3.12. tls_ca_path (string) 3.13. tcp_keepalive (integer) 3.14. tcp_ka_idle (integer) 3.15. tcp_ka_interval (integer)
tls_ca_path string 3.13. tcp_keepalive (integer) 3.14. tcp_ka_idle (integer) 3.15. tcp_ka_interval (integer)
tcp_keepalive integer 3.14. tcp_ka_idle (integer) 3.15. tcp_ka_interval (integer)
tcp_ka_idle integer 3.15. tcp_ka_interval (integer)
tcp_ka_interval integer 3.1. workers (integer)
workers integer Number of worker processes to be started to send HTTP requests and asynchronously handle responses.
connection_timeout integer Defines in milliseconds how long Kamailio waits for a response from HTTP server.
hash_size integer The size of the hash table internally used to keep the requests. A larger table is much faster but consumes more memory. The hash size must be a power of two, otherwise it will be rounded down to the
tls_version integer For HTTPS connections, what's the preferred SSL version. http://curl.haxx.se/libcurl/c/CURLOPT_SSLVERSION.html
tls_verify_host integer For HTTPS connections, whether the client should verify the server host. http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html
tls_verify_peer integer For HTTPS connections, whether the client should verify the server identity. http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
curl_verbose integer If defined to a non-zero value, extra information from cURL (request and response headers) will be included in the kamailio logs, with LM_INFO priority.
curl_follow_redirect integer If defined to a non-zero value, will tell curl to follow HTTP 3xx redirects.
memory_manager string Choose the memory manager used by curl: * shm: curl will use kamailio's SHM pool and memory manager * sys: curl will use the system memory and memory manager (malloc, free, ...)
tls_client_cert string For HTTPS connections, the file path of the TLS client certificate to be used. http://curl.haxx.se/libcurl/c/CURLOPT_SSLCERT.html
tls_client_key string For HTTPS connections, the file path of the TLS client certificate key. http://curl.haxx.se/libcurl/c/CURLOPT_SSLKEY.html
tls_ca_path string The path of the directory holding the CA certificates. http://curl.haxx.se/libcurl/c/CURLOPT_CAPATH.html
tcp_keepalive integer If defined to a non-zero value, TCP keepalive will be enabled on cURL connections.
tcp_ka_idle integer TCP keep-alive idle time wait value (in seconds).
tcp_ka_interval integer TCP keep-alive interval (in seconds).

Funciones exportadas

http_async_query(url, route_name)

4.1. http_async_query(url, route_name)

http_async_query(url, route_name)

Sends HTTP(S) request asynchronously to the URL given in “url” parameter, which is a string that may contain pseudo variables.

http_async_query()

usage ... # create a transaction to be paused, and resumed in route[HTTP_REPLY] t_newtran(); # GET http_async_query("http://example.com/test.php?r_uri=$rU&f_uri=$fU", "HTTP_REPLY" ); ... # POST $http_req(body) = "{'r_uri':'" + $rU + "', 'f_uri':'" +

Autores y contribuidores

Federico Cabiddu <federico.cabiddu@gmail.com>Giacomo Vacca <giacomo.vacca@gmail.com>Camille OudotOrange <camille.oudot@orange.com>

Copyright © 2016 Federico Cabiddu

Módulos relacionados

http_client jsonrpcs websocket xhttp xmlrpc