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

Joshua Colp (JIRA) noreply at issues.asterisk.org
Thu Mar 2 09:01:11 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-26818:
-----------------------------------

    Attachment: ASTERISK-26818.diff

If you try this attached patch does it resolve the problem?

If not please provide the dialplan that can be used to reproduce the problem, the full console output, as well as your cdr.conf so that it can be reproduced and isolated.

> 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
>
>
> 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