Hi,
I try to have exploitable accounting for multiple domains and multi hops routing.
I've previously tried for weeks on asterisk without success, even with adding c
modules and playing with cdr fork :-(
He is a case:
- sip.domainA and sip.domainB point to the same Openser server.
- 4(a)sip.domainA is dbaliased to 5(a)sip.domainB
- 5(a)sip.domainB is dbaliased to 6@asteriskServer
- 6@asteriskServer make a dial to phone2(a)sip.domainA
I dial 4 on phone1 and get this INVITE routing
phone1(a)sip.domainA === RURI:4@sip.domainA ==> openser
openser === RURI:6@asteriskServer ==> asteriskServer
asteriskServer == RURI:phone2@sip.domainA ==> openser
openser ==> phone2
this works and phone2 ring, I take the call and hangup phone1 after some time.
Now in acc table I find 15 records (7 INVITEs, 5 ACKs and 3 BYEs)
The 3 BYE records seems correct (one from phone 1 to openser, one from
openser to asteriskBox and the last from asteriskBox to phone 2 via openser).
But I can't find a way to match the 7 INVITEs to the 3 BYEs, even with adding
src&dst
legs src_ip info and so on.
From acc records, I'd like to have make the
following records report:
== Call ID, src, dst, total duration, billing duration ==
- 1234, phone1@sip.domainA,4@sip.domainA,10,8
- 1234, 4@sip.domainA,5@sip.domainB,10,8
- 1234, 5@sip.domainB,6@asteriskBox,10,8
- 1234, 6@asteriskBox,phone2@domainA,10,8
Is it a complete dream or do you have an idea ?
Manuel