hoxfon / react-native-twilio-programmable-voice Goto Github PK
View Code? Open in Web Editor NEWReact Native wrapper for Twilio Programmable Voice SDK
License: MIT License
React Native wrapper for Twilio Programmable Voice SDK
License: MIT License
RN 0.45.0
this lib 2.11.1
experienced on iPhone 6
app running in foreground
iOS lib pod 'TwilioVoice', '=2.0.0-beta14'
EndCallAction transaction request failed: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 4.)
to reproduce this:
Although this represent an error in the log, I haven't seen crashes or other side effect.
related to #30
I get this issue running on both iOS Simulator and on iPhone 6. This occurs immediately once the call starts ringing. This error is dismissible, and does not cause the app to crash. I am adding all of the necessary event listeners to the TwilioVoice Instance.
This error is originating from line 88 in index.js
Thanks in advance!
RN: "0.47"
package v: "3.2.0"
I can't really understand the documentation, in my use case I only need to make calls via userName > userName.
Am I obligated to configure CallKit
? If so, whats the appName
param?
Also, the initWithTokenUrl
function, expects the get Token url, am I correct? What object should the server return?
I already tried to return a {token: '...'}
a {'....'}
and an {accessToken: '...'
}. But I get the following error everytime:
An error occurred while registering: Invalid access token header
;
Also, I can successfully login using initWithToken
but can't seem to connect to anyone. It says "calling number {identity
}" on xcode console but none of the events get trigger nor in my client nor in the other device.
Thanks in advance.
Maybe this is becouse ReactNative is too heavy to load in background
RN 0.38
this lib 0.2.0
API level 22 Android 5.1.1
device SM-G925F
Exception java.lang.IllegalArgumentException: accessToken cannot be null
com.twilio.voice.VoiceClient.call (VoiceClient.java:108)
com.hoxfon.react.TwilioVoice.TwilioVoiceModule.connect (TwilioVoiceModule.java:556)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke (BaseJavaModule.java:318)
com.facebook.react.cxxbridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:158)
com.facebook.react.bridge.queue.NativeRunnable.run (NativeRunnable.java)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:31)
android.os.Looper.loop (Looper.java:145)
com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:196)
java.lang.Thread.run (Thread.java:818)
What version of React Native are you running?
0.50.3
What version of react-native-twilio-programmable-voice are you running?
3.7.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
Android Emulator - Nexus 6
Is your app running in foreground, background or not running?
Foreground
Is there any relevant message in the log?
{
"name": "error",
"group": "connection",
"timestamp": "2017-12-27T19:07:24.165Z",
"level": "INFO",
"private": false,
"payload_type": "application/json",
"publisher": "twilio-voice-android",
"publisher_metadata": {
"client_address": "FEC0::5054:FF:FE12:3456",
"os_name": "android",
"os_version": "7.1.1",
"device_model": "Android SDK built for x86",
"device_vendor": "unknown",
"device_type": "Android SDK built for x86",
"cpu_architecture": "x86"
},
"payload": {
"timestamp_ms": 1514401644161,
"temp_call_sid": "TAND2cdeb07a-7a4a-4bee-a4dd-d95c0afd5fae",
"sdk_version": "2.0.0-beta24",
"platform": "android",
"direction": "OUTGOING",
"code": 31006,
"message": "Audio device error pjsua_call_make_call(): No suitable sound capture device (PJMEDIA_ENOSNDREC)"
}
}
I'm just playing around and I would like to know if this should be working on emulator, because I can only make this work on device.
Please include following information for better support
I have 'Voice over IP' enabled and my iOS app connects to a voice call, however I cannot hear anything or emit any sounds to the other side. I have microphone usage 'allowed'. The apple 'call view' does not appear, should it? The call is registered under Twilio as 'In Progress'. It just seems that the audio is disabled.
What version of React Native are you running?
0.47.1
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
iPhone 6
Is your app running in foreground, background or not running?
foreground
Is there any relevant message in the log?
If using iOS, which pod version are you using?
1.3.1
Step to reproduce
Connect to a Twilio address.
Advanced:
Have you tried adding break point in native handlers and see the logs printed?
can share a project with issue?
Did you try to reinstall the pods completely?
The more context you provide around this issue the faster the community can help you.
The method provider:performPlayDTMFCallAction
is called when the provider performs the specified play DTMF call action.
Adding this method would allow us to catch Callkit's keypad. I've been testing the following implementation:
- (void)provider:(CXProvider *)provider performPlayDTMFCallAction:(CXPlayDTMFCallAction *)action {
if (self.call && self.call.state == TVOCallStateConnected) {
RCTLogInfo(@"SendDigits %@", action.digits);
[self.call sendDigits:action.digits];
}
}
What do you think?
Cheers
Esteban
What version of React Native are you running?
0.48.4
What version of react-native-twilio-programmable-voice are you running?
3.7.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
Android 6.0.1 device
Is your app running in foreground, background or not running?
running in foreground and background
Is there any relevant message in the log?
No
Well, I don't think this is an issue, but I'm here looking for ideas. The main issue is that when I receive the call while the device is locked, I don't have the accept button; I see the banner notification but without the accept/reject options.
Due this main issue, I'm trying to follow this post, which gives the idea of build a native screen for Android locked screen cases.
I did not finish this task, but I already have done the screen and when the app it's open I'm able to send notification to the react-native. You can see the code here.
Another problem is, when I emit the handleIncomingCall
my showUnlockScreen
doesn't work, but if I change, removing handleIncomingCall
; the screen will be shown without notification banner.
So my question is; do you have any idea about how create this screen keeping the current notification working?
Android Twilio Voice SDK beta 17 has a new feature called Regions
references:
https://www.twilio.com/docs/api/voice-sdk/android/changelog#200-beta17
https://www.twilio.com/docs/api/voice-sdk/regions
I have asked Twilio clarification on how to use best this new API.
What version of React Native are you running? 0.49
What version of react-native-twilio-programmable-voice are you running? ^3.2.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? iOS 11 device
Hey, I'm currently able to make and receive a call with CallKit configured. However digging the docs and even the code I was not able to understand how can I change the received caller name. FE: I receive a call from twilio by the user "Rui", however to receive this callerId as a string I have to prepend "client:" to the string, or the caller Id will treat it like a number and convert the name "Rui" to "784".
The thing is, with "client:Rui" on the twilio server as callerId the iOS call screen will display: "client:Rui", my question is, how can I trim this "client:"?
Also, can't I just display a call notification instead of the popup caller screen? So when I press the notification it'll open the app with my custom screen.
P.S: I have limited understanding of ObjC / Java, I'm kinda struggling atm
Thanks for the great package! Also, your app deserves way more downloads.
Please include following information for better support
What version of React Native are you running? 0.48.2
What version of react-native-twilio-programmable-voice are you running? 3.2.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? iOS11 device
Is your app running in foreground, background or not running? foreground
Is there any relevant message in the log? no
If using iOS, which pod version are you using? 'TwilioVoice', '=2.0.0-beta13'
Step to reproduce
Hi All,
I'm having some trouble with managing the call once it's connected. After I accept the call on my screen, the call screen goes into the background and my app screen shows up. iOS shows me there is an active call and I can hear voices, but I cannot bring up the call screen to to hang up the call. Has anyone come across this or have any example code I can have a look at?
Thanks alot
My main question is this: is apply plugin: 'com.google.gms.google-services'
needed in all cases, or only when specifying a specific play-service-gcm
version?
Please include following information for better support
React Native: 0.33.0
react-native-twilio-programmable-voice: 0.2.1
Device: Samsung Galaxy S7 (Genymotion)
Error:
Plugin with id 'com.google.gms.google-services' not found.
What version of React Native are you running? 0.49
What version of react-native-twilio-programmable-voice are you running? ^3.2.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? Android 4,5,6 device
I'm currently using react-native-fcm for handling android notifications, the thing is.
I'm able to receive chat notifications (also from twilio services), I also receive notifications sent by the Firebase Console and I'm able to trigger voip notifications (using react-native-fcm listening events) when my app is either open or in foreground.
However, I'm not receiving any android push notification when the app is closed or in foregroud (as desired). Any clue whats the problem?
P.S: I've correctly implemented this on iOS with callkit..
Thanks in advance.
Using RN 0.45.0
and "react-native-twilio-programmable-voice": "^2.8.0"
Android crash log
Fatal Exception: java.lang.NoSuchMethodError: No static method zzabU()Lcom/google/firebase/iid/zzg; in class Lcom/google/firebase/iid/zzg; or its super classes (declaration of 'com.google.firebase.iid.zzg' appears in /data/app/com.hoxfon.Hoxfon-1/base.apk:classes32.dex)
at com.google.firebase.messaging.FirebaseMessagingService.zzD(Unknown Source)
at com.google.firebase.iid.zzb.onStartCommand(Unknown Source)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3451)
at android.app.ActivityThread.-wrap21(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1632)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6290)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Apparently this happens when using conflicting version of firebase.
For example I found out that the third party libraries of my app were both using:
com.google.firebase:firebase-messaging:10.2.4
com.google.firebase:firebase-messaging:10.2.6
I used this command to find out which libraries were using each version:
./gradlew -q app:dependencyInsight --dependency firebase --configuration compile
Hi there,
there is No call_to or call_from returns from connectionDidConnect from ios, only {"call_state":"CONNECTED","call_sid":"CAfe03b29d8339052389e348cdb44aa2f4"} has been returned. Any thoughts?
Thanks,
Jun
In version 3.2.0
the parameters for:
connectionDidConnect
connectionDidDisconnect
are different between iOS and Android.
to
is used instead of call_to
from
is used instead of call_from
As a temporary fix you can migrate the parameters in your app:
if (Platform.OS === 'ios') {
if (params.to) {
params.call_to = params.to
delete params.to
}
if (params.from) {
params.call_from = params.from
delete params.from
}
}
Also on iOS the event connectionDidDisconnect
uses the parameter error
instead of err
As a temporary fix you can migrate the parameters in your app:
if (Platform.OS === 'ios') {
if (params.error) {
params.err = params.error
delete params.error
}
}
Please include following information for better support
What version of React Native are you running? --0.51.0
What version of react-native-twilio-programmable-voice are you running? 3.7.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? ios 10
Is your app running in foreground, background or not running? foreground
Is there any relevant message in the log?
If using iOS, which pod version are you using?
Step to reproduce
Not sure why TwilioVoice.connect
has no action and no listener was triggered. I didn't setup quick start up app and was able to make call from app. Can you help to review what I did wrong the the following code? Thank you very much!!!
`
import React, { Component } from 'react';
import { Text, TextInput, View, Button, StyleSheet, Image } from 'react-native';
import TwilioVoice from 'react-native-twilio-programmable-voice';
async function initTelephony() {
try {
const result = await fetch('https://4f155c65.ngrok.io/token');
let accessToken = JSON.parse(result._bodyText);
console.log('token:'+ JSON.stringify(accessToken));
const success = await TwilioVoice.initWithToken(accessToken.token);
return success;
} catch (err) {
console.log(err);
}
}
class Login extends Component {
constructor(props) {
super(props);
}
async componentWillMount() {
try {
let result = await initTelephony();
TwilioVoice.addEventListener('connectionDidConnect', () => {
console.log('>> TwilioVoice, Call connected.');
});
TwilioVoice.addEventListener('connectionDidDisconnect', () => {
console.log('>> TwilioVoice, Call disconnected.');
});
TwilioVoice.addEventListener('deviceReady', function() {
console.log('deviceReady');
// no data
});
TwilioVoice.addEventListener('deviceNotReady', function(data) {
console.log('deviceNotReady');
// {
// err: string
// }
});
TwilioVoice.addEventListener('callRejected', function(value: 'callRejected') {
console.log('callRejected');
});
} catch (e) {
console.log('error token:', e);
}
}
render() {
return (
<View style={styles.container}>
<Button style={styles.button}
onPress={() => {
// console.log('state:'+this.state.success.initialized);
// if (this.state.success && this.state.success.initialized) {
try {
console.log('>> TwilioVoice, Calling...');
TwilioVoice.connect({To: '+6049708409'});
} catch (e) {
console.log('>> error:', e);
}
// }
}
}
title="call"
/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flexDirection: 'column',
flex: 1,
alignSelf: 'stretch',
justifyContent: 'center',
alignItems: 'center'
},
button:{
marginTop: 20,
fontSize: 36,
justifyContent: 'space-between'
}
})
module.exports = Login;
`
In this module, TwilioVoice.requestPermission(GCM_sender_id)
is available as a method.
Is this method needed to initialize the application to send calls?
Also, where can GCM_sender_id be accessed?
Thanks for your help.
Please include following information for better support
What version of React Native are you running? -- 0.51.0
What version of react-native-twilio-programmable-voice are you running? --3.7.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? iOS 8.1 simulator
Is your app running in foreground, background or not running?
Is there any relevant message in the log?
If using iOS, which pod version are you using?
Step to reproduce
/Users/jun/github/RSPush/node_modules/react-native-twilio-programmable-voice/ios/RNTwilioVoice/RNTwilioVoice.m:11:9: fatal error: module 'TwilioVoice' not found
@import TwilioVoice;
1 error generated.
** BUILD FAILED **
Please include following information for better support
What version of React Native are you running?
0.47.2
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
iOS10.3
Is your app running in foreground, background or not running?
foreground
Is there any relevant message in the log?
<Warning>: 'token:', { identity: 'IgnominiousCameronNevis', token: '...' }
<Warning>: CallKit Initialized
<Warning>: providerDidBegin
<Notice>: '_deviceReady', undefined
<Warning>: Calling phone number ...
<Error>: [avas] AVAudioSessionUtilities.h:112:GetProperty: AudioSessionGetProperty ('acat') failed with error: '!ini'
<Error>: [avas] AVAudioSessionUtilities.h:125:GetProperty_DefaultToZero: AudioSessionGetProperty ('acat') failed with error: '!ini'
<Error>: [avas] AVAudioSession.mm:852:-[AVAudioSession category]: No valid string for category: 0
<Error>: [avas] AVAudioSessionUtilities.h:112:GetProperty: AudioSessionGetProperty ('mode') failed with error: '!ini'
<Error>: [avas] AVAudioSessionUtilities.h:125:GetProperty_DefaultToZero: AudioSessionGetProperty ('mode') failed with error: '!ini'
<Error>: [avas] AVAudioSession.mm:1575:-[AVAudioSession mode]: No valid string for mode: 0
<Warning>: StartCallAction transaction request successful
<Warning>: provider:performStartCallAction
<Warning>: Ignoring assertion request named "com.apple.AddressBook.Search" from <BSProcessHandle: 0x7fbaccd0b920; callservicesd:3848; valid: YES> because process { pid 3848; bundleID (null) } is unknown.
com.apple.CallKit.CallDirectory[4233]
<Error>: [Default] Unable to initialize CXCallDirectoryStore for reading: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7fe83a50c620 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
<Error>: [Default] Error retrieving call directory first identification entry for phone number ...: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
<Warning>: provider:didActivateAudioSession
If using iOS, which pod version are you using?
Step to reproduce
I'm just setting the token and making a call.
fetch('https://.../token')
.then((response) => response.json())
.then((response) => {
Twilio.initWithToken(response.token)
Twilio.initWithTokenUrl('https://.../token')
Twilio.connect({
To: number
})
Advanced:
Have you tried adding break point in native handlers and see the logs printed?
can share a project with issue?
Did you try to reinstall the pods completely?
The more context you provide around this issue the faster the community can help you.
RN 0.38
this lib 0.2.2
Android 5.1.1 and 7.0.0
Google play service:
Exception in native call
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference
at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source)
at com.google.android.gms.common.GoogleApiAvailability.getErrorDialog(Unknown Source)
at com.google.android.gms.common.GoogleApiAvailability.getErrorDialog(Unknown Source)
at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.checkPlayServices(TwilioVoiceModule.java:678)
at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.startGCMRegistration(TwilioVoiceModule.java:168)
at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.<init>(TwilioVoiceModule.java:138)
at com.hoxfon.react.TwilioVoice.TwilioVoicePackage.createNativeModules(TwilioVoicePackage.java:28)
at com.facebook.react.XReactInstanceManagerImpl.processPackage(XReactInstanceManagerImpl.java:954)
at com.facebook.react.XReactInstanceManagerImpl.createReactContext(XReactInstanceManagerImpl.java:878)
at com.facebook.react.XReactInstanceManagerImpl.access$600(XReactInstanceManagerImpl.java:110)
at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:214)
at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:193)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Please include following information for better support
What version of React Native are you running? 0.51.0
What version of react-native-twilio-programmable-voice are you running? 3.10.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? Simulator ios10, ios10, android device 6.0.1
Is your app running in foreground, background or not running? App is in foreground.
Is there any relevant message in the log? I'm not sure what's relevant yet.
If using iOS, which pod version are you using? 2.0.0
Step to reproduce
Call from iOS device to Android device.
Advanced:
Have you tried adding break point in native handlers and see the logs printed? Yes, but I'm not sure what's relevant.
can share a project with issue? Not really.
Did you try to reinstall the pods completely? Yes, I've done this more times than I can count.
I'm seeing multiple (5+) failed requests in the Twilio debugger when only one call is initiated.
It's only empty when I call from iOS to Android. Android to iOS doesn't trigger the empty credential errors. iOS simulator to iOS device doesn't trigger it either. I'm now testing calls between real devices because the simulator seems to crash a lot and not accept incoming calls. Everything is client to client connection.
This is what I see in the call log. One call results in an incoming call from the initial client, then the Twiml results in an outgoing dial that connects both clients.
My guess is that old tokens are being triggered because I've deleted those credentials that are missing and the server isn't serving those tokens anymore. I've restarted the Node server many times.
I'm attempting to use VoIP Push Notifications to handle the incoming connection. I've yet to see a notification on iOS. I see the didReceiveIncomingPushWithPayload get triggered, but no notification appears, and I don't see any errors. Android notifications work fine.
I tried downgrading to 2.0.0-beta15, but my Android notifications stopped working. I don't know where else to look to make this work properly.
I have two server routes to deliver push tokens for iOS and Android. I was planning to add token storage in React Native and handle the refresh check there, but I wanted to solve this problem first.
My client JS looks like this... it used to be identical to the recommended docs, but that was causing me issues, and this seems to be working - for the most part.
async function initTelephony(uid) {
try {
const url = `${TWILIO_APP_URL}/accessToken?identity=${encodeURIComponent(uid)}&platform=${encodeURIComponent(platform)}`
const request = new Request(url)
const accessToken = await getAccessTokenFromServer(url)
TwilioVoice.initWithToken(accessToken)
if (Platform.OS === IOS){
TwilioVoice.configureCallKit({
appName: 'appname', // Required param
imageName: '', // OPTIONAL
ringtoneSound: '' // OPTIONAL
})
}
else {
requestMicrophonePermission() //this goes to React Native Android permissions
}
} catch (err) {
console.log("init error: ", err)
}
}
Here's the express path that Node is delivering.
(req, res) => {
var resp = new VoiceResponse()
const dial = resp.dial()
res.writeHead(200, {
'Content-Type':'text/xml'
});
dial.client({},req.body.To)
res.end( resp.toString() )
Sometimes when a call connects I hear nothing but a loud noise - dunno if this is relevant or what to do about it besides initiate a new call.
Hi,
I have notice that there're differences between iOS and Android callbacks data, for example:
is there any reason for those differences or I can add/fix them?
best regards,
Noam
Please include following information for better support
What version of React Native are you running?
0.46.3
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
iPhone 6/ Samsung S8
Is your app running in foreground, background or not running?
foreground
Is there any relevant message in the log?
If using iOS, which pod version are you using?
1.3.1
Please include following information for better support
What version of React Native are you running? 0.50.4
What version of react-native-twilio-programmable-voice are you running? 3.5.0
What device are you using? (e.g iOS9 simulator, Android 6 device)? iOS 11 Device
Is there any relevant message in the log? No
If using iOS, which pod version are you using? 3.10.0
Step to reproduce
When the app is reloaded, or resumed after a some period of time the call doesn't work, if i logout and login the voice call works again.
Doesn't have the same issue with Android
Using:
Step to reproduce:
...
call = () => {
try {
TwilioVoice.connect({
"To": '+<my number in twilio>',
"Foo": "Bar"
})
} catch(err) {
// we never get here, thankfully
}
}
Output:
01-18 16:01:59.377 29676-29723/com.myapp D/RNTwilioVoice: connect params: { NativeMap: {"Foo":"Bar","To":"+<my number>"} }
01-18 16:01:59.384 29676-29723/com.myapp D/CallControlManager: CallControlManager created
01-18 16:01:59.418 29676-29898/com.myapp D/UserAgent: Creating UserAgent
01-18 16:01:59.419 29676-29898/com.myapp I/PJSIP: 16:01:59.419 os_core_unix.c !pjlib 2.5.1 for POSIX initialized
01-18 16:01:59.422 29676-29898/com.myapp D/PJSIP: 16:01:59.422 sip_endpoint.c .Creating endpoint instance...
01-18 16:01:59.423 29676-29898/com.myapp I/PJSIP: 16:01:59.423 pjlib .select() I/O Queue created (0x78fbcc04)
01-18 16:01:59.423 29676-29898/com.myapp I/PJSIP: 16:01:59.423 sip_endpoint.c .Module "mod-msg-print" registered
01-18 16:01:59.423 29676-29898/com.myapp D/PJSIP: 16:01:59.423 sip_transport. .Transport manager created.
01-18 16:01:59.423 29676-29898/com.myapp I/PJSIP: 16:01:59.423 pjsua_core.c .PJSUA state changed: NULL --> CREATED
01-18 16:01:59.448 29676-29676/com.myapp D/CallControlManager: Ignoring network event, sticky broadcast
01-18 16:01:59.485 1486-29907/? I/AudioFlinger: AudioFlinger's thread 0xa7d93680 tid=29907 ready to run
01-18 16:01:59.492 29676-29898/com.myapp D/AudioTrack: Client defaulted notificationFrames to 258 for frameCount 776
01-18 16:01:59.521 29676-29898/com.myapp W/AudioTrack: Use of stream types is deprecated for operations other than volume control
01-18 16:01:59.524 29676-29898/com.myapp W/AudioTrack: See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
01-18 16:01:59.549 1389-4268/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 30388505 , only wrote 30388320
01-18 16:01:59.566 29676-29898/com.myapp D/CallControlManager: Call CALLING
01-18 16:01:59.571 29676-29723/com.myapp D/Call: Received CALLING while in CONNECTING state
01-18 16:02:00.564 29676-29901/com.myapp D/CallControlManager: Call EARLY
01-18 16:02:00.565 29676-29723/com.myapp D/Call: Received EARLY while in CONNECTING state
01-18 16:02:00.566 29676-29901/com.myapp D/CallControlManager: onTransactionState received CA07f890fc727fee76e2498b49397d269e
01-18 16:02:00.859 29676-29901/com.myapp D/CallControlManager: Call CA07f890fc727fee76e2498b49397d269e EARLY
01-18 16:02:00.859 29676-29723/com.myapp D/Call: Received EARLY while in CONNECTING state
01-18 16:02:00.860 29676-29901/com.myapp D/CallControlManager: onTransactionState received CA07f890fc727fee76e2498b49397d269e
01-18 16:02:04.888 29676-29901/com.myapp D/CallControlManager: Call CA07f890fc727fee76e2498b49397d269e DISCONNECTED
01-18 16:02:04.888 29676-29723/com.myapp D/Call: Received DISCONNECTED while in CONNECTING state
01-18 16:02:04.995 29676-29898/com.myapp D/AudioTrack: stop() called with 87040 frames delivered
01-18 16:02:05.001 29676-29898/com.myapp D/UserAgent: Destroyed UserAgent
01-18 16:02:05.002 29676-29723/com.myapp D/InternalCall: Publishing event : disconnected-by-remote
01-18 16:02:05.011 29676-29723/com.myapp D/CallControlManager: CallControlManager destroyed
01-18 16:02:05.011 29676-29898/com.myapp D/CallCommandHandlerImpl: Shutting down thread
01-18 16:06:57.750 29676-29896/com.myapp W/OkHttpClient: A connection to https://ers.twilio.com/ was leaked. Did you forget to close a response body?
01-18 16:06:57.750 29676-29896/com.myapp W/OkHttpClient: A connection to https://eventgw.twilio.com/ was leaked. Did you forget to close a response body?
In Twilio:
Request:
URL: https://www.<mybackendserver>.com/call/route
Parameters:
ApplicationSid | APxxxxxxxxx
-- | --
ApiVersion | 2010-04-01
Called |
Caller | client:user
CallStatus | ringing
From | client:user
To | +<my number>
CallSid | CAxxxxxxxxxx
Direction | inbound
AccountSid | ACxxxxxxxxx
Extra parameters are logged in Android when the call begins, and the call is connected successfully, but when inspecting the call in Twilio, the extra parameters are not present and they are never passed along to my server that handles the Twiml.
Some params I am trying to pass along are additional user and device meta data (example: version and model of the android device, as well as some app-specific account identifiers). Some of these params are required for determining how to handle the call at the server level, all while using the same dedicated Twiml App route.
It looks like the _callParams hash is serialized in the connect method, but it is not surviving the journey from client to Twiml to my server. Anything I am doing wrong here? Previously I
was using the same Twiml App with the same params and https://www.npmjs.com/package/react-native-twilio but I waned to migrate because that library is not really maintained.
ApplicationSid and AccountSid are correct, the To field is correct, I can lookup the call by CallSID, but normally I am able to pass additional parameters through Twiml when making outbound calls, but not with this library.
Any advice (twilio-related or otherwise) would be appreciated.
Hey guys, any plans to upgrade to new API structure?
Let me know if there is a roadmap so I can chip in with some contributions.
It would be nice to use the contact API to lookup for the caller number in the contact list.
This should be used in the notification text for incoming and missed calls.
Please include following information for better support
What version of React Native are you running?
0.47.2
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
Nexus 6
Is your app running in foreground, background or not running?
foreground
Even getting the token response from Twilio, I still get
deviceNotReadyHandler: { "err": "Invalid access token" }
What version of React Native are you running? 0.42.0
What version of react-native-twilio-programmable-voice are you running? 0.4.0
What device are you using? (e.g iOS9 emulator, Android 6 device)? Android emulator
Is your app running in foreground, background or not running? Foreground
Is there any relevant message in the log? Crashes when receiving GCM notifications during an incoming call due to a version conflict between play-services-gcm
and firebase
. Following the example in the README and using version 10.2.0
will cause a conflict when firebase libs used in this library are a different version.
Stack trace:
03-14 22:06:04.534 6015 6015 D AndroidRuntime: Shutting down VM
03-14 22:06:04.535 6015 6015 E AndroidRuntime: FATAL EXCEPTION: main
03-14 22:06:04.535 6015 6015 E AndroidRuntime: Process: com.twilio.voice.quickstart, PID: 6015
03-14 22:06:04.535 6015 6015 E AndroidRuntime: java.lang.NoSuchMethodError: No static method zzaaj()Lcom/google/firebase/iid/zzg; in class Lcom/google/firebase/iid/zzg; or its super classes (declaration of 'com.google.firebase.iid.zzg' appears in /data/app/com.twilio.voice.quickstart-1/base.apk)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at com.google.firebase.messaging.FirebaseMessagingService.zzF(Unknown Source)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at com.google.firebase.iid.zzb.onStartCommand(Unknown Source)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3010)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at android.app.ActivityThread.-wrap17(ActivityThread.java)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1442)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-14 22:06:04.535 6015 6015 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
This is fixed by setting play-services-gcm
to the same minor version number as used in the library.
compile ('com.google.android.gms:play-services-gcm:10.0.+') {
force = true;
}
Please include following information for better support
What version of React Native are you running?
0.47.2
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
iOS10.3
Is there any relevant message in the log?
Code: no_call
Message: There was no active call
<Warning>: providerDidBegin
<Error>: [Default] Denying creation of CXXPCCallSource with applicationIdentifier: FAKETEAMID.org.reactjs.native.example.twilio bundle: NSBundle </CoreSimulator/Devices/.../twilio.app> (not yet loaded) hasVoIPBackgroundMode: 0 capabilities: {(
)} connection: <NSXPCConnection: 0x7fa289c6ca80> connection from pid 21398
<Warning>: providerDidReset
<Warning>: 'Error', { [Error: There was no active call]
line: 1736,
column: 24,
sourceURL: '...',
framesToPop: 1,
code: 'no_call',
nativeStackIOS:
[ '0 twilio 0x000000010aba3e46 RCTJSErrorFromCodeMessageAndNSError + 134',
'1 twilio 0x000000010ab255d8 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.224 + 184',
'2 twilio 0x000000010ad3adc9 -[RNTwilioVoice resolver:rejecter:] + 2745',
'3 CoreFoundation 0x000000010cf6fc6c __invoking___ + 140',
'4 CoreFoundation 0x000000010cf6fb40 -[NSInvocation invoke] + 320',
'5 CoreFoundation 0x000000010cf87956 -[NSInvocation invokeWithTarget:] + 54',
'6 twilio 0x000000010ab26a03 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1923',
'7 twilio 0x000000010abe8d90 _ZN8facebook5react15RCTNativeModule11invokeInnerEjOKN5folly7dynamicE + 784',
'8 twilio 0x000000010abe896c _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 60',
'9 twilio 0x000000010abe8929 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25',
'10 libdispatch.dylib 0x000000011113b585 _dispatch_call_block_and_release + 12',
'11 libdispatch.dylib 0x000000011115c792 _dispatch_client_callout + 8',
'12 libdispatch.dylib 0x0000000111144247 _dispatch_main_queue_callback_4CF + 1041',
'13 CoreFoundation 0x000000010cfac909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9',
'14 CoreFoundation 0x000000010cf72ae4 __CFRunLoopRun + 2164',
'15 CoreFoundation 0x000000010cf72016 CFRunLoopRunSpecific + 406',
'16 GraphicsServices 0x0000000112534a24 GSEventRunModal + 62',
'17 UIKit 0x000000010f241134 UIApplicationMain + 159',
'18 twilio 0x000000010aacfdbf main + 111',
'19 libdyld.dylib 0x00000001111a565d start + 1',
'20 ??? 0x0000000000000001 0x0 + 1' ],
userInfo: null,
domain: 'RCTErrorDomain' }
<Warning>: Calling phone number BrashKendraVail
<Error>: [Default] Connection is not entitled to use public API: <CXCallControllerHostConnection 0x7fa289e14560 hasVoIPBackgroundMode=0 applicationIdentifier=FAKETEAMID.org.reactjs.native.example.twilio bundle=NSBundle </CoreSimulator/Devices/33790932-85A5-4566-81DA-2415F7D7ECC2/data/Containers/Bundle/Application/E87FD6AF-4D61-4F73-A00B-42A905D2A064/twilio.app> (not yet loaded) capabilities={(
)}
<Warning>: StartCallAction transaction request failed: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 1.)
<Error>: CoreLocation: Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104
Step to reproduce
I'm just setting the token and making a call.
TwilioVoice.connect({ To: this.state.phone_number })
TwilioVoice.getActiveCall().then(incomingCall => {
if (incomingCall) {
_deviceDidReceiveIncoming(incomingCall)
}
}).catch((error) => {
console.warn('Code', error.code)
console.warn('Message', error.message)
console.warn('Error', error)
})
Please include following information for better support
When calling 'initWithToken' with an invalid token it does not throw an error. Also, when TwilioVoice.connect fails to connect it does not throw an error either, how are we suppose to react to errors? I see the errors in the logs. I am not sure if I am missing something.
What version of React Native are you running?
16.0.0-alpha.6
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
iPhone 6 device
Is your app running in foreground, background or not running?
foreground
Is there any relevant message in the log?
native[1019:281452] providerDidBegin
native[1019:283459] StartCallAction transaction request successful
native[1019:283411] StartCallAction transaction request failed: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 7.)
native[1019:281452] provider:performStartCallAction
native[1019:281452] provider:didActivateAudioSession
native[1019:283053] [ERROR TVONotificationClient] Registration failed: Error Domain=com.twilio.voice.error Code=20101 "Invalid access token" UserInfo={NSLocalizedDescription=Invalid access token}
native[1019:283053] [ERROR TwilioVoice] Inside register:deviceToken:completion:, failed to register for Twilio push notifications. Error:Invalid access token
native[1019:283053] An error occurred while registering: Invalid access token
If using iOS, which pod version are you using?
1.3.1
Step to reproduce
Call TwilioVoice.initWithToken with an invalid token.
Advanced:
Have you tried adding break point in native handlers and see the logs printed?
can share a project with issue?
Did you try to reinstall the pods completely?
The more context you provide around this issue the faster the community can help you.
I have Twilio Programmable Voice working perfectly within my own React Native app for iOS. As I intend to now move to Android, I thought I would try to pull my code over to be included in this library to help someone else out.
I built the functionality outside of this library, so I pulled out the relevant bits from my own project and put it in my fork. I haven't tested it from within the library yet, but the structure is all there that I used. My biggest reservation is the linking of the Twilio library that is pulled in through the Podfile as I haven't tested it from within the library yet.
I utilized CallKit as it is super easy and much more integrated on iOS than manually handling calls. Because of this, my implementation is missing manual calls for "accept", "reject", and "ignore."
If you want the PR, just let me know. If someone wants to test, that would be appreciated as well as I don't have the time for that currently.
React Native: 42
react-native-twilio-programmable-voice: 0.6.2
Device: Nexus 6 (Android 7)
What I am experiencing currently is any inbound call opens the app (if not already in foreground) and creates a notification in all app states (background, foreground, screen off). The notification does not show on screen, just in the status bar.
The default Android phone app does things differently for inbound calls.
When device screen is off the phone app functions just like this library. It opens the app in foreground to an "answer/reject" style page of the phone app itself. It also puts a notification in the status bar (not onscreen).
But, when app is in foreground and background a notification is shown on screen, but the app does not come to foreground automatically. If rejected, the app does not open and notification goes away. If answered, the app comes to foreground and notification is modified.
I am not yet familiar enough with the Android API to modify the NotificationHelper.java code itself to achieve UX on parity with the default phone app. Would this be controlled in the "getLaunchIntent"...or maybe the "NotificationCompat.Builder"s themselves? I am not yet seeing where to modify this behavior. Any pointers would be appreciated.
React-Native 0.37
React-Native-Twilio-Programmable-Voice 2.2.0
iOS10 simulator
App in foreground
Pod version = 2.0.0
Upon attempting to place an outgoing call, the app crashes with NSInvalidArgumentException with reason 'setObjectForKey: object cannot be nil (key: call_sid)'
I am also getting X-Twilio-Error: 31201 which is a 'generic unknown error'.
This is after receiving a valid twilio auth token from our server, and then initializing twilio with that valid token.
The outgoing call is to a valid phone number.
I can provide additional console output if helpful!
Please include following information for better support
RN 0.38
this lib 0.2.0
device Android One Plus 2 OS 5.1.1
app running in background
log
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.twilio.voice.IncomingCallMessage.getCallSid()' on a null object reference
at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.handleIncomingCallIntent(TwilioVoiceModule.java:429)
at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.onNewIntent(TwilioVoiceModule.java:164)
at com.facebook.react.bridge.ReactContext.onNewIntent(ReactContext.java:218)
at com.facebook.react.XReactInstanceManagerImpl.onNewIntent(XReactInstanceManagerImpl.java:483)
at com.facebook.react.ReactActivityDelegate.onNewIntent(ReactActivityDelegate.java:165)
at com.facebook.react.ReactActivity.onNewIntent(ReactActivity.java:99)
at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1211)
at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1223)
at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2489)
at android.app.ActivityThread.performNewIntents(ActivityThread.java:2501)
at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2510)
at android.app.ActivityThread.access$1700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Every event that is received from the library, starts a different instance of React-Native activity. Is it possible to bring to front an original instance and forward events to it?
RN 0.41.2
this lib 0.4.0
Android Plus 1 three
foreground
com.hoxfon.react.TwilioVoice.NotificationHelper.removeHangupNotification (NotificationHelper.java:316)
com.hoxfon.react.TwilioVoice.TwilioVoiceModule$5.onDisconnected (TwilioVoiceModule.java:365)
com.twilio.voice.OutgoingCall$4.run (OutgoingCall.java:168)
At some point the callId becomes null
so the equals
method fails.
There must be a way to check for the presence of the ongoing notification and remove it, even without the callId.
After installing the package I'm getting an Unable to resolve module ReactNativeART
error when running the project.
RN version: 0.47.2
react-native-twilio-programmable-voice version: ^3.1.0
using IOS10.3 simulator
pod version: =2.0.0-beta15
Step to reproduce
The console message is
error: bundling failed: "Unable to resolve module
ReactNativeART
from/node_modules/react-native/Libraries/react-native/react-native-implementation.js
: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches:watchman watch-del-all
.\n 2. Delete thenode_modules
folder:rm -rf node_modules && npm install
.\n 3. Reset packager cache:rm -fr $TMPDIR/react-*
ornpm start -- --reset-cache
."
I've tried starting from scratch but still getting the same error.
Thanks
Please include following information for better support
What version of React Native are you running? "0.49.3"
What version of react-native-twilio-programmable-voice are you running? "^3.2.0"
What device are you using? Android 6 Device
Is your app running in foreground, background or not running? Runtime
Is there any relevant message in the log? Attempt to invoke virtual method 'boolean android.app.Activity.shouldShowRequestPermissionRationale(java.lang.String)' on a null object reference.
If i remove the requestPermissionForMicrophone
function isnide TwilioVoiceModule.java the error disappears.
I'm also requesting permission as recommended in app and manifest.
Any clue whats triggering the error?
Hi, can you please share how to resolve Invalid access token header
issue? I simply retrieve token from my local https://4f155c65.ngrok.io/token
server and verified the token is fine. however I still received `invalid access token header' when I make a call. thanks!!!
Twilio released SDKs beta4 and beta5, the Android part of this library still uses beta3
https://github.com/twilio/voice-quickstart-android/pull/14/files
https://github.com/twilio/voice-quickstart-android/pull/24/files
https://www.twilio.com/docs/api/voice-sdk/android/changelog
react-native 0.50.4
react-native-twilio-programmable-voice 3.18.0
Android One Plus 3
Android v 8.0.0
when there is an incoming call regardless of the app being on the foreground, when the app gets killed the incoming call notification stays, but neither of the button works.
Ideally the ANSWER button would restart the app, the REJECT button would reject the call and dismiss the incoming call notification.
If anyone knows how to handle this situation correctly, any help would be greatly appreciated.
RN 0.41.2
lib 0.6.0
Android ONE PLUS 3
When the App is closed from the tray, or dismissed the onHostDestroy()
method is not called and the active call is not terminated
TwilioVoice.initWithToken()
and TwilioVoice.connect()
did not work properly, after connect
executed it nothing is happening.
And also whatever the token used on initWithToken
(e.g. random string), it always return:
{
initilized: true,
}
Here is the code that I use:
import React, {Component} from 'react';
import {StyleSheet, Text, View, Button} from 'react-native';
import TwilioVoice from 'react-native-twilio-programmable-voice';
export default class App extends Component {
constructor() {
super(...arguments);
this.state = {
success: false,
};
}
async componentWillMount() {
try {
let success = await TwilioVoice.initWithToken('token');
console.log(success);
this.setState({success});
TwilioVoice.addEventListener('connectionDidConnect', () => {
console.log('>> TwilioVoice, Call connected.');
});
TwilioVoice.addEventListener('connectionDidDisconnect', () => {
console.log('>> TwilioVoice, Call disconnected.');
});
} catch (e) {
console.log('error token:', e);
}
}
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>Welcome!</Text>
<Button
title="Call"
onPress={() => {
if (this.state.success && this.state.success.initilized) {
try {
console.log('>> TwilioVoice, Calling...');
TwilioVoice.connect({To: '+62123456789'});
} catch (e) {
console.log('>> error:', e);
}
}
}}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});
What version of React Native are you running?
I use RN v0.47.2
What version of react-native-twilio-programmable-voice are you running?
I use v2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
I use iOS 10.2 simulator
Is your app running in foreground, background or not running?
It's running on foreground
Is there any relevant message in the log?
Nope, nothing
If using iOS, which pod version are you using?
I use pod v1.31
Step to reproduce
Just run it normally
I am trying to update from this repo: https://github.com/rogchap/react-native-twilio
But my app users App to app calling, no numbers.
Is this possible with this repo?
RN 0.43.4
react-native-twilio-programmable-voice 0.6.1
Android emulator 7.0.0
When I try to re-connect an outgoing call after receiving an Authorization error
I received another error: Wrong answer from a service
. Also the RegistrationListener().onRegistered()
method is called multiple times.
This is the exception: sending message to a Handler on a dead thread
E/TwilioVoice: outgoingCallListener onDisconnected error: 31201, Authorization error
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"err":"Authorization error","call_state":"DISCONNECTED","call_sid":null} }
D/TwilioVoice: sendEvent deviceReady params null
D/TwilioVoice: sendEvent deviceReady params null
D/TwilioVoice: connect params: { NativeMap: {"CallerId":"+441253530539","To":"+441992351888"} }
W/MessageQueue: Handler (android.os.Handler) {cd9baba} sending message to a Handler on a dead thread
java.lang.IllegalStateException: Handler (android.os.Handler) {cd9baba} sending message to a Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:543)
at android.os.Handler.enqueueMessage(Handler.java:643)
at android.os.Handler.sendMessageAtTime(Handler.java:612)
at android.os.Handler.sendMessageDelayed(Handler.java:582)
at android.os.Handler.post(Handler.java:338)
at com.twilio.voice.CallCommandHandlerImpl.postCommand(CallCommandHandlerImpl.java:34)
at com.twilio.voice.CallControlManager.call(CallControlManager.java:364)
at com.twilio.voice.VoiceClient.call(VoiceClient.java:121)
at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.connect(TwilioVoiceModule.java:588)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:345)
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:141)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:761)
D/TwilioVoice: sendEvent deviceReady params null
E/TwilioVoice: Error: 31404, Wrong answer from a service
D/TwilioVoice: sendEvent deviceNotReady params { NativeMap: {"err":"Wrong answer from a service"} }
D/TwilioVoice: sendEvent deviceReady params null
When I wait 2 seconds before retrying the call the error disappear and the call is connected
when answering a call
D/TwilioVoice: onMessageReceived senderId 839934664954
D/TwilioVoice: showNotification messageType: twilio.voice.call
D/MessagingService: Remote message received
D/TwilioVoice: sendEvent deviceDidReceiveIncoming params { NativeMap: {"call_state":"PENDING","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: sendEvent deviceDidReceiveIncoming params { NativeMap: {"call_state":"PENDING","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: sendEvent deviceDidReceiveIncoming params { NativeMap: {"call_state":"PENDING","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: sendEvent deviceDidReceiveIncoming params { NativeMap: {"call_state":"PENDING","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: sendEvent deviceDidReceiveIncoming params { NativeMap: {"call_state":"PENDING","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: sendEvent deviceDidReceiveIncoming params { NativeMap: {"call_state":"PENDING","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
W/EGL_emulation: eglSurfaceAttrib not implemented
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xd2d996c0, error=EGL_SUCCESS
I/PJSIP: 11:55:37.715 os_core_unix.c !pjlib 2.5.1 for POSIX initialized
D/PJSIP: 11:55:37.716 sip_endpoint.c .Creating endpoint instance...
I/PJSIP: 11:55:37.716 pjlib .select() I/O Queue created (0xcc416044)
I/PJSIP: 11:55:37.716 sip_endpoint.c .Module "mod-msg-print" registered
D/PJSIP: 11:55:37.716 sip_transport. .Transport manager created.
I/PJSIP: 11:55:37.716 pjsua_core.c .PJSUA state changed: NULL --> CREATED
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-pjsua-log" registered
I/PJSIP: 11:55:37.717 pjsua_core.c .Nameserver 8.8.8.8 added
I/PJSIP: 11:55:37.717 pjsua_core.c .Nameserver 192.168.1.254 added
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-tsx-layer" registered
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-stateful-util" registered
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-ua" registered
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-100rel" registered
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-pjsua" registered
I/PJSIP: 11:55:37.717 sip_endpoint.c .Module "mod-invite" registered
I/PJSIP: 11:55:37.717 opensl_dev.c ..OpenSL sound library initialized
I/PJSIP: 11:55:37.717 android_jni_de ..Android JNI sound library initialized
I/PJSIP: 11:55:37.717 pjlib ..select() I/O Queue created (0xd2d63814)
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-evsub" registered
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-presence" registered
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-mwi" registered
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-refer" registered
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-pjsua-pres" registered
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-pjsua-im" registered
I/PJSIP: 11:55:37.720 sip_endpoint.c .Module "mod-pjsua-options" registered
I/PJSIP: 11:55:37.720 pjsua_core.c .1 SIP worker threads created
W/PJSIP: 11:55:37.720 pjsua_core.c .pjsua version 2.5.1 for Linux-3.10/i686 initialized
I/PJSIP: 11:55:37.720 pjsua_core.c .PJSUA state changed: CREATED --> INIT
I/PJSIP: 11:55:37.722 tlstp:36585 SIP TLS listener is ready for incoming connections at 10.0.3.15:36585
I/PJSIP: 11:55:37.723 pjsua_core.c PJSUA state changed: INIT --> STARTING
I/PJSIP: 11:55:37.723 sip_endpoint.c .Module "mod-unsolicited-mwi" registered
I/PJSIP: 11:55:37.723 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING
I/PJSIP: 11:55:37.724 pjsua_acc.c Adding account: id=sip:[email protected]
I/PJSIP: 11:55:37.724 pjsua_acc.c .Account sip:[email protected] added with id 0
W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 1, track 16000 Hz, output 44100 Hz
W/AudioRecord: AUDIO_INPUT_FLAG_FAST denied by client; transfer 1, track 16000 Hz, primary 44100 Hz
A/PJSIP: 11:55:43.737 pjsua_call.c .Error making call: Too many objects of the specified type (PJ_ETOOMANY) [status=70010]
A/PJSIP: 11:55:43.737 pjsua_call.c .Error making call: Too many objects of the specified type (PJ_ETOOMANY) [status=70010]
E/TwilioVoice: incomingCallListener onDisconnected error: 31000, code:31000, message:Generic errorpjsua_call_make_call(): Too many objects of the specified type (PJ_ETOOMANY)
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","err":"code:31000, message:Generic errorpjsua_call_make_call(): Too many objects of the specified type (PJ_ETOOMANY)","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
E/TwilioVoice: incomingCallListener onDisconnected error: 31000, code:31000, message:Generic errorpjsua_call_make_call(): Too many objects of the specified type (PJ_ETOOMANY)
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","err":"code:31000, message:Generic errorpjsua_call_make_call(): Too many objects of the specified type (PJ_ETOOMANY)","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
I/Choreographer: Skipped 520 frames! The application may be doing too much work on its main thread.
D/TwilioVoice: sendEvent connectionDidConnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
E/TwilioVoice: incomingCallListener onDisconnected error: 31001, code:31001, message:TwiML application not found
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","err":"code:31001, message:TwiML application not found","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
E/TwilioVoice: incomingCallListener onDisconnected error: 31001, code:31001, message:TwiML application not found
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","err":"code:31001, message:TwiML application not found","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
E/TwilioVoice: incomingCallListener onDisconnected error: 31000, code:31000, message:Generic error
D/TwilioVoice: sendEvent connectionDidDisconnect params { NativeMap: {"call_state":"DISCONNECTED","call_to":"client:44786849XXXX","err":"code:31000, message:Generic error","call_from":"+44786849XXXX","call_sid":"CA02fd51d45b5c1c777a89e5cac8d7feca"} }
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: onMessageReceived senderId 839934664954
D/TwilioVoice: showNotification messageType: twilio.voice.cancel
D/TwilioVoice: incoming call cancelled
D/MessagingService: Remote message received
D/TwilioVoice: onIncomingCallCancelled: Incoming call from +44786849XXXX was cancelled active call null
D/TwilioVoice: sendEvent connectionDidDisconnect params null
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: onIncomingCallCancelled: Incoming call from +44786849XXXX was cancelled active call null
D/TwilioVoice: sendEvent connectionDidDisconnect params null
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: onIncomingCallCancelled: Incoming call from +44786849XXXX was cancelled active call null
D/TwilioVoice: sendEvent connectionDidDisconnect params null
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: onIncomingCallCancelled: Incoming call from +44786849XXXX was cancelled active call null
D/TwilioVoice: sendEvent connectionDidDisconnect params null
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: onIncomingCallCancelled: Incoming call from +44786849XXXX was cancelled active call null
D/TwilioVoice: sendEvent connectionDidDisconnect params null
D/TwilioVoice: failed Catalyst instance not active
D/TwilioVoice: onIncomingCallCancelled: Incoming call from +44786849XXXX was cancelled active call null
D/TwilioVoice: sendEvent connectionDidDisconnect params null
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.