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:-

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/AdditionalConfig_id256654.html

basically something like :-

add to your applicationmap in

/etc/asterisk/features_applicationmap_custom.conf

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

[doorphone]
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