linotp.provider.pushprovider.default_push_provider module

  • implementation of the KeyIdentity VoiceProvider
class linotp.provider.voiceprovider.custom_voice_provider.CustomVoiceProvider[source]

Bases: linotp.provider.provider_base.ProviderBase, linotp.provider.voiceprovider.TwillioMixin

Send a Voice notification through the Custom Voice Provider to the Voice Challenge Service. The CustomVoiceProvider allows to define all required config definitions directly and expects the following parameter:

{ “server_url”: “https://vcs.*/v1/twilio/call” “access_certificate”: “/etc/linotp2/voice-license.pem”, “server_certificate”: “/etc/linotp2/keyidentity-voice-ca-bundle.crt” ‘callerNumber’: ‘+4989231234567’ }

Part of the config definition is as well the Voice Delivery Service configuration definition, whereby currently the twilio definition is the only supported one:

‘twilio’: {
‘accountSid’: ‘ACf9095f540f0b090edbd239b99230a8ee’, ‘authToken’: ‘8f36aab7ca485b432500ce49c15280c5’ ‘voice’: ‘alice’, }

Loads the configuration for this Voice notification provider

Parameters:configDict – A dictionary that contains all configuration entries you defined (e.g. in the linotp.ini file)
the voice provider target url,
the client certificate
server verification certificate
“proxy”: ‘
the proxy url
the http timeout value
“twillioConfig”: {
the account identifier
the authentication token
reader’s voice - default is ‘alice’
the number of the originator



submitVoiceMessage(calleeNumber, messageTemplate, otp, locale)[source]

Sends out the voice notification message.

‘calleeNumber’: ‘+4917012345678’, ‘messageTemplate’: ‘Hi! Your otp is {otp}’ ‘otp’: ‘98018932’ ‘locale’: ‘en’,



the other information is joined in the lower level of the http call

  • calleeNumber – the destination phone number
  • messageTemplate – the message text containing the placeholder for the otp
  • otp – the otp
  • locale – the language of the voice reader

A tuple of success and result message


to test the connection, we just call the same endpoint without arguments (empty document), which will raise an error 400