<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 May 2013 12:16, Andreas Granig <span dir="ltr"><<a href="mailto:agranig@sipwise.com" target="_blank">agranig@sipwise.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pete,<div class="im"><br>
<br>
On 05/10/2013 12:59 PM, Pete Kelly wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for that - so I have created the new billing profile and created<br>
the contract, so I have 2 contracts in the "SIP Peerings" menu.<br>
<br>
When I create the peering group, how does it know to do some kind of LCR?<br>
</blockquote>
<br></div>
Because you have to assign a contract id to a peering group, and a contract has a billing profile, where the costs of calls via this groups are stored.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Provider A charges me 10c/min for prefix 44, Provider B charges me<br>
11c/min for prefix 44.<br>
<br>
When one of my subscribers dials prefix 44 I would like the LCR to<br>
choose Provider A to terminate the call as they are cheaper for termination.<br>
</blockquote>
<br></div>
We implemented a kamailio module called lcr_rate, which takes the lcr list as returned by the lcr module (ordered by weight, priorities etc), and reorders the groups of gateways according to the cost.</blockquote><div><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, am I right in thinking that in order to have a "sell price" for my<br>
subscribers, I just set them up with a Billing Profile which reflects<br>
sell pricing, and to have a "cost price" for my sip peers, I just set<br>
them up with a different billing profile which reflects my "cost price" ?<br>
</blockquote>
<br></div>
Exactly. It depends on where the profile is being used to tell whether the fees are costs or income.</blockquote><div><br></div><div style>Thanks Andreas, I have LCR working now as a basic example.</div><div style><br></div>
<div style>I notice though that calls are not being rated. Every call I make is left as 'unrated' against the subscriber. Is there a rating script I need to run?</div><div style><br></div><div style><br></div><div style>
Also there seems to be an option to use a permanent Contact header rather than a SIP REGISTER, is this something that is supported? Even when I fill it in I am being asked for Auth credentials within a 407.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
Andreas<br>
</font></span></blockquote></div><br></div></div>