Skip to content

Commit

Permalink
Will automatically setup up the realm properly for Twilio Programmabl…
Browse files Browse the repository at this point in the history
…e Voice (sip.twilio.com)
  • Loading branch information
root committed Apr 29, 2022
1 parent 90313c5 commit 3ce7eca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui/modules/api/carriergroups/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def addUpdateCarrierGroups(data=None):
auth_domain = form['auth_domain'] if 'auth_domain' in form else settings.DEFAULT_AUTH_DOMAIN
auth_proxy = form['auth_proxy'] if 'auth_proxy' in form else ''

# Workaround: for Twilio Elastic SIP
# Set the Realm to sip.twilio.com if the domain contains a pstn.twilio.com domain.
# Workaround: for Twilio Elastic SIP and Programmable SIP
# Set the Realm to sip.twilio.com if the domain contains a pstn.twilio.com or sip.twilio.com domain.
# Otherwise, set it to the name of the auth domain
auth_realm = "sip.twilio.com" if "pstn.twilio.com" in auth_domain else auth_domain
auth_realm = "sip.twilio.com" if "twilio.com" in auth_domain else auth_domain

# format data
if authtype == "userpwd" and (plugin_name is None or plugin_name == ''):
Expand Down

0 comments on commit 3ce7eca

Please sign in to comment.