[Asterisk-Users] Modifying CDR data?

Roy Sigurd Karlsbakk roy at karlsbakk.net
Sun Oct 31 02:44:31 MST 2004


>>> I've written a small AGI thing to allow lots of stuff, including
>>> diverts. If a call is placed to a diverted number, a new call is
>>> initiated from * to that number. Simple. But then, to make billing
>>> sane, I need to change the 'dst' in CDR to reflect the number 
>>> diverted
>>> to.
>>>
>>> How can I do this?
>
> I don't think you can change dst from the extension flow just like that
> (maybe via an app, but that might have alternate consequences)
>
> I've done some scripting with entirely different purposes, but it may
> fit your needs:
>
> create an AGI script that is called when a call comes in, use that to
> store the uniqueid of the call leg into a database. Then check if call
> diversion is active and log that too. Afterwards, check (i.e. once an
> hour or whatever is convenient) and match CDR versus your own database.

I'm in an AGI script, and I've tried to ForkCDR. This gave me two CDR 
records

(original src,original dst)
(original dst,original dst)

I want to change the latter to

(original dst,diverted dst)

...and I really want to do as much as possible with the stuff available 
in asterisk.

roy




More information about the asterisk-users mailing list