[asterisk-bugs] [JIRA] Issue Comment Edited: (ASTERISK-20504) Asterisk 1.8 should use [compat] section in asterisk.conf and behave acconding to the flag pbx_realtime=1.6

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Wed Oct 3 15:16:27 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197908#comment-197908 ] 

Richard Mudgett edited comment on ASTERISK-20504 at 10/3/12 3:15 PM:
---------------------------------------------------------------------

just to show you...

debianastk:/etc/asterisk# grep Queue_log extensions_partner/*ael|wc -l
81

debianastk:/etc/asterisk# grep "Queue_log" extensions_services.ael|wc -l
58

this is stuff like:
{noformat}
                Set(data=${PARTNER}|${STARTED}|${CALLERID(dnid)}|${CALLERID(num)}|${remoteUniqueID}|${GEO}|${recording-path}); Set(CDR(data)=${data});
&Queue_log(${UNIQUEID},${PARTNER},${CHANNEL},INCOMING,${data});         // Log it to csr_queue
{noformat}


where macro is:

{noformat}
macro Queue_log(mUNIQUEID,mPARTN,mCHANNEL,mEVENT,data)  // log in queue_log and in mysql csr_queue
{
        if("${LEN(${mEXT})}" == "3"){
                MYSQL(Query resultid ${connid_pbx} SELECT agent FROM queue_member_table WHERE membername=${mEXT} LIMIT 1);
                MYSQL(Fetch fetchid ${resultid} agentName);
                MYSQL(Clear ${resultid});
                Set(CDR(agent)=${agentName});
        }
        MYSQL(Query resultid ${connid_pbx} INSERT INTO csr_queue(time,callid,queuename,agent,event,data) VALUES(${EPOCH},'${mUNIQUEID}','${mPARTN}','${mEXT}','${mEVENT$

        MYSQL(Disconnect ${connid_pbx});

        return;
}
{noformat}




      was (Author: cusco):
    just to show you...

debianastk:/etc/asterisk# grep Queue_log extensions_partner/*ael|wc -l
81

debianastk:/etc/asterisk# grep "Queue_log" extensions_services.ael|wc -l
58

this is stuff like:
                Set(data=${PARTNER}|${STARTED}|${CALLERID(dnid)}|${CALLERID(num)}|${remoteUniqueID}|${GEO}|${recording-path}); Set(CDR(data)=${data});
&Queue_log(${UNIQUEID},${PARTNER},${CHANNEL},INCOMING,${data});         // Log it to csr_queue


where macro is:

macro Queue_log(mUNIQUEID,mPARTN,mCHANNEL,mEVENT,data)  // log in queue_log and in mysql csr_queue
{
        if("${LEN(${mEXT})}" == "3"){
                MYSQL(Query resultid ${connid_pbx} SELECT agent FROM queue_member_table WHERE membername=${mEXT} LIMIT 1);
                MYSQL(Fetch fetchid ${resultid} agentName);
                MYSQL(Clear ${resultid});
                Set(CDR(agent)=${agentName});
        }
        MYSQL(Query resultid ${connid_pbx} INSERT INTO csr_queue(time,callid,queuename,agent,event,data) VALUES(${EPOCH},'${mUNIQUEID}','${mPARTN}','${mEXT}','${mEVENT$

        MYSQL(Disconnect ${connid_pbx});

        return;
}



  
> Asterisk 1.8 should use [compat] section in asterisk.conf and behave acconding to the flag pbx_realtime=1.6
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-20504
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20504
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Addons/res_config_mysql, Applications/app_queue
>    Affects Versions: 1.8.16.0
>         Environment: Debian wheezy, mysql (using addon res_config_mysql)
>            Reporter: Tiago Geada
>
> in 1.6 queue_log was being populated with the column 'time' formated as UNIX TIME STAMP, while in 1.8, res_config starts by complaining about column time being varchar(11) while it should be char(26) and every queue event is registered with datetime format (as in '2012-10-02 00:01:04') instead of '1349132464'
> I thought in asterisk.conf [compat] section having "pbx_realtime=1.6" would take care of this, but it does not.
> Shouldn't date be inserted as unixtimestamp, if this compat flag is set to 1.6 ??
> Also, maintaining this compatibility, queue_log should still need only one 'data' column, instead of 'data1','data2','data3','data4' and 'data5'

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list