← Volver al índice de módulos

cnxcc

This module was designed to act as a mechanism to limit call duration based on credit information parameters. After getting the credit information of the call being set up, you can instruct the module
🛠️ Utilidades y Varios Kamailio 6.1 4 parámetros 15 funciones

Descripción general

This module was designed to act as a mechanism to limit call duration based on credit information parameters. After getting the credit information of the call being set up, you can instruct the module to start monitoring the consumed credit to shutdown a single call or a group of calls in case of credit exhaustion. Every call is associated to an unique client/customer identifier. If a credit event occurs, all calls hooked to this identifier are automatically shutdown. Cnxcc is dialog-aware so there's no need to explicitly allocate/deallocate the monitoring. The dlg_manage() function must be called in the configuration file for the dialog to be tracked. The credit discount rate is proportional to the number of calls grouped inside an identifier. Once the setup of the first call is done, the information remains while the call is active. If the customer starts a new call with the same routing criteria, it will land in the same monitoring bag and it will consume the same pool of credit in rates that are equal to the cost per second of both calls. If your accounting program does not maintain the state of the call in real time, this module can provide you with that ability. Cnxcc can also provide more common means of monitoring, i.e., by time limit or by maximum simultaneous calls.

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

Parámetros de configuración

ParámetroTipoDescripción
redis integer 3.2. credit_check_period (integer)
credit_check_period integer 3.1. redis (integer)
redis integer Redis datasource connection information
credit_check_period integer Indicates how often the credit checking function should be called. It is directly related to the precision of the module. The maximum precision is 1, which means that every call is checked every one s

Funciones exportadas

cnxcc_set_max_credit(customer, maxcredit, connect, cps, ipulse, fpulse)

4.2. cnxcc_set_max_time(customer, maxtime) 4.3. cnxcc_update_max_time(customer, maxtime) 4.4. cnxcc_set_max_channel(customer, maxchan) 4.5. cnxcc_terminate_all(customer)

cnxcc_set_max_time(customer, maxtime)

4.3. cnxcc_update_max_time(customer, maxtime) 4.4. cnxcc_set_max_channel(customer, maxchan) 4.5. cnxcc_terminate_all(customer)

cnxcc_update_max_time(customer, maxtime)

4.4. cnxcc_set_max_channel(customer, maxchan) 4.5. cnxcc_terminate_all(customer)

cnxcc_set_max_channel(customer, maxchan)

4.5. cnxcc_terminate_all(customer)

cnxcc_terminate_all(customer)

4.1. cnxcc_set_max_credit(customer, maxcredit, connect, cps, ipulse, fpulse)

cnxcc_set_max_credit(customer, maxcredit, connect, cps, ipulse, fpulse)

Note

cnxcc_set_max_credit()

... cnxcc_set_max_credit("john-doe", "100", "3.0", "0.5", 60, 1); ... $var(customer) = "john-doe"; # customer id $var(credit) = "100"; # max credit for all calls with the same # customer id $var(connect) = "3.0"; # connect cost or initial cost for th

cnxcc_set_max_time(customer, maxtime)

Note

cnxcc_set_max_time()

... $var(customer) = "john-doe-basic"; $var(max_time) = 120; cnxcc_set_max_time("$var(customer)", "$var(max_time)"); ...

cnxcc_update_max_time(customer, maxtime)

Note

cnxcc_update_max_time()

... $var(client) = "john-doe-basic"; $var(update_time) = 5;

cnxcc_set_max_channel(customer, maxchan)

Note

cnxcc_set_max_channels()

... $var(customer) = "john-doe-123-basic"; $var(max_chan) = 2; $var(retcode) = cnxcc_set_max_channels("$var(customer)", "$var(max_chan)");

cnxcc_terminate_all(customer)

Terminates all calls of the specified customer/profile.

cnxcc_set_max_time()

... $var(customer) = "john-doe-123-basic";

Autores y contribuidores

Carlos Ruiz DíazConexionGroup S.A.

Copyright © 2013 Carlos Ruiz Díaz, carlos.ruizdiaz@gmail.com
Copyright © 2014 Carlos Ruiz Díaz, carlos@latamvoices.com

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj