Run script just before passing call to extention?

Hi there,

I would like to execute a small script just before a call is passed to an extention. Is there a specific place where i can hook such a script?

greetings,

Kees