← Volver al índice de módulos

sworker

This module can delegate processing of SIP requests to a group of workers in the configuration file by using event_route[core:pre-routing]. The async workers have to be defined with the global paramet
🛠️ Utilidades y Varios Kamailio 6.1 2 parámetros 6 funciones

Descripción general

This module can delegate processing of SIP requests to a group of workers in the configuration file by using event_route[core:pre-routing]. The async workers have to be defined with the global parameter. The worker process that received the message internally does the usual execution of the config script, running request_route or reply_route. Note: the behaviour is different than the async module, because it does not create the transaction (obviously also not performing suspend). Note: it does not propagate anything set in the event_route, therefore any set flag, or avp, etc. are lost. The SIP message is processed by the delegated worker as it was fresh received from the network (including parsing).

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

Parámetros de configuración

ParámetroTipoDescripción
xdata str 3.1. xdata (str)
xdata str Name of a script variable from where to take additional data to be passed to special worker along with the SIP message. Same variable will be set by the special worker, therefore it has to be a writab

Funciones exportadas

sworker_active()

4.2. sworker_task(gname)

sworker_task(gname)

4.1. sworker_active()

sworker_active()

Return 1 (true) if the processing happens in an async process, or -1 (false) if the processing is happening in a SIP receiving process.

sworker_active()

usage ... request_route { ... if(sworker_active()) { } ... } ...

sworker_task(gname)

Delegate the processing of SIP message to a group of async workers. The function is restricted to be used inside event_route[core:pre-routing].

sworker_task()

usage ... event_route[core:pre-routing] { if(sworker_task("default")) { xinfo("===== delegate processing [$Tf] [$si:$sp]\n"); drop; } xinfo("===== processing continues [$Tf] [$si:$sp]\n"); ... } ...

Autores y contribuidores

Daniel-Constantin Mierla <miconda@gmail.com>

Copyright © 2020 asipto.com

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj