[Spce-user] cfu during call from one subscriber to another

Andrew Pogrebennyk apogrebennyk at sipwise.com
Thu Oct 30 07:04:39 EDT 2014


Hi Matthew,

it's clear now, it's just my lack  of time and experience with external
billing systems why i didn't look into this earlier:)

Well, i made a quick test now and on my machine and I don't have this
problem. On call forward the CDR of user1 has subscriber ext id of user1
and CDR of user2 the ext id of user2.

The only case where we keep the subscriber ext id of the caller is when
the call forwarding it to local application service like voicemail, it's
set in proxy.cfg.tt2/ROUTE_FIND_CALLER like this (because one of our
customers requested it):

>                 if($rd =~ "^.+\.local$")
>                 {
>                         # keep external and account ids on forward to fax2mail and voicemail
>                         # we fake loading account_id as callee preference
>                         $var(callee_ext_contract_id) = $hdr(P-Callee-Ext-Contr-ID);
>                         $var(callee_ext_subscriber_id) = $hdr(P-Callee-Ext-Subs-ID);
>                         $var(callee_account_id) = $hdr(P-Callee-Account-ID);
>                         remove_hf("P-Callee-Ext-Subs-ID");
>                         remove_hf("P-Callee-Ext-Contr-ID");
>                         remove_hf("P-Callee-Account-ID");
>                 }

Not sure if this is your case, though. The log you provided previously
does not match the CDRs you provided.

Andrew

On 10/29/2014 10:41 PM, Matthew Ogden wrote:
> Hi Andrew,
> 
> Just want so check that I am explaining clear enough, or if I am still
> leaving some room for confusion?
> 
> On Sat, Oct 25, 2014 at 2:26 PM, Matthew Ogden <matthew at tenacit.net
> <mailto:matthew at tenacit.net>> wrote:
> 
>     Also, maybe I am explaining my self badly.
> 
>     The SourceUser column is correctly displaying TN001 in the log I
>     sent you, but that same line, both the SourceExtAccountId and
>     SourceExtSubscriberId are displaying PD001 (the original calling user).
> 
>     So if you use these two fields for billing (SourceExtAccountId and
>     SourceExtSubsbriberId), then I end up billing the wrong caller?
>     (Whereas, if you look at SourceUser, you will bill the right caller
>     for the cfu leg.
> 
>     Hope I am explaining myself correctly.
> 
>     On Sat, Oct 25, 2014 at 2:21 PM, Matthew Ogden <matthew at tenacit.net
>     <mailto:matthew at tenacit.net>> wrote:
> 
>         Thanks Andrew, but we have been using SourceAccountExtId to
>         check who should pay for the call, in exported system.
> 
>         the cfu leg of the call is billable to the person who needed
>         the cfu to exist (Called party). 
> 
>         But in the case of a CFU, its actually the otherway around,
>         (isn't that a little counter-intuitive?) Well, it was for me, but
> 
>         I can quite happily go and change it around post-processing, but
>         in your panel, do you then make two queries for all your lookups
>         as well for billing? Or are you billing the original calling party?
> 
>         On Thu, Oct 16, 2014 at 1:03 AM, Andrew Pogrebennyk
>         <apogrebennyk at sipwise.com <mailto:apogrebennyk at sipwise.com>> wrote:
> 
>             Matthew,
>             // I'm adding list to the cc again since this message
>             doesn't carry
>             conditential information
>             So the mysql output shows you have two CDRs, one for the
>             caller and
>             another for subscriber which has a call forwarding, just
>             like I said.
> 
>             Think of it like that in case of call A->B forwarded to C,
>             you get one
>             CDR for A->B and a second one with B->C with
>             call_type='cfu'. You can
>             use the call_type field if you want to apply special rating
>             to the
>             forwarding subscriber.
> 
>             On 14/10/14 16:42, Matthew Ogden wrote:
>             > Hi Andrew,
>             >
>             > I've kept this offlist, and didn't want to sanitize it and lose any info
>             > you might need.
>             >
>             > Please find attached
>             >
>             > I wasn't sure the best way to give you the two records, so I just used
>             > mysql OUTPUTFILE syntax.
>             > There are two records in it.
>             >
>             > The call is from PD001 and then the cfu leg for TEST1 is logged as a
>             > call against PD001 in SourceSubscriber
>             >
>             > Regards
>             >
>             > On Fri, Oct 10, 2014 at 5:09 PM, Andrew Pogrebennyk
>             > <apogrebennyk at sipwise.com <mailto:apogrebennyk at sipwise.com>
>             <mailto:apogrebennyk at sipwise.com
>             <mailto:apogrebennyk at sipwise.com>>> wrote:
>             >
>             >     Hi,
>             >     you should have two CDRs, one for the caller and another for subscriber
>             >     which has a call forwarding. This is consistent for any 2.x and 3.x
>             >     release. What is your issue? Could you please provide the select * from
>             >     accounting.cdr where call_id='...'? And if there is really just one CDR
>             >     provide the kamailio-proxy.log for this call-id.
>             >
>             >     Regards,
>             >     Andrew
>             >
>             >     On 10/10/2014 10:00 AM, Matthew Ogden wrote:
>             >     > Hi All,
>             >     >
>             >     > Seems to be quite a serious issue this (at least on a large system it
>             >     > could be if a lot of inter subscriber calling with cfu's is occuring).
>             >     >
>             >     > Is there any additional info I can give you ?
>             >     >
>             >     > On Tue, Oct 7, 2014 at 11:36 PM, Matthew Ogden <matthew at tenacit.net <mailto:matthew at tenacit.net>
>             <mailto:matthew at tenacit.net <mailto:matthew at tenacit.net>>
>             >     > <mailto:matthew at tenacit.net <mailto:matthew at tenacit.net>
>             <mailto:matthew at tenacit.net <mailto:matthew at tenacit.net>>>>
>             wrote:
>             >     >
>             >     >     Hi All
>             >     >
>             >     >
>             >     >     I'm running templates templates 2.8.18
>             >     >
>             >     >     It seems that if one subscriber calls another subscriber, if
>             >     the 2nd
>             >     >     subscriber does a call forward, that the call cost is logged
>             >     against
>             >     >     the calling (caller) subscriber, and not the called (callee)
>             >     >     subscriber.
>             >     >
>             >     >     I'm seeing this in my exported CDRs.
>             >     >
>             >     >     I wanted to check, is this the expectation (because I'm
>             >     thinking it
>             >     >     should not be), or is there something wrong in this template
>             >     version?
>             >     >
>             >     >     Kind Regards
>             >     >     Matthew
>             >     >
>             >     >
>             >     >
>             >
>             >
>             >
>             >
>             > --
>             >
>             >
>             >
>             >
>             >
>             > *Matthew Ogden*
>             >
>             > Management
>             >
>             > TenacIT
>             >
>             >
>             >
>             >
>             >
>             > *Strategic IT Consulting *•*Advanced Networking *•
>             *Virtualisation***
>             >
>             > *Custom Development *•***Hosting *•***Syspro Support  *•
>             *MS Licensing***
>             >
>             > National Tel: 041 10 10 100 | Cell: 084 205 4445 | Email:
>             > matthew at tenacit.net <mailto:matthew at tenacit.net>
>             <mailto:matthew at tenacit.net <mailto:matthew at tenacit.net>>
>             >
>             > CT Tel: 021 201 0333 | Skype Name: matthew.ogden | Web:
>             > http://www.tenacit.net <http://www.tenacit.net/>
>             >
>             >
>             >
> 
> 
> 
> 
>         -- 
> 
>          
> 
>          
> 
>         *Matthew Ogden*
> 
>         Management
> 
>         TenacIT
> 
>          
> 
>          
> 
>         *Strategic IT Consulting *•*Advanced Networking *•
>         *Virtualisation***
> 
>         *Custom Development *•***Hosting *•***Syspro Support  *• *MS
>         Licensing***
> 
>         National Tel: 041 10 10 100 | Cell: 084 205 4445 | Email:
>         matthew at tenacit.net <mailto:matthew at tenacit.net> 
> 
>         CT Tel: 021 201 0333 | Skype Name: matthew.ogden | Web:
>         http://www.tenacit.net <http://www.tenacit.net/>
> 
>             
> 
> 
> 
> 
>     -- 
> 
>      
> 
>      
> 
>     *Matthew Ogden*
> 
>     Management
> 
>     TenacIT
> 
>      
> 
>      
> 
>     *Strategic IT Consulting *•*Advanced Networking *• *Virtualisation***
> 
>     *Custom Development *•***Hosting *•***Syspro Support  *• *MS
>     Licensing***
> 
>     National Tel: 041 10 10 100 | Cell: 084 205 4445 | Email:
>     matthew at tenacit.net <mailto:matthew at tenacit.net> 
> 
>     CT Tel: 021 201 0333 | Skype Name: matthew.ogden | Web:
>     http://www.tenacit.net <http://www.tenacit.net/>
> 
>         
> 
> 
> 
> 
> -- 
> 
>  
> 
>  
> 
> *Matthew Ogden*
> 
> Management
> 
> TenacIT
> 
>  
> 
>  
> 
> *Strategic IT Consulting *•*Advanced Networking *• *Virtualisation***
> 
> *Custom Development *•***Hosting *•***Syspro Support  *• *MS Licensing***
> 
> National Tel: 041 10 10 100 | Cell: 084 205 4445 | Email:
> matthew at tenacit.net <mailto:matthew at tenacit.net> 
> 
> CT Tel: 021 201 0333 | Skype Name: matthew.ogden | Web:
> http://www.tenacit.net <http://www.tenacit.net/>
> 
>     
> 




More information about the Spce-user mailing list