Announce long call to a queue member

Hello,

would anyone know of a way to announce to a queue member when the call has been going on for a long time? For example, play a short tone every 5 minutes so that the agent will know that it’s time to wrap up the call.

Thanks

Andres

Inject a chanspy with the help of AMI to the agent, obviously you will need to monitor somehow the time of each call, maybe triggering an external script when every user enter in the queue.

1 Like

Hi navaismo,

thanks for the information. I went through the AMI commands but I can’t figure out which one to use to inject a chanspy. I would need to basically go to a specific context and start executing the extension.

Do you know which command should I be using?

Thanks

Andres

The wonders of google a thread of 6 years ago:

thank you very much for that link, it’s exactly what I needed.

I was able to create the script and add all the necessary contexts but I’m running into the following problem now. I have a python script that will run every X amount of time and whisper on the agent’s channel by using AMI:

extensions.conf

exten => 8013,1,Verbose(“Testing the Queue Macros”)
same => n,Queue(test,k,testing)

[macro-testing]
exten => s,1,Verbose(“Entering Macro ${CHANNEL}”)
same => n,Set(AGENT=${CUT(MEMBERINTERFACE,-,1)})
same => n,System(python /var/scripts/whisper.py ${AGENT} >/dev/null 2>&1)

The problem with this is that Asterisk will only add both parties to the bridge the moment the python script has ended. What I actually need, is for the macro to execute the python script but have Asterisk continue with the process of connecting the call at the same time.

Is there a way to do this?

Thanks

hi,

I found the solution to my previous post and it was quite simple after all. I just changed:

same => n,System(python /var/scripts/whisper.py ${AGENT} >/dev/null 2>&1)

for:

same => n,System(python /var/scripts/whisper.py ${AGENT} >/dev/null 2>&1 &)

which makes the script run on the background and lets the dialplan continue.