CDRTool does not identify by IP origin from OpenSips

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CDRTool does not identify by IP origin from OpenSips

Alberto Listas
Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give this command:

ShowPrice From=sip:005521810000@10.0.0.4 To=sip:00552181000000@10.0.0.1 Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates correctly.

When the call comes from the OpenSips it doesn't identify the customer and uses
the default profile:

Start time: 2009-07-21 14:55:24
Stop time: 2009-07-21 14:55:59
Method:Invite from :
From:5521083200000@10.0.0.4
Domain:10.0.0.4
To (dialed URI):005521810000@10.0.0.4
Canonical URI: 005521810000@10.0.0.1
Next hop URI:005521810000@10.0.0.2
Destination: BRAZIL CELL (55218)
Billing Party:5521810000@10.0.0.4
Reseller:
Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0.0000 ......

Should I set some different variable to FreeRadius for it to identify the GATEWAY?
 
Thanks,
 
Alberto

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool does not identify by IP origin from OpenSips

DanB-2
Hi Alberto,

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.

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.
Example of params in opensips.cfg:
modparam("acc", "radius_extra", "       Source-IP=$avp(s:mygtw)")

Another trick you can use is to write your own radius sql query which places the SourceIP from another radius attribute received.

Cheers,
DanB

On Tue, Jul 21, 2009 at 9:44 PM, Alberto Listas <[hidden email]> wrote:
Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give this command:

ShowPrice From=[hidden email] To=[hidden email] Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates correctly.

When the call comes from the OpenSips it doesn't identify the customer and uses
the default profile:

Start time: 2009-07-21 14:55:24
Stop time: 2009-07-21 14:55:59
Method:Invite from :
[hidden email]
Domain:10.0.0.4
To (dialed URI):[hidden email]
Canonical URI: [hidden email]
Next hop [hidden email]
Destination: BRAZIL CELL (55218)
Billing [hidden email]
Reseller:
Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0.0000 ......

Should I set some different variable to FreeRadius for it to identify the GATEWAY?
 
Thanks,
 
Alberto

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool does not identify by IP origin from OpenSips

Alberto Listas
Hi Dan,
 
Thanks for the info, the doc/Rating.txt is very good but
sometimes you need previous experience to understand
the details.
 
I was already using the param:
    Source-IP=$avp(s:source_ip);
But I wasn't setting any values so the SourceIP column was blank.
I added a line to the cfg to set the value:
    $avp(s:source_ip) = $si;
 
And now the rating identifies the origin by SourceIP
when the CallingStationId is in the form [hidden email]
(and hence the domain is set to the IP of the source)
but when CallingStationId is in the form 1.1.1.1 (just the IP)
the Domain in the info of the call is blank and the rating does not work.
 
When the Domain is blank the rating engine use the profile
"Customer: [hidden email]" from the default Customer
configuration of CDRTool. I suppose this is because this customer
has a blank domain field. But this is an error since it should use
the default profile instead.
 
Anyway, Thanks for your help, now it can rate by IP.
 
Cheers,
 
Alberto
 
----- Original Message -----
Sent: Wednesday, July 22, 2009 4:23 AM
Subject: Re: [OpenSIPS-Users] CDRTool does not identify by IP origin from OpenSips

Hi Alberto,

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.

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.
Example of params in opensips.cfg:
modparam("acc", "radius_extra", "       Source-IP=$avp(s:mygtw)")

Another trick you can use is to write your own radius sql query which places the SourceIP from another radius attribute received.

Cheers,
DanB

On Tue, Jul 21, 2009 at 9:44 PM, Alberto Listas <[hidden email]> wrote:
Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give this command:

ShowPrice From=[hidden email] To=[hidden email] Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates correctly.

When the call comes from the OpenSips it doesn't identify the customer and uses
the default profile:

Start time: 2009-07-21 14:55:24
Stop time: 2009-07-21 14:55:59
Method:Invite from :
[hidden email]
Domain:10.0.0.4
To (dialed URI):[hidden email]
Canonical URI: [hidden email]
Next hop [hidden email]
Destination: BRAZIL CELL (55218)
Billing [hidden email]
Reseller:
Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0.0000 ......

Should I set some different variable to FreeRadius for it to identify the GATEWAY?
 
Thanks,
 
Alberto

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool does not identify by IP origin from OpenSips

Adrian Georgescu
CDRTool was designed to rate while using user@domain format for SIP URIs. IPs/hostnames only without username are not fully supported, something somewhere will likely break as you have already noticed.

Adrian

On Jul 22, 2009, at 7:41 PM, Alberto Listas wrote:

Hi Dan,
 
Thanks for the info, the doc/Rating.txt is very good but
sometimes you need previous experience to understand
the details.
 
I was already using the param:
    Source-IP=$avp(s:source_ip);
But I wasn't setting any values so the SourceIP column was blank.
I added a line to the cfg to set the value:
    $avp(s:source_ip) = $si;
 
And now the rating identifies the origin by SourceIP
when the CallingStationId is in the form [hidden email]
(and hence the domain is set to the IP of the source)
but when CallingStationId is in the form 1.1.1.1 (just the IP)
the Domain in the info of the call is blank and the rating does not work.
 
When the Domain is blank the rating engine use the profile
"Customer: [hidden email]" from the default Customer
configuration of CDRTool. I suppose this is because this customer
has a blank domain field. But this is an error since it should use
the default profile instead.
 
Anyway, Thanks for your help, now it can rate by IP.
 
Cheers,
 
Alberto
 
----- Original Message -----
Sent: Wednesday, July 22, 2009 4:23 AM
Subject: Re: [OpenSIPS-Users] CDRTool does not identify by IP origin from OpenSips

Hi Alberto,

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.

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.
Example of params in opensips.cfg:
modparam("acc", "radius_extra", "       Source-IP=$avp(s:mygtw)")

Another trick you can use is to write your own radius sql query which places the SourceIP from another radius attribute received.

Cheers,
DanB

On Tue, Jul 21, 2009 at 9:44 PM, Alberto Listas <[hidden email]> wrote:
Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give this command:

ShowPrice From=[hidden email] To=[hidden email] Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates correctly.

When the call comes from the OpenSips it doesn't identify the customer and uses
the default profile:

Start time: 2009-07-21 14:55:24 
Stop time: 2009-07-21 14:55:59
Method:Invite from : 
[hidden email]
Domain:10.0.0.4
To (dialed URI):[hidden email]
Canonical URI: [hidden email]
Next hop [hidden email]
Destination: BRAZIL CELL (55218)
Billing [hidden email]
Reseller:
Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0.0000 ......

Should I set some different variable to FreeRadius for it to identify the GATEWAY?
 
Thanks,
 
Alberto

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool does not identify by IP origin from OpenSips

Alberto Listas
I am storing the [hidden email] for the client in the tag column of the trusted table, so when I
authorize the IP I place the [hidden email] information in the variables. Don't know if I am doing
all the correct settings because I am a real newbie. But CDRTool is working perfectly for post paid.
I am having an issue with not decrementing prepaid value and will be posting this in a few minutes,
but I don't think its related to this IP issue.
Alberto
----- Original Message -----
Sent: Thursday, July 23, 2009 7:20 AM
Subject: Re: [OpenSIPS-Users] CDRTool does not identify by IP origin from OpenSips

CDRTool was designed to rate while using [hidden email] format for SIP URIs. IPs/hostnames only without username are not fully supported, something somewhere will likely break as you have already noticed.

Adrian

On Jul 22, 2009, at 7:41 PM, Alberto Listas wrote:

Hi Dan,
 
Thanks for the info, the doc/Rating.txt is very good but
sometimes you need previous experience to understand
the details.
 
I was already using the param:
    Source-IP=$avp(s:source_ip);
But I wasn't setting any values so the SourceIP column was blank.
I added a line to the cfg to set the value:
    $avp(s:source_ip) = $si;
 
And now the rating identifies the origin by SourceIP
when the CallingStationId is in the form [hidden email]
(and hence the domain is set to the IP of the source)
but when CallingStationId is in the form 1.1.1.1 (just the IP)
the Domain in the info of the call is blank and the rating does not work.
 
When the Domain is blank the rating engine use the profile
"Customer: [hidden email]" from the default Customer
configuration of CDRTool. I suppose this is because this customer
has a blank domain field. But this is an error since it should use
the default profile instead.
 
Anyway, Thanks for your help, now it can rate by IP.
 
Cheers,
 
Alberto
 
----- Original Message -----
Sent: Wednesday, July 22, 2009 4:23 AM
Subject: Re: [OpenSIPS-Users] CDRTool does not identify by IP origin from OpenSips

Hi Alberto,

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.

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.
Example of params in opensips.cfg:
modparam("acc", "radius_extra", "       Source-IP=$avp(s:mygtw)")

Another trick you can use is to write your own radius sql query which places the SourceIP from another radius attribute received.

Cheers,
DanB

On Tue, Jul 21, 2009 at 9:44 PM, Alberto Listas <[hidden email]> wrote:
Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give this command:

ShowPrice From=[hidden email] To=[hidden email] Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates correctly.

When the call comes from the OpenSips it doesn't identify the customer and uses
the default profile:

Start time: 2009-07-21 14:55:24 
Stop time: 2009-07-21 14:55:59
Method:Invite from : 
[hidden email]
Domain:10.0.0.4
To (dialed URI):[hidden email]
Canonical URI: [hidden email]
Next hop [hidden email]
Destination: BRAZIL CELL (55218)
Billing [hidden email]
Reseller:
Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0.0000 ......

Should I set some different variable to FreeRadius for it to identify the GATEWAY?
 
Thanks,
 
Alberto

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users