Re: CDRTool - Rating Origination and Termination differently

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

Re: CDRTool - Rating Origination and Termination differently

David M. Lee
Duane Larson wrote:
I have been playing with CDRTool for a while but I am not sure if it is
possible to rate Origination (Inbound) calls differently than Termination
(Outbound) calls from my SIP Provider.  For Origination I pay 0.0035 and
for Termination I pay 0.005.  Keep in mind these costs are for destination
"1”.

I've recently run into nearly the same situation.

I tried overloading the Sip-Application-Type field, but it's limited
by the supportedApplicationTypes array in cdr_generic.php. There also
seems to be hard coded logic for the different application types.

I think I will patch CDRTool so that you can have subtypes of
application types (audio.inbound, audio.outbound, etc.). This would
allow the billing rates to be a bit more specific for these
situations.

Thoughts?
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool - Rating Origination and Termination differently

osiris123d
If you are going to make a patch I might be interested in testing it as long as AG-Projects are ok with adding it into future version.


On Wed, Jan 22, 2014 at 12:58 PM, David Lee (digium) <[hidden email]> wrote:
Duane Larson wrote:
I have been playing with CDRTool for a while but I am not sure if it is
possible to rate Origination (Inbound) calls differently than Termination
(Outbound) calls from my SIP Provider.  For Origination I pay 0.0035 and
for Termination I pay 0.005.  Keep in mind these costs are for destination
"1”.

I've recently run into nearly the same situation.

I tried overloading the Sip-Application-Type field, but it's limited
by the supportedApplicationTypes array in cdr_generic.php. There also
seems to be hard coded logic for the different application types.

I think I will patch CDRTool so that you can have subtypes of
application types (audio.inbound, audio.outbound, etc.). This would
allow the billing rates to be a bit more specific for these
situations.

Thoughts?
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--

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

Re: CDRTool - Rating Origination and Termination differently

Adrian Georgescu
In reply to this post by David M. Lee
I think it would be a good idea.

Adrian

On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:

Duane Larson wrote:
I have been playing with CDRTool for a while but I am not sure if it is
possible to rate Origination (Inbound) calls differently than Termination
(Outbound) calls from my SIP Provider.  For Origination I pay 0.0035 and
for Termination I pay 0.005.  Keep in mind these costs are for destination
"1”.

I've recently run into nearly the same situation.

I tried overloading the Sip-Application-Type field, but it's limited
by the supportedApplicationTypes array in cdr_generic.php. There also
seems to be hard coded logic for the different application types.

I think I will patch CDRTool so that you can have subtypes of
application types (audio.inbound, audio.outbound, etc.). This would
allow the billing rates to be a bit more specific for these
situations.

Thoughts?
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org
_______________________________________________
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

signature.asc (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool - Rating Origination and Termination differently

David M. Lee
Excellent!

I'll post a link to the patch here when I've got it working.

-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

I think it would be a good idea.

Adrian

On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:

Duane Larson wrote:
I have been playing with CDRTool for a while but I am not sure if it is
possible to rate Origination (Inbound) calls differently than Termination
(Outbound) calls from my SIP Provider.  For Origination I pay 0.0035 and
for Termination I pay 0.005.  Keep in mind these costs are for destination
"1”.

I've recently run into nearly the same situation.

I tried overloading the Sip-Application-Type field, but it's limited
by the supportedApplicationTypes array in cdr_generic.php. There also
seems to be hard coded logic for the different application types.

I think I will patch CDRTool so that you can have subtypes of
application types (audio.inbound, audio.outbound, etc.). This would
allow the billing rates to be a bit more specific for these
situations.

Thoughts?
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org
_______________________________________________
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 - Rating Origination and Termination differently

David M. Lee
In reply to this post by Adrian Georgescu
I’ve got a first attempt at a patch:
  https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider.  For Origination I pay 0.0035 and
>>> for Termination I pay 0.005.  Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at:  www.digium.com  & www.asterisk.org
>> _______________________________________________
>> 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 - Rating Origination and Termination differently

Tijmen de Mes
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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

Re: CDRTool - Rating Origination and Termination differently

osiris123d
Got CDRTool patched.  Will update OpenSIPS config and then play with it.  Hope to have some testing done later in the day.


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--

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

Re: CDRTool - Rating Origination and Termination differently

osiris123d
In reply to this post by Tijmen de Mes
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--

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

Re: CDRTool - Rating Origination and Termination differently

osiris123d
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
67aa8df81e8e3c@0:0:0:0:0:0:0:0 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--

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

Re: CDRTool - Rating Origination and Termination differently

osiris123d
Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
67aa8df81e8e3c@0:0:0:0:0:0:0:0 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--

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

Re: CDRTool - Rating Origination and Termination differently

Tijmen de Mes
Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:

http://sipsimpleclient.org/projects/sipsimpleclient/wiki/SipSupport

You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
67aa8df81e8e3c@0:0:0:0:0:0:0:0 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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 - Rating Origination and Termination differently

Tijmen de Mes
Hi,

I run into trouble and reversed the patch. In the rating engine (telnet) DebitBalance function does not return anything anymore with the patch applied, so something goes wrong.

-- 
Tijmen de Mes
AG-Projects

On 27 januari 2014 at 17:55:01, Tijmen de Mes ([hidden email]) wrote:

Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:

http://sipsimpleclient.org/projects/sipsimpleclient/wiki/SipSupport

You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
67aa8df81e8e3c@0:0:0:0:0:0:0:0 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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 - Rating Origination and Termination differently

David M. Lee
Sorry for the delayed response.

I’ll take a look and see if I can correct the patch.

Thanks!
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 28, 2014, at 6:12 AM, Tijmen de Mes <[hidden email]> wrote:

Hi,

I run into trouble and reversed the patch. In the rating engine (telnet) DebitBalance function does not return anything anymore with the patch applied, so something goes wrong.

-- 
Tijmen de Mes
AG-Projects

On 27 januari 2014 at 17:55:01, Tijmen de Mes ([hidden email]) wrote:

Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:


You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
[hidden email] Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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


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

Re: CDRTool - Rating Origination and Termination differently

David M. Lee
In reply to this post by Tijmen de Mes
I figured that out. I’ve updated the patch on my gist, and updated the rating doc to include a description of how the subtypes work.

I’m sending the patch to [hidden email] now.

Thanks!
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 28, 2014, at 6:12 AM, Tijmen de Mes <[hidden email]> wrote:

Hi,

I run into trouble and reversed the patch. In the rating engine (telnet) DebitBalance function does not return anything anymore with the patch applied, so something goes wrong.

-- 
Tijmen de Mes
AG-Projects

On 27 januari 2014 at 17:55:01, Tijmen de Mes ([hidden email]) wrote:

Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:


You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
[hidden email] Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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


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

Re: CDRTool - Rating Origination and Termination differently

David M. Lee
For everyone following along at home:

I’ve updated my CDRTool patch (again) to fix MaxSessionTime and ShowPrice commands, and fix some minor issues that cropped up with DebitBalance.


I’ve also discovered that the call_control daemon also needs to be patched to pass through the SIP Application Type from the call_control module onto the CDRTool prepaid engine.


I’ll be sending both patches to [hidden email]. Feedback welcome on both!

-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Feb 6, 2014, at 9:29 AM, David M. Lee <[hidden email]> wrote:

I figured that out. I’ve updated the patch on my gist, and updated the rating doc to include a description of how the subtypes work.

I’m sending the patch to [hidden email] now.

Thanks!
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 28, 2014, at 6:12 AM, Tijmen de Mes <[hidden email]> wrote:

Hi,

I run into trouble and reversed the patch. In the rating engine (telnet) DebitBalance function does not return anything anymore with the patch applied, so something goes wrong.

-- 
Tijmen de Mes
AG-Projects

On 27 januari 2014 at 17:55:01, Tijmen de Mes ([hidden email]) wrote:

Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:


You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
[hidden email] Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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



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

Re: CDRTool - Rating Origination and Termination differently

Tijmen de Mes
Hi All,

Already sent it to David  in private, but will post it here to be complete.

We have trouble with the patch for call control. We get:

Feb 18 12:51:09 node04 call-control[19257]: error: 'Request' object has no attribute ‘application'

I looked into in and the call_control module of OpenSIPS seems to be not passing the application type. So is this module also patched ?  

-- 
Tijmen de Mes
AG-Projects

On 12 februari 2014 at 21:05:32, David M. Lee ([hidden email]) wrote:

For everyone following along at home:

I’ve updated my CDRTool patch (again) to fix MaxSessionTime and ShowPrice commands, and fix some minor issues that cropped up with DebitBalance.


I’ve also discovered that the call_control daemon also needs to be patched to pass through the SIP Application Type from the call_control module onto the CDRTool prepaid engine.


I’ll be sending both patches to [hidden email]. Feedback welcome on both!

-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Feb 6, 2014, at 9:29 AM, David M. Lee <[hidden email]> wrote:

I figured that out. I’ve updated the patch on my gist, and updated the rating doc to include a description of how the subtypes work.

I’m sending the patch to [hidden email] now.

Thanks!
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 28, 2014, at 6:12 AM, Tijmen de Mes <[hidden email]> wrote:

Hi,

I run into trouble and reversed the patch. In the rating engine (telnet) DebitBalance function does not return anything anymore with the patch applied, so something goes wrong.

-- 
Tijmen de Mes
AG-Projects

On 27 januari 2014 at 17:55:01, Tijmen de Mes ([hidden email]) wrote:

Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:


You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
[hidden email] Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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


_______________________________________________
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 - Rating Origination and Termination differently

David M. Lee
I have an open pull request with OpenSIPS with this patch.


-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Feb 18, 2014, at 6:52 AM, Tijmen de Mes <[hidden email]> wrote:

Hi All,

Already sent it to David  in private, but will post it here to be complete.

We have trouble with the patch for call control. We get:

Feb 18 12:51:09 node04 call-control[19257]: error: 'Request' object has no attribute ‘application'

I looked into in and the call_control module of OpenSIPS seems to be not passing the application type. So is this module also patched ?  

-- 
Tijmen de Mes
AG-Projects

On 12 februari 2014 at 21:05:32, David M. Lee ([hidden email]) wrote:

For everyone following along at home:

I’ve updated my CDRTool patch (again) to fix MaxSessionTime and ShowPrice commands, and fix some minor issues that cropped up with DebitBalance.


I’ve also discovered that the call_control daemon also needs to be patched to pass through the SIP Application Type from the call_control module onto the CDRTool prepaid engine.


I’ll be sending both patches to [hidden email]. Feedback welcome on both!

-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Feb 6, 2014, at 9:29 AM, David M. Lee <[hidden email]> wrote:

I figured that out. I’ve updated the patch on my gist, and updated the rating doc to include a description of how the subtypes work.

I’m sending the patch to [hidden email] now.

Thanks!
-- 
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org

On Jan 28, 2014, at 6:12 AM, Tijmen de Mes <[hidden email]> wrote:

Hi,

I run into trouble and reversed the patch. In the rating engine (telnet) DebitBalance function does not return anything anymore with the patch applied, so something goes wrong.

-- 
Tijmen de Mes
AG-Projects

On 27 januari 2014 at 17:55:01, Tijmen de Mes ([hidden email]) wrote:

Hi

I tested the patch and for now I don’t see any problem with it. Before adding it to trunk, can you update the rating docs and record all changes in 1 patch using darcs? After that I can apply it directly on trunk with your credentials.

These instructions to submit the patch also apply on CDRTool:


You don’t need to open a ticket however, just tell me after you send the patch.
 
-- 
Tijmen de Mes
AG-Projects

On 26 januari 2014 at 02:08:50, Duane Larson ([hidden email]) wrote:

Ugh.... Nevermind.  My "Max Duration" was set to 6 on the Destinations rate setup.  I set it to zero and I think things are looking better now.  Think I'm done for the day.  Good work David!  Really appreciate the patch.


On Sat, Jan 25, 2014 at 6:56 PM, Duane Larson <[hidden email]> wrote:
Not sure my "price" is being calculated correctly.

My audio.outbound should be $0.005
My audio.inbound should be $0.0035

Here is an example of a call that lasted 2:06 minutes and is audio.outbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=dc1e32b1ba18ff91a3
[hidden email] Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 Cos
t=0.0050/60 Price=0.0005 PriceIn=0.0000

Here is an example of a call that lasted 1:33 minutes and is audio.inbound
Increment=6 MinDuration=6 MaxDuration=6 ConnectFee=0.0000 CallId=2e0334513a34964e7c0
a18cd3be449dd@108.166.97.17:5060 Span=1 Duration=6 DestId=1 default Profile=USA_Default Period=weekend Rate=USA_Default Interval=0-24 C
ost=0.0035/60 Price=0.0003 PriceIn=0.0000

Looks like no matter what the duration is for the inbound calls it costs $0.0003 and the outbound calls all cost $0.0005.




On Sat, Jan 25, 2014 at 6:24 PM, Duane Larson <[hidden email]> wrote:
David/Tijmen/Adrian,

It is working for me too.  Both inbound and outbound are being recognized and the different rates are being applied.  I will keep looking at it while more calls are being made to make sure there are no unforeseen issues. 


On Fri, Jan 24, 2014 at 5:35 AM, Tijmen de Mes <[hidden email]> wrote:
Hi David,

Thanks for the patch. If have some time Monday I will analyze it and give you some feedback so we include this in CDRTool.

Besides the rating, I’ve to check if the code that now sets the the ‘route’ for the CDRs and if there are no problems.

  
-- 
Tijmen de Mes
AG-Projects

On 23 januari 2014 at 21:21:26, David M. Lee ([hidden email]) wrote:

I’ve got a first attempt at a patch:
https://gist.github.com/leedm777/8585690

To get this to work, your CDR’s will have to record the application
subtype. For me, I set $avp(s:call_class) = “audio.inbound” or
“audio.outbound” as appropriate in the routes, and added
Sip-Application-Type=$avp(s:call_class) to “radius_extra”.

Billing rates will be matched on the full application, allowing
different rates depending on the application subtype.

It works with the simple testing I’ve been able to do on my desktop.
Feedback, of course, is greatly appreciated.

Duane - Does the patch work for you?

Adrian - Any objections/concerns with this approach?

If it looks good, I’ll work on updating the docs.

Thanks!
--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org

On Jan 23, 2014, at 4:43 AM, Adrian Georgescu <[hidden email]> wrote:

> I think it would be a good idea.
>
> Adrian
>
> On 22 Jan 2014, at 16:58, David Lee (digium) <[hidden email]> wrote:
>
>> Duane Larson wrote:
>>> I have been playing with CDRTool for a while but I am not sure if it is
>>> possible to rate Origination (Inbound) calls differently than Termination
>>> (Outbound) calls from my SIP Provider. For Origination I pay 0.0035 and
>>> for Termination I pay 0.005. Keep in mind these costs are for destination
>>> "1”.
>>
>> I've recently run into nearly the same situation.
>>
>> I tried overloading the Sip-Application-Type field, but it's limited
>> by the supportedApplicationTypes array in cdr_generic.php. There also
>> seems to be hard coded logic for the different application types.
>>
>> I think I will patch CDRTool so that you can have subtypes of
>> application types (audio.inbound, audio.outbound, etc.). This would
>> allow the billing rates to be a bit more specific for these
>> situations.
>>
>> Thoughts?
>> --
>> David M. Lee
>> Digium, Inc. | Software Developer
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: www.digium.com & www.asterisk.org
>> _______________________________________________
>> 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

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




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--



--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
_______________________________________________
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


_______________________________________________ 
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 - Rating Origination and Termination differently

osiris123d
I fell off this for a while.  Did this ever get officially put into CDRTool?
Reply | Threaded
Open this post in threaded view
|

Re: CDRTool - Rating Origination and Termination differently

Tijmen de Mes
Hi,

It is in CDRTool. Soon we will release a new version of call control which should be safe if OpenSIPS does not have support for this.

-- 
Tijmen de Mes
AG-Projects

On 7 augustus 2014 at 04:16:01, osiris123d ([hidden email]) wrote:

I fell off this for a while. Did this ever get officially put into CDRTool?



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Re-CDRTool-Rating-Origination-and-Termination-differently-tp7589320p7592835.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
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 - Rating Origination and Termination differently

osiris123d
Great! Thanks

On Thursday, August 7, 2014, Tijmen de Mes <[hidden email]> wrote:
Hi,

It is in CDRTool. Soon we will release a new version of call control which should be safe if OpenSIPS does not have support for this.

-- 
Tijmen de Mes
AG-Projects

On 7 augustus 2014 at 04:16:01, osiris123d (<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;duane.larson@gmail.com&#39;);" target="_blank">duane.larson@...) wrote:

I fell off this for a while. Did this ever get officially put into CDRTool?



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Re-CDRTool-Rating-Origination-and-Termination-differently-tp7589320p7592835.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;Users@lists.opensips.org&#39;);" target="_blank">Users@...
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--

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