[Asterisk-Dev] Modifying CDR_MYSQL

Sherwood McGowan madprofzero at yahoo.com
Thu Oct 13 11:12:35 MST 2005


Hello all,

I've been trying to find information on how to modify what the cdr_mysql
module uses for which field in the logs. Unfortunately, I have been
unable to find anything so far.

I ask this here because I figure this would be a modification of source
and recompilation issue, rather than just a configuration issue.

The reason I need this is I have forwarding numbers set for certain
lines, and the CDR only records the resulting outgoing call. Here's how
the call is processed in the extensions.conf:

We'll use the number 09876 as the number of my company:
[incoming] # Going to use actual numbers instead of patternmatch exten
lines:

exten=1234,1,Verbose(1|Call coming in for 1234 from 0101, forwarding
call to 4321)
exten=1234,2,Dial(4321@$TRUNK,120,rtT)


Now, the CDR table in the DB shows the following information:

SRC: 09876
DST: 4321
ACCOUNTCODE:
# (Account code usually has customer's number in it)
and so on...


Any idea how I might be able to force Asterisk to use the originally
called number as the dst and the original calling number as the src?
Basically, I need to force it to ignore the fact that the second call
takes place, but to log the time to the first call.

Thank you in advance for any advice you may have.

Sincerely,
Sherwood




More information about the asterisk-dev mailing list