Webphone SDK
Region fallback
Configure an ordered list of regions for managed signaling.
const phone = await IllyVoipWebRtcPhone.create({
tokenBootstrapUrl: 'https://api.illyvoip.com/api/v1/sip/browser-bootstrap',
tokenProvider: async ({ region }) => fetch('/my-backend/illyvoip/browser-token', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ region })
}).then((response) => response.json()),
regions: ['de', 'us', 'sg'],
autoConnect: true,
autoRegister: true
});
phone.on('fallback:applied', ({ region }) => {
console.log('Browser signaling failed over to', region);
});