1

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?

Arun J
  • 687
  • 4
  • 14
  • 27

1 Answers1

1

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

Brent Schooley
  • 782
  • 1
  • 6
  • 20
  • I'm trying to create NTS Token in my android app but facing the following error. Could you please have a look in case you could help. Thanks https://stackoverflow.com/questions/66366779/unable-to-create-nts-token-twilio-android-studio – Arjun May 16 '21 at 08:58