[Users] Multiple hops Accounting

Manuel Guesdon ml+openser-users at oxymium.net
Wed Feb 28 20:00:39 CET 2007


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 at sip.domainA is dbaliased to 5 at sip.domainB
- 5 at sip.domainB is dbaliased to 6 at asteriskServer
- 6 at asteriskServer make a dial to phone2 at sip.domainA

I dial 4 on phone1 and get this INVITE routing
phone1 at sip.domainA === RURI:4 at sip.domainA ==> openser
openser  === RURI:6 at asteriskServer ==> asteriskServer
asteriskServer == RURI:phone2 at 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 at sip.domainA,4 at sip.domainA,10,8
- 1234, 4 at sip.domainA,5 at sip.domainB,10,8
- 1234, 5 at sip.domainB,6 at asteriskBox,10,8
- 1234, 6 at asteriskBox,phone2 at domainA,10,8

Is it a complete dream or do you have an idea ? 


Manuel






More information about the Users mailing list