### Description
Implement a new TM logic to distribute calls to contacts belonging to the same subscriber
similar to the weight mechanism that is used in lcr module. This mechanism should support
primary/backup, load-sharing or a combination of both.
### Expected behavior
Currently, with the existing serial forking using q-value:
- if the q-values are different, the devices will ring serially but always in the same
order
- if the q-values are equals, the devices will ring in parallel
With the new mechanism, instead, I have to be able, for example, to register 2 devices and
send:
- the 50% of the call to device 1 and then to device 2 as a backup
- the 50% of the call to device 2 and then to device 1 as a backup
### Possible Solutions
A possible approach is to extend the existing load_contact function and re-use the q-value
as a weight.
For example:
- contact 1 has Q value 1
- contact 2 has Q value 0.5
- contact 3 has Q value 0.5
- contact 4 has Q value 0
Then kamailio distributes the calls using the following proportion:
Q : total_Q = call_prob : 100
So:
- contact 1 has probability to ring of 50% (1 * 100 / 2)
- contact 2 has probability to ring of 25% (0.5 * 100 / 2)
- contact 3 has probability to ring of 25% (0.5 * 100 / 2)
- contact 4 has probability to ring of 0 (0 * 100 / 2) but it is used as backup option if
all other contacts fail
This should solves the limitations of serial forking and allows to achieve equal or
predictable weight-based call termination distribution.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2167