CDR Mysql adaptive Colum

Home » Asterisk Users » CDR Mysql adaptive Colum
Asterisk Users 4 Comments

Hello folks, i installed asterisk 1.8 from repo:

And Looked at this article about CDR in mysl.

I installed asterisk-mysql pacakge from debian repo.

The cdr in mysql is working, but i can not get cdr adaptive colums are not,
i use this in my extension.conf

exten => s,1,set(CDR(teste)=${CHANNEL(audioreadformat)})

And is not working, i thought the only diference it i would need the colum
teste in my cdr table right ?

I tryied a lot of combinations of exten =>

Does anyone have any ideia how is the right way ?

Or if i need to install anythign else to make the adaptive colums works ?



4 thoughts on - CDR Mysql adaptive Colum

  • Correct. Did you restart Asterisk after modifying the table? If you set
    core debug to 2 (core set debug 2 cdr_mysql), does it spit out any messages
    regarding the MySQL CDR driver? (Note that you’ll need to have debug lines
    going to the console in logger.conf for this to work.)

  • Found something now! i need first to set the CDR and after make the Dial

    Like this.

    exten=> _X.,1,set(CDR(teste)=${CHANNEL(useragent)})
    exten=> _X.,2,Dial(SIP/${EXTEN})

    Like this, this would work!!

    Now i have a question, if i do not use EXTEN and add an entry for each
    number like this

    exten=> _600.,1,set(CDR(teste)=${CHANNEL(useragent)})
    exten=> _600.,2,Dial(SIP/600)
    exten=> _700.,1,set(CDR(teste)=${CHANNEL(useragent)})
    exten=> _700.,2,Dial(SIP/700)
    exten=> _800.,1,set(CDR(teste)=${CHANNEL(useragent)})
    exten=> _800.,2,Dial(SIP/800)

    I would have to do like this or thre is an easier way to set the CDR for all
    my calls ?


  • Do NOT copy me on replies. I do NOT need two copies of your message.

    Simple pattern matching:

    exten => _[678]00.,1,set(CDR(teste)=….)
    exten => _600.,2,Dial(…)
    exten => _700.,2,Dial(…)
    exten => _800.,2,Dial(…)

    Or, better:
    exten => _[678]00.,1,set(CDR(teste)=….)
    exten => _[678]00.,n,Dial(SIP/${EXTEN:0:3})

  • Sorry, just use to click on the same botton.

    Thanks, i guess i would figure out something now!!

    Thanks a lot!