Post Call Evaluation

HI All,

I am able to setup a Post Call Evaluation Survey for our IVR calls.

I have edited the email response

[macro-survey]
exten => s,1,answer()

;this asks the first question (based on your recording) and stores them in variable

exten => s,n(question1),Read(answer1,/var/lib/asterisk/sounds/custom/question1,1,1,2)
exten => s,n,GotoIf($[ ${answer1} < 4 ]?finish:question1)

;this asks the first question (based on your recording) and stores them in variable

;this line puts the two answers together and separates them with a | symbol.
exten => s,n(finish),set(answer=${answer1})

;this saves the answers into the CDR field of “userfield”
exten => s,n,Set(CDR(userfield)=${answer})

exten => s,n,system(mail -s “Post Call Evaluation Survey” [email protected] <<< ‘\n\tHi Team,\n\tYou have a Post Call Evaluation Response from the Client ${CALLERID(name)}.\n\tPlease Find Details Below:\n\tCall-ID-Name - ${CALLERID(name)}\n\tCall-ID-Number - ${CALLERID(number)}\n\tAnswering Peer - ${BRIDGEPEER}\n\tCall-Rec - ${UNIQUEID}\n\tResponses: ${answer}\n\n\tThanks,\n\tRegards,\n\tVoIP Team’)

;

;play a thankyou message. you can just remove this line for anyone who doesn’t want the thankyou.
exten => s,n,playback(/var/lib/asterisk/sounds/custom/thankyouforyourtime)

exten => s,n,hangup()

I am getting the file recording information but I want to attach that call recording as well.
Can anyone help me with this how can i get the call recording attached to that email

Does no body want’s to show up ?

Need little help

hi comtech,

thanks for the response. I’ll check that out and share the status.

I am sending the email after the survey in the below format but need to change few information.

Current Email Format:

Response: 1 =Excellent
2 =Good
3 =Bad

Subject: Post Call Evaluation Survey

Hi Team,
	You have a Post Call Evaluation Response from the Client Queue Label-Client Number or Name.
	Please Find Details Below:
	Call-ID-Name - Queue Label-CallerID of the Caller
	Call-ID-Number - CallerID Number of the Caller
	Answering Peer - Local/831@from-queue-0000bf0b;1
	Call-Rec - 1599666835.148874
	Responses: 3

I need to modify the email response in this format. can anyone help. I am having trouble in separating the peer name and Extension from this output info

Answering Peer - Local/831@from-queue-0000bf0b;1

and need to change the Response value to appear as Excellent good or Bad in readable form.

Below you can find the format required:

email subject: Post Call Evaluation Survey - Answering Agent Name - Quality: Good

    Notification body can be :

    Hi Team,

    You have received a Post Call Evaluation Response from Client Name or CallerID.
    Call-ID-Number - 1000
    Answering Agent - Answering Agent Name (Ext.No)
    Call-Rec - 1599152757.60891
    Quality: Good

use gotoif in the dialplan.

If the read variable =1 go to set ${RESPONSE} = Excellent otherwise
If the read variable =2 go to set ${RESPONSE} = Good otherwise
If the read variable =3 go to set ${RESPONSE} = Bad otherwise
set ${RESPONSE} = NA

https://wiki.asterisk.org/wiki/display/AST/Goto+Application+and+Priority+Labels

ok let me try that out.

how to separate answering agent name from local channel output

Lots of ways. I personally would set a channel variable using Shell with bash commands to run the asterisk command and trim the result.

https://wiki.asterisk.org/wiki/display/AST/Function_SHELL

if you can write the code I will be thankful as I don’t know shell much.

That is not possible. Someone else might, otherwise, here is some reading material to get you started.

I want to make this code like

greater than 0 and less than 4, how can I write that.
;exten => s,n,GotoIf($[ ${answer2} < 4 ]?finish:question1)

You can separate conditions between the square brackets with || for ‘or’ and & for ‘and’. So something like:

exten => s,n,GotoIf($[${answer2}>4 & ${answer2}<4]?finish:question1)
1 Like

That works like a charm. thanks. :grinning::grinning::grinning:

how can I get answering peer extension in output:

I used this variable ${BRIDGEPEER} but get the below response. I just need 831 or extension name which answered the call.

Local/831@from-queue-0000bf0b;1

If you’re looking for the extension number of the agent that answered a queue call, it should be in the variable ${QAGENT}

hi Igaetz,

thanks for your response. but ${QAGENT} is not giving and value .

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