CDRTool - ReloadRatingTables and new destinations

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

CDRTool - ReloadRatingTables and new destinations

DanB-2
Folks,

some strange behavior I have noticed in CDRTool: both ReloadRatingTables
and "/etc/init.d/cdrtool reload" are strangely removing the destinations
and destinations.sip from cdrtool.memcached table, therefore I have the
feeling that this is why ShowPrice does newer show newer updates in the
destinations table.

"""
version
CDRTool version 6.7.2
"""

The only way I made CDRTool work with newer destinations inserted into
destinations table was restarting it. Is this behavior wanted?
Also, ShowPrice used to insert also destination name, other than dest_id
inside Destination field, but no longer there.


Ta,
DanB


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

Re: CDRTool - ReloadRatingTables and new destinations

Adrian Georgescu
Hello Dan,

I found the bug that affected the rating engine, I fixed it. You should upgrade to 6.7.3 version.

Regards,
Adrian

On Mar 14, 2009, at 7:12 PM, Dan-Cristian Bogos wrote:

Folks,

some strange behavior I have noticed in CDRTool: both ReloadRatingTables
and "/etc/init.d/cdrtool reload" are strangely removing the destinations
and destinations.sip from cdrtool.memcached table, therefore I have the
feeling that this is why ShowPrice does newer show newer updates in the
destinations table.

"""
version
CDRTool version 6.7.2
"""

The only way I made CDRTool work with newer destinations inserted into
destinations table was restarting it. Is this behavior wanted?
Also, ShowPrice used to insert also destination name, other than dest_id
inside Destination field, but no longer there.


Ta,
DanB


_______________________________________________
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 - ReloadRatingTables and new destinations

DanB-2
Hey Adrian,

thanks for the quick reaction.

Here it comes what I found out after tests (could be I am doing something wrong):

* ReloadRatingTables produces a reload of destination table now (during normalize.php execution, so not real-time but depending on how often this script is run in cron).
* Even when the tables are reloaded, the new destinations are not processed, therefore when querying ShowPrice I will get still the initial values (the one received on cdrtool startup). So the result is that I am adding/deleting/modifying destinations, but no effect in the ShowPrice.

My version:
"""
version
CDRTool version 6.7.3
"""

Ta,
DanB


On Sun, Mar 15, 2009 at 9:56 AM, Adrian Georgescu <[hidden email]> wrote:
Hello Dan,

I found the bug that affected the rating engine, I fixed it. You should upgrade to 6.7.3 version.

Regards,
Adrian

On Mar 14, 2009, at 7:12 PM, Dan-Cristian Bogos wrote:

Folks,

some strange behavior I have noticed in CDRTool: both ReloadRatingTables
and "/etc/init.d/cdrtool reload" are strangely removing the destinations
and destinations.sip from cdrtool.memcached table, therefore I have the
feeling that this is why ShowPrice does newer show newer updates in the
destinations table.

"""
version
CDRTool version 6.7.2
"""

The only way I made CDRTool work with newer destinations inserted into
destinations table was restarting it. Is this behavior wanted?
Also, ShowPrice used to insert also destination name, other than dest_id
inside Destination field, but no longer there.


Ta,
DanB


_______________________________________________
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 - ReloadRatingTables and new destinations

Adrian Georgescu

On Mar 16, 2009, at 11:36 AM, DanB wrote:

Hey Adrian,

thanks for the quick reaction.

Here it comes what I found out after tests (could be I am doing something wrong):

* ReloadRatingTables produces a reload of destination table now (during normalize.php execution, so not real-time but depending on how often this script is run in cron).

The reload simply sets a flag in the system to reload the destinations. The destinations are reloaded when normalization process occurs, either from cron job, manual run of normalize.php script or when you load a web page. 

* Even when the tables are reloaded, the new destinations are not processed, therefore when querying ShowPrice I will get still the initial values (the one received on cdrtool startup). So the result is that I am adding/deleting/modifying destinations, but no effect in the ShowPrice.

This is a problem unrelated to the destinations reload. Most likely you did not create the correct rating table data.

My version:
"""
version
CDRTool version 6.7.3
"""

Ta,
DanB


On Sun, Mar 15, 2009 at 9:56 AM, Adrian Georgescu <[hidden email]> wrote:
Hello Dan,

I found the bug that affected the rating engine, I fixed it. You should upgrade to 6.7.3 version.

Regards,
Adrian

On Mar 14, 2009, at 7:12 PM, Dan-Cristian Bogos wrote:

Folks,

some strange behavior I have noticed in CDRTool: both ReloadRatingTables
and "/etc/init.d/cdrtool reload" are strangely removing the destinations
and destinations.sip from cdrtool.memcached table, therefore I have the
feeling that this is why ShowPrice does newer show newer updates in the
destinations table.

"""
version
CDRTool version 6.7.2
"""

The only way I made CDRTool work with newer destinations inserted into
destinations table was restarting it. Is this behavior wanted?
Also, ShowPrice used to insert also destination name, other than dest_id
inside Destination field, but no longer there.


Ta,
DanB


_______________________________________________
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 - ReloadRatingTables and new destinations

DanB-2

Adrian,

On Mon, 2009-03-16 at 11:50 +0100, Adrian Georgescu wrote:
> This is a problem unrelated to the destinations reload. Most likely
> you did not create the correct rating table data.

I am not sure if it is due to correct rating table data (should see no
Span price in that case I think), so bear with me to read the logs.

Here comes a more detailed usage scenario:

I have added a new number inside destination table (like you said, no
rating defined, just the destination one).

* First query will identify maybe correctly the destination 31 (since
the reload of rating tables was not yet done and the new destination is
not yet in the memory).

ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
         App: audio
 Destination: 31
    Customer: default
    Increment: 60 s
     Connect: 0.0000
   StartTime: 2009-03-16 10:08:45
--
        Span: 1
    Duration: 60 s
   ProfileId: DEFAULT / weekday
      RateId: DEFAULT / 0-24h
        Rate: 0.1200 / 60 s
       Price: 0.1200

reloadratingtables
1

* Second and third attempt are after reloadratingtables succeed - saw it
in mysql.log. Notice that the destination identified is still 31.

ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
         App: audio
 Destination: 31
    Customer: default
    Increment: 60 s
     Connect: 0.0000
   StartTime: 2009-03-16 10:09:52
--
        Span: 1
    Duration: 60 s
   ProfileId: DEFAULT / weekday
      RateId: DEFAULT / 0-24h
        Rate: 0.1200 / 60 s
       Price: 0.1200

ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
         App: audio
 Destination: 31
    Customer: default
    Increment: 60 s
     Connect: 0.0000
   StartTime: 2009-03-16 10:18:20
--
        Span: 1
    Duration: 60 s
   ProfileId: DEFAULT / weekday
      RateId: DEFAULT / 0-24h
        Rate: 0.1200 / 60 s
       Price: 0.1200

Connection closed by foreign host.

* Here I have restarted the cdrtool with /etc/init.d/cdrtool restart.
Now the destination is correctly identified as 31676000008 (full
length), of course without Span section since I have no rating defined
yet.

DellLaptop:/usr/local/src/cdrtool# telnet localhost 9094
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0
Duration: 60 s
         App: audio
 Destination: 31676000008
    Customer: default
    Increment: 60 s


Is my logic broken?
Same thing happens if I simply remove the destination (still showing it
in ShowPrice even if there is no longer in the database.

Ta,
DanB


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

Re: CDRTool - ReloadRatingTables and new destinations

Adrian Georgescu
A call once normalized is stored in the radiust table and remains unchanged unless you re-normalize the calls that you wish to have updated. So changing rating tables does not have any influence upon previously normalized calls, they remain with the previous values.

Adrian


On Mar 16, 2009, at 12:21 PM, Dan-Cristian Bogos wrote:


Adrian,

On Mon, 2009-03-16 at 11:50 +0100, Adrian Georgescu wrote:
This is a problem unrelated to the destinations reload. Most likely
you did not create the correct rating table data.

I am not sure if it is due to correct rating table data (should see no
Span price in that case I think), so bear with me to read the logs.

Here comes a more detailed usage scenario:

I have added a new number inside destination table (like you said, no
rating defined, just the destination one).

* First query will identify maybe correctly the destination 31 (since
the reload of rating tables was not yet done and the new destination is
not yet in the memory).

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
        App: audio
Destination: 31
   Customer: default
   Increment: 60 s
    Connect: 0.0000
  StartTime: 2009-03-16 10:08:45
--
       Span: 1
   Duration: 60 s
  ProfileId: DEFAULT / weekday
     RateId: DEFAULT / 0-24h
       Rate: 0.1200 / 60 s
      Price: 0.1200

reloadratingtables
1

* Second and third attempt are after reloadratingtables succeed - saw it
in mysql.log. Notice that the destination identified is still 31.

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
        App: audio
Destination: 31
   Customer: default
   Increment: 60 s
    Connect: 0.0000
  StartTime: 2009-03-16 10:09:52
--
       Span: 1
   Duration: 60 s
  ProfileId: DEFAULT / weekday
     RateId: DEFAULT / 0-24h
       Rate: 0.1200 / 60 s
      Price: 0.1200

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
        App: audio
Destination: 31
   Customer: default
   Increment: 60 s
    Connect: 0.0000
  StartTime: 2009-03-16 10:18:20
--
       Span: 1
   Duration: 60 s
  ProfileId: DEFAULT / weekday
     RateId: DEFAULT / 0-24h
       Rate: 0.1200 / 60 s
      Price: 0.1200

Connection closed by foreign host.

* Here I have restarted the cdrtool with /etc/init.d/cdrtool restart.
Now the destination is correctly identified as 31676000008 (full
length), of course without Span section since I have no rating defined
yet.

DellLaptop:/usr/local/src/cdrtool# telnet localhost 9094
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0
Duration: 60 s
        App: audio
Destination: 31676000008
   Customer: default
   Increment: 60 s


Is my logic broken?
Same thing happens if I simply remove the destination (still showing it
in ShowPrice even if there is no longer in the database.

Ta,
DanB



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

Re: CDRTool - ReloadRatingTables and new destinations

DanB-2
I understand that, but I did not normalize anything in my actions. I
just played with the ShowPrice over telnet (adding and deleting
destinations directly from the database, and then running ReloadTables
over telnet interface).

DanB

On Mon, 2009-03-16 at 13:39 +0100, Adrian Georgescu wrote:

> A call once normalized is stored in the radiust table and remains
> unchanged unless you re-normalize the calls that you wish to have
> updated. So changing rating tables does not have any influence upon
> previously normalized calls, they remain with the previous values.
>
>
> Adrian
>
>
>
>
> On Mar 16, 2009, at 12:21 PM, Dan-Cristian Bogos wrote:
>
> >
> > Adrian,
> >
> > On Mon, 2009-03-16 at 11:50 +0100, Adrian Georgescu wrote:
> > > This is a problem unrelated to the destinations reload. Most
> > > likely
> > > you did not create the correct rating table data.
> >
> > I am not sure if it is due to correct rating table data (should see
> > no
> > Span price in that case I think), so bear with me to read the logs.
> >
> > Here comes a more detailed usage scenario:
> >
> > I have added a new number inside destination table (like you said,
> > no
> > rating defined, just the destination one).
> >
> > * First query will identify maybe correctly the destination 31
> > (since
> > the reload of rating tables was not yet done and the new destination
> > is
> > not yet in the memory).
> >
> > ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
> > To=0031676000008
> > 0.1200
> > Duration: 60 s
> >         App: audio
> > Destination: 31
> >    Customer: default
> >    Increment: 60 s
> >     Connect: 0.0000
> >   StartTime: 2009-03-16 10:08:45
> > --
> >        Span: 1
> >    Duration: 60 s
> >   ProfileId: DEFAULT / weekday
> >      RateId: DEFAULT / 0-24h
> >        Rate: 0.1200 / 60 s
> >       Price: 0.1200
> >
> > reloadratingtables
> > 1
> >
> > * Second and third attempt are after reloadratingtables succeed -
> > saw it
> > in mysql.log. Notice that the destination identified is still 31.
> >
> > ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
> > To=0031676000008
> > 0.1200
> > Duration: 60 s
> >         App: audio
> > Destination: 31
> >    Customer: default
> >    Increment: 60 s
> >     Connect: 0.0000
> >   StartTime: 2009-03-16 10:09:52
> > --
> >        Span: 1
> >    Duration: 60 s
> >   ProfileId: DEFAULT / weekday
> >      RateId: DEFAULT / 0-24h
> >        Rate: 0.1200 / 60 s
> >       Price: 0.1200
> >
> > ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
> > To=0031676000008
> > 0.1200
> > Duration: 60 s
> >         App: audio
> > Destination: 31
> >    Customer: default
> >    Increment: 60 s
> >     Connect: 0.0000
> >   StartTime: 2009-03-16 10:18:20
> > --
> >        Span: 1
> >    Duration: 60 s
> >   ProfileId: DEFAULT / weekday
> >      RateId: DEFAULT / 0-24h
> >        Rate: 0.1200 / 60 s
> >       Price: 0.1200
> >
> > Connection closed by foreign host.
> >
> > * Here I have restarted the cdrtool with /etc/init.d/cdrtool
> > restart.
> > Now the destination is correctly identified as 31676000008 (full
> > length), of course without Span section since I have no rating
> > defined
> > yet.
> >
> > DellLaptop:/usr/local/src/cdrtool# telnet localhost 9094
> > Trying 127.0.0.1...
> > Connected to localhost.
> > Escape character is '^]'.
> > ShowPrice from=[hidden email] gateway=10.10.10.1 Duration=59
> > To=0031676000008
> > 0
> > Duration: 60 s
> >         App: audio
> > Destination: 31676000008
> >    Customer: default
> >    Increment: 60 s
> >
> >
> > Is my logic broken?
> > Same thing happens if I simply remove the destination (still showing
> > it
> > in ShowPrice even if there is no longer in the database.
> >
> > Ta,
> > DanB
> >
> >
>


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

Re: CDRTool - ReloadRatingTables and new destinations

Adrian Georgescu
Only the normalization process reinitializes the changed data. If you run telnet and issue manually the ShowPrice command nothing happens until a normalization process runs. If you would check for every ShowOPrice command if a reload is required  it will affect the speed of the engine. 

Adrian


On Mar 16, 2009, at 1:44 PM, Dan-Cristian Bogos wrote:

I understand that, but I did not normalize anything in my actions. I
just played with the ShowPrice over telnet (adding and deleting
destinations directly from the database, and then running ReloadTables
over telnet interface).

DanB

On Mon, 2009-03-16 at 13:39 +0100, Adrian Georgescu wrote:
A call once normalized is stored in the radiust table and remains
unchanged unless you re-normalize the calls that you wish to have
updated. So changing rating tables does not have any influence upon
previously normalized calls, they remain with the previous values.


Adrian




On Mar 16, 2009, at 12:21 PM, Dan-Cristian Bogos wrote:


Adrian,

On Mon, 2009-03-16 at 11:50 +0100, Adrian Georgescu wrote:
This is a problem unrelated to the destinations reload. Most
likely
you did not create the correct rating table data.

I am not sure if it is due to correct rating table data (should see
no
Span price in that case I think), so bear with me to read the logs.

Here comes a more detailed usage scenario:

I have added a new number inside destination table (like you said,
no
rating defined, just the destination one).

* First query will identify maybe correctly the destination 31
(since
the reload of rating tables was not yet done and the new destination
is
not yet in the memory).

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
       App: audio
Destination: 31
  Customer: default
  Increment: 60 s
   Connect: 0.0000
 StartTime: 2009-03-16 10:08:45
--
      Span: 1
  Duration: 60 s
 ProfileId: DEFAULT / weekday
    RateId: DEFAULT / 0-24h
      Rate: 0.1200 / 60 s
     Price: 0.1200

reloadratingtables
1

* Second and third attempt are after reloadratingtables succeed -
saw it
in mysql.log. Notice that the destination identified is still 31.

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
       App: audio
Destination: 31
  Customer: default
  Increment: 60 s
   Connect: 0.0000
 StartTime: 2009-03-16 10:09:52
--
      Span: 1
  Duration: 60 s
 ProfileId: DEFAULT / weekday
    RateId: DEFAULT / 0-24h
      Rate: 0.1200 / 60 s
     Price: 0.1200

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
       App: audio
Destination: 31
  Customer: default
  Increment: 60 s
   Connect: 0.0000
 StartTime: 2009-03-16 10:18:20
--
      Span: 1
  Duration: 60 s
 ProfileId: DEFAULT / weekday
    RateId: DEFAULT / 0-24h
      Rate: 0.1200 / 60 s
     Price: 0.1200

Connection closed by foreign host.

* Here I have restarted the cdrtool with /etc/init.d/cdrtool
restart.
Now the destination is correctly identified as 31676000008 (full
length), of course without Span section since I have no rating
defined
yet.

DellLaptop:/usr/local/src/cdrtool# telnet localhost 9094
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0
Duration: 60 s
       App: audio
Destination: 31676000008
  Customer: default
  Increment: 60 s


Is my logic broken?
Same thing happens if I simply remove the destination (still showing
it
in ShowPrice even if there is no longer in the database.

Ta,
DanB






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

Re: CDRTool - ReloadRatingTables and new destinations

Adrian Georgescu
Hi Dan,

I have made a change to fix your problem. Pl upgrade to 6.7.4 and let me know if you still have problems with reloading the tables.

Regards,
Adrian

On Mar 16, 2009, at 2:16 PM, Dan-Cristian Bogos wrote:

Adrian,

I understand all these, but I think you don't get me.

Please do me a favor, and let me know if you get the same behavior like
me in your lab:

1. Delete a destination from cdrtool.destinations table.
2. Issue a ShowPrice command over telnet which should match the
destination you just deleted. Nothing should happen, I understand until
you ReloadRatingTables and run normalize.php.
3. Issue a ReloadRatingTables and run normalize.php.
4. Run the same ShowPrice over telnet and you will see that your
destination is still showing up in the results (at least this is what is
happening to me). This scenario you can repeat when adding new
destinations or modifying the existing ones.

Ta,
DanB

On Mon, 2009-03-16 at 14:03 +0100, Adrian Georgescu wrote:
Only the normalization process reinitializes the changed data. If you
run telnet and issue manually the ShowPrice command nothing happens
until a normalization process runs. If you would check for every
ShowOPrice command if a reload is required  it will affect the speed
of the engine.


Adrian



On Mar 16, 2009, at 1:44 PM, Dan-Cristian Bogos wrote:

I understand that, but I did not normalize anything in my actions. I
just played with the ShowPrice over telnet (adding and deleting
destinations directly from the database, and then running
ReloadTables
over telnet interface).

DanB

On Mon, 2009-03-16 at 13:39 +0100, Adrian Georgescu wrote:
A call once normalized is stored in the radiust table and remains
unchanged unless you re-normalize the calls that you wish to have
updated. So changing rating tables does not have any influence
upon
previously normalized calls, they remain with the previous values.


Adrian




On Mar 16, 2009, at 12:21 PM, Dan-Cristian Bogos wrote:


Adrian,

On Mon, 2009-03-16 at 11:50 +0100, Adrian Georgescu wrote:
This is a problem unrelated to the destinations reload. Most
likely
you did not create the correct rating table data.

I am not sure if it is due to correct rating table data (should
see
no
Span price in that case I think), so bear with me to read the
logs.

Here comes a more detailed usage scenario:

I have added a new number inside destination table (like you
said,
no
rating defined, just the destination one).

* First query will identify maybe correctly the destination 31
(since
the reload of rating tables was not yet done and the new
destination
is
not yet in the memory).

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
      App: audio
Destination: 31
 Customer: default
 Increment: 60 s
  Connect: 0.0000
StartTime: 2009-03-16 10:08:45
--
     Span: 1
 Duration: 60 s
ProfileId: DEFAULT / weekday
   RateId: DEFAULT / 0-24h
     Rate: 0.1200 / 60 s
    Price: 0.1200

reloadratingtables
1

* Second and third attempt are after reloadratingtables succeed
-
saw it
in mysql.log. Notice that the destination identified is still
31.

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
      App: audio
Destination: 31
 Customer: default
 Increment: 60 s
  Connect: 0.0000
StartTime: 2009-03-16 10:09:52
--
     Span: 1
 Duration: 60 s
ProfileId: DEFAULT / weekday
   RateId: DEFAULT / 0-24h
     Rate: 0.1200 / 60 s
    Price: 0.1200

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
      App: audio
Destination: 31
 Customer: default
 Increment: 60 s
  Connect: 0.0000
StartTime: 2009-03-16 10:18:20
--
     Span: 1
 Duration: 60 s
ProfileId: DEFAULT / weekday
   RateId: DEFAULT / 0-24h
     Rate: 0.1200 / 60 s
    Price: 0.1200

Connection closed by foreign host.

* Here I have restarted the cdrtool with /etc/init.d/cdrtool
restart.
Now the destination is correctly identified as 31676000008 (full
length), of course without Span section since I have no rating
defined
yet.

DellLaptop:/usr/local/src/cdrtool# telnet localhost 9094
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0
Duration: 60 s
      App: audio
Destination: 31676000008
 Customer: default
 Increment: 60 s


Is my logic broken?
Same thing happens if I simply remove the destination (still
showing
it
in ShowPrice even if there is no longer in the database.

Ta,
DanB










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

Re: CDRTool - ReloadRatingTables and new destinations

DanB-2
Hey Adrian,

I have retested with the new version and now works like a charm. I noticed that also the destinations refresh is instant, no longer depending on normalize.php script.

Thanks for all your efforts!

Cheers,
DanB

On Mon, Mar 16, 2009 at 6:54 PM, Adrian Georgescu <[hidden email]> wrote:
Hi Dan,

I have made a change to fix your problem. Pl upgrade to 6.7.4 and let me know if you still have problems with reloading the tables.

Regards,
Adrian

On Mar 16, 2009, at 2:16 PM, Dan-Cristian Bogos wrote:

Adrian,

I understand all these, but I think you don't get me.

Please do me a favor, and let me know if you get the same behavior like
me in your lab:

1. Delete a destination from cdrtool.destinations table.
2. Issue a ShowPrice command over telnet which should match the
destination you just deleted. Nothing should happen, I understand until
you ReloadRatingTables and run normalize.php.
3. Issue a ReloadRatingTables and run normalize.php.
4. Run the same ShowPrice over telnet and you will see that your
destination is still showing up in the results (at least this is what is
happening to me). This scenario you can repeat when adding new
destinations or modifying the existing ones.

Ta,
DanB

On Mon, 2009-03-16 at 14:03 +0100, Adrian Georgescu wrote:
Only the normalization process reinitializes the changed data. If you
run telnet and issue manually the ShowPrice command nothing happens
until a normalization process runs. If you would check for every
ShowOPrice command if a reload is required  it will affect the speed
of the engine.


Adrian



On Mar 16, 2009, at 1:44 PM, Dan-Cristian Bogos wrote:

I understand that, but I did not normalize anything in my actions. I
just played with the ShowPrice over telnet (adding and deleting
destinations directly from the database, and then running
ReloadTables
over telnet interface).

DanB

On Mon, 2009-03-16 at 13:39 +0100, Adrian Georgescu wrote:
A call once normalized is stored in the radiust table and remains
unchanged unless you re-normalize the calls that you wish to have
updated. So changing rating tables does not have any influence
upon
previously normalized calls, they remain with the previous values.


Adrian




On Mar 16, 2009, at 12:21 PM, Dan-Cristian Bogos wrote:


Adrian,

On Mon, 2009-03-16 at 11:50 +0100, Adrian Georgescu wrote:
This is a problem unrelated to the destinations reload. Most
likely
you did not create the correct rating table data.

I am not sure if it is due to correct rating table data (should
see
no
Span price in that case I think), so bear with me to read the
logs.

Here comes a more detailed usage scenario:

I have added a new number inside destination table (like you
said,
no
rating defined, just the destination one).

* First query will identify maybe correctly the destination 31
(since
the reload of rating tables was not yet done and the new
destination
is
not yet in the memory).

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
      App: audio
Destination: 31
 Customer: default
 Increment: 60 s
  Connect: 0.0000
StartTime: 2009-03-16 10:08:45
--
     Span: 1
 Duration: 60 s
ProfileId: DEFAULT / weekday
   RateId: DEFAULT / 0-24h
     Rate: 0.1200 / 60 s
    Price: 0.1200

reloadratingtables
1

* Second and third attempt are after reloadratingtables succeed
-
saw it
in mysql.log. Notice that the destination identified is still
31.

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
      App: audio
Destination: 31
 Customer: default
 Increment: 60 s
  Connect: 0.0000
StartTime: 2009-03-16 10:09:52
--
     Span: 1
 Duration: 60 s
ProfileId: DEFAULT / weekday
   RateId: DEFAULT / 0-24h
     Rate: 0.1200 / 60 s
    Price: 0.1200

ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0.1200
Duration: 60 s
      App: audio
Destination: 31
 Customer: default
 Increment: 60 s
  Connect: 0.0000
StartTime: 2009-03-16 10:18:20
--
     Span: 1
 Duration: 60 s
ProfileId: DEFAULT / weekday
   RateId: DEFAULT / 0-24h
     Rate: 0.1200 / 60 s
    Price: 0.1200

Connection closed by foreign host.

* Here I have restarted the cdrtool with /etc/init.d/cdrtool
restart.
Now the destination is correctly identified as 31676000008 (full
length), of course without Span section since I have no rating
defined
yet.

DellLaptop:/usr/local/src/cdrtool# telnet localhost 9094
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ShowPrice [hidden email] gateway=10.10.10.1 Duration=59
To=0031676000008
0
Duration: 60 s
      App: audio
Destination: 31676000008
 Customer: default
 Increment: 60 s


Is my logic broken?
Same thing happens if I simply remove the destination (still
showing
it
in ShowPrice even if there is no longer in the database.

Ta,
DanB











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