-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Pre-submission Checklist
- I have verified that the issue occurs with the latest release and is not marked as a known issue in the CHANGELOG.md.
- I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
- I am not sharing any Personally Identifiable Information (PII)
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Description
Hi, could you please explain how registering access tokens works for incoming calls.
On my backend for testing purposes i have set up access token life time for 1 minute (ttl: 60).
getToken({identity, platform}) {
const {
AccessToken,
AccessToken: {VoiceGrant},
} = jwt;
const accessToken = new AccessToken(
this.accountSid,
this.apiKeySid,
this.apiKeySecret,
{
identity,
ttl: 60,
},
);
const voiceGrant = new VoiceGrant({
outgoingApplicationSid: this.voiceOutgoingTwimlAppSid,
incomingAllow: true,
...(platform !== undefined && {
pushCredentialSid: platform === PLATFORM.IOS ? this.twilioApnPushCredentialSid : this.twilioFcmPushCredentialSid,
}),
});
accessToken.addGrant(voiceGrant);
return accessToken.toJwt();
}
Then on mobile side registering this token.
await voice.register(token);
When using such token after a minute for outgoing call it will be automatically disconnected.
But for incoming calls it works even after an hour. Could you please clarify how exactly access tokens expiration works for incoming calls? What happens with previous tokens if i register a new one? What happens with previous tokens if i unregister the latest one?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels