Why my cdr custom field is ignored?

I have activate a cdr with mysql, when call arrives to my number (extension s) the sql register the dst as ‘s’

| 2023-02-12 12:29:11 | "CALLER" <*******> | ******** | s | uscita | PJSIP/asterisk01-00000000 | DAHDI/17-1 | Dial | PJSIP/telefono1&DAHDI/17,30,tTkK | 16 | 0 | NO ANSWER | 3 | | asterisk1-****** |

I want s became my number so in extensions.conf I made this change

exten = s,1,NoOp()
same => n,Set(CDR(dst)='0********')
........

but after asterisk restart the cdr report the dst as…‘s’
:frowning:

Why my custom field is ignored?
This happen only in incoming calls, for the outcoming the field dst is reported correctly

p.s=is the same also in answered calls

update1: on console I see this error

“[Feb 12 12:43:59] ERROR[18744]: cdr.c:3250 ast_cdr_setvar: Attempt to set the ‘dst’ read-only variable!”

I use this workaround
I modifiy my extension, of course PHONEEXTNUMBER is defined
in [global]

[global]
PHONEEXTNUMBER=0.....67
[uscita]
exten = s,1,NoOp()
same => n,Set(CDR(original_dst)=${PHONEEXTNUMBER})
same => n,Dial(PJSIP/telefono1&DAHDI/17,30,tTkK)
same => n,Hangup()

on mysql I create the column original_dst after dst

alter table cdr add COLUMN original_dst varchar (80) AFTER dst;

Let’s Try…

| 2023-02-12 12:54:10 | "CALLER" <******> | ***** | s | 0.....67 | uscita | PJSIP/asterisk01-00000000 | DAHDI/17-1 | Dial | PJSIP/telefono1&DAHDI/17,30,tTkK | 2 | 0 | NO ANSWER | 3 | | asterisk1-****** |

works!

Very bad zxa9I

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.