Benoit Panizzon
2020-Jan-28 11:53 UTC
[asterisk-users] How to correctly fork a CDR for billing in a call forwarding scenario?
Hi Gang
I have not yet managed to find a solution to correctly generate CDRs
for this situation:
Alice calls Bob.
Bob has call forwarding delayed 20s to Charlie.
Charlie picks up immediately.
exten => bob,1,DBget(cfwdly=CFDLY/${exten}); $cfwdly contains charlie
same => n,Set(CDR(src)=${CALLERID(number)}) ; src 'alice'
same => n,Set(CDR(dst)=${exten})
same => n,Dial(bob,20)
same => n,ForkCDR
same => n,Set(CDR(src)=bob) ; 2nd cdr src shall contain 'bob'
same => n,Set(CDR(dst)=${cfwdly})
same => n,Set(CALLERID(number)=bob)
same => n,Dial(${cfwdly})
Now assume a call of 1 minute.
For billing purposes, I need 2 CDRS.
Billing to Alice: Call of 40 seconds to Bob.
Billing to Bob: Call of 40 seconds to Charlie.
I would expect that setting the custom variables as above and forking
the CDR would generate CDRS looking like this:
no;src;dst;duration;billed;status
1;alice;bob;60;40;answered
2;bob;charlie;40;40;answered
But that is not happening. Booth CDR contain the same source and
destination.
I have played around with the various ForkCDR(options) but none did
what I expected.
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Reasonably Related Threads
- res_pjsip.c:3461 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport 'transport-name'
- DUNDI anyone?
- pjsip: How is asterisk choosing the IP address to put in the Contact header?
- Global number rewriting rules affecting ALL headers?
- pre-dial handler, how to access variables from calling channel?
