diff --git a/react/features/invite/actions.js b/react/features/invite/actions.js index 30cf886fa..58c36d941 100644 --- a/react/features/invite/actions.js +++ b/react/features/invite/actions.js @@ -174,7 +174,7 @@ export function updateDialInNumbers() { const { room } = state['features/base/conference']; Promise.all([ - getDialInNumbers(dialInNumbersUrl), + getDialInNumbers(dialInNumbersUrl, room, mucURL), getDialInConferenceID(dialInConfCodeUrl, room, mucURL) ]) .then(([ dialInNumbers, { conference, id, message } ]) => { diff --git a/react/features/invite/components/dial-in-summary/DialInSummary.web.js b/react/features/invite/components/dial-in-summary/DialInSummary.web.js index 0903488ae..5ff2e9307 100644 --- a/react/features/invite/components/dial-in-summary/DialInSummary.web.js +++ b/react/features/invite/components/dial-in-summary/DialInSummary.web.js @@ -190,13 +190,25 @@ class DialInSummary extends Component { * @returns {Promise} */ _getNumbers() { - const { dialInNumbersUrl } = config; + const { room } = this.props; + const { dialInNumbersUrl, hosts } = config; + const mucURL = hosts && hosts.muc; + let URLSuffix = ''; if (!dialInNumbersUrl) { return Promise.reject(this.props.t('info.dialInNotSupported')); } - return fetch(dialInNumbersUrl) + // when room and mucURL are available + // provide conference when looking up dial in numbers + + if (room && mucURL) { + URLSuffix = `?conference=${room}@${mucURL}`; + } + const conferenceIDURL + = `${dialInNumbersUrl}${URLSuffix}`; + + return fetch(conferenceIDURL) .then(response => response.json()) .catch(() => Promise.reject(this.props.t('info.genericError'))); } diff --git a/react/features/invite/functions.js b/react/features/invite/functions.js index 7df5946d9..cf268badb 100644 --- a/react/features/invite/functions.js +++ b/react/features/invite/functions.js @@ -56,12 +56,22 @@ export function getDialInConferenceID( * Sends a GET request for phone numbers used to dial into a conference. * * @param {string} url - The service that returns confernce dial-in numbers. + * @param {string} roomName - The conference name to find the associated + * conference ID. + * @param {string} mucURL - In which MUC the conference exists. * @returns {Promise} - The promise created by the request. The returned numbers * may be an array of numbers or an object with countries as keys and arrays of * phone number strings. */ -export function getDialInNumbers(url: string): Promise<*> { - return doGetJSON(url); +export function getDialInNumbers( + url: string, + roomName: string, + mucURL: string +): Promise<*> { + + const fullUrl = `${url}?conference=${roomName}@${mucURL}`; + + return doGetJSON(fullUrl); } /** @@ -442,7 +452,7 @@ export function getShareInfoText( } numbersPromise = Promise.all([ - getDialInNumbers(dialInNumbersUrl), + getDialInNumbers(dialInNumbersUrl, room, mucURL), getDialInConferenceID(dialInConfCodeUrl, room, mucURL) ]).then(([ { defaultCountry, numbers }, { conference, id, message } ]) => {