Call Evaluation

I need help in this case

for now, I have FreePBX and asternic reports but transfer calls were not written in the reports
but I found a solution for adding the prefix S before EXTEN like SIP/1062 and it’s working
but the call evaluation is not working if delete this prefix working normally
here is the dial I made

[ivr-18] ;
exten => return,1,noop(EVALUATION SYSTEM HERE )
exten => return,n,Read(choice1,/var/lib/asterisk/sounds/en/custom/bevatel-eval1-en,1,3,10)
exten => return,n,Read(choice2,/var/lib/asterisk/sounds/en/custom/bevatel-eval2-en,1,3,10)

exten => return,n,MYSQL(Connect connid localhost user Pass evaluate)
exten => return,n,MYSQL(Query resultid ${connid} insert into data (service,service2,number,ext,company,record) values (“${choice1}”,“${choice2}”,“${CALLERID(num)}”, “${QAGENT}”, “Bevatel”,“${CDR(recordingfile)}”))

exten => return,n,MYSQL(Disconnect ${connid})
exten => return,n,playback(/var/lib/asterisk/sounds/en/custom/bevatel-eval-thanks-en)

What actually… happens? What’s the console output?

what happens that the call ends from the agent side not return to IVR

IF PREFIX S add to extensions

Isn’t MYSQL() removed from Asterisk? I can’t find any recent documentation on it.

Removed as of Asterisk 19[1].

[1] Asterisk Module Deprecations - Asterisk Documentation

That’s what I thought, I just don’t even see it in the Asterisk 16 or 18 documents.

all need how to make call return to IVR if the queue have exten with prefix S for SIP

Return to the IVR when? When the caller is removed from the queue? If the caller abandons the queue? When exactly should a call be returned to an IVR from the queue?

the already return to IVR when the queue agent put like this
1062,0
1063,0
but when like this
S1062,0
S1063,0
not back to IVR

Well you’re going to need to show us what you’re doing with the Queue config. There’s no option in the queues in FreePBX to return to an IVR.

ok the call go like this the client call 012879XX
go to IVR and hit option 1 or 2 etc
and in IVR we make return to yes
after the call hangup from agent return to this dialplan
[ivr-18] ;
exten => return,1,noop(EVALUATION SYSTEM HERE )
exten => return,n,Read(choice1,/var/lib/asterisk/sounds/en/custom/bevatel-eval1-en,1,3,10)
exten => return,n,Read(choice2,/var/lib/asterisk/sounds/en/custom/bevatel-eval2-en,1,3,10)

exten => return,n,MYSQL(Connect connid localhost user Pass evaluate)
exten => return,n,MYSQL(Query resultid ${connid} insert into data (service,service2,number,ext,company,record) values (“${choice1}”,“${choice2}”,“${CALLERID(num)}”, “${QAGENT}”, “Bevatel”,“${CDR(recordingfile)}”))

exten => return,n,MYSQL(Disconnect ${connid})
exten => return,n,playback(/var/lib/asterisk/sounds/en/custom/bevatel-eval-thanks-en)

but when QUEUE like this
S1062,0
S1063,0
not back to IVR

That is due to the fact the only return options in an IVR are return to a previous IVR on invalid or timeout tries being exceeded or to return to the IVR if the extension being called goes to voicemail.

1062 and 1063 are real extensions that would go to voicemail. S1062 and S1063 are not real extensions and they don’t go to voicemail. Because of that, they won’t return to the IVR when the “Return to IVR after VM” option is set to yes. That option requires the call to hit voicemail before it is used.

Any work around

or i can make transfer shown in reports without adding this prefix