I’m currently working on implementing an after-call survey feature in Asterisk, and I’m encountering some challenges. The goal is to prompt the caller with a survey immediately after the call with the agent ends, gathering feedback on their experience.
if you are using a queue, there is a c option: that allows you to Continue to the dialplan if the agent hangs up. and then you can jump to the survey
https://docs.asterisk.org/latest_api/API_Documentation/Dialplan_Applications/Queue/
does this work on both outgoing and incoming calls?
Queues can only be used in an incoming context, although the use of call files, or Originate, could mean the the call was outgoing.
Dial has options to continue execution for the caller (g) or the callee (F), when the other party hangs up.
To implement an after-call survey feature in Asterisk:
- Utilize the Asterisk Dialplan to trigger the survey after the call with the agent ends.
- Prompt the caller with survey questions using the Asterisk playback or background application.
- Capture the caller’s responses using DTMF input or a speech recognition system.
- Store the survey responses in a database or log file for analysis.
[after-call-survey]
exten => s,1,Answer()
same => n,Wait(1)
same => n,Playback(survey_question_1)
same => n,Background(survey_question_2)
; Continue prompting for additional survey questions
same => n,WaitExten()
You would need to customize this Dialplan to suit your specific survey questions and response handling logic.
Best Regard
Danish Hafeez | QA Assistant
[ICTInnovations](https://www.ictinnovations.com)
How to do this after the agent hangsup can you provide me with dialplan of outgoing and incoming both?
I want to continue to dialplan even after agent hangs up in outgoing call,
[incoming]
exten => 12345,1,NoOp(pressed 12345)
same => n,Queue(queuethree,c)
same => n,Goto(customer,s,1)
same => n,HangUp
after the agent hang up the call I am passing call to ivr context now i want to achieve same in outgoing call as well…and if there is any better way to do this suggest me.
You have to define what “outgoing call” means. How it was done, how it works.
Outbound call
[outgoing]
exten => _X.,1,Set(CALLERID(num)=number)
same => n,Dial(SIP/Trunkname/${EXTEN})
when the agent dials call to external number
As I already said:
Hey david,
same => n,Dial(SIP/trunkname/${EXTEN},g)
same => n,Goto(customer,s,1)
same => n,HangUp
i did this it isnt working is there any further suggestion.
You want to divert the callee. I even crossed out the g option for you, to just leave the correct one.
The dialplan will drop through on failed calls as well, so you don’t want the simple version of F. Your HangUp line will never be reached.
I tried with F also but it didnt work.
If your dialplan is accurate, then you ware putting the option in the “timeout” field instead of the correct place:
same => n,Dial(SIP/trunkname/${EXTEN},,F)
Note the:
,,
To leave out a timeout.
thanks jcolp it worked
can i do the same with specific agents ?? only??
If you write dialplan logic for it…
For an outgoing call they’re not part of a queue, there’s no concept of agents, nada. It’s up to you to write logic to do what you want.
if I have 3 agents I want to run survey to only 2 agents…how should I write the logic so I can achieve the above?
On Mon, 11 Mar 2024, 20:26 jcolp via Asterisk Community, <notifications@asterisk.discoursemail.com> wrote:
jcolp Asterisk Project Lead
March 11If you write dialplan logic for it…
For an outgoing call they’re not part of a queue, there’s no concept of agents, nada. It’s up to you to write logic to do what you want.
Visit Topic or reply to this email to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, click here.
you can setup hangup handler , and write survey in this
Hangup handlers have no access to media, and, even if they did, they would be subject to the constraint "As always, hangup handlers, like the h extension, need to execute quickly because they are in the hangup sequence path of the call leg. Specific channel driver protocols like ISDN and SIP may not be able to handle excessive delays completing the hangup sequence."