Reputation: 707
In my app ,I want to integrate Twilio chat, voice and video. For now I am working on Twilio voip. I have used this link to make call : https://www.ipragmatech.com/steps-make-call-android-twilio-voice/
but I am getting my app crashed with this error Logcat error:
Connecting call failed
java.lang.IllegalArgumentException: Account SID cannot be null when making a call
at com.twilio.client.impl.MakeCallCommand.<init>(MakeCallCommand.java:33)
at com.twilio.client.impl.CallControlManager.makeCall(CallControlManager.java:424)
at com.twilio.client.impl.InternalConnectionImpl.connect(InternalConnectionImpl.java:314)
at com.twilio.client.impl.DeviceImpl$2.onCompletion(DeviceImpl.java:338)
at com.twilio.client.impl.MediaManager.onPlayComplete(MediaManager.java:279)
at com.twilio.client.impl.sound.SoundPoolPlayThread.onPeriodicNotification(SoundPoolPlayThread.java:242)
at android.media.AudioTrack$NativePositionEventHandlerDelegate$1.handleMessage(AudioTrack.java:2410)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:179)
at android.app.ActivityThread.main(ActivityThread.java:5730)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:681)
How can we get capability token for voice?
Upvotes: 1
Views: 275
Reputation: 792
Twilio evangelist here. I have a video that shows how to generate capability tokens for Twilio Video using Twilio Functions that might make this a bit easier for you. Check out the video here and where it creates a Video grant you can create a Voice grant using var grant = new VoiceGrant();
.
For more details on generating capability tokens, check out the documentation here: https://www.twilio.com/docs/iam/access-tokens
Upvotes: 1