[asterisk-bugs] [JIRA] (ASTERISK-26818) cdr: Problem setting variables in h exten

Joshua Colp (JIRA) noreply at issues.asterisk.org
Mon Mar 20 13:44:10 CDT 2017


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

Joshua Colp commented on ASTERISK-26818:
----------------------------------------

The issue has been triaged and accepted. Any updates will be posted here, as well as any questions (if there are any) when work begins. If you'd like to see it completed faster we've recently published a blog post[1] which has some pointers.

[1] http://blogs.asterisk.org/2017/03/15/five-shocking-tips-get-asterisk-bugs-resolved-quickly/

> cdr: Problem setting variables in h exten
> -----------------------------------------
>
>                 Key: ASTERISK-26818
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26818
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/cdr_adaptive_odbc, CDR/General
>    Affects Versions: 13.14.0
>            Reporter: scgm11
>            Assignee: Unassigned
>         Attachments: 1314NOTWORKING2.txt, 1314NOTWORKING.txt, 1314WORKING.txt, ASTERISK-26818.diff, cdr.conf, full
>
>
> If I set on the h extension   CDR(userfield) = test
> the insert created never has the userfield (using cdr_adaptative) and other variables are also not setted
> {noformat}
> [Feb 23 17:02:26] DEBUG[2634]: pbx_variables.c:474 ast_str_substitute_variables_full: Evaluating 'CDR(userfield)' (from 'CDR(userfield)})' len 14)
> [Feb 23 17:02:26] DEBUG[2634]: pbx_variables.c:508 ast_str_substitute_variables_full: Function CDR(userfield) result is ''
> [Feb 23 17:02:26] DEBUG[2634]: pbx_variables.c:508 ast_str_substitute_variables_full: Function CSV_QUOTE() result is '""'
> [Feb 23 17:02:26] DEBUG[2634]: pbx_variables.c:474 ast_str_substitute_variables_full: Evaluating 'CSV_QUOTE(${CDR(uniqueid)})' (from 'CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(type)})},${CSV_QUOTE(${CDR(guid)})},${CSV_QUOTE(${CDR(causecode)})},${CSV_QUOTE(${CDR(campaign)})},${CSV_QUOTE(${CDR(direction)})},${CSV_QUOTE(${CDR(carrier)})},${CSV_QUOTE(${CDR(linkedid)})},${CSV_QUOTE(${CDR(peeraccount)})},${CDR(sequence)},${CDR(charged_balance)},${CDR(real_balance)},${CSV_QUOTE(${CDR(note)})},${CDR(contact)},${CSV_QUOTE(${CDR(dialerbase)})},
>  [INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,type,guid,causecode,campaign,direction,linkedid,peeraccount,sequence,contact,dialerbase,parandvalues) VALUES ({ ts '2017-02-23 17:01:38' },'"PowerDialer:PTI<-:5556446467:f4c9f887-d830-4e49-b339-6f93ba632af020170223T1538','5556446467','5556446467','PowerDialer','SIP/TRK_TELEMDIC-00000012','SIP/2502-00000014','Queue','PTI<-,TtKk,,,600,,,,,',47,47,'ANSWERED',3,'PowerDialer','1487880093.30','record','38c9889c-757b-4fb8-ad02-13b8b66f3caa','16','PTI<-','outgoing','1487880093.30','URIELMONTER',18,113086,'f4c9f887-d830-4e49-b339-6f93ba632af020170223T153800','Documento=PROTOTELEM63_02858')]
> {noformat}
> userfield is shown on core show channel XXXXXX and is setted on an h extension
> seems to be that all variables existing before h execution are not overwritten with the new values that are setted on h exten, this worked in 13.13
> this function ast_str_substitute_variables_full (line 398) gives empty string for variables that I try to overwrite on h exten
> there is also an UTF-8 problem I think accents are not saved ok
> example: I set CDR(userfield) from AMI before hangup, then I have this on the database:
> ;No Contactación|Telefono buzón|PROTOTELEM63_09015
> the ; seems to concat both channels data and as I just setting one channel one is empty, I repeat that this worked fine on 13.13 accents were ok and not using the ;
> is this the intended behaviour now? I think this is a breaking change for this branch...



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list