[asterisk-dev] [Code Review] CDR: add Dialed Number Identifierfield (DNID) field in record

Kurt Lidl kurt.lidl at cello.com
Fri Jan 8 07:53:16 CST 2010


On Fri, Jan 08, 2010 at 11:19:36AM +1300, Alec Davis wrote:
> On 100107 0037, Alec Davis wrote:
> > Testing
> > -------
> > 
> > added additional mysql field with following systax;
> >   mysql> alter table cdr ADD (dnid varchar(80) not null);

I don't think this is the correct DDL for this column.  For
internal calls, extension to extension, there is no DNID, so
this column should be nullable.

I hacked on my dialplan to record the DNID for calls that have
it in the 'userdata' column.  I am looking forward to having
the base system perform this functionality.

-Kurt

> > made inbound test calls, from my cell phone (021xxxx), and restricted
> number.
> > The DNID is only 4 digits, as that is what our Telco presents us with.
> > The 'userfield' is still being customized from the dialplan. My extension
> is 4866. 8888 was unassigned.
> > 
> > mysql> select 
> > mysql> calldate,clid,dnid,dst,userfield,dcontext,lastapp,lastdata,dura
> > mysql> tion from cdr where dcontext like "ivr2%" and dnid like "9%";
> >
> +---------------------+-------------------------+------+------+-------------
> ----+-----------------------------+---------+---------------+----------+
> > | calldate            | clid                    | dnid | dst  | userfield
> | dcontext                    | lastapp | lastdata      | duration |
> >
> +---------------------+-------------------------+------+------+-------------
> ----+-----------------------------+---------+---------------+----------+
> > | 2010-01-07 20:52:52 | "Alec Davis" <21496xxx> | 9100 | 4866 | 9100-Alec
> Davis | ivr2-bdt-dialledbyextension | Dial    | DAHDI/g0/4866 |       22 |
> > | 2010-01-07 20:56:46 |                         | 9100 | 4866 | 9100-Alec
> Davis | ivr2-bdt-dialledbyextension | Dial    | DAHDI/g0/4866 |       17 |
> > | 2010-01-07 21:23:44 | "Alec Davis" <21496xxx> | 9888 | 8888 | 9888-
> | ivr2-bdt-dialledbyextension | Dial    | DAHDI/g0/8888 |       16 |
> > | 2010-01-07 21:24:29 | "Alec Davis" <21496xxx> | 9888 | 4866 | 9888-Alec
> Davis | ivr2-bdt-dialledbyextension | Dial    | DAHDI/g0/4866 |       20 |
> >
> +---------------------+-------------------------+------+------+-------------
> ----+-----------------------------+---------+---------------+----------+
> > 4 rows in set (0.01 sec)
> > 
> > 
> > Thanks,
> > 
> > Alec
> > 
> > 
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> > 
> > asterisk-dev mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-dev
> > 
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list