To do this as a custom action, you would have to modify every rule/story to insert your custom action. You could also insert middleware between the user and the Rasa channel and do the call in your middleware before sending the utterance on to the Rasa channel. You could also create a custom version of the REST or socket channel.