Features.conf & custom command


I would like to start a bash script from a DTMF code sequence while having a conversation.

I found lots of reference doing this with custom extension but all relative information about custom feature code refers to internal asterisk commands.

Any clue ?

Let consider a bash script named ‘opengate’ to trigger the opening of a door lock
(Driving parallel port)

Add in globals_custom.conf


Add in extensions_custom.conf

exten => s,1,System(/etc/asterisk/opengate)

;end [macro-gateopen]

Add in features_applicationmap_custom.conf
opengate => 4,caller,macro,gateopen

During conversation I can dial 4 to trigger the bash script.

I like to thanks all the forum users for their absence of help !

Thank you for share your solution