[Home]

Summary:ASTERISK-06924: If you use coma in your Dial String instead of "/" the data will be incorrectly entered in the table.
Reporter:dimitripietro (dimitripietro)Labels:
Date Opened:2006-05-08 12:44:56Date Closed:2011-06-07 14:08:03
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_cdr
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) DataBase.JPG
( 1) extensions.conf
Description:I used this script that can be found : /usr/src/asterisk/contrib/scripts/postgres_cdr.sql

CREATE TABLE cdr (
       AcctId          BIGSERIAL PRIMARY KEY,
       calldate        TIMESTAMP with time zone NOT NULL DEFAULT now(),
       clid            VARCHAR(80) NOT NULL default '',
       src             VARCHAR(80) NOT NULL default '',
       dst             VARCHAR(80) NOT NULL default '',
       dcontext        VARCHAR(80) NOT NULL default '',
       channel         VARCHAR(80) NOT NULL default '',
       dstchannel      VARCHAR(80) NOT NULL default '',
       lastapp         VARCHAR(80) NOT NULL default '',
       lastdata        VARCHAR(80) NOT NULL default '',
       duration        INTEGER NOT NULL default '0',
       billsec         INTEGER NOT NULL default '0',
       disposition     VARCHAR(45) NOT NULL default '',
       amaflags        INTEGER NOT NULL default '0',
       accountcode     VARCHAR(20) NOT NULL default '',
       uniqueid        VARCHAR(32) NOT NULL default '',
       userfield       VARCHAR(255) NOT NULL default ''
);

If in the Dial String you use coma instead of "/" the data is incorrectly copied in the database. I'm getting the dial options (ex: tTwW) in the "duration" row. After replacing every coma iwith a "/", everything work fine.

Before : Dial(ZAP/g1/${EXTEN},20,tTwW)
After: Dial(ZAP/g1/${EXTEN}/20/tTwW)
Comments:By: Tilghman Lesher (tilghman) 2006-05-08 13:09:09

Are you using AEL or extensions.conf to enter your dialplan?

By: dimitripietro (dimitripietro) 2006-05-08 13:12:09

extensions.conf

I'm only using the postgresql database for CDR

By: Tilghman Lesher (tilghman) 2006-05-08 13:14:55

Please upload your extensions.conf as a file.

By: dimitripietro (dimitripietro) 2006-05-08 13:17:40

Note : I replaced every coma by the "/". Take a look at the exten :

_XXXXXXXXXX This is the one I was using for my test.

By: dimitripietro (dimitripietro) 2006-05-08 21:35:23

I made a mistake, if you use "/" instead of coma, the options are not working. If I replace the coma by the "|". I have the same problem. I will post a screenshot of a my database view.

By: dimitripietro (dimitripietro) 2006-05-08 21:40:35

AS you can see in the pictures, if I use "/" (this mean there is not more options because when using "/" instead of coma Asterisk didn't recognize the options anymore, my error) But as soon as I had options to my Dial command, I'm getting wrong data. Take a look at the voicemail command, same problem. If I use options like "su", I get "su" in the duration.

By: Tilghman Lesher (tilghman) 2006-05-08 23:30:41

Actually, this would appear to be a problem with your phpPgAdmin tool, and not with the underlying database (or with Asterisk).

By: dimitripietro (dimitripietro) 2006-05-08 23:52:07

Corydon76, Could you give me some tips about what your are talking about.

By: Tilghman Lesher (tilghman) 2006-05-09 00:08:28

Sure.  Very simply, note that with your table structure, the columns duration and billsec are of type INTEGER.  That means that you cannot possibly store any text in those columns.  Your photo, however, apparently shows text in that column.  That indicates to me that this is simply a problem with the web tool that you're using to display the data, not a problem with Asterisk or with the underlying database.

Hence, this is not a bug in Asterisk.