[Spce-user] LCR not working

Mark van Herpen mark at cambrium.nl
Mon Mar 23 08:26:16 EDT 2015


Hi all,

Tl;dr:
I'm having troubles setting up Least Cost Routing in Sipwise, LCR isn't
working although all config settings are in place I guess.
The calls are working trough each peer, but the fees are ignored and
it's balanced between the peers.

I'm using CE version 3.7.2.

lcr is enabled in /etc/ngcp-config/config.yml:
max_gw_lcr: 128
perform_peer_lcr: 'yes'

Fees:
I've added 3 different Peering Groups, with the same priority. Each
peering group has a Billing Profile. They have only 1 Fee Entry, with
the same source pattern: .
The destination is ^31
The only difference between them is the onpeak follow rate and offpeak
follow rate: peer 1 has 0.1, peer 2 has 0.2 peer 3 has 0.3
The intervals are 1.

Peering Server:
Each Peering Group has got a single peering server, with weight 1. They
all have a single peering rule with an empty callee prefix, callee and
caller pattern.

I can tell that LCR is enabled, because I placed some debug lines in the
config file, /etc/kamailio/proxy/proxy.cfg, in
#!ifdef ENABLE_PEER_LCR
# re-order lcr list based on costs per peer-group
lcr_rate("$avp(s:caller_cli_userprov)@$avp(s:acc_caller_domain)",
"$rU@$rd");
#!endif

A strange thing, dunno if it's relevant, but in the kamailio.lcr_rule
table there are only three records with an empty prefix, and NULL for
request and from uri:

mysql> use kamailio; select * from lcr_rule;
Database changed
+----+--------+--------+-------------+----------+---------+---------+----------+
| id | lcr_id | prefix | request_uri | from_uri | stopper | enabled |
group_id |
+----+--------+--------+-------------+----------+---------+---------+----------+
|  3 |      1 |        | NULL        | NULL     |       0 |       1 |
     1 |
|  4 |      1 |        | NULL        | NULL     |       0 |       1 |
     2 |
|  5 |      1 |        | NULL        | NULL     |       0 |       1 |
     3 |
+----+--------+--------+-------------+----------+---------+---------+----------+

When calling, an error is shown in the proxy.log file, a snippet:
NOTICE: <script>: Call to SIP Peering -
R=sip:316<SNIP-DESTNR>@<SNIP-HOSTNAME> ID=1540068188-268_b2b-1
NOTICE: <script>: Load gws matching calling part
'sip:317<SNIP-SOURCENR>@<SNIP-SIPDOMAIN>' and called user
'316<SNIP-DESTNR>' and called part
'sip:316<SNIP-DESTNR>@<SNIP-HOSTNAME>' -
R=sip:316<SNIP-DESTNR>@<SNIP-HOSTNAME> ID=1540068188-268_b2b-1
NOTICE: <script>: Setting acc source-leg for uuid
'78f32851-08b3-4093-be2f-42987b69723a':
'78f32851-08b3-4093-be2f-42987b69723a|317<SNIP-SOURCENR>|<SNIP-SIPDOMAIN>|317<SNIP-SOURCENR>|<SNIP-id>|sub01-cambriumvoice|3|||0|call|<SNIP-IPADDR>|1427112494.381625|||||||||||'
- R=sip:316<SNIP-DESTNR>@<SNIP-PEERIP>:5060;transport=udp
ID=1540068188-268_b2b-1
NOTICE: <script>: Setting acc destination-leg for uuid '0':
'0|||0|316<SNIP-DESTNR>|0|316<SNIP-DESTNR>|<SNIP-PEERIP>|316<SNIP-DESTNR>|<SNIP-HOSTNAME>|3|||||||||||'
- R=sip:316<SNIP-DESTNR>@<SNIP-PEERIP>:5060;transport=udp
ID=1540068188-268_b2b-1
ERROR: dispatcher [dispatch.c:1240]: ds_get_index(): destination set
[50] not found
ERROR: dispatcher [dispatch.c:1618]: ds_select_dst(): destination set
[50] not found
WARNING: <script>: Failed to load dispatcher entries for lb using did
'50', use first lb found in network.yml -
R=sip:316<SNIP-DESTNR>@<SNIP-PEERIP>:5060;transport=udp
ID=1540068188-268_b2b-1
NOTICE: <script>: Setting caller_cli_userprov/caller_domain_userprov
'317<SNIP-SOURCENR>@<SNIP-SIPDOMAIN>' for upn -
R=sip:316<SNIP-DESTNR>@<SNIP-PEERIP>:5060;transport=udp
ID=1540068188-268_b2b-1


I can't tell what I'm doing wrong or how to troubleshout any further..
Normaly, I would check the lcr_rule tables, but these are empty. I don't
know how lcr works with the sipwise patches on Kamailio.

Kind regards,

Mark van Herpen








More information about the Spce-user mailing list