Let me make it simple for you:<div><br></div><div>Add a column to your table, e.g. `my column`.</div><div><br></div><div>In the dialplan do the following (AEL example):</div><div><br></div><div><div> MYSQL(Connect connid localhost username password database);</div>
<div> MYSQL(Query resultid ${connid} INSERT INTO `cdr` (`mycolumn`) VALUES('${SIPCHANINFO(ip)}'));</div><div> MYSQL(Disconnect ${connid});</div><div><br></div><div>--</div><div>Zeeshan</div><br>
<div class="gmail_quote">On Tue, Jun 29, 2010 at 10:32 AM, Gareth Blades <span dir="ltr"><<a href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Remco Bressers wrote:<br>
> Hi,<br>
><br>
> Sorry, but i forgot to notice that i am already using the 'userfield'<br>
> column so that's not a possibility. Is there any way i can add the IP<br>
> address to a custom MySQL field in CDR? With AGI possibly? The problem<br>
> is, that the CDR entry is written in MySQL when the call is hungup, so i<br>
> have no possibility to write the IP address after a call.<br>
><br>
> Regards,<br>
><br>
> Remco<br>
><br>
<br>
</div>See my earlier post. You can certenly write the information after the<br>
call is hung up by using the 'h' extension. I do this myself to write<br>
the calculated call cost to a custom column in the mysql table.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Zeeshan A Zakaria<br>
</div>