Activate script by keypress during call

I would like to have a AGI script (to activate a door relay) executed if the pound (#) key is press during a call. How to embed this behaviour in the dialplan?

I think I overlook something or I search with wrong keywords. Any help is highly appreciated.

I think searching for features.conf will get you close:-

basically something like :-

add to your applicationmap in


opendoor => #,self/callee,AGI(youragiscript.agi)

and set the global DYNAMIC_FEATURES to suit on a call originating from your door-phone (101) in /etc/asterisk/extensions_custom.conf

exten => 101,1,Set(__DYNAMIC_FEATURES=opendoor)
exten => 101,n,Dial(LOCAL/whatever)

(and the context of 101 of course would be doorphone)

1 Like