Does anyone have any tips on how to allow bookmarking of where a caller is holding using ControlPlayBack? I was trying to use ApplicaitonMap to call an AGI while using ControlPlayBack but that did not work (as per the docs some functions/features/applications that won’t work with application map and I assume this is one of those cases). I know I can look at CPLAYBACKSTATUS and CPLAYBACKOFFSET once it exits but the user would like to press a button during the playback to bookmark it in the middle.
i think you designate the key press (CPLAYBACKSTOPKEY) to save the timestamp and when caller comes back you check callerid where was the last time and you play it with a offset
That just tells me that the caller stopped. I want during the playback for them to press a key and get the time of that as a variable when the application is done.
Interpose a local channel, so there is a bridge that can implement feature codes. Use the feature code to set a channel variable, or ASTDB entry.
to my expierence just deal with the designated dtmf in the dial plan
Blockquote ExecIf($[“${CPLAYBACKSTOPKEY}”=“4”]
@benphone Again that only tells me when it’s over (which I know I can do. I was looking something mid play. Perhaps I will find someone to create a patch for Asterisk.
I used to use Local channels for items like this but then Asterisk throws lots of long queue errors (I forget the exact error, it’s why I moved away from local channels).
any button presses will exit bookmark it and return where it left try it
ExecIf($[“${CPLAYBACKSTOPKEY}”=“4” go bookmark
ExecIf($[“${CPLAYBACKSTOPKEY}”=“4” tell the callee its boommarked
ExecIf($[“${CPLAYBACKSTOPKEY}”=“4” return to control playback with offset ssaved when exit
That usually indicates a deadlock or a bug. If you know of such scenarios, you should report them on the issue tracker (issues.asterisk.org)
Long Queue warnings are very common when you are playing with third parties applications that you can’t control speed of response.
When you need call some external app with AGI or similar, put call in hold or play some message in loop until you get some response from your external app/service.
Local Channels are amazing to solve a lot of logic problems.
The correct way to deal with these is generally autoservicing a channel which is something that can be done in the Asterisk core. Many modules that might “block” due to such a task do that.
I don’t use AGI at all so I don’t know if that capability is possible there or can be manually invoked.
I had them whenever I would put a call on hold and play an external stream. It would happen to one caller listening while not giving an issue to another caller listening to the same stream. It became very hard to debug and my work around “just worked” so I stopped using it.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.