diff --git a/README.md b/README.md index f49275fb..7804c00c 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,7 @@ Currently, Apprise only supports phone calls with Twilio. Notifications consist | Notification Service | Service ID | Default Port | Example Syntax | | -------------------- | ---------- | ------------ | -------------- | -| [Twilio](https://github.com/caronc/apprise/wiki/Notify_twilio) | twilio:// | (TCP) 443 | twilio://AccountSid:AuthToken@FromPhoneNo?method=call
twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo?method=call
twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN?method=call
twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo?apikey=Key&method=call
twilio://AccountSid:AuthToken@ShortCode/ToPhoneNo?method=call
twilio://AccountSid:AuthToken@ShortCode/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN?method=call +| [Twilio](https://github.com/caronc/apprise/wiki/Notify_twilio) | twilio:// | (TCP) 443 | twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo?method=call
twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN?method=call
twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo?apikey=Key&method=call ## Custom Notifications diff --git a/apprise/plugins/twilio.py b/apprise/plugins/twilio.py index 626af7eb..9c536740 100644 --- a/apprise/plugins/twilio.py +++ b/apprise/plugins/twilio.py @@ -357,7 +357,8 @@ class NotifyTwilio(NotifyBase): ) continue - # We can't send twilio WhatsApp using short-codes as our source + # We can't use WhatsApp using short-codes as our source or + # for phone calls if ((len(self.source) in (5, 6) or self.method == TwilioNotificationMethod.CALL) and mode is TwilioMessageMode.WHATSAPP): @@ -409,8 +410,8 @@ class NotifyTwilio(NotifyBase): # Set up our authentication. Prefer the API Key if provided. auth = (self.apikey or self.account_sid, self.auth_token) - if len(targets) == 0: - # No sources specified, use our own phone no + if len(targets) == 0 and self.method != TwilioNotificationMethod.CALL: + # No sources specified, use our own phone only with messages targets.append((self.default_mode, self.source)) while len(targets):