[Spce-user] Problem with SIP Peering and Billing

Jon Bonilla (Manwe) jbonilla at sipwise.com
Fri Jul 26 08:37:14 EDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El Fri, 26 Jul 2013 15:15:01 +0300
Ali Jawad <ali.jawad at splendor.net> escribió:

> All is the same on both billing groups and sub groups ..the only difference
> is in the billing amounts and the IPs of the 1 carrier gw in each group.
> Traffic always goes to first defined group.
> 
> 

Then I'd say it's by design. This is how it works:

1: The module loads all gws that match with the peering rules
2: Then it orders those gws by match length
3: Then by priority
4: Then randomize by weight


I guess the load of the gws in step 1 and order them by length in step 2 will
always give the same result as the gws will be loaded in order and not
randomized before ordered.

For someone familiar with C it would be  trivial to randomize the gws in step 1
or 2.

Check in the sources of kamailio the function "load_gws" in the file
modules/lcr/lcr_mod.c


Note: Not C programer myself. No warranties about what I've just told you :)


cheers,

Jon


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJR8m19AAoJEBm7zl2xC8frD3IP/jCBYBppk1BnFh2lOAnHxz46
dhTF8jSx5swt04YHHKcxVqOdr/HrCvg/4H66ATcC3p8cysKEXgbRGbNhI3LlipOp
kV/yQ4vAqDzUfWBZ72AA1LRzfraHI7DjJZIchYQXpzEOWro7lFXU5Pr7C5ZCVeVU
e8gF7oXQsFgn6j9unPkU9GStKz14h4W/vwjxjMdKBK94GslmYtpbZKUBTORFTrqd
pwJOwTs+/4BhU0s6yYEKN7wzsYjgVhloNS3fQzrsW2dL9qjN6sbJsnTq9za2vc4m
ANJZS6dhV1bEa8k5lXFs3xI+W3/KqdUgY7kMwAvwzDAeqCUQbid/MLna+C5hrJsU
/cDq3OI5aWyxNZBme7EKbxQJkRy9IgwPdj/JYPapWTFWTnzBUe54AP8XRxsBM7/z
prOXCYEQ2t48yVwnvJ+s4RFtvDi4zrNGnju2ewFxu9ffz0MVB1AM3aKEFpN8Yhqb
Nr/V0az1H4flItTAak3LOyMwNgAe0j56WvRoPrUHvQgpQlUozwgNNE68gp9etZge
6ur13JY9cjLoG+0TEKCK5jLWcead+CaxzvReVUCnWjb1s9bwTfyWnGiZ0LVxDlrN
MjRkHy9x/UKvGQrUINTBDgUiksMkZFGARrHqTawzu8+5/e8tvH1ZFdX4rGJLz4Ij
CpMNFypYugX8es7uJBLM
=TVJF
-----END PGP SIGNATURE-----


More information about the Spce-user mailing list