<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783">
<STYLE></STYLE>
</HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>I am storing the <A
href="mailto:user@domain">user@domain</A> for the client in the tag column of
the trusted table, so when I </FONT></DIV>
<DIV><FONT size=2 face=Arial>authorize the IP I place the <A
href="mailto:user@domain">user@domain</A> information in the variables. Don't
know if I am doing</FONT></DIV>
<DIV><FONT size=2 face=Arial>all the correct settings because I am a real
newbie. But CDRTool is working perfectly for post paid.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I am having an issue with not decrementing prepaid
value and will be posting this in a few minutes, </FONT></DIV>
<DIV><FONT size=2 face=Arial>but I don't think </FONT><FONT size=2
face=Arial>its related to this IP issue.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Alberto</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=ag@ag-projects.com href="mailto:ag@ag-projects.com">Adrian
Georgescu</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=listas@b2br.net
href="mailto:listas@b2br.net">Alberto Listas</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=danb@sms4sip.com
href="mailto:danb@sms4sip.com">DanB</A> ; <A title=users@lists.opensips.org
href="mailto:users@lists.opensips.org">users@lists.opensips.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 23, 2009 7:20
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [OpenSIPS-Users] CDRTool
does not identify by IP origin from OpenSips</DIV>
<DIV><BR></DIV>
<DIV>CDRTool was designed to rate while using <A
href="mailto:user@domain">user@domain</A> format for SIP URIs. IPs/hostnames
only without username are not fully supported, something somewhere will likely
break as you have already noticed.</DIV>
<DIV><BR></DIV>
<DIV>Adrian</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>On Jul 22, 2009, at 7:41 PM, Alberto Listas wrote:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV bgcolor="#ffffff">
<DIV><FONT size=2 face=Arial>Hi Dan,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks for the info, the doc/Rating.txt is very
good but</FONT></DIV>
<DIV><FONT size=2 face=Arial>sometimes you need previous experience to
understand</FONT></DIV>
<DIV><FONT size=2 face=Arial>the details.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>I was already using the param:</FONT></DIV>
<DIV><FONT size=2 face=Arial>
Source-IP=$avp(s:source_ip);</FONT></DIV>
<DIV><FONT size=2 face=Arial>But I wasn't setting any values so the SourceIP
column was blank.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I added a line to the cfg to set the
value:</FONT></DIV>
<DIV><FONT size=2 face=Arial> $avp(s:source_ip) =
$si;</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>And now the rating identifies the origin by
SourceIP</FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG>when</STRONG><SPAN
class=Apple-converted-space> </SPAN>the</FONT><FONT size=2
face=Arial> CallingStationId is in the form<SPAN
class=Apple-converted-space> </SPAN><A
href="mailto:123456@1.1.1.1">123456@1.1.1.1</A></FONT></DIV>
<DIV><FONT size=2 face=Arial>(and hence the domain is set to the IP of the
source)</FONT></DIV>
<DIV><FONT size=2 face=Arial>but when CallingStationId is in the form
1.1.1.1 (just the IP)</FONT></DIV>
<DIV><FONT size=2 face=Arial>the Domain in the info of the call is blank and
the rating does not work.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>When the Domain is blank the rating engine use
the profile</FONT></DIV>
<DIV><FONT size=2 face=Arial>"Customer:<SPAN
class=Apple-converted-space> </SPAN></FONT><A
href="mailto:alice@example.com"><FONT size=2
face=Arial>alice@example.com</FONT></A><FONT size=2 face=Arial>" from
the default Customer</FONT></DIV>
<DIV><FONT size=2 face=Arial>configuration of CDRTool. I suppose this is
because this customer</FONT></DIV>
<DIV><FONT size=2 face=Arial>has a blank domain field. But this is an error
since it should use</FONT></DIV>
<DIV><FONT size=2 face=Arial>the default profile instead.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Anyway, Thanks for your help, now it can rate
by IP.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Cheers,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Alberto</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(0,0,0) 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message -----</DIV>
<DIV
style="BACKGROUND-COLOR: rgb(228,228,228); FONT: 10pt arial; -webkit-background-clip: initial; -webkit-background-origin: initial"><B>From:</B><SPAN
class=Apple-converted-space> </SPAN><A title=danb@sms4sip.com
href="mailto:danb@sms4sip.com">DanB</A></DIV>
<DIV style="FONT: 10pt arial"><B>To:</B><SPAN
class=Apple-converted-space> </SPAN><A title=listas@b2br.net
href="mailto:listas@b2br.net">Alberto Listas</A></DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B><SPAN
class=Apple-converted-space> </SPAN><A title=users@lists.opensips.org
href="mailto:users@lists.opensips.org">users@lists.opensips.org</A></DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B><SPAN
class=Apple-converted-space> </SPAN>Wednesday, July 22, 2009 4:23
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B><SPAN
class=Apple-converted-space> </SPAN>Re: [OpenSIPS-Users] CDRTool does
not identify by IP origin from OpenSips</DIV>
<DIV><BR></DIV>Hi Alberto,
<DIV><BR></DIV>
<DIV>By default CDRTool takes the gateway parameter out of Source IP
(nicely explained also in the doc/RATING.TXT) and if you don't modify the
defaults, out of radacct.SourceIP column.</DIV>
<DIV><BR></DIV>
<DIV>In order to identify the gateway, you need to enforce that SourceIP
inside opensips script to whatever IP you want to be used as your
gateway.</DIV>
<DIV>Example of params in opensips.cfg:</DIV>
<DIV>modparam("acc", "radius_extra", "
Source-IP=$avp(s:mygtw)")</DIV>
<DIV><BR></DIV>
<DIV>Another trick you can use is to write your own radius sql query which
places the SourceIP from another radius attribute received.</DIV>
<DIV><BR></DIV>
<DIV>Cheers,</DIV>
<DIV>DanB</DIV><BR>
<DIV class=gmail_quote>On Tue, Jul 21, 2009 at 9:44 PM, Alberto
Listas<SPAN class=Apple-converted-space> </SPAN><SPAN dir=ltr><<A
href="mailto:listas@b2br.net">listas@b2br.net</A>></SPAN><SPAN
class=Apple-converted-space> </SPAN>wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV bgcolor="#ffffff">
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial>Hi,<BR><BR>I am having a difficulty with
the rating in CDRTool. When I telnet and give this
command:<BR><BR>ShowPrice From=<A
href="mailto:sip%3A005521810000@10.0.0.4"
target=_blank>sip:005521810000@10.0.0.4</A><SPAN
class=Apple-converted-space> </SPAN>To=<A
href="mailto:sip%3A00552181000000@10.0.0.1"
target=_blank>sip:00552181000000@10.0.0.1</A><SPAN
class=Apple-converted-space> </SPAN>Gateway=10.0.0.4
Duration=30</FONT></DIV>
<DIV><FONT size=2 face=Arial>(IPs where changed)</FONT></DIV><FONT
size=2 face=Arial>
<DIV><BR>The rating engine identifies the customer by the gateway and
rates correctly.<BR><BR>When the call comes from the OpenSips it doesn't
identify the customer and uses<BR>the default profile:<BR><BR>Start
time: 2009-07-21 14:55:24<SPAN
class=Apple-converted-space> </SPAN><BR>Stop time: 2009-07-21
14:55:59<BR>Method:Invite from :<SPAN
class=Apple-converted-space> </SPAN><BR><A
href="mailto:From%3A5521083200000@10.0.0.4"
target=_blank>From:5521083200000@10.0.0.4</A><BR>Domain:10.0.0.4<BR>To
(dialed URI):<A href="mailto:005521810000@10.0.0.4"
target=_blank>005521810000@10.0.0.4</A><BR>Canonical URI:<SPAN
class=Apple-converted-space> </SPAN><A
href="mailto:005521810000@10.0.0.1"
target=_blank>005521810000@10.0.0.1</A><BR>Next hop<SPAN
class=Apple-converted-space> </SPAN><A
href="mailto:URI%3A005521810000@10.0.0.2"
target=_blank>URI:005521810000@10.0.0.2</A><BR>Destination: BRAZIL CELL
(55218)<BR>Billing<SPAN class=Apple-converted-space> </SPAN><A
href="mailto:Party%3A5521810000@10.0.0.4"
target=_blank>Party:5521810000@10.0.0.4</A><BR>Reseller:<BR></DIV>
<DIV>Duration: 35 s<BR>App: audio<BR>Destination: 55218<BR>Customer:
default<BR>Connect: 0.0000 ......</DIV>
<DIV><BR>Should I set some different variable to FreeRadius for it to
identify the GATEWAY?</DIV></FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV><FONT color=#888888>
<DIV><FONT size=2
face=Arial>Alberto</FONT></DIV></FONT></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</A><BR><A
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target=_blank>http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE>_______________________________________________<BR>Users
mailing list<BR><A
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</A><BR><A
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR></DIV></SPAN></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>