[asterisk-users] peer IP address in CDR
Zeeshan Zakaria
zishanov at gmail.com
Tue Jun 29 10:27:14 CDT 2010
Let me make it simple for you:
Add a column to your table, e.g. `my column`.
In the dialplan do the following (AEL example):
MYSQL(Connect connid localhost username password database);
MYSQL(Query resultid ${connid} INSERT INTO `cdr` (`mycolumn`)
VALUES('${SIPCHANINFO(ip)}'));
MYSQL(Disconnect ${connid});
--
Zeeshan
On Tue, Jun 29, 2010 at 10:32 AM, Gareth Blades
<list-asterisk at skycomuk.com>wrote:
> Remco Bressers wrote:
> > Hi,
> >
> > Sorry, but i forgot to notice that i am already using the 'userfield'
> > column so that's not a possibility. Is there any way i can add the IP
> > address to a custom MySQL field in CDR? With AGI possibly? The problem
> > is, that the CDR entry is written in MySQL when the call is hungup, so i
> > have no possibility to write the IP address after a call.
> >
> > Regards,
> >
> > Remco
> >
>
> See my earlier post. You can certenly write the information after the
> call is hung up by using the 'h' extension. I do this myself to write
> the calculated call cost to a custom column in the mysql table.
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Zeeshan A Zakaria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100629/db2a3e15/attachment.htm
More information about the asterisk-users
mailing list