Invoking a seperate IVR once dead channel is identified

Hi All,
Here is my environment:
CentOS: 6
Asterisk: 11.16
FreePBX: 12.0
I have created a simple IVR with two menu options which are configured as queues and agents are assigned to these queues. Till now everything is good, agents can login to queue, answer calls from callers based on options selected by callers. Now my requirement is to send callers to Post call survey IVR treatment after call without agent transferring them manually. Means once conversation between agent and caller is over, agent simply disconnects himself from call and caller gets transferred to Post call survey IVR.
I thought it is possible to do this by manipulating dead channel or h extension of the queue context, but all my readings and experiments tell me that it is not possible to play any media on dead channel or transfer call to any other extension.
My context details are as below:
Initial IVR: [ivr-1]
Queue context: [ext-queues]
Post call survey IVR context: [survey-ivr]
I am trying to put below configuration in queue context to send caller to Post call survey IVR:
exten => h,1,GoTo(survey-ivr,s,1)
exten => h,n,Macro(hangupcall,)

In Previous logs, i am trying to send call back to initial IVR.

Please let me know if above is possible or any other way to achieve this.
Any help would be very helpful.


You haven’t said what you are attempting to do or accomplish…

sorry… new to this forum. My writings were overwritten by logs

All above mentioned dial plans are written in extensions_override_freepbx.conf.
Please let me know if you want me to put that configuration as well for review.

If you are using FreePBX, you should use as what you can do with FreePBX is severely constrained by FreePBX.

One you are in the h extension, you no longer have a working channel that you can use to talk to the caller.

What you probably actually want to do, if you have full control of Asterisk, is to set the c option on the Queue application, then test QUEUESTATUS. You may find that FreePBX doesn’t allow you to do this, or doesn’t allow you to add dialplan immediately after the call to Queue.

1 Like

When the ‘h’ extension is running, the call legs have already been torn down. There is no way to delay this happening, and you can’t do anything in the ‘h’ extension that needs to read audio from the channel (since no audio will appear, the first time it tries to read audio it will abort). Thus Playback() or Background(), for example, does not work. Essentially, the only things that make sense to use in the ‘h’ extension are those that don’t have anything to do with the external channel that was involved before the hangup. No audio, no DTMF, etc.

As @david551 said, you could try the c option to continue in the dialplan if the callee hangs up, but you will need to do some customization on the FreePBX dial plan, those customization will be added to the files extensions_custom.conf or extensions_additional_override.conf but that part is supported on the FreePBX forum

1 Like

thank you david551 and ambiorixg12 for your views.
I know FreePBX does not allow directly to manipulate and achieve what i want; hence i have moved all the IVR and Queue configuration to extensions_override_freepbx.conf file which allows me to make changes to the dial plan and Asterisk can have full control of that configuration. So now any changes that I make in the dial plan are reflecting with Asterisk.
As you suggested, I will try to research on c option and QUEUESTATUS and update the post with my findings.
However I am pretty sure this has been achieved by some of the providers using Asterisk as I had come across some examples on Internet. If I can find those examples, I will give post those links here.

Hey david551 and ambiorixg12,
Queue application with option c has worked like charm. I am able to achieve my goal with this option.
Thank you very much for your pointer to help me out with this problem.

1 Like