(insert facepalm here)
Eegads… That makes perfect sense! And, I just realized there’s a whole section of explanation on applicationmap … just a little farther down than I originally stopped reading… in features.conf!
…arrgh…
Thanks. I’ll go and give it a try.
(UPDATE - THE NEXT MORNING)
Thanks to the above post about featuremap, and given a little more research and tweaking, I thought I’d share my version of the solution (and, hopefully, save someone else a lot of frustration).
My specific application was to be able to start or stop recording a call on demand, all from whatever phone the user happens to be on at the time. I had the additional requirements of making the call recordings a mix of both sides of the conversation, and for using a smaller file format than .wav.
The solution turned out to be a combination of macros in the dialplan, and some tweaks to the application map in features.conf.
First, the additions to extensions.conf under the [globals] context:
DYNAMIC_FEATURES=mixmon#stopmix
Next, the two macros:
[macro-callrec]
; Sets up the mixmonitor call recording function with an easily-tweakable filename.
;
exten => s,1,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${CALLERID(num)}-${CHANNEL})
same => n,Playback(beep) ; optional - hear when recording starts
same => n,MixMonitor(${MONITOR_FILENAME}.gsm,b)
;
[macro-stoprec]
; Shuts off call recording on demand.
exten => s,1,StopMixMonitor(${MONITOR_FILENAME}.gsm,b)
And, finally, in features.conf under applicationmap:
[applicationmap]
;
mixmon => *7,peer,macro(callrec)
stopmix => *0,peer,macro(stoprec)
The nice thing about using a macro is I can also (I think) find a way to call it using a feature button on a VoIP phone. I suspect this would have proven much more difficult with a trigger limited exclusively to DTMF signaling.
I think my only regret is I didn’t figure this out last night.
Keep the peace(es).