Answer the question
In order to leave comments, you need to log in
Asterisk writes parameters to the database every other time, how to fix it?
There is an IVR with several numbers, several people sit on each number in order to reduce reporting, the Dialpernumber parameter was added to the database, which shows who answered the phone, which extension number, but this parameter works every other time, out of 10 calls, 50x50 gets into the database , or there is an internal number, or NULL. How to fix it, where to dig?
Section with call evaluation and extension number entry.
[rating]
exten => _X,1,Noop(RATING press 1 - 5)
same => n,SET(OP=-2)
same => n,NOOP(r9-1 ${CUT(DIALEDPEERNUMBER,/,1) })
same => n,SET(CDR(DIALEDPEERNUMBER)=${CUT(DIALEDPEERNUMBER,/,1)})
same => n,NOOP(CDR - ${CDR(start)} - ${CDR(calldate)} )
same => n,Read(OP,rating&beep,1)
same => n,Hangup()
exten => h,1,ExecIF($["${OP}"=""]?SET(CDR(rating)=-1):SET(CDR(rating)=${OP}))
Answer the question
In order to leave comments, you need to log in
If DB mysql then it is much more convenient to use asterisk.ru/knowledgebase/Asterisk+cmd+MYSQL and there already insert into the values you need into the desired table.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question