I have an app that needs to occasionally bust in on someone listening to a file when an external event happens (like a status event). I redirect callers from voice file to voice file using the Call Manager’s Redirect command. I’m having a problem with ControlPlayback, though.
This callflow works:
- Caller calls in
- Manager Redirects to play a voice file using Playback
- An event happens, so I Redirect back to a Wait
- Caller is in the Wait now.
This doesn’t:
- Caller calls in
- Manager Redirects to play a voice file using ControlPlayback
- An event happens, so I Redirect back to a Wait
- Caller is hung up on by Asterisk.
I modified app_controlplayback.c to printf the res variable upon leaving, thinking that it was returning -1, which would cause a hangup. But it says it’s returning 0 (I do get CPLAYBACKSTATUS=ERROR, though).
The meat of my extensions.conf:
exten => 1000,1, Answer
exten => 1000,2, Wait(600)
exten => 1000,3, Goto(1000,2)
exten => 1000pb, 1, Playback(${VOICEFILE})
exten => 1000pb, 2, Goto(1000,2)
exten => 1000pbskip, 1, ControlPlayback(${VOICEFILE},5000,6,4)
exten => 1000pbskip, 2, Goto(1000,2)
Any ideas on why ControlPlayback causes a hangup after a Manager Redirect?